@cimulate/copilot-widget 1.30.5 → 1.30.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/cimulate-copilot-widget.d.ts +6 -0
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +6 -0
- package/dist/messaging.es.js +2596 -2593
- package/dist/messaging.umd.js +31 -31
- package/package.json +1 -1
package/dist/messaging.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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 L7=Object.defineProperty,D7=Object.defineProperties;var M7=Object.getOwnPropertyDescriptors;var cd=Object.getOwnPropertySymbols;var g2=Object.prototype.hasOwnProperty,E2=Object.prototype.propertyIsEnumerable;var zo=(Me,Ye)=>(Ye=Symbol[Me])?Ye:Symbol.for("Symbol."+Me),F7=Me=>{throw TypeError(Me)},dd=Math.pow,o0=(Me,Ye,tt)=>Ye in Me?L7(Me,Ye,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Me[Ye]=tt,j=(Me,Ye)=>{for(var tt in Ye||(Ye={}))g2.call(Ye,tt)&&o0(Me,tt,Ye[tt]);if(cd)for(var tt of cd(Ye))E2.call(Ye,tt)&&o0(Me,tt,Ye[tt]);return Me},ue=(Me,Ye)=>D7(Me,M7(Ye));var _n=(Me,Ye)=>{var tt={};for(var pt in Me)g2.call(Me,pt)&&Ye.indexOf(pt)<0&&(tt[pt]=Me[pt]);if(Me!=null&&cd)for(var pt of cd(Me))Ye.indexOf(pt)<0&&E2.call(Me,pt)&&(tt[pt]=Me[pt]);return tt};var Xe=(Me,Ye,tt)=>o0(Me,typeof Ye!="symbol"?Ye+"":Ye,tt);var Fe=(Me,Ye,tt)=>new Promise((pt,kt)=>{var Tt=bt=>{try{Jt(tt.next(bt))}catch(gn){kt(gn)}},Ue=bt=>{try{Jt(tt.throw(bt))}catch(gn){kt(gn)}},Jt=bt=>bt.done?pt(bt.value):Promise.resolve(bt.value).then(Tt,Ue);Jt((tt=tt.apply(Me,Ye)).next())}),Cs=function(Me,Ye){this[0]=Me,this[1]=Ye},a0=(Me,Ye,tt)=>{var pt=(Jt,bt,gn,rr)=>{try{var Ui=tt[Jt](bt),Ns=(bt=Ui.value)instanceof Cs,ks=Ui.done;Promise.resolve(Ns?bt[0]:bt).then(wn=>Ns?pt(Jt==="return"?Jt:"next",bt[1]?{done:wn.done,value:wn.value}:wn,gn,rr):gn({value:wn,done:ks})).catch(wn=>pt("throw",wn,gn,rr))}catch(wn){rr(wn)}},kt=(Jt,bt,gn,rr)=>Ue[Jt]=Ui=>(bt=new Promise((Ns,ks,wn)=>(wn=()=>pt(Jt,Ui,Ns,ks),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,kt("next"),kt("throw"),kt("return"),Ue},u0=Me=>{var Ye=Me[zo("asyncIterator")],tt=!1,pt,kt={};return Ye==null?(Ye=Me[zo("iterator")](),pt=Tt=>kt[Tt]=Ue=>Ye[Tt](Ue)):(Ye=Ye.call(Me),pt=Tt=>kt[Tt]=Ue=>{if(tt){if(tt=!1,Tt==="throw")throw Ue;return Ue}return tt=!0,{done:!1,value:new Cs(new Promise(Jt=>{var bt=Ye[Tt](Ue);bt instanceof Object||F7("Object expected"),Jt(bt)}),1)}}),kt[zo("iterator")]=()=>kt,pt("next"),"throw"in Ye?pt("throw"):kt.throw=Tt=>{throw Tt},"return"in Ye&&pt("return"),kt},y2=(Me,Ye,tt)=>(Ye=Me[zo("asyncIterator")])?Ye.call(Me):(Me=Me[zo("iterator")](),Ye={},tt=(pt,kt)=>(kt=Me[pt])&&(Ye[pt]=Tt=>new Promise((Ue,Jt,bt)=>(Tt=kt.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-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-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 pt={exports:{}},kt={},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"),h=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 N(M,J,P){this.props=M,this.context=J,this.refs=v,this.updater=P||y}var I=N.prototype=new w;I.constructor=N,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,ke={},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)&&(ke[Ae]=J[Ae]);var je=arguments.length-2;if(je===1)ke.children=P;else if(1<je){for(var Ke=Array(je),ht=0;ht<je;ht++)Ke[ht]=arguments[ht+2];ke.children=Ke}if(M&&M.defaultProps)for(Ae in je=M.defaultProps,je)ke[Ae]===void 0&&(ke[Ae]=je[Ae]);return{$$typeof:e,type:M,key:ge,ref:Le,props:ke,_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 pe(M,J,P,Ae,ke){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,ke=ke(Le),M=Ae===""?"."+fe(Le,0):Ae,U(ke)?(P="",M!=null&&(P=M.replace(te,"$&/")+"/"),pe(ke,J,P,"",function(ht){return ht})):ke!=null&&(z(ke)&&(ke=le(ke,P+(!ke.key||Le&&Le.key===ke.key?"":(""+ke.key).replace(te,"$&/")+"/")+M)),J.push(ke)),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+=pe(ge,J,P,Ke,ke)}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+=pe(ge,J,P,Ke,ke);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=[],ke=0;return pe(M,Ae,"","",function(ge){return J.call(P,ge,ke++)}),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 C(){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=N,Ue.StrictMode=r,Ue.Suspense=d,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ue.act=C,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),ke=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&&(ke=""+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 ht=0;ht<Ke;ht++)je[ht]=arguments[ht+2];Ae.children=je}return{$$typeof:e,type:M.type,key:ke,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:h,_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=C,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 Ns(){if(Ui)return kt;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 h,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(h in d)r.call(d,h)&&!a.hasOwnProperty(h)&&(m[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:l,key:x,ref:y,props:m,_owner:s.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var ks;function wn(){return ks||(ks=1,pt.exports=Ns()),pt.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 fd={type:"error",data:"parser error"},l0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",c0=typeof ArrayBuffer=="function",d0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pd=({type:e,data:t},n,r)=>l0&&t instanceof Blob?n?r(t):f0(t,r):c0&&(t instanceof ArrayBuffer||d0(t))?n?r(t):f0(new Blob([t]),r):r(br[e]+(t||"")),f0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function p0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let hd;function _2(e,t){if(l0&&e.data instanceof Blob)return e.data.arrayBuffer().then(p0).then(t);if(c0&&(e.data instanceof ArrayBuffer||d0(e.data)))return t(p0(e.data));pd(e,!1,n=>{hd||(hd=new TextEncoder),t(hd.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 w2=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),h=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)],h[s++]=a<<2|u>>4,h[s++]=(u&15)<<4|l>>2,h[s++]=(l&3)<<6|d&63;return f},S2=typeof ArrayBuffer=="function",md=(e,t)=>{if(typeof e!="string")return{type:"message",data:m0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:v2(e.substring(1),t)}:_u[n]?e.length>1?{type:_u[n],data:e.substring(1)}:{type:_u[n]}:fd},v2=(e,t)=>{if(S2){const n=w2(e);return m0(n,t)}else return{base64:!0,data:e}},m0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g0="",A2=(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(g0))})})},C2=(e,t)=>{const n=e.split(g0),r=[];for(let s=0;s<n.length;s++){const a=md(n[s],t);if(r.push(a),a.type==="error")break}return r};function N2(){return new TransformStream({transform(e,t){_2(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 gd;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 k2(e,t){gd||(gd=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),h=f.getUint32(0);if(h>Math.pow(2,21)-1){l.enqueue(fd);break}s=h*Math.pow(2,32)+f.getUint32(4),r=3}else{if(wu(n)<s)break;const d=Su(n,s);l.enqueue(md(a?d:gd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(fd);break}}}})}const E0=4;function Ft(e){if(e)return O2(e)}function O2(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")(),I2="arraybuffer";function B7(){}function y0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const P2=Yn.setTimeout,R2=Yn.clearTimeout;function Au(e,t){t.useNativeTimers?(e.setTimeoutFn=P2.bind(Yn),e.clearTimeoutFn=R2.bind(Yn)):(e.setTimeoutFn=Yn.setTimeout.bind(Yn),e.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const L2=1.33;function D2(e){return typeof e=="string"?M2(e):Math.ceil((e.byteLength||e.size)*L2)}function M2(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 T0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function F2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function B2(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 U2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ed 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 U2(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=md(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=F2(t);return n.length?"?"+n:""}}class H2 extends Ed{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)};C2(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,A2(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]=T0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let b0=!1;try{b0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const j2=b0;function $2(){}class z2 extends H2{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=y0(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=$2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete xr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(xr.requestsCount=0,xr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",x0);else if(typeof addEventListener=="function"){const e="onpagehide"in Yn?"pagehide":"unload";addEventListener(e,x0,!1)}}function x0(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const V2=(function(){const e=_0({xdomain:!1});return e&&e.responseType!==null})();class q2 extends z2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=V2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(_0,this.uri(),t)}}function _0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||j2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const w0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Y2 extends Ed{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=w0?{}:y0(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]=T0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yd=Yn.WebSocket||Yn.MozWebSocket;class W2 extends Y2{createSocket(t,n,r){return w0?new yd(t,n,r):n?new yd(t,n):new yd(t)}doWrite(t,n){this.ws.send(n)}}class G2 extends Ed{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=k2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=N2();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 X2={websocket:W2,webtransport:G2,polling:q2},Q2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Td(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=Q2.exec(e||""),a={},u=14;for(;u--;)a[K2[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=J2(a,a.path),a.queryKey=Z2(a,a.query),a}function J2(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 Z2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const bd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cu=[];bd&&addEventListener("offline",()=>{Cu.forEach(e=>e())},!1);class ii extends Ft{constructor(t,n){if(super(),this.binaryType=I2,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=Td(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=Td(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=B2(this.opts.query)),bd&&(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"})},Cu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=E0,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+=D2(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(),bd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Cu.indexOf(this._offlineEventListener);r!==-1&&Cu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ii.protocol=E0;class eS 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"&&(h(),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,h(),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 h=()=>{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 tS=class extends eS{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=>X2[a]).filter(a=>!!a)),super(r?s:t,s)}};function nS(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=Td(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 rS=typeof ArrayBuffer=="function",iS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,S0=Object.prototype.toString,sS=typeof Blob=="function"||typeof Blob!="undefined"&&S0.call(Blob)==="[object BlobConstructor]",oS=typeof File=="function"||typeof File!="undefined"&&S0.call(File)==="[object FileConstructor]";function xd(e){return rS&&(e instanceof ArrayBuffer||iS(e))||sS&&e instanceof Blob||oS&&e instanceof File}function Nu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Nu(e[n]))return!0;return!1}if(xd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Nu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Nu(e[n]))return!0;return!1}function aS(e){const t=[],n=e.data,r=e;return r.data=ku(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ku(e,t,n){if(!e)return e;if(xd(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]=ku(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return ku(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=ku(e[s],t));return r}return e}function uS(e,t){return e.data=_d(e.data,t),delete e.attachments,e}function _d(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]=_d(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=_d(e[n],t));return e}const lS=["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 cS{constructor(t){this.replacer=t}encode(t){return(t.type===rt.EVENT||t.type===rt.ACK)&&Nu(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=aS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class wd 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 dS(n)):super.emitReserved("decoded",n)}else if(xd(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(!fS(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(wd.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 v0(n);case rt.DISCONNECT:return n===void 0;case rt.CONNECT_ERROR:return typeof n=="string"||v0(n);case rt.EVENT:case rt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lS.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 dS{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=uS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function v0(e){return Object.prototype.toString.call(e)==="[object Object]"}const pS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wd,Encoder:cS,get PacketType(){return rt}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class A0 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(hS.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 h=this.ids++,m=n.pop();this._registerAckCallback(h,m),u.id=h}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 Sd 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||pS;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 tS(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 A0(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 vd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=nS(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 Sd(r,t):(qo[s]||(qo[s]=new Sd(r,t)),d=qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(vd,{Manager:Sd,Socket:A0,io:vd,connect:vd});const C0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&C0.call(Blob),typeof File=="function"||typeof File!="undefined"&&C0.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 Ad="cimulate",Cd=`${Ad}:pdp-update`,Nd=`${Ad}:ui-state-update`,kd=`${Ad}:prompts-state-update`,mS=e=>{window.addEventListener(Cd,e)},gS=e=>{window.removeEventListener(Cd,e)},ES=(e,t,n)=>{const r=new CustomEvent(Cd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class yS{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)=>(ES(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 yS,k0=["ask_cim","search","browse","pdp"],O0=e=>k0.includes(e),I0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(I0)),new Map(Object.entries(I0).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 TS{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 bS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!O0(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 xS=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 _S{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,`
|
|
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 M7=Object.defineProperty,F7=Object.defineProperties;var B7=Object.getOwnPropertyDescriptors;var cd=Object.getOwnPropertySymbols;var g2=Object.prototype.hasOwnProperty,E2=Object.prototype.propertyIsEnumerable;var zo=(Me,Ye)=>(Ye=Symbol[Me])?Ye:Symbol.for("Symbol."+Me),U7=Me=>{throw TypeError(Me)},dd=Math.pow,o0=(Me,Ye,tt)=>Ye in Me?M7(Me,Ye,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Me[Ye]=tt,j=(Me,Ye)=>{for(var tt in Ye||(Ye={}))g2.call(Ye,tt)&&o0(Me,tt,Ye[tt]);if(cd)for(var tt of cd(Ye))E2.call(Ye,tt)&&o0(Me,tt,Ye[tt]);return Me},ue=(Me,Ye)=>F7(Me,B7(Ye));var xn=(Me,Ye)=>{var tt={};for(var pt in Me)g2.call(Me,pt)&&Ye.indexOf(pt)<0&&(tt[pt]=Me[pt]);if(Me!=null&&cd)for(var pt of cd(Me))Ye.indexOf(pt)<0&&E2.call(Me,pt)&&(tt[pt]=Me[pt]);return tt};var Xe=(Me,Ye,tt)=>o0(Me,typeof Ye!="symbol"?Ye+"":Ye,tt);var Fe=(Me,Ye,tt)=>new Promise((pt,kt)=>{var Tt=bt=>{try{Jt(tt.next(bt))}catch(gn){kt(gn)}},Ue=bt=>{try{Jt(tt.throw(bt))}catch(gn){kt(gn)}},Jt=bt=>bt.done?pt(bt.value):Promise.resolve(bt.value).then(Tt,Ue);Jt((tt=tt.apply(Me,Ye)).next())}),Cs=function(Me,Ye){this[0]=Me,this[1]=Ye},a0=(Me,Ye,tt)=>{var pt=(Jt,bt,gn,rr)=>{try{var Ui=tt[Jt](bt),Ns=(bt=Ui.value)instanceof Cs,ks=Ui.done;Promise.resolve(Ns?bt[0]:bt).then(wn=>Ns?pt(Jt==="return"?Jt:"next",bt[1]?{done:wn.done,value:wn.value}:wn,gn,rr):gn({value:wn,done:ks})).catch(wn=>pt("throw",wn,gn,rr))}catch(wn){rr(wn)}},kt=(Jt,bt,gn,rr)=>Ue[Jt]=Ui=>(bt=new Promise((Ns,ks,wn)=>(wn=()=>pt(Jt,Ui,Ns,ks),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,kt("next"),kt("throw"),kt("return"),Ue},u0=Me=>{var Ye=Me[zo("asyncIterator")],tt=!1,pt,kt={};return Ye==null?(Ye=Me[zo("iterator")](),pt=Tt=>kt[Tt]=Ue=>Ye[Tt](Ue)):(Ye=Ye.call(Me),pt=Tt=>kt[Tt]=Ue=>{if(tt){if(tt=!1,Tt==="throw")throw Ue;return Ue}return tt=!0,{done:!1,value:new Cs(new Promise(Jt=>{var bt=Ye[Tt](Ue);bt instanceof Object||U7("Object expected"),Jt(bt)}),1)}}),kt[zo("iterator")]=()=>kt,pt("next"),"throw"in Ye?pt("throw"):kt.throw=Tt=>{throw Tt},"return"in Ye&&pt("return"),kt},y2=(Me,Ye,tt)=>(Ye=Me[zo("asyncIterator")])?Ye.call(Me):(Me=Me[zo("iterator")](),Ye={},tt=(pt,kt)=>(kt=Me[pt])&&(Ye[pt]=Tt=>new Promise((Ue,Jt,bt)=>(Tt=kt.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:.875rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-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 pt={exports:{}},kt={},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"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function _(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(){}},b=Object.assign,v={};function A(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(D,J){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,J,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=A.prototype;function N(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}var I=N.prototype=new w;I.constructor=N,b(I,A.prototype),I.isPureReactComponent=!0;var U=Array.isArray,G=Object.prototype.hasOwnProperty,M={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,J,P){var Ae,ke={},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)&&(ke[Ae]=J[Ae]);var je=arguments.length-2;if(je===1)ke.children=P;else if(1<je){for(var Ke=Array(je),ht=0;ht<je;ht++)Ke[ht]=arguments[ht+2];ke.children=Ke}if(D&&D.defaultProps)for(Ae in je=D.defaultProps,je)ke[Ae]===void 0&&(ke[Ae]=je[Ae]);return{$$typeof:e,type:D,key:ge,ref:Le,props:ke,_owner:M.current}}function de(D,J){return{$$typeof:e,type:D.type,key:J,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function oe(D){var J={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(P){return J[P]})}var te=/\/+/g;function fe(D,J){return typeof D=="object"&&D!==null&&D.key!=null?oe(""+D.key):J.toString(36)}function pe(D,J,P,Ae,ke){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,ke=ke(Le),D=Ae===""?"."+fe(Le,0):Ae,U(ke)?(P="",D!=null&&(P=D.replace(te,"$&/")+"/"),pe(ke,J,P,"",function(ht){return ht})):ke!=null&&($(ke)&&(ke=de(ke,P+(!ke.key||Le&&Le.key===ke.key?"":(""+ke.key).replace(te,"$&/")+"/")+D)),J.push(ke)),1;if(Le=0,Ae=Ae===""?".":Ae+":",U(D))for(var je=0;je<D.length;je++){ge=D[je];var Ke=Ae+fe(ge,je);Le+=pe(ge,J,P,Ke,ke)}else if(Ke=_(D),typeof Ke=="function")for(D=Ke.call(D),je=0;!(ge=D.next()).done;)ge=ge.value,Ke=Ae+fe(ge,je++),Le+=pe(ge,J,P,Ke,ke);else if(ge==="object")throw J=String(D),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Le}function ce(D,J,P){if(D==null)return D;var Ae=[],ke=0;return pe(D,Ae,"","",function(ge){return J.call(P,ge,ke++)}),Ae}function we(D){if(D._status===-1){var J=D._result;J=J(),J.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=J)}if(D._status===1)return D._result.default;throw D._result}var le={current:null},W={transition:null},re={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:W,ReactCurrentOwner:M};function C(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:ce,forEach:function(D,J,P){ce(D,function(){J.apply(this,arguments)},P)},count:function(D){var J=0;return ce(D,function(){J++}),J},toArray:function(D){return ce(D,function(J){return J})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Ue.Component=A,Ue.Fragment=n,Ue.Profiler=s,Ue.PureComponent=N,Ue.StrictMode=r,Ue.Suspense=d,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ue.act=C,Ue.cloneElement=function(D,J,P){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Ae=b({},D.props),ke=D.key,ge=D.ref,Le=D._owner;if(J!=null){if(J.ref!==void 0&&(ge=J.ref,Le=M.current),J.key!==void 0&&(ke=""+J.key),D.type&&D.type.defaultProps)var je=D.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 ht=0;ht<Ke;ht++)je[ht]=arguments[ht+2];Ae.children=je}return{$$typeof:e,type:D.type,key:ke,ref:ge,props:Ae,_owner:Le}},Ue.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},Ue.createElement=ie,Ue.createFactory=function(D){var J=ie.bind(null,D);return J.type=D,J},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(D){return{$$typeof:l,render:D}},Ue.isValidElement=$,Ue.lazy=function(D){return{$$typeof:h,_payload:{_status:-1,_result:D},_init:we}},Ue.memo=function(D,J){return{$$typeof:f,type:D,compare:J===void 0?null:J}},Ue.startTransition=function(D){var J=W.transition;W.transition={};try{D()}finally{W.transition=J}},Ue.unstable_act=C,Ue.useCallback=function(D,J){return le.current.useCallback(D,J)},Ue.useContext=function(D){return le.current.useContext(D)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(D){return le.current.useDeferredValue(D)},Ue.useEffect=function(D,J){return le.current.useEffect(D,J)},Ue.useId=function(){return le.current.useId()},Ue.useImperativeHandle=function(D,J,P){return le.current.useImperativeHandle(D,J,P)},Ue.useInsertionEffect=function(D,J){return le.current.useInsertionEffect(D,J)},Ue.useLayoutEffect=function(D,J){return le.current.useLayoutEffect(D,J)},Ue.useMemo=function(D,J){return le.current.useMemo(D,J)},Ue.useReducer=function(D,J,P){return le.current.useReducer(D,J,P)},Ue.useRef=function(D){return le.current.useRef(D)},Ue.useState=function(D){return le.current.useState(D)},Ue.useSyncExternalStore=function(D,J,P){return le.current.useSyncExternalStore(D,J,P)},Ue.useTransition=function(){return le.current.useTransition()},Ue.version="18.3.1",Ue}var gn;function rr(){return gn||(gn=1,Tt.exports=bt()),Tt.exports}var Ui;function Ns(){if(Ui)return kt;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 h,m={},_=null,y=null;f!==void 0&&(_=""+f),d.key!==void 0&&(_=""+d.key),d.ref!==void 0&&(y=d.ref);for(h in d)r.call(d,h)&&!a.hasOwnProperty(h)&&(m[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:l,key:_,ref:y,props:m,_owner:s.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var ks;function wn(){return ks||(ks=1,pt.exports=Ns()),pt.exports}var x=wn(),L=rr();const Hi=tt(L),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 xu=Object.create(null);Object.keys(br).forEach(e=>{xu[br[e]]=e});const fd={type:"error",data:"parser error"},l0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",c0=typeof ArrayBuffer=="function",d0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pd=({type:e,data:t},n,r)=>l0&&t instanceof Blob?n?r(t):f0(t,r):c0&&(t instanceof ArrayBuffer||d0(t))?n?r(t):f0(new Blob([t]),r):r(br[e]+(t||"")),f0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function p0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let hd;function x2(e,t){if(l0&&e.data instanceof Blob)return e.data.arrayBuffer().then(p0).then(t);if(c0&&(e.data instanceof ArrayBuffer||d0(e.data)))return t(p0(e.data));pd(e,!1,n=>{hd||(hd=new TextEncoder),t(hd.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 w2=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),h=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)],h[s++]=a<<2|u>>4,h[s++]=(u&15)<<4|l>>2,h[s++]=(l&3)<<6|d&63;return f},S2=typeof ArrayBuffer=="function",md=(e,t)=>{if(typeof e!="string")return{type:"message",data:m0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:v2(e.substring(1),t)}:xu[n]?e.length>1?{type:xu[n],data:e.substring(1)}:{type:xu[n]}:fd},v2=(e,t)=>{if(S2){const n=w2(e);return m0(n,t)}else return{base64:!0,data:e}},m0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g0="",A2=(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(g0))})})},C2=(e,t)=>{const n=e.split(g0),r=[];for(let s=0;s<n.length;s++){const a=md(n[s],t);if(r.push(a),a.type==="error")break}return r};function N2(){return new TransformStream({transform(e,t){x2(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 gd;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 k2(e,t){gd||(gd=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),h=f.getUint32(0);if(h>Math.pow(2,21)-1){l.enqueue(fd);break}s=h*Math.pow(2,32)+f.getUint32(4),r=3}else{if(wu(n)<s)break;const d=Su(n,s);l.enqueue(md(a?d:gd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(fd);break}}}})}const E0=4;function Ft(e){if(e)return O2(e)}function O2(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")(),I2="arraybuffer";function H7(){}function y0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const P2=Yn.setTimeout,R2=Yn.clearTimeout;function Au(e,t){t.useNativeTimers?(e.setTimeoutFn=P2.bind(Yn),e.clearTimeoutFn=R2.bind(Yn)):(e.setTimeoutFn=Yn.setTimeout.bind(Yn),e.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const L2=1.33;function D2(e){return typeof e=="string"?M2(e):Math.ceil((e.byteLength||e.size)*L2)}function M2(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 T0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function F2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function B2(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 U2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ed 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 U2(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=md(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=F2(t);return n.length?"?"+n:""}}class H2 extends Ed{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)};C2(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,A2(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]=T0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let b0=!1;try{b0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const j2=b0;function $2(){}class z2 extends H2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class _r extends 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=y0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=$2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",_0);else if(typeof addEventListener=="function"){const e="onpagehide"in Yn?"pagehide":"unload";addEventListener(e,_0,!1)}}function _0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const V2=(function(){const e=x0({xdomain:!1});return e&&e.responseType!==null})();class q2 extends z2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=V2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(x0,this.uri(),t)}}function x0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||j2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const w0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Y2 extends Ed{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=w0?{}:y0(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]=T0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yd=Yn.WebSocket||Yn.MozWebSocket;class W2 extends Y2{createSocket(t,n,r){return w0?new yd(t,n,r):n?new yd(t,n):new yd(t)}doWrite(t,n){this.ws.send(n)}}class G2 extends Ed{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=k2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=N2();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 X2={websocket:W2,webtransport:G2,polling:q2},Q2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Td(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=Q2.exec(e||""),a={},u=14;for(;u--;)a[K2[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=J2(a,a.path),a.queryKey=Z2(a,a.query),a}function J2(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 Z2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const bd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cu=[];bd&&addEventListener("offline",()=>{Cu.forEach(e=>e())},!1);class ii extends Ft{constructor(t,n){if(super(),this.binaryType=I2,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=Td(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=Td(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=B2(this.opts.query)),bd&&(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"})},Cu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=E0,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+=D2(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(),bd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Cu.indexOf(this._offlineEventListener);r!==-1&&Cu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ii.protocol=E0;class eS 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"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=n.name,this.emitReserved("upgradeError",_)}}))};function a(){r||(r=!0,h(),n.close(),n=null)}const u=m=>{const _=new Error("probe error: "+m);_.transport=n.name,a(),this.emitReserved("upgradeError",_)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const h=()=>{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 tS=class extends eS{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=>X2[a]).filter(a=>!!a)),super(r?s:t,s)}};function nS(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=Td(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 rS=typeof ArrayBuffer=="function",iS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,S0=Object.prototype.toString,sS=typeof Blob=="function"||typeof Blob!="undefined"&&S0.call(Blob)==="[object BlobConstructor]",oS=typeof File=="function"||typeof File!="undefined"&&S0.call(File)==="[object FileConstructor]";function _d(e){return rS&&(e instanceof ArrayBuffer||iS(e))||sS&&e instanceof Blob||oS&&e instanceof File}function Nu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Nu(e[n]))return!0;return!1}if(_d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Nu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Nu(e[n]))return!0;return!1}function aS(e){const t=[],n=e.data,r=e;return r.data=ku(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ku(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]=ku(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return ku(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=ku(e[s],t));return r}return e}function uS(e,t){return e.data=xd(e.data,t),delete e.attachments,e}function xd(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]=xd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=xd(e[n],t));return e}const lS=["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 cS{constructor(t){this.replacer=t}encode(t){return(t.type===rt.EVENT||t.type===rt.ACK)&&Nu(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=aS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class wd 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 dS(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(!fS(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(wd.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 v0(n);case rt.DISCONNECT:return n===void 0;case rt.CONNECT_ERROR:return typeof n=="string"||v0(n);case rt.EVENT:case rt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lS.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 dS{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=uS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function v0(e){return Object.prototype.toString.call(e)==="[object Object]"}const pS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wd,Encoder:cS,get PacketType(){return rt}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class A0 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(hS.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 h=this.ids++,m=n.pop();this._registerAckCallback(h,m),u.id=h}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 Sd 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||pS;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 tS(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 A0(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 vd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=nS(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 Sd(r,t):(qo[s]||(qo[s]=new Sd(r,t)),d=qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(vd,{Manager:Sd,Socket:A0,io:vd,connect:vd});const C0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&C0.call(Blob),typeof File=="function"||typeof File!="undefined"&&C0.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 Ad="cimulate",Cd=`${Ad}:pdp-update`,Nd=`${Ad}:ui-state-update`,kd=`${Ad}:prompts-state-update`,mS=e=>{window.addEventListener(Cd,e)},gS=e=>{window.removeEventListener(Cd,e)},ES=(e,t,n)=>{const r=new CustomEvent(Cd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class yS{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)=>(ES(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 yS,k0=["ask_cim","search","browse","pdp"],O0=e=>k0.includes(e),I0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(I0)),new Map(Object.entries(I0).map(([e,t])=>[t,e]));const _t=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class TS{constructor(t=!1){Xe(this,"isDevelopment");Xe(this,"_log",(t,n,...r)=>{_t(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const bS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!O0(e.type)){_t(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&_t(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){_t(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Yo.updateProxy(e.params);return}_t(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let _S=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 xS{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
4
|
`);(l=s.indexOf(`
|
|
5
5
|
|
|
6
6
|
`))>=0;){const d=s.slice(0,l);s=s.slice(l+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
|
|
7
7
|
`))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const s=r.join(`
|
|
8
|
-
`);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Hr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let wS=class extends Hr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class P0 extends Hr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Od=class extends Hr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class SS{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 vS="0Mw";let AS=class extends xS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,h,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:(h=s.enableLogging)!=null?h:!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 SS(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 _S(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 h=this.getNestedString(l,"tokenType");h&&(s=h)}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((h,m)=>{var A,w,N;const x=h.participant,y=h.displayName||(x==null?void 0:x.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",b=(x==null?void 0:x.role)||((N=(w=t.conversationEntry)==null?void 0:w.sender)==null?void 0:N.role)||"",v=h.operation||h.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 h=((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:h},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 Od("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 h={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(h.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,h);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 Od(`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 Od(`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 wS(`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 P0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),h=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${h.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,h));continue}throw new P0(`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(vS))}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 R0="onCimulateWidgetReady",k="cim-widget",Mn=`--${k}`,si={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},CS=(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 NS{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 IS(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 NS,kS=e=>{window.addEventListener(Nd,e)},OS=e=>{window.removeEventListener(Nd,e)},IS=(e,t)=>{const n=new CustomEvent(Nd,{detail:{property:e,value:t}});window.dispatchEvent(n)},PS=e=>{at.connectedProxy.connected=e},L0=e=>{if(!O0(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)},Id=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"},Pd=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},RS=e=>{const t=at.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;at.dialogProxy.isFullHeight=n};function D0(e,t){return function(){return e.apply(t,arguments)}}const{toString:LS}=Object.prototype,{getPrototypeOf:Is}=Object,{iterator:Wo,toStringTag:M0}=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},DS=(e,t)=>e!=null&&Go(e,t)?e[t]:void 0,Rd=(e=>t=>{const n=LS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Rd(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 F0=sr("ArrayBuffer");function MS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&F0(e.buffer),t}const FS=Ru("string"),Sn=Ru("function"),B0=Ru("number"),Ls=e=>e!==null&&typeof e=="object",BS=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,M0)&&!Go(e,Wo)},US=e=>{if(!Ls(e)||Rs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},HS=sr("Date"),jS=sr("File"),$S=e=>!!(e&&typeof e.uri!="undefined"),zS=e=>e&&typeof e.getParts!="undefined",VS=sr("Blob"),qS=sr("FileList"),YS=e=>Ls(e)&&Sn(e.pipe);function WS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const U0=WS(),H0=typeof U0.FormData!="undefined"?U0.FormData:void 0,GS=e=>{if(!e)return!1;if(H0&&e instanceof H0)return!0;const t=Is(e);if(!t||t===Object.prototype||!Sn(e.append))return!1;const n=Rd(e);return n==="formdata"||n==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"},XS=sr("URLSearchParams"),[QS,KS,JS,ZS]=["ReadableStream","Request","Response","Headers"].map(sr),ev=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 j0(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,$0=e=>!Ps(e)&&e!==$i;function Ld(...e){const{caseless:t,skipUndefined:n}=$0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&j0(r,u)||u,d=Pu(r,l)?r[l]:void 0;Lu(d)&&Lu(a)?r[l]=Ld(d,a):Lu(a)?r[l]=Ld({},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 h=d[f];fv.call(l,h)&&s(l[h],h)}}return r}const tv=(e,t,n,{allOwnKeys:r}={})=>(Xo(t,(s,a)=>{n&&Sn(s)?Object.defineProperty(e,a,{__proto__:null,value:D0(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),nv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rv=(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)},iv=(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},sv=(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},ov=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!B0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},av=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Is(Uint8Array)),uv=(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])}},lv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cv=sr("HTMLFormElement"),dv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:fv}=Object.prototype,pv=sr("RegExp"),z0=(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)},hv=e=>{z0(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+"'")})}})},mv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?r(e):r(String(e).split(t)),n},gv=()=>{},Ev=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yv(e){return!!(e&&Sn(e.append)&&e[M0]==="FormData"&&e[Wo])}const Tv=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)},bv=sr("AsyncFunction"),xv=e=>e&&(Ls(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch),V0=((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)),_v=typeof queueMicrotask!="undefined"?queueMicrotask.bind($i):typeof process!="undefined"&&process.nextTick||V0,q0=e=>e!=null&&Sn(e[Wo]),Y={isArray:ji,isArrayBuffer:F0,isBuffer:Rs,isFormData:GS,isArrayBufferView:MS,isString:FS,isNumber:B0,isBoolean:BS,isObject:Ls,isPlainObject:Lu,isEmptyObject:US,isReadableStream:QS,isRequest:KS,isResponse:JS,isHeaders:ZS,isUndefined:Ps,isDate:HS,isFile:jS,isReactNativeBlob:$S,isReactNative:zS,isBlob:VS,isRegExp:pv,isFunction:Sn,isStream:YS,isURLSearchParams:XS,isTypedArray:av,isFileList:qS,forEach:Xo,merge:Ld,extend:tv,trim:ev,stripBOM:nv,inherits:rv,toFlatObject:iv,kindOf:Rd,kindOfTest:sr,endsWith:sv,toArray:ov,forEachEntry:uv,matchAll:lv,isHTMLForm:cv,hasOwnProperty:Pu,hasOwnProp:Pu,hasOwnInPrototypeChain:Go,getSafeProp:DS,reduceDescriptors:z0,freezeMethods:hv,toObjectSet:mv,toCamelCase:dv,noop:gv,toFiniteNumber:Ev,findKey:j0,global:$i,isContextDefined:$0,isSpecCompliantForm:yv,toJSONObject:Tv,isAsyncFn:bv,isThenable:xv,setImmediate:V0,asap:_v,isIterable:q0,isSafeIterable:e=>e!=null&&Go(e,Wo)&&q0(e)},wv=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"]),Sv=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
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 wS=class extends Hr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class P0 extends Hr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Od=class extends Hr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class SS{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 vS="0Mw";let AS=class extends _S{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,h,m,_;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:(h=s.enableLogging)!=null?h:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(_=s.capabilitiesVersion)!=null?_:"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 SS(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 xS(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 h=this.getNestedString(l,"tokenType");h&&(s=h)}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((h,m)=>{var A,w,N;const _=h.participant,y=h.displayName||(_==null?void 0:_.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",b=(_==null?void 0:_.role)||((N=(w=t.conversationEntry)==null?void 0:w.sender)==null?void 0:N.role)||"",v=h.operation||h.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 h=((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:h},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 Od("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 h={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(h.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,h);if(clearTimeout(l),!m.ok){const _=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 Od(`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 Od(`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 wS(`Request ${t} ${n} failed (${m.status}): ${_}`,m.status,_)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(_=>_?JSON.parse(_):null)}catch(d){if(clearTimeout(l),d instanceof Hr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new P0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),h=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${h.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,h));continue}throw new P0(`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(vS))}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 R0="onCimulateWidgetReady",k="cim-widget",Mn=`--${k}`,si={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},CS=(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 NS{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 IS(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 NS,kS=e=>{window.addEventListener(Nd,e)},OS=e=>{window.removeEventListener(Nd,e)},IS=(e,t)=>{const n=new CustomEvent(Nd,{detail:{property:e,value:t}});window.dispatchEvent(n)},PS=e=>{at.connectedProxy.connected=e},L0=e=>{if(!O0(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)},Id=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"},Pd=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},RS=e=>{const t=at.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;at.dialogProxy.isFullHeight=n};function D0(e,t){return function(){return e.apply(t,arguments)}}const{toString:LS}=Object.prototype,{getPrototypeOf:Is}=Object,{iterator:Wo,toStringTag:M0}=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},DS=(e,t)=>e!=null&&Go(e,t)?e[t]:void 0,Rd=(e=>t=>{const n=LS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Rd(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 F0=sr("ArrayBuffer");function MS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&F0(e.buffer),t}const FS=Ru("string"),Sn=Ru("function"),B0=Ru("number"),Ls=e=>e!==null&&typeof e=="object",BS=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,M0)&&!Go(e,Wo)},US=e=>{if(!Ls(e)||Rs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},HS=sr("Date"),jS=sr("File"),$S=e=>!!(e&&typeof e.uri!="undefined"),zS=e=>e&&typeof e.getParts!="undefined",VS=sr("Blob"),qS=sr("FileList"),YS=e=>Ls(e)&&Sn(e.pipe);function WS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const U0=WS(),H0=typeof U0.FormData!="undefined"?U0.FormData:void 0,GS=e=>{if(!e)return!1;if(H0&&e instanceof H0)return!0;const t=Is(e);if(!t||t===Object.prototype||!Sn(e.append))return!1;const n=Rd(e);return n==="formdata"||n==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"},XS=sr("URLSearchParams"),[QS,KS,JS,ZS]=["ReadableStream","Request","Response","Headers"].map(sr),ev=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 j0(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,$0=e=>!Ps(e)&&e!==$i;function Ld(...e){const{caseless:t,skipUndefined:n}=$0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&j0(r,u)||u,d=Pu(r,l)?r[l]:void 0;Lu(d)&&Lu(a)?r[l]=Ld(d,a):Lu(a)?r[l]=Ld({},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 h=d[f];fv.call(l,h)&&s(l[h],h)}}return r}const tv=(e,t,n,{allOwnKeys:r}={})=>(Xo(t,(s,a)=>{n&&Sn(s)?Object.defineProperty(e,a,{__proto__:null,value:D0(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),nv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rv=(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)},iv=(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},sv=(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},ov=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!B0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},av=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Is(Uint8Array)),uv=(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])}},lv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cv=sr("HTMLFormElement"),dv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:fv}=Object.prototype,pv=sr("RegExp"),z0=(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)},hv=e=>{z0(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+"'")})}})},mv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?r(e):r(String(e).split(t)),n},gv=()=>{},Ev=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yv(e){return!!(e&&Sn(e.append)&&e[M0]==="FormData"&&e[Wo])}const Tv=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)},bv=sr("AsyncFunction"),_v=e=>e&&(Ls(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch),V0=((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)),xv=typeof queueMicrotask!="undefined"?queueMicrotask.bind($i):typeof process!="undefined"&&process.nextTick||V0,q0=e=>e!=null&&Sn(e[Wo]),Y={isArray:ji,isArrayBuffer:F0,isBuffer:Rs,isFormData:GS,isArrayBufferView:MS,isString:FS,isNumber:B0,isBoolean:BS,isObject:Ls,isPlainObject:Lu,isEmptyObject:US,isReadableStream:QS,isRequest:KS,isResponse:JS,isHeaders:ZS,isUndefined:Ps,isDate:HS,isFile:jS,isReactNativeBlob:$S,isReactNative:zS,isBlob:VS,isRegExp:pv,isFunction:Sn,isStream:YS,isURLSearchParams:XS,isTypedArray:av,isFileList:qS,forEach:Xo,merge:Ld,extend:tv,trim:ev,stripBOM:nv,inherits:rv,toFlatObject:iv,kindOf:Rd,kindOfTest:sr,endsWith:sv,toArray:ov,forEachEntry:uv,matchAll:lv,isHTMLForm:cv,hasOwnProperty:Pu,hasOwnProp:Pu,hasOwnInPrototypeChain:Go,getSafeProp:DS,reduceDescriptors:z0,freezeMethods:hv,toObjectSet:mv,toCamelCase:dv,noop:gv,toFiniteNumber:Ev,findKey:j0,global:$i,isContextDefined:$0,isSpecCompliantForm:yv,toJSONObject:Tv,isAsyncFn:bv,isThenable:_v,setImmediate:V0,asap:xv,isIterable:q0,isSafeIterable:e=>e!=null&&Go(e,Wo)&&q0(e)},wv=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"]),Sv=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
9
9
|
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&wv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function vv(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 Av=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Cv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Dd(e,t){return Y.isArray(e)?e.map(n=>Dd(n,t)):vv(String(e).replace(t,""))}const Nv=e=>Dd(e,Av),kv=e=>Dd(e,Cv);function Y0(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=kv(n)}),t}const W0=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):Nv(String(e))}function Ov(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 Iv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Md(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 Pv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Rv(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 h=Qo(d);if(!h)return;const m=Y.findKey(s,h);(!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,h)=>a(f,h,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!Iv(t))u(Sv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const h of t){if(!Y.isArray(h))throw new TypeError("Object iterator must return a key-value pair");f=h[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,h[1]]:[d,h[1]]):l[f]=h[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 Ov(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||Md(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||Md(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||Md(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?Pv(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[W0]=this[W0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=Qo(u);r[l]||(Rv(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 Lv="[REDACTED ****]";function Dv(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 Mv(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)&&Dv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?Lv:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ce=class T2 extends Error{static from(t,n,r,s,a,u){const l=new T2(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?Mv(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}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Fv=null,G0=100;function Fd(e){return Y.isPlainObject(e)||Y.isArray(e)}function X0(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Bd(e,t,n){return e?e.concat(t).map(function(s,a){return s=X0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Bv(e){return Y.isArray(e)&&!e.some(Fd)}const Uv=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(N,I){return!Y.isUndefined(I[N])});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?G0:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),h=[];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 Ce("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 Ce("Blob is not supported. Use a Buffer instead.",Ce.ERR_NOT_SUPPORT)}return w}function x(w){if(w>d)throw new Ce("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,N){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(N+I.length-1),L})}function b(w,N,I){let U=w;if(Y.isReactNative(t)&&Y.isReactNativeBlob(w))return t.append(Bd(I,N,a),m(w)),!1;if(w&&!I&&typeof w=="object"){if(Y.endsWith(N,"{}"))N=r?N:N.slice(0,-2),w=y(w,1);else if(Y.isArray(w)&&Bv(w)||(Y.isFileList(w)||Y.endsWith(N,"[]"))&&(U=Y.toArray(w)))return N=X0(N),U.forEach(function(L,V){!(Y.isUndefined(L)||L===null)&&t.append(u===!0?Bd([N],V,a):u===null?N:N+"[]",m(L))}),!1}return Fd(w)?!0:(t.append(Bd(I,N,a),m(w)),!1)}const v=Object.assign(Uv,{defaultVisitor:b,convertValue:m,isVisitable:Fd});function A(w,N,I=0){if(!Y.isUndefined(w)){if(x(I),h.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));h.push(w),Y.forEach(w,function(G,L){(!(Y.isUndefined(G)||G===null)&&s.call(t,G,Y.isString(L)?L.trim():L,N,v))===!0&&A(G,N?N.concat(L):[L],I+1)}),h.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function Q0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ud(e,t){this._pairs=[],e&&Mu(e,this,t)}const K0=Ud.prototype;K0.append=function(t,n){this._pairs.push([t,n])},K0.toString=function(t){const n=t?r=>t.call(this,r,Q0):Q0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function J0(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||Hv,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new Ud(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Z0{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 Hd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},jv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ud,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},jd=typeof window!="undefined"&&typeof document!="undefined",$d=typeof navigator=="object"&&navigator||void 0,$v=jd&&(!$d||["ReactNative","NativeScript","NS"].indexOf($d.product)<0),zv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vv=jd&&window.location.href||"http://localhost",Zt=j(j({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jd,hasStandardBrowserEnv:$v,hasStandardBrowserWebWorkerEnv:zv,navigator:$d,origin:Vv},Symbol.toStringTag,{value:"Module"}))),jv);function qv(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 eg=G0;function tg(e){if(e>eg)throw new Ce("FormData field is too deeply nested ("+e+" levels). Max depth: "+eg,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Yv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)tg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Wv(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 ng(e){function t(n,r,s,a){tg(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]=Wv(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(Yv(r),s,n,0)}),n}return null}const Ds=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function Gv(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:Hd,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(ng(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 qv(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ds(this,"env"),h=f&&f.FormData;return Mu(l?{"files[]":t}:t,h&&new h,d)}}return a||s?(n.setContentType("application/json",!1),Gv(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"?Ce.from(d,Ce.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 zd(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 rg(e){return!!(e&&e.__CANCEL__)}let Jo=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ig(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n))}function Xv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Qv(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(),h=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=h&&f-h;return y?Math.round(x*1e3/y):void 0}}function Kv(e,t){let n=0,r=1e3/t,s,a;const u=(f,h=Date.now())=>{n=h,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const h=Date.now(),m=h-n;m>=r?u(f,h):(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=Qv(50,250);return Kv(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),h=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:h||void 0,estimated:h&&l?(l-d)/h:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},sg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},og=e=>(...t)=>Y.asap(()=>e(...t)),Jv=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,Zv=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 eA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const nA=/^https?:(?!\/\/)/i,rA=/[\t\n\r]/g;function iA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function sA(e){return iA(e).replace(rA,"")}function ag(e,t){if(typeof e=="string"&&nA.test(sA(e)))throw new Ce('Invalid URL: missing "//" after protocol',Ce.ERR_INVALID_URL,t)}function ug(e,t,n,r){ag(t,r);let s=!eA(t);return e&&(s||n===!1)?(ag(e,r),tA(e,t)):t}const lg=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(h,m,x,y){return Y.isPlainObject(h)&&Y.isPlainObject(m)?Y.merge.call({caseless:y},h,m):Y.isPlainObject(m)?Y.merge({},m):Y.isArray(m)?m.slice():m}function s(h,m,x,y){if(Y.isUndefined(m)){if(!Y.isUndefined(h))return r(void 0,h,x,y)}else return r(h,m,x,y)}function a(h,m){if(!Y.isUndefined(m))return r(void 0,m)}function u(h,m){if(Y.isUndefined(m)){if(!Y.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function l(h){const m=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(m))if(Y.isPlainObject(m)){if(Y.hasOwnProp(m,h))return m[h]}else return;const x=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(x)&&Y.hasOwnProp(x,h))return x[h]}function d(h,m,x){if(Y.hasOwnProp(t,x))return r(h,m);if(Y.hasOwnProp(e,x))return r(void 0,h)}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:(h,m,x)=>s(lg(h),lg(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 oA=["content-type","content-length"];function aA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{oA.includes(r.toLowerCase())&&e.set(r,s)})}const uA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function cg(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"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=sn.from(l),t.url=J0(ug(f,m,h,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?uA(y):"")))}catch(b){throw Ce.from(b,Ce.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&aA(l,r.getHeaders(),n("formDataHeaderPolicy"))),Zt.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&Jv(t.url))){const y=a&&u&&Zv.read(u);y&&l.set(a,y)}return t}const lA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=cg(e);let a=s.data;const u=sn.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,h,m,x,y,b;function v(){y&&y(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}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};ig(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 Ce("Request aborted",Ce.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(U){const G=U&&U.message?U.message:"Network Error",L=new Ce(G,Ce.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||Hd;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new Ce(U,G.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(Y0(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)&&(h=I=>{A&&(r(!I||I.type?new Jo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const N=Xv(s.url);if(N&&!Zt.protocols.includes(N)){r(new Ce("Unsupported protocol "+N+":",Ce.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},cA=(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 Ce?f:new Jo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(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},dA=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},fA=function(e,t){return a0(this,null,function*(){try{for(var n=y2(pA(e)),r,s,a;r=!(s=yield new Cs(n.next())).done;r=!1){const u=s.value;yield*u0(dA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Cs(s.call(n)))}finally{if(a)throw a[0]}}})},pA=function(e){return a0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*u0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Cs(t.read());if(n)break;yield r}}finally{yield new Cs(t.cancel())}})},dg=(e,t,n,r)=>{const s=fA(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:h,value:m}=yield s.next();if(h){l(),f.close();return}let x=m.byteLength;if(n){let y=a+=x;n(y)}f.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Bu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,hA=(e,t,n)=>t+2<n&&Bu(e.charCodeAt(t+1))&&Bu(e.charCodeAt(t+2));function mA(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 h=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--):h(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||h(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&&hA(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 Vd="1.18.1",fg=64*1024,{isFunction:Uu}=Y,gA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),pg=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}},EA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},yA=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 h=l&&Uu(n),m=l&&(typeof r=="function"?(w=>N=>w.encode(N))(new r):w=>Fe(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),x=d&&h&&hg(()=>{let w=!1;const N=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),I=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!I}),y=f&&h&&hg(()=>Y.isReadableStream(new u("").body)),b={stream:y&&(w=>w.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!b[w]&&(b[w]=(N,I)=>{let U=N&&N[w];if(U)return U.call(N);throw new Ce(`Response type '${w}' is not supported`,Ce.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,N)=>Fe(null,null,function*(){const I=Y.toFiniteNumber(w.getContentLength());return I==null?v(N):I});return w=>Fe(null,null,function*(){let{url:N,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:pe,maxBodyLength:de}=cg(w);const we=Y.isNumber(pe)&&pe>-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 C=cA([G,L&&L.toAbortSignal()],V),M=null;const J=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let P,Ae=null;const ke=()=>new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,w,M);try{let ge;const Le=W("auth");if(Le){const Be=Y.getSafeProp(Le,"username")||"",Ne=Y.getSafeProp(Le,"password")||"";ge={username:Be,password:Ne}}if(EA(N)){const Be=new URL(N,Zt.origin);if(!ge&&(Be.username||Be.password)){const Ne=pg(Be.username),We=pg(Be.password);ge={username:Ne,password:We}}(Be.username||Be.password)&&(Be.username="",Be.password="",N=Be.href)}if(ge&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(gA((ge.username||"")+":"+(ge.password||""))))),we&&typeof N=="string"&&N.startsWith("data:")&&mA(N)>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.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 ke()}const je=ce&&(Y.isReadableStream(U)||Y.isStream(U)),Ke=(Be,Ne,We)=>dg(Be,fg,et=>{if(ce&&et>de)throw Ae=ke();Ne&&Ne(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(N,{method:"POST",body:U,duplex:"half"}),Ne;if(Y.isFormData(U)&&(Ne=Be.headers.get("content-type"))&&oe.setContentType(Ne),Be.body){const[We,et]=le&&sg(P,Fu(og(le)))||[];U=Ke(Be.body,We,et)}}}else if(je&&!d&&h&&I!=="get"&&I!=="head")U=Ke(U);else if(je&&d&&!x&&I!=="get"&&I!=="head")throw new Ce("Stream request bodies are not supported by the current fetch implementation",Ce.ERR_NOT_SUPPORT,w,M);Y.isString(te)||(te=te?"include":"omit");const ht=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/"+Vd,!1);const Ot=ue(j({},fe),{signal:C,method:I.toUpperCase(),headers:Y0(oe.normalize()),body:U,duplex:"half",credentials:ht?te:void 0});M=d&&new a(N,Ot);let Ut=yield d?re(M,fe):re(N,Ot);const yn=sn.from(Ut.headers);if(we){const Be=Y.toFiniteNumber(yn.getContentLength());if(Be!=null&&Be>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.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 Ne=Y.toFiniteNumber(yn.getContentLength()),[We,et]=ie&&sg(Ne,Fu(og(ie),!0))||[];let se=0;const Se=ae=>{if(we&&(se=ae,se>pe))throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,M);We&&We(ae)};Ut=new u(dg(Ut.body,fg,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>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,M)}return!Tn&&J&&J(),yield new Promise((Be,Ne)=>{ig(Be,Ne,{data:Lt,headers:sn.from(Ut.headers),status:Ut.status,statusText:Ut.statusText,config:w,request:M})})}catch(ge){if(J&&J(),C&&C.aborted&&C.reason instanceof Ce){const Le=C.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 Ce)throw M&&!ge.request&&(ge.request=M),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){const Le=new Ce("Network Error",Ce.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 Ce.from(ge,ge&&ge.code,w,M,ge&&ge.response)}})},TA=new Map,mg=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,h=TA;for(;l--;)d=a[l],f=h.get(d),f===void 0&&h.set(d,f=l?new Map:yA(t)),h=f;return f};mg();const qd={http:Fv,xhr:lA,fetch:{get:mg}};Y.forEach(qd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const gg=e=>`- ${e}`,bA=e=>Y.isFunction(e)||e===null||e===!1;function xA(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,!bA(r)&&(s=qd[(l=String(r)).toLowerCase()],s===void 0))throw new Ce(`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 :
|
|
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[W0]=this[W0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=Qo(u);r[l]||(Rv(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 Lv="[REDACTED ****]";function Dv(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 Mv(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)&&Dv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?Lv:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ce=class T2 extends Error{static from(t,n,r,s,a,u){const l=new T2(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?Mv(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}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Fv=null,G0=100;function Fd(e){return Y.isPlainObject(e)||Y.isArray(e)}function X0(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Bd(e,t,n){return e?e.concat(t).map(function(s,a){return s=X0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Bv(e){return Y.isArray(e)&&!e.some(Fd)}const Uv=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(N,I){return!Y.isUndefined(I[N])});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?G0:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),h=[];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 Ce("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 Ce("Blob is not supported. Use a Buffer instead.",Ce.ERR_NOT_SUPPORT)}return w}function _(w){if(w>d)throw new Ce("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,N){if(d===1/0)return JSON.stringify(w);const I=[];return JSON.stringify(w,function(G,M){if(!Y.isObject(M))return M;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(M),_(N+I.length-1),M})}function b(w,N,I){let U=w;if(Y.isReactNative(t)&&Y.isReactNativeBlob(w))return t.append(Bd(I,N,a),m(w)),!1;if(w&&!I&&typeof w=="object"){if(Y.endsWith(N,"{}"))N=r?N:N.slice(0,-2),w=y(w,1);else if(Y.isArray(w)&&Bv(w)||(Y.isFileList(w)||Y.endsWith(N,"[]"))&&(U=Y.toArray(w)))return N=X0(N),U.forEach(function(M,V){!(Y.isUndefined(M)||M===null)&&t.append(u===!0?Bd([N],V,a):u===null?N:N+"[]",m(M))}),!1}return Fd(w)?!0:(t.append(Bd(I,N,a),m(w)),!1)}const v=Object.assign(Uv,{defaultVisitor:b,convertValue:m,isVisitable:Fd});function A(w,N,I=0){if(!Y.isUndefined(w)){if(_(I),h.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));h.push(w),Y.forEach(w,function(G,M){(!(Y.isUndefined(G)||G===null)&&s.call(t,G,Y.isString(M)?M.trim():M,N,v))===!0&&A(G,N?N.concat(M):[M],I+1)}),h.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function Q0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ud(e,t){this._pairs=[],e&&Mu(e,this,t)}const K0=Ud.prototype;K0.append=function(t,n){this._pairs.push([t,n])},K0.toString=function(t){const n=t?r=>t.call(this,r,Q0):Q0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function J0(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||Hv,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new Ud(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Z0{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 Hd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},jv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ud,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},jd=typeof window!="undefined"&&typeof document!="undefined",$d=typeof navigator=="object"&&navigator||void 0,$v=jd&&(!$d||["ReactNative","NativeScript","NS"].indexOf($d.product)<0),zv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vv=jd&&window.location.href||"http://localhost",Zt=j(j({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jd,hasStandardBrowserEnv:$v,hasStandardBrowserWebWorkerEnv:zv,navigator:$d,origin:Vv},Symbol.toStringTag,{value:"Module"}))),jv);function qv(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 eg=G0;function tg(e){if(e>eg)throw new Ce("FormData field is too deeply nested ("+e+" levels). Max depth: "+eg,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Yv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)tg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Wv(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 ng(e){function t(n,r,s,a){tg(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]=Wv(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(Yv(r),s,n,0)}),n}return null}const Ds=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function Gv(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:Hd,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(ng(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 qv(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ds(this,"env"),h=f&&f.FormData;return Mu(l?{"files[]":t}:t,h&&new h,d)}}return a||s?(n.setContentType("application/json",!1),Gv(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"?Ce.from(d,Ce.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 zd(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 rg(e){return!!(e&&e.__CANCEL__)}let Jo=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ig(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n))}function Xv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Qv(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(),h=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,_=0;for(;m!==s;)_+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=h&&f-h;return y?Math.round(_*1e3/y):void 0}}function Kv(e,t){let n=0,r=1e3/t,s,a;const u=(f,h=Date.now())=>{n=h,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const h=Date.now(),m=h-n;m>=r?u(f,h):(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=Qv(50,250);return Kv(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),h=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:h||void 0,estimated:h&&l?(l-d)/h:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},sg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},og=e=>(...t)=>Y.asap(()=>e(...t)),Jv=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,Zv=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 eA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const nA=/^https?:(?!\/\/)/i,rA=/[\t\n\r]/g;function iA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function sA(e){return iA(e).replace(rA,"")}function ag(e,t){if(typeof e=="string"&&nA.test(sA(e)))throw new Ce('Invalid URL: missing "//" after protocol',Ce.ERR_INVALID_URL,t)}function ug(e,t,n,r){ag(t,r);let s=!eA(t);return e&&(s||n===!1)?(ag(e,r),tA(e,t)):t}const lg=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(h,m,_,y){return Y.isPlainObject(h)&&Y.isPlainObject(m)?Y.merge.call({caseless:y},h,m):Y.isPlainObject(m)?Y.merge({},m):Y.isArray(m)?m.slice():m}function s(h,m,_,y){if(Y.isUndefined(m)){if(!Y.isUndefined(h))return r(void 0,h,_,y)}else return r(h,m,_,y)}function a(h,m){if(!Y.isUndefined(m))return r(void 0,m)}function u(h,m){if(Y.isUndefined(m)){if(!Y.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function l(h){const m=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(m))if(Y.isPlainObject(m)){if(Y.hasOwnProp(m,h))return m[h]}else return;const _=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(_)&&Y.hasOwnProp(_,h))return _[h]}function d(h,m,_){if(Y.hasOwnProp(t,_))return r(h,m);if(Y.hasOwnProp(e,_))return r(void 0,h)}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:(h,m,_)=>s(lg(h),lg(m),_,!0)};return Y.forEach(Object.keys(j(j({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const _=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=_(y,b,m);Y.isUndefined(v)&&_!==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 oA=["content-type","content-length"];function aA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{oA.includes(r.toLowerCase())&&e.set(r,s)})}const uA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function cg(e){const t=zi({},e),n=_=>Y.hasOwnProp(t,_)?t[_]: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"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=sn.from(l),t.url=J0(ug(f,m,h,t),n("params"),n("paramsSerializer")),d){const _=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(_+":"+(y?uA(y):"")))}catch(b){throw Ce.from(b,Ce.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&aA(l,r.getHeaders(),n("formDataHeaderPolicy"))),Zt.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&Jv(t.url))){const y=a&&u&&Zv.read(u);y&&l.set(a,y)}return t}const lA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=cg(e);let a=s.data;const u=sn.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,h,m,_,y,b;function v(){y&&y(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}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};ig(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 Ce("Request aborted",Ce.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(U){const G=U&&U.message?U.message:"Network Error",M=new Ce(G,Ce.ERR_NETWORK,e,A);M.event=U||null,r(M),v(),A=null},A.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const G=s.transitional||Hd;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new Ce(U,G.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(Y0(u),function(U,G){A.setRequestHeader(G,U)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([_,b]=Fu(f,!0),A.addEventListener("progress",_)),d&&A.upload&&([m,y]=Fu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(h=I=>{A&&(r(!I||I.type?new Jo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const N=Xv(s.url);if(N&&!Zt.protocols.includes(N)){r(new Ce("Unsupported protocol "+N+":",Ce.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},cA=(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 Ce?f:new Jo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(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},dA=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},fA=function(e,t){return a0(this,null,function*(){try{for(var n=y2(pA(e)),r,s,a;r=!(s=yield new Cs(n.next())).done;r=!1){const u=s.value;yield*u0(dA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Cs(s.call(n)))}finally{if(a)throw a[0]}}})},pA=function(e){return a0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*u0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Cs(t.read());if(n)break;yield r}}finally{yield new Cs(t.cancel())}})},dg=(e,t,n,r)=>{const s=fA(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:h,value:m}=yield s.next();if(h){l(),f.close();return}let _=m.byteLength;if(n){let y=a+=_;n(y)}f.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Bu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,hA=(e,t,n)=>t+2<n&&Bu(e.charCodeAt(t+1))&&Bu(e.charCodeAt(t+2));function mA(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 h=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--):h(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||h(f))&&d++;const _=Math.floor(u/4)*3-(d||0);return _>0?_:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&hA(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 Vd="1.18.1",fg=64*1024,{isFunction:Uu}=Y,gA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),pg=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}},EA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},yA=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 h=l&&Uu(n),m=l&&(typeof r=="function"?(w=>N=>w.encode(N))(new r):w=>Fe(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),_=d&&h&&hg(()=>{let w=!1;const N=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),I=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!I}),y=f&&h&&hg(()=>Y.isReadableStream(new u("").body)),b={stream:y&&(w=>w.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!b[w]&&(b[w]=(N,I)=>{let U=N&&N[w];if(U)return U.call(N);throw new Ce(`Response type '${w}' is not supported`,Ce.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,N)=>Fe(null,null,function*(){const I=Y.toFiniteNumber(w.getContentLength());return I==null?v(N):I});return w=>Fe(null,null,function*(){let{url:N,method:I,data:U,signal:G,cancelToken:M,timeout:V,onDownloadProgress:ie,onUploadProgress:de,responseType:$,headers:oe,withCredentials:te="same-origin",fetchOptions:fe,maxContentLength:pe,maxBodyLength:ce}=cg(w);const we=Y.isNumber(pe)&&pe>-1,le=Y.isNumber(ce)&&ce>-1,W=ge=>Y.hasOwnProp(w,ge)?w[ge]:void 0;let re=s||fetch;$=$?($+"").toLowerCase():"text";let C=cA([G,M&&M.toAbortSignal()],V),D=null;const J=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let P,Ae=null;const ke=()=>new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,w,D);try{let ge;const Le=W("auth");if(Le){const Be=Y.getSafeProp(Le,"username")||"",Ne=Y.getSafeProp(Le,"password")||"";ge={username:Be,password:Ne}}if(EA(N)){const Be=new URL(N,Zt.origin);if(!ge&&(Be.username||Be.password)){const Ne=pg(Be.username),We=pg(Be.password);ge={username:Ne,password:We}}(Be.username||Be.password)&&(Be.username="",Be.password="",N=Be.href)}if(ge&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(gA((ge.username||"")+":"+(ge.password||""))))),we&&typeof N=="string"&&N.startsWith("data:")&&mA(N)>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,D);if(le&&I!=="get"&&I!=="head"){const Be=yield v(U);if(typeof Be=="number"&&isFinite(Be)&&(P=Be,Be>ce))throw ke()}const je=le&&(Y.isReadableStream(U)||Y.isStream(U)),Ke=(Be,Ne,We)=>dg(Be,fg,et=>{if(le&&et>ce)throw Ae=ke();Ne&&Ne(et)},We);if(_&&I!=="get"&&I!=="head"&&(de||je)){if(P=P==null?yield A(oe,U):P,P!==0||je){let Be=new a(N,{method:"POST",body:U,duplex:"half"}),Ne;if(Y.isFormData(U)&&(Ne=Be.headers.get("content-type"))&&oe.setContentType(Ne),Be.body){const[We,et]=de&&sg(P,Fu(og(de)))||[];U=Ke(Be.body,We,et)}}}else if(je&&!d&&h&&I!=="get"&&I!=="head")U=Ke(U);else if(je&&d&&!_&&I!=="get"&&I!=="head")throw new Ce("Stream request bodies are not supported by the current fetch implementation",Ce.ERR_NOT_SUPPORT,w,D);Y.isString(te)||(te=te?"include":"omit");const ht=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/"+Vd,!1);const Ot=ue(j({},fe),{signal:C,method:I.toUpperCase(),headers:Y0(oe.normalize()),body:U,duplex:"half",credentials:ht?te:void 0});D=d&&new a(N,Ot);let Ut=yield d?re(D,fe):re(N,Ot);const yn=sn.from(Ut.headers);if(we){const Be=Y.toFiniteNumber(yn.getContentLength());if(Be!=null&&Be>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,D)}const Tn=y&&($==="stream"||$==="response");if(y&&Ut.body&&(ie||we||Tn&&J)){const Be={};["status","statusText","headers"].forEach(ae=>{Be[ae]=Ut[ae]});const Ne=Y.toFiniteNumber(yn.getContentLength()),[We,et]=ie&&sg(Ne,Fu(og(ie),!0))||[];let se=0;const Se=ae=>{if(we&&(se=ae,se>pe))throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,D);We&&We(ae)};Ut=new u(dg(Ut.body,fg,Se,()=>{et&&et(),J&&J()}),Be)}$=$||"text";let Lt=yield b[Y.findKey(b,$)||"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>pe)throw new Ce("maxContentLength size of "+pe+" exceeded",Ce.ERR_BAD_RESPONSE,w,D)}return!Tn&&J&&J(),yield new Promise((Be,Ne)=>{ig(Be,Ne,{data:Lt,headers:sn.from(Ut.headers),status:Ut.status,statusText:Ut.statusText,config:w,request:D})})}catch(ge){if(J&&J(),C&&C.aborted&&C.reason instanceof Ce){const Le=C.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(Ae)throw D&&!Ae.request&&(Ae.request=D),Ae;if(ge instanceof Ce)throw D&&!ge.request&&(ge.request=D),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){const Le=new Ce("Network Error",Ce.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 Ce.from(ge,ge&&ge.code,w,D,ge&&ge.response)}})},TA=new Map,mg=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,h=TA;for(;l--;)d=a[l],f=h.get(d),f===void 0&&h.set(d,f=l?new Map:yA(t)),h=f;return f};mg();const qd={http:Fv,xhr:lA,fetch:{get:mg}};Y.forEach(qd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const gg=e=>`- ${e}`,bA=e=>Y.isFunction(e)||e===null||e===!1;function _A(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,!bA(r)&&(s=qd[(l=String(r)).toLowerCase()],s===void 0))throw new Ce(`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
11
|
`+u.map(gg).join(`
|
|
12
|
-
`):" "+gg(u[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+l,Ce.ERR_NOT_SUPPORT)}return s}const Eg={getAdapter:
|
|
12
|
+
`):" "+gg(u[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+l,Ce.ERR_NOT_SUPPORT)}return s}const Eg={getAdapter:_A,adapters:qd};function Yd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function yg(e){return Yd(e),e.headers=sn.from(e.headers),e.data=zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Eg.getAdapter(e.adapter||Ko.adapter,e)(e).then(function(r){Yd(e),e.response=r;try{r.data=zd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=sn.from(r.headers),r},function(r){if(!rg(r)&&(Yd(e),r&&r.response)){e.response=r.response;try{r.response.data=zd.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 Tg={};Hu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Vd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ce(s(u," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!Tg[u]&&(Tg[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 xA(e,t,n){if(typeof e!="object"||e===null)throw new Ce("options must be an object",Ce.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 Ce("option "+a+" must be "+d,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+a,Ce.ERR_BAD_OPTION)}}const ju={assertOptions:xA,validators:Hu},on=ju.validators;let Vi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Z0,response:new Z0}}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
14
|
`),l=u===-1?-1:a.indexOf(`
|
|
15
15
|
`,u+1),d=l===-1?"":a.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
16
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=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||Hd;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 h,m=0,x;if(!d){const b=[yg.bind(this),void 0];for(b.unshift(...l),b.push(...f),x=b.length,h=Promise.resolve(n);m<x;)h=h.then(b[m++],b[m++]);return h}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{h=yg.call(this,y)}catch(b){return Promise.reject(b)}for(m=0,x=f.length;m<x;)h=h.then(f[m++],f[m++]);return h}getUri(t){t=zi(this.defaults,t);const n=ug(t.baseURL,t.url,t.allowAbsoluteUrls,t);return J0(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 wA=class b2{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 b2(function(s){t=s}),cancel:t}}};function SA(e){return function(n){return e.apply(null,n)}}function vA(e){return Y.isObject(e)&&e.isAxiosError===!0}const Wd={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(Wd).forEach(([e,t])=>{Wd[t]=e});function bg(e){const t=new Vi(e),n=D0(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 bg(zi(e,s))},n}const Pt=bg(Ko);Pt.Axios=Vi,Pt.CanceledError=Jo,Pt.CancelToken=wA,Pt.isCancel=rg,Pt.VERSION=Vd,Pt.toFormData=Mu,Pt.AxiosError=Ce,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=SA,Pt.isAxiosError=vA,Pt.mergeConfig=zi,Pt.AxiosHeaders=sn,Pt.formToJSON=e=>ng(Y.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=Eg.getAdapter,Pt.HttpStatusCode=Wd,Pt.default=Pt;const{Axios:q7,AxiosError:Y7,CanceledError:W7,isCancel:G7,CancelToken:X7,VERSION:Q7,all:K7,Cancel:J7,isAxiosError:Z7,spread:eU,toFormData:tU,AxiosHeaders:nU,HttpStatusCode:rU,formToJSON:iU,getAdapter:sU,mergeConfig:oU,create:aU}=Pt;class AA{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 CA{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 AA(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 NA={copilot:"Your Search Assistant",messaging:"Commerce Client"},xg=D.createContext(null),kA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:h,searchPlaceholder:m,searchButtonLabel:x,searchConfig:y,suggestionButtonConfig:b,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:w=!0,showProductDescription:N=!1,componentConfig:I,conversationHistory:U,resetConversationMessage:G="",apiKey:L,apiToken:V,baseUrl:ie,customerId:le,tenantId:z,theme:oe,isDevelopment:te,__features:fe,routingAttributes:pe,enableDownloadTranscript:de=!0,enableEscalationToAgent:we=!1,showProductCaptions:ce=!1,children:W})=>{const re=e==="messaging",C=D.useMemo(()=>{const Le=pe==null?void 0:pe.isCartMgmtSupported;return Le===!0||Le==="true"},[pe]),M=D.useMemo(()=>re?{config:null}:new CA(ie,L,V,te,le,z),[re,ie,L,V,te,le,z]),J=D.useMemo(()=>new TS(te),[te]);D.useEffect(()=>{re||!M||M.config||M.getConfig()},[M,re]);const P=D.useMemo(()=>CS(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]),ke=D.useMemo(()=>ue(j({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||NA[e!=null?e:"copilot"]}),[r,t,n,e]),ge=D.useMemo(()=>({configModule:M,mode:e!=null?e:"copilot",headerConfig:ke,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:h,themeVariables:P,logger:J,searchConfig:Ae,suggestionButtonConfig:b,progressStepsLimit:v,messageAlignment:A,autoScroll:w,showProductDescription:!!N,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:C}),[M,e,ke,a,s,f,h,l,d,u,Ae,b,A,w,N,I,de,we,ce,G,J,P,U,fe,C]);return _.jsx(xg.Provider,{value:ge,children:W})},ct=()=>{const e=D.useContext(xg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},_g=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],qi=-1;function wg(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 _g.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:qi,data:{content:e}}}function Sg(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"||!_g.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 OA(e,t){var n,r;return(r=(n=$u(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function vg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function IA(e){return e.type==="markdown"&&e.index===qi?!vg(e.data.content):!0}function PA(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 RA(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 Ag(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Cg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function LA(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 Ag(e.messages,t.message)?e:ue(j({},e),{messages:[...e.messages,ue(j({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=wg(t.token);return n?ue(j({},e),{streamingBlocks:RA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Ag(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({},Cg),{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*(){})}),DA=4320*60*1e3;function Gd(e,t){return`cim_af_conv_${e}_${t}`}function Xd(e,t){return Date.now()-e>t}function MA(e,t,n){try{const r=Gd(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"||Xd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function zu(e,t,n){try{const r=Gd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Qd(e,t){try{const n=Gd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Kd(e,t){return`cim_af_ct_${e}_${t}`}function FA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(UA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function BA(e){const t=FA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function UA(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=Kd(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:BA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function HA(e,t,n,r){try{const s=Kd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function jA(e,t){try{const n=Kd(e,t);sessionStorage.removeItem(n)}catch(n){}}function $A(e,t){return`cim_af_conv_${e}_${t}`}function zA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=$A(e,t);return new BroadcastChannel(n)}catch(n){return null}}function VA(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 qA(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 YA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function WA(e){if(e)try{e.close()}catch(t){}}function GA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function XA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Og(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 QA(e){if(e.entryType!=="Message")return null;const n=XA(e.entryPayload).abstractMessage;if(!n)return null;const r=Og(n,"staticContent","text")||Og(n,"content","text")||"";if(!r)return null;const s=GA(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 KA(e){const t=[];for(const n of e){const r=QA(n);r&&t.push(r)}return t}const JA=5e3;function Vu(e={}){const{routingAttributes:t,timeoutMs:n=JA}=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 h=Object.keys(r).length>0;s(h?r:t)},l={routingAttributes:t,setHiddenPrechatFields:h=>{a.settled||!h||Object.assign(r,h)},done:u},d=new CustomEvent(R0,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function ZA(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=DA,h=D.useCallback(()=>(l.current||(l.current=VA(a.current)),l.current),[]);D.useEffect(()=>{const w=zA(t,n);a.current=w,l.current=null;const N=qA(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}},()=>{Qd(t,n),u.current=null});return()=>{N(),WA(w),a.current=null}},[t,n]);const m=D.useCallback((w,N)=>Fe(null,null,function*(){var G;const I=(G=N==null?void 0:N.createIfMissing)!=null?G:!0;let U=MA(t,n,f);if(!U){const L=yield h();L&&!Xd(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(Qd(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=KA(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,h]),x=D.useCallback(w=>{zu(t,n,w),u.current=w},[t,n]),y=D.useCallback(()=>{Qd(t,n),jA(t,n),YA(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 h();return!(w!=null&&w.continuationToken)||Xd(w.storedAt,f)?null:{continuationToken:w.continuationToken,lastEventId:w.lastEventId}}),[f,h]),A=D.useCallback(w=>Fe(null,null,function*(){try{const{accessToken:N,lastEventId:I}=yield w.generateContinuationToken();HA(t,n,N,I)}catch(N){}}),[t,n]);return{initializeConversation:m,persistConversationId:x,clearPersistedConversation:y,getStoredConnectOptions:b,getPeerConnectOptions:v,persistContinuationToken:A}}const eC="Your session ended due to inactivity. Starting a new session…",tC=300*1e3,nC=2e3,rC=1e4,iC=15e3,sC=2;function Zo(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function oC(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Ig(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 Jd(e){if(Ig(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function aC(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}]`:"",h=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:h,display:m}}function uC({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=iC,logger:f,isRecoveryInFlight:h}){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(h);b.current=h;const v=D.useRef(0),A=D.useRef(!1),w=D.useRef(0),[N,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>sC){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,N])}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 lC(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}=lC(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 Pg(e){switch(e.code){case"MAX_RECONNECT":return _r.lost;case"ROUTING_FAILED":return _r.routing;default:return _r.connect}}const Rg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:h})=>{const{logger:m,conversationHistory:x}=ct(),[y,b]=D.useReducer(LA,Cg),[v,A]=D.useState(!1),[w,N]=D.useState(!1),I=D.useRef(y);I.current=y;const U=ZA({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),pe=D.useRef(0),de=D.useRef(0),we=D.useRef(null),ce=D.useRef(null),W=D.useRef([]),re=D.useRef(null),C=D.useCallback(()=>{b({type:"SET_CART_UPDATING",isUpdating:W.current.some(oC)})},[]),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),C(),se.resolve(Se)},[C]);L.current=l,V.current=d,ie.current=u,le.current=f,D.useEffect(()=>{const se=new AS({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?PA(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=wg(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:Pg({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:Pg(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&&Jd(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}N($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(Jd(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:eC,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]),ke=D.useRef(Ae);ke.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(Jd(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<nC||(de.current=ee,Le.current())},Se=()=>{if(document.visibilityState==="hidden"){pe.current=Date.now();return}const ee=G.current;if(!ee)return;const xe=pe.current?Date.now()-pe.current:0;pe.current=0,(te.current||!ee.isConnected||xe>tC)&&se()},ae=ee=>{ee.persisted&&se()},ve=()=>{pe.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 ke.current(se);return}try{yield ae.sendMessage(se.text)}catch($e){if(Ig($e)){yield ke.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]),ht=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"})},rC)}),W.current.push(dt),C(),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:""})),ht(()=>Ke(dt,ee=>({text:se,displayContent:Se,options:ae,message:ee})))}),[Ke,ht,M,C]),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}=aC(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,N(!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]);uC({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 Ne=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(()=>{PS(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:Ne}),[y,We,Ut,yn,Be,Tn,Lt,Ne]);return _.jsx(Ng.Provider,{value:et,children:h})};var Lg=Symbol.for("immer-nothing"),Dg=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?Mg(e)||Array.isArray(e)||!!e[Dg]||!!((t=e.constructor)!=null&&t[Dg])||ea(e)||Wu(e):!1}var cC=Object.prototype.constructor.toString();function Mg(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)===cC}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 Zd(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Fg(e,t,n){const r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function dC(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 ef(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=Mg(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 tf(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=>tf(n,!0))),e}function Gu(){or(2)}function Xu(e){return Object.isFrozen(e)}var fC={};function Gi(e){const t=fC[e];return t||or(0,e),t}var ta;function Bg(){return ta}function pC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ug(e,t){t&&(Gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nf(e){rf(e),e.drafts_.forEach(hC),e.drafts_=null}function rf(e){e===ta&&(ta=e.parent_)}function Hg(e){return ta=pC(ta,e)}function hC(e){const t=e[Fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function jg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fn].modified_&&(nf(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,[]),nf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Lg?e:void 0}function Qu(e,t,n){if(Xu(t))return t;const r=t[Fn];if(!r)return qu(t,(s,a)=>$g(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)=>$g(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 $g(e,t,n,r,s,a,u){if(Fs(s)){const l=a&&t&&t.type_!==3&&!Zd(t.assigned_,r)?a.concat(r):void 0,d=Qu(e,s,l);if(Fg(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_&&tf(t,n)}function mC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Bg(),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=na);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var sf={get(e,t){if(t===Fn)return e;const n=Wi(e);if(!Zd(n,t))return gC(e,n,t);const r=n[t];return e.finalized_||!Yi(r)?r:r===of(e.base_,t)?(uf(e),e.copy_[t]=lf(r,e)):r},has(e,t){return t in Wi(e)},ownKeys(e){return Reflect.ownKeys(Wi(e))},set(e,t,n){const r=zg(Wi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=of(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(dC(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=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(sf,(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 sf.set.call(this,e[0],t,n,e[0])};function of(e,t){const n=e[Fn];return(n?Wi(n):e)[t]}function gC(e,t,n){var s;const r=zg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function zg(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 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 EC=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,h=>n.call(this,h,...f))}}typeof n!="function"&&or(6),r!==void 0&&typeof r!="function"&&or(7);let s;if(Yi(t)){const a=Hg(this),u=lf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?nf(a):rf(a)}return Ug(a,r),jg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Lg&&(s=void 0),this.autoFreeze_&&tf(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=yC(e));const t=Hg(this),n=lf(e,void 0);return n[Fn].isManual_=!0,rf(t),n}finishDraft(e,t){const n=e&&e[Fn];(!n||!n.isManual_)&&or(9);const{scope_:r}=n;return Ug(r,t),jg(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 lf(e,t){const n=ea(e)?Gi("MapSet").proxyMap_(e,t):Wu(e)?Gi("MapSet").proxySet_(e,t):mC(e,t);return(t?t.scope_:Bg()).drafts_.push(n),n}function yC(e){return Fs(e)||or(10,e),Vg(e)}function Vg(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=ef(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ef(e,!0);return qu(n,(r,s)=>{Fg(n,r,Vg(s))}),t&&(t.finalized_=!1),n}var TC=new EC,bC=TC.produce;function xC(e,t,n){var r=D.useMemo(function(){return bC(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"},qg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},_C=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Yg=D.createContext(null),Wg=D.createContext(null),wC=({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]),h=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:h,setResponseMessage:m,setIsResponseLoading:x}),[n,r,s,a,u,l,d,f,h,m,x]);return _.jsx(Wg.Provider,{value:y,children:e})},SC=(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}},vC=({promptsConfig:e,children:t})=>{const[n,r]=xC(SC,ue(j(j({},qg),e||{}),{staticQuestions:_C((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(Yg.Provider,{value:n,children:_.jsx(wC,{dispatch:r,children:t})})};function AC(){var e=D.useRef(!0);return e.current?(e.current=!1,!0):e.current}function CC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function NC(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",Ju=function(e){D.useEffect(e,[])},kC=function(e){var t=D.useRef(e);t.current=e,Ju(function(){return function(){return t.current()}})},OC=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 kC(function(){cancelAnimationFrame(t.current)}),[r,a]},IC=function(e,t){return e===t};function PC(e,t){t===void 0&&(t=IC);var n=D.useRef(),r=D.useRef(e),s=AC();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var RC=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=OC({width:cf?window.innerWidth:r,height:cf?window.innerHeight:a}),d=l[0],f=l[1];return D.useEffect(function(){if(cf){var h=function(){var m=window.innerWidth,x=window.innerHeight;f({width:m,height:x}),u&&u(m,x)};return CC(window,"resize",h),function(){NC(window,"resize",h)}}},[]),d};const Gg=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}),LC=({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}),[h,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),N=PC(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 kS(U),()=>{OS(U)}},[]),Ju(()=>{e&&L0(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&&Pd(U),"dialogFullHeight"in t.options&&RS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Id(!!t.options.isModalFullscreen)});const I=D.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:N||"dialog",dialogPosition:h,isDialogFullHeight:x,dialogWidth:b,isModalFullscreen:A}),[u,s,d,N,h,x,b,A]);return _.jsx(Gg.Provider,{value:I,children:r})},DC={productId:Yo.productId,pdpLink:Yo.pdpLink},Xg=D.createContext(DC),MC=({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 mS(u),()=>{gS(u)}},[]);const a=D.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(Xg.Provider,{value:a,children:e})},FC=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)}),Qg=D.createContext({overrides:{},isInitialized:!1}),BC=({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 FC(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(Qg.Provider,{value:l,children:n})},Kg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:h=!1,componentType:m,componentConfig:x,entryType:y,initialEntry:b,entryMessage:v,disclaimerText:A,disclaimerMarkdown:w,clientContext:N,searchPlaceholder:I,searchButtonLabel:U,searchConfig:G,suggestionButtonConfig:L,messageAlignment:V,autoScroll:ie,promptsConfig:le,showProductDescription:z,resetConversationMessage:oe,conversationHistory:te,messagingConfig:fe,overrides:pe,overridesUrl:de,inlineOverrides:we,__features:ce,children:W})=>{const re=D.useRef(!1);return re.current||(re.current=!0,bS({initialEntry:b,entryType:y,isDevelopment:h})),_.jsx(kA,{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:N,disclaimerMarkdown:w,disclaimerText:A,resetConversationMessage:oe,conversationHistory:te,isDevelopment:h,__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(LC,{entryType:y!=null?y:b==null?void 0:b.type,componentConfig:x,componentType:m,children:_.jsx(MC,{children:_.jsx(vC,{promptsConfig:le,children:_.jsx(BC,{overridesUrl:de,inlineOverrides:we||pe,children:_.jsx(Rg,{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:h,onProductResult:fe==null?void 0:fe.onProductResult,children:W})})})})})})},ai=()=>{const e=D.useContext(Gg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var df={exports:{}},vn={},ff={exports:{}},pf={};var Jg;function UC(){return Jg||(Jg=1,(function(e){function t(W,re){var C=W.length;W.push(re);e:for(;0<C;){var M=C-1>>>1,J=W[M];if(0<s(J,re))W[M]=re,W[C]=J,C=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],C=W.pop();if(C!==re){W[0]=C;e:for(var M=0,J=W.length,P=J>>>1;M<P;){var Ae=2*(M+1)-1,ke=W[Ae],ge=Ae+1,Le=W[ge];if(0>s(ke,C))ge<J&&0>s(Le,ke)?(W[M]=Le,W[ge]=C,M=ge):(W[M]=ke,W[Ae]=C,M=Ae);else if(ge<J&&0>s(Le,C))W[M]=Le,W[ge]=C,M=ge;else break e}}return re}function s(W,re){var C=W.sortIndex-re.sortIndex;return C!==0?C: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=[],h=1,m=null,x=3,y=!1,b=!1,v=!1,A=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 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 C=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=C,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 N=="function")fe=function(){N(te)};else if(typeof MessageChannel!="undefined"){var pe=new MessageChannel,de=pe.port2;pe.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 C=x;x=re;try{return W()}finally{x=C}},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 C=x;x=W;try{return re()}finally{x=C}},e.unstable_scheduleCallback=function(W,re,C){var M=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?M+C:M):C=M,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=C+J,W={id:h++,callback:re,priorityLevel:W,startTime:C,expirationTime:J,sortIndex:-1},C>M?(W.sortIndex=C,t(f,W),n(d)===null&&W===n(f)&&(v?(w(ie),ie=-1):v=!0,ce(U,C-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 C=x;x=re;try{return W.apply(this,arguments)}finally{x=C}}}})(pf)),pf}var Zg;function HC(){return Zg||(Zg=1,ff.exports=UC()),ff.exports}var e1;function jC(){if(e1)return vn;e1=1;var e=rr(),t=HC();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]*$/,h={},m={};function x(i){return d.call(m,i)?!0:d.call(h,i)?!1:f.test(i)?m[i]=!0:(h[i]=!0,!1)}function y(i,o,c,p){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,c,p){if(o===null||typeof o=="undefined"||y(i,o,c,p))return!0;if(p)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,p,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=p,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 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);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,N);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,N);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,p){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:p||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,c,E,p)&&(c=null),p||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,p=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,p?i.setAttributeNS(p,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"),pe=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 C=Object.assign,M;function J(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
|
|
17
|
-
`+
|
|
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||Hd;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 h,m=0,_;if(!d){const b=[yg.bind(this),void 0];for(b.unshift(...l),b.push(...f),_=b.length,h=Promise.resolve(n);m<_;)h=h.then(b[m++],b[m++]);return h}_=l.length;let y=n;for(;m<_;){const b=l[m++],v=l[m++];try{y=b(y)}catch(A){v.call(this,A);break}}try{h=yg.call(this,y)}catch(b){return Promise.reject(b)}for(m=0,_=f.length;m<_;)h=h.then(f[m++],f[m++]);return h}getUri(t){t=zi(this.defaults,t);const n=ug(t.baseURL,t.url,t.allowAbsoluteUrls,t);return J0(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 wA=class b2{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 b2(function(s){t=s}),cancel:t}}};function SA(e){return function(n){return e.apply(null,n)}}function vA(e){return Y.isObject(e)&&e.isAxiosError===!0}const Wd={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(Wd).forEach(([e,t])=>{Wd[t]=e});function bg(e){const t=new Vi(e),n=D0(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 bg(zi(e,s))},n}const Pt=bg(Ko);Pt.Axios=Vi,Pt.CanceledError=Jo,Pt.CancelToken=wA,Pt.isCancel=rg,Pt.VERSION=Vd,Pt.toFormData=Mu,Pt.AxiosError=Ce,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=SA,Pt.isAxiosError=vA,Pt.mergeConfig=zi,Pt.AxiosHeaders=sn,Pt.formToJSON=e=>ng(Y.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=Eg.getAdapter,Pt.HttpStatusCode=Wd,Pt.default=Pt;const{Axios:W7,AxiosError:G7,CanceledError:X7,isCancel:Q7,CancelToken:K7,VERSION:J7,all:Z7,Cancel:eU,isAxiosError:tU,spread:nU,toFormData:rU,AxiosHeaders:iU,HttpStatusCode:sU,formToJSON:oU,getAdapter:aU,mergeConfig:uU,create:lU}=Pt;class AA{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 CA{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 AA(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 NA={copilot:"Your Search Assistant",messaging:"Commerce Client"},_g=L.createContext(null),kA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:h,searchPlaceholder:m,searchButtonLabel:_,searchConfig:y,suggestionButtonConfig:b,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:w=!0,showProductDescription:N=!1,componentConfig:I,conversationHistory:U,resetConversationMessage:G="",apiKey:M,apiToken:V,baseUrl:ie,customerId:de,tenantId:$,theme:oe,isDevelopment:te,__features:fe,routingAttributes:pe,enableDownloadTranscript:ce=!0,enableEscalationToAgent:we=!1,showProductCaptions:le=!1,children:W})=>{const re=e==="messaging",C=L.useMemo(()=>{const Le=pe==null?void 0:pe.isCartMgmtSupported;return Le===!0||Le==="true"},[pe]),D=L.useMemo(()=>re?{config:null}:new CA(ie,M,V,te,de,$),[re,ie,M,V,te,de,$]),J=L.useMemo(()=>new TS(te),[te]);L.useEffect(()=>{re||!D||D.config||D.getConfig()},[D,re]);const P=L.useMemo(()=>CS(oe),[oe]),Ae=L.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,je=(y==null?void 0:y.buttonLabel)||_;let Ke="icon";return y!=null&&y.buttonType?Ke=y.buttonType:_&&(Ke="text"),ue(j({},y||{}),{placeholder:Le,buttonLabel:je,buttonType:Ke})},[y,m,_]),ke=L.useMemo(()=>ue(j({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||NA[e!=null?e:"copilot"]}),[r,t,n,e]),ge=L.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:ke,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:h,themeVariables:P,logger:J,searchConfig:Ae,suggestionButtonConfig:b,progressStepsLimit:v,messageAlignment:A,autoScroll:w,showProductDescription:!!N,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:ce,enableEscalationToAgent:we,showProductCaptions:!!le,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:C}),[D,e,ke,a,s,f,h,l,d,u,Ae,b,A,w,N,I,ce,we,le,G,J,P,U,fe,C]);return x.jsx(_g.Provider,{value:ge,children:W})},ct=()=>{const e=L.useContext(_g);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 wg(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 Sg(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 OA(e,t){var n,r;return(r=(n=$u(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function vg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function IA(e){return e.type==="markdown"&&e.index===qi?!vg(e.data.content):!0}function PA(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 RA(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 Ag(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Cg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function LA(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 Ag(e.messages,t.message)?e:ue(j({},e),{messages:[...e.messages,ue(j({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=wg(t.token);return n?ue(j({},e),{streamingBlocks:RA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Ag(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({},Cg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const Ng=L.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*(){})}),DA=4320*60*1e3;function Gd(e,t){return`cim_af_conv_${e}_${t}`}function Xd(e,t){return Date.now()-e>t}function MA(e,t,n){try{const r=Gd(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"||Xd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function zu(e,t,n){try{const r=Gd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Qd(e,t){try{const n=Gd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Kd(e,t){return`cim_af_ct_${e}_${t}`}function FA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(UA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function BA(e){const t=FA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function UA(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=Kd(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:BA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function HA(e,t,n,r){try{const s=Kd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function jA(e,t){try{const n=Kd(e,t);sessionStorage.removeItem(n)}catch(n){}}function $A(e,t){return`cim_af_conv_${e}_${t}`}function zA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=$A(e,t);return new BroadcastChannel(n)}catch(n){return null}}function VA(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 qA(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 YA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function WA(e){if(e)try{e.close()}catch(t){}}function GA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function XA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Og(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 QA(e){if(e.entryType!=="Message")return null;const n=XA(e.entryPayload).abstractMessage;if(!n)return null;const r=Og(n,"staticContent","text")||Og(n,"content","text")||"";if(!r)return null;const s=GA(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 KA(e){const t=[];for(const n of e){const r=QA(n);r&&t.push(r)}return t}const JA=5e3;function Vu(e={}){const{routingAttributes:t,timeoutMs:n=JA}=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 h=Object.keys(r).length>0;s(h?r:t)},l={routingAttributes:t,setHiddenPrechatFields:h=>{a.settled||!h||Object.assign(r,h)},done:u},d=new CustomEvent(R0,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}const ZA=200,eC=1e3;function tC(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=L.useRef(null),u=L.useRef(null),l=L.useRef(null),d=s.sinceHours*60*60*1e3,f=DA,h=L.useCallback(()=>(l.current||(l.current=VA(a.current)),l.current),[]);L.useEffect(()=>{const w=zA(t,n);a.current=w,l.current=null;const N=qA(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}},()=>{Qd(t,n),u.current=null});return()=>{N(),WA(w),a.current=null}},[t,n]);const m=L.useCallback((w,N)=>Fe(null,null,function*(){var G,M;const I=(G=N==null?void 0:N.createIfMissing)!=null?G:!0;let U=MA(t,n,f);if(!U){const V=yield h();V&&!Xd(V.storedAt,f)&&(U=V)}if(!U){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const V=yield w.createConversation(yield Vu({routingAttributes:r}));return zu(t,n,V),u.current=V,{conversationId:V,restoredMessages:[],resumed:!1,outcome:"created"}}try{const ie=(yield w.listConversations({conversationId:U.conversationId,startTimestamp:Date.now()-f})).conversations.find($=>$.conversationId===U.conversationId&&!$.isConversationClosed);if(!ie){if(Qd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const $=yield w.createConversation(yield Vu({routingAttributes:r}));return zu(t,n,$),u.current=$,{conversationId:$,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}w.resumeConversation(ie.conversationId),u.current=ie.conversationId,zu(t,n,ie.conversationId);let de=[];try{const $=yield w.listConversationEntries(ie.conversationId,{limit:Math.min((M=s.limit)!=null?M:ZA,eC),startTimestamp:Date.now()-d,direction:"FromEnd"});de=KA($.conversationEntries).reverse()}catch($){}return{conversationId:ie.conversationId,restoredMessages:de,resumed:!0,outcome:"resumed"}}catch(V){return{conversationId:U.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:V}}}),[t,n,r,s,d,f,h]),_=L.useCallback(w=>{zu(t,n,w),u.current=w},[t,n]),y=L.useCallback(()=>{Qd(t,n),jA(t,n),YA(a.current),u.current=null},[t,n]),b=L.useCallback(()=>{const w=kg(t,n);return w?{continuationToken:w.accessToken,lastEventId:w.lastEventId}:null},[t,n]),v=L.useCallback(()=>Fe(null,null,function*(){const w=yield h();return!(w!=null&&w.continuationToken)||Xd(w.storedAt,f)?null:{continuationToken:w.continuationToken,lastEventId:w.lastEventId}}),[f,h]),A=L.useCallback(w=>Fe(null,null,function*(){try{const{accessToken:N,lastEventId:I}=yield w.generateContinuationToken();HA(t,n,N,I)}catch(N){}}),[t,n]);return{initializeConversation:m,persistConversationId:_,clearPersistedConversation:y,getStoredConnectOptions:b,getPeerConnectOptions:v,persistContinuationToken:A}}const nC="Your session ended due to inactivity. Starting a new session…",rC=300*1e3,iC=2e3,sC=1e4,oC=15e3,aC=2;function Zo(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function uC(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Ig(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 Jd(e){if(Ig(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function lC(e){var _;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((_=e.variants)!=null?_:[]).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}]`:"",h=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:h,display:m}}function cC({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=oC,logger:f,isRecoveryInFlight:h}){const m=L.useRef(u);m.current=u;const _=L.useRef(l);_.current=l;const y=L.useRef(f);y.current=f;const b=L.useRef(h);b.current=h;const v=L.useRef(0),A=L.useRef(!1),w=L.useRef(0),[N,I]=L.useState(0);L.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 M=setTimeout(()=>{Fe(null,null,function*(){var $,oe;if(($=b.current)!=null&&$.call(b)){if(w.current+=1,w.current>aC){A.current=!0,_.current();return}I(te=>te+1);return}const V=v.current,ie=m.current;if(V>=ie.length){A.current=!0,_.current();return}w.current=0,(oe=y.current)==null||oe.warn("🦜 connect bootstrap stalled",{attempt:V});let de;try{yield Promise.race([Promise.resolve(ie[V]()),new Promise((te,fe)=>{de=setTimeout(()=>{fe(new Error("connect bootstrap step timed out"))},d)})])}catch(te){}finally{de!==void 0&&clearTimeout(de),v.current=V+1,I(te=>te+1)}})},d);return()=>{clearTimeout(M)}},[e,t,n,r,s,a,d,N])}const xr={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 dC(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}=dC(e);if(t==="api"&&typeof n=="number")return n===429?xr.rateLimit:n>=500?xr.server:xr.default;switch(t){case"network":return xr.network;case"sse":return xr.interrupted;case"auth":return xr.connect;default:return xr.default}}function Pg(e){switch(e.code){case"MAX_RECONNECT":return xr.lost;case"ROUTING_FAILED":return xr.routing;default:return xr.connect}}const Rg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:h})=>{const{logger:m,conversationHistory:_}=ct(),[y,b]=L.useReducer(LA,Cg),[v,A]=L.useState(!1),[w,N]=L.useState(!1),I=L.useRef(y);I.current=y;const U=tC({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:_}),G=L.useRef(null),M=L.useRef(l),V=L.useRef(d),ie=L.useRef(u),de=L.useRef(f),$=L.useRef(!1),oe=L.useRef(!1),te=L.useRef(!1),fe=L.useRef(0),pe=L.useRef(0),ce=L.useRef(0),we=L.useRef(null),le=L.useRef(null),W=L.useRef([]),re=L.useRef(null),C=L.useCallback(()=>{b({type:"SET_CART_UPDATING",isUpdating:W.current.some(uC)})},[]),D=L.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),C(),se.resolve(Se)},[C]);M.current=l,V.current=d,ie.current=u,de.current=f,L.useEffect(()=>{const se=new AS({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=M.current)==null||qe.call(M,ve),$e&&D($e,{outcome:"success"});const{messagingSessionId:ee}=ae,_e=ee?PA(ae.content):null;ee&&_e&&((Je=de.current)==null||Je.call(de,{agentSessionId:ee,kind:_e.kind,productIds:_e.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=wg(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:Pg({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:Pg(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&&Jd(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}N($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 le.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,le.current=null}},[e,t,n,s,D]);const J=L.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(Jd(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=L.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)),D(se,{outcome:"failure",message:$e})}}}),[D]),Ae=L.useCallback(se=>Fe(null,null,function*(){var ae;const Se=G.current;if(!(!Se||$.current)){$.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:nC,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&&D(se,{outcome:"failure",message:oi(ve)})}finally{$.current=!1,oe.current=!1}}}),[r,U,J,P,m,D]),ke=L.useRef(Ae);ke.current=Ae;const ge=L.useCallback(()=>Fe(null,null,function*(){const se=G.current;if(!se||$.current)return;if(!I.current.conversationId&&!te.current){se.reconnect();return}$.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{$.current=!1,we.current=null}});we.current=Se,yield Se}),[J]),Le=L.useRef(ge);Le.current=ge;const je=L.useCallback(()=>Fe(null,null,function*(){const se=G.current;if(!se||$.current)return;const Se=U.getStoredConnectOptions(),ae=Se==null?void 0:Se.continuationToken;if(ae){$.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(Jd(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{$.current=!1}}}),[U,m]);L.useEffect(()=>{const se=()=>{const ee=Date.now();ee-ce.current<iC||(ce.current=ee,Le.current())},Se=()=>{if(document.visibilityState==="hidden"){pe.current=Date.now();return}const ee=G.current;if(!ee)return;const _e=pe.current?Date.now()-pe.current:0;pe.current=0,(te.current||!ee.isConnected||_e>rC)&&se()},ae=ee=>{ee.persisted&&se()},ve=()=>{pe.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=L.useCallback((se,Se)=>Fe(null,null,function*(){var ve;const ae=G.current;if(!ae){D(se,{outcome:"failure",message:"Messaging is unavailable"});return}if(te.current){yield ke.current(se);return}try{yield ae.sendMessage(se.text)}catch($e){if(Ig($e)){yield ke.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)),D(se,{outcome:"failure",message:dt})}}),[D]),ht=L.useCallback(se=>Fe(null,null,function*(){const Se=we.current;Se&&(yield Se),yield se()}),[]),Ot=L.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}),D(dt,{outcome:"timeout"})},sC)}),W.current.push(dt),C(),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:""})),ht(()=>Ke(dt,ee=>({text:se,displayContent:Se,options:ae,message:ee})))}),[Ke,ht,D,C]),Ut=L.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=L.useCallback(se=>{if(!G.current)return;const{prompt:Se,display:ae}=lC(se);Ot(Se,ae)},[Ot]),Tn=L.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=L.useCallback(()=>{const se=G.current,Se=le.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=L.useCallback(()=>{const se=G.current;if(se)return te.current=!1,N(!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]);cC({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:()=>$.current||we.current!==null});const Ne=L.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;L.useEffect(()=>{PS(We)},[We]);const et=L.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:Ne}),[y,We,Ut,yn,Be,Tn,Lt,Ne]);return x.jsx(Ng.Provider,{value:et,children:h})};var Lg=Symbol.for("immer-nothing"),Dg=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?Mg(e)||Array.isArray(e)||!!e[Dg]||!!((t=e.constructor)!=null&&t[Dg])||ea(e)||Wu(e):!1}var fC=Object.prototype.constructor.toString();function Mg(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)===fC}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 Zd(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Fg(e,t,n){const r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function pC(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 ef(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=Mg(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 tf(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=>tf(n,!0))),e}function Gu(){or(2)}function Xu(e){return Object.isFrozen(e)}var hC={};function Gi(e){const t=hC[e];return t||or(0,e),t}var ta;function Bg(){return ta}function mC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ug(e,t){t&&(Gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nf(e){rf(e),e.drafts_.forEach(gC),e.drafts_=null}function rf(e){e===ta&&(ta=e.parent_)}function Hg(e){return ta=mC(ta,e)}function gC(e){const t=e[Fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function jg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fn].modified_&&(nf(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,[]),nf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Lg?e:void 0}function Qu(e,t,n){if(Xu(t))return t;const r=t[Fn];if(!r)return qu(t,(s,a)=>$g(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)=>$g(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 $g(e,t,n,r,s,a,u){if(Fs(s)){const l=a&&t&&t.type_!==3&&!Zd(t.assigned_,r)?a.concat(r):void 0,d=Qu(e,s,l);if(Fg(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_&&tf(t,n)}function EC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Bg(),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=na);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var sf={get(e,t){if(t===Fn)return e;const n=Wi(e);if(!Zd(n,t))return yC(e,n,t);const r=n[t];return e.finalized_||!Yi(r)?r:r===of(e.base_,t)?(uf(e),e.copy_[t]=lf(r,e)):r},has(e,t){return t in Wi(e)},ownKeys(e){return Reflect.ownKeys(Wi(e))},set(e,t,n){const r=zg(Wi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=of(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(pC(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=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(sf,(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 sf.set.call(this,e[0],t,n,e[0])};function of(e,t){const n=e[Fn];return(n?Wi(n):e)[t]}function yC(e,t,n){var s;const r=zg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function zg(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 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 TC=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,h=>n.call(this,h,...f))}}typeof n!="function"&&or(6),r!==void 0&&typeof r!="function"&&or(7);let s;if(Yi(t)){const a=Hg(this),u=lf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?nf(a):rf(a)}return Ug(a,r),jg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Lg&&(s=void 0),this.autoFreeze_&&tf(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=bC(e));const t=Hg(this),n=lf(e,void 0);return n[Fn].isManual_=!0,rf(t),n}finishDraft(e,t){const n=e&&e[Fn];(!n||!n.isManual_)&&or(9);const{scope_:r}=n;return Ug(r,t),jg(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 lf(e,t){const n=ea(e)?Gi("MapSet").proxyMap_(e,t):Wu(e)?Gi("MapSet").proxySet_(e,t):EC(e,t);return(t?t.scope_:Bg()).drafts_.push(n),n}function bC(e){return Fs(e)||or(10,e),Vg(e)}function Vg(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=ef(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ef(e,!0);return qu(n,(r,s)=>{Fg(n,r,Vg(s))}),t&&(t.finalized_=!1),n}var _C=new TC,xC=_C.produce;function wC(e,t,n){var r=L.useMemo(function(){return xC(e)},[e]);return L.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"},qg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},SC=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Yg=L.createContext(null),Wg=L.createContext(null),vC=({children:e,dispatch:t})=>{const n=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_INITIALIZED,payload:b})},[t]),r=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_OPEN,payload:b})},[t]),s=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_INLINE,payload:b})},[t]),a=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:b})},[t]),u=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:b})},[t]),l=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:b})},[t]),d=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:b})},[t]),f=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_PARAMS,payload:b})},[t]),h=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:b})},[t]),m=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:b})},[t]),_=L.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:b})},[t]),y=L.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:h,setResponseMessage:m,setIsResponseLoading:_}),[n,r,s,a,u,l,d,f,h,m,_]);return x.jsx(Wg.Provider,{value:y,children:e})},AC=(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}},CC=({promptsConfig:e,children:t})=>{const[n,r]=wC(AC,ue(j(j({},qg),e||{}),{staticQuestions:SC((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(Yg.Provider,{value:n,children:x.jsx(vC,{dispatch:r,children:t})})};function NC(){var e=L.useRef(!0);return e.current?(e.current=!1,!0):e.current}function kC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function OC(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",Ju=function(e){L.useEffect(e,[])},IC=function(e){var t=L.useRef(e);t.current=e,Ju(function(){return function(){return t.current()}})},PC=function(e){var t=L.useRef(0),n=L.useState(e),r=n[0],s=n[1],a=L.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return IC(function(){cancelAnimationFrame(t.current)}),[r,a]},RC=function(e,t){return e===t};function LC(e,t){t===void 0&&(t=RC);var n=L.useRef(),r=L.useRef(e),s=NC();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var DC=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=PC({width:cf?window.innerWidth:r,height:cf?window.innerHeight:a}),d=l[0],f=l[1];return L.useEffect(function(){if(cf){var h=function(){var m=window.innerWidth,_=window.innerHeight;f({width:m,height:_}),u&&u(m,_)};return kC(window,"resize",h),function(){OC(window,"resize",h)}}},[]),d};const Gg=L.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}),MC=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=L.useState(e!=null?e:at.entryTypeProxy.entryType),[u,l]=L.useState(at.modeProxy.mode),[d,f]=L.useState({type:n||at.statusProxy.type,isOpen:at.statusProxy.isOpen,isMinimized:at.statusProxy.isMinimized}),[h,m]=L.useState(at.dialogProxy.position),[_,y]=L.useState(at.dialogProxy.isFullHeight),[b,v]=L.useState(at.dialogProxy.width),[A,w]=L.useState(at.modalProxy.isFullscreen),N=LC(d.type);L.useEffect(()=>{const U=G=>{const{property:M,value:V}=G.detail||{};if(!(!M||V===void 0)){if(M==="mode"){l(V);return}if(M==="entryType"){a(V);return}if(M==="isMinimized"){f(ie=>ue(j({},ie),{isMinimized:V}));return}if(M==="isOpen"){f(ie=>ue(j({},ie),{isOpen:V}));return}if(M==="type"){f(ie=>ue(j({},ie),{type:V}));return}if(M==="position"){m(V);return}if(M==="isFullHeight"){y(V);return}if(M==="width"){v(V);return}if(M==="isFullscreen"){w(V);return}}};return kS(U),()=>{OS(U)}},[]),Ju(()=>{e&&L0(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&&Pd(U),"dialogFullHeight"in t.options&&RS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Id(!!t.options.isModalFullscreen)});const I=L.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:N||"dialog",dialogPosition:h,isDialogFullHeight:_,dialogWidth:b,isModalFullscreen:A}),[u,s,d,N,h,_,b,A]);return x.jsx(Gg.Provider,{value:I,children:r})},FC={productId:Yo.productId,pdpLink:Yo.pdpLink},Xg=L.createContext(FC),BC=({children:e})=>{const[t,n]=L.useState(Yo.productId),[r,s]=L.useState(Yo.pdpLink);L.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 mS(u),()=>{gS(u)}},[]);const a=L.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(Xg.Provider,{value:a,children:e})},UC=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){_t(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){_t(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(_t(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(_t(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),_t(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,_t(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Qg=L.createContext({overrides:{},isInitialized:!1}),HC=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=L.useState({}),[a,u]=L.useState(!1);L.useEffect(()=>{Fe(null,null,function*(){let f={};e?(_t(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield UC(e)):t&&typeof t=="object"?(_t(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(_t(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=L.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return x.jsx(Qg.Provider,{value:l,children:n})},Kg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:h=!1,componentType:m,componentConfig:_,entryType:y,initialEntry:b,entryMessage:v,disclaimerText:A,disclaimerMarkdown:w,clientContext:N,searchPlaceholder:I,searchButtonLabel:U,searchConfig:G,suggestionButtonConfig:M,messageAlignment:V,autoScroll:ie,promptsConfig:de,showProductDescription:$,resetConversationMessage:oe,conversationHistory:te,messagingConfig:fe,overrides:pe,overridesUrl:ce,inlineOverrides:we,__features:le,children:W})=>{const re=L.useRef(!1);return re.current||(re.current=!0,bS({initialEntry:b,entryType:y,isDevelopment:h})),x.jsx(kA,{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:M,messageAlignment:V,autoScroll:ie,showProductDescription:$,componentConfig:_,clientContext:N,disclaimerMarkdown:w,disclaimerText:A,resetConversationMessage:oe,conversationHistory:te,isDevelopment:h,__features:le,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:x.jsx(MC,{entryType:y!=null?y:b==null?void 0:b.type,componentConfig:_,componentType:m,children:x.jsx(BC,{children:x.jsx(CC,{promptsConfig:de,children:x.jsx(HC,{overridesUrl:ce,inlineOverrides:we||pe,children:x.jsx(Rg,{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:h,onProductResult:fe==null?void 0:fe.onProductResult,children:W})})})})})})},ai=()=>{const e=L.useContext(Gg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var df={exports:{}},vn={},ff={exports:{}},pf={};var Jg;function jC(){return Jg||(Jg=1,(function(e){function t(W,re){var C=W.length;W.push(re);e:for(;0<C;){var D=C-1>>>1,J=W[D];if(0<s(J,re))W[D]=re,W[C]=J,C=D;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],C=W.pop();if(C!==re){W[0]=C;e:for(var D=0,J=W.length,P=J>>>1;D<P;){var Ae=2*(D+1)-1,ke=W[Ae],ge=Ae+1,Le=W[ge];if(0>s(ke,C))ge<J&&0>s(Le,ke)?(W[D]=Le,W[ge]=C,D=ge):(W[D]=ke,W[Ae]=C,D=Ae);else if(ge<J&&0>s(Le,C))W[D]=Le,W[ge]=C,D=ge;else break e}}return re}function s(W,re){var C=W.sortIndex-re.sortIndex;return C!==0?C: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=[],h=1,m=null,_=3,y=!1,b=!1,v=!1,A=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 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&&le(U,re.startTime-W)}}function G(W,re){b=!1,v&&(v=!1,w(ie),ie=-1),y=!0;var C=_;try{for(I(re),m=n(d);m!==null&&(!(m.expirationTime>re)||W&&!oe());){var D=m.callback;if(typeof D=="function"){m.callback=null,_=m.priorityLevel;var J=D(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&&le(U,Ae.startTime-re),P=!1}return P}finally{m=null,_=C,y=!1}}var M=!1,V=null,ie=-1,de=5,$=-1;function oe(){return!(e.unstable_now()-$<de)}function te(){if(V!==null){var W=e.unstable_now();$=W;var re=!0;try{re=V(!0,W)}finally{re?fe():(M=!1,V=null)}}else M=!1}var fe;if(typeof N=="function")fe=function(){N(te)};else if(typeof MessageChannel!="undefined"){var pe=new MessageChannel,ce=pe.port2;pe.port1.onmessage=te,fe=function(){ce.postMessage(null)}}else fe=function(){A(te,0)};function we(W){V=W,M||(M=!0,fe())}function le(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"):de=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(_){case 1:case 2:case 3:var re=3;break;default:re=_}var C=_;_=re;try{return W()}finally{_=C}},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 C=_;_=W;try{return re()}finally{_=C}},e.unstable_scheduleCallback=function(W,re,C){var D=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?D+C:D):C=D,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=C+J,W={id:h++,callback:re,priorityLevel:W,startTime:C,expirationTime:J,sortIndex:-1},C>D?(W.sortIndex=C,t(f,W),n(d)===null&&W===n(f)&&(v?(w(ie),ie=-1):v=!0,le(U,C-D))):(W.sortIndex=J,t(d,W),b||y||(b=!0,we(G))),W},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(W){var re=_;return function(){var C=_;_=re;try{return W.apply(this,arguments)}finally{_=C}}}})(pf)),pf}var Zg;function $C(){return Zg||(Zg=1,ff.exports=jC()),ff.exports}var e1;function zC(){if(e1)return vn;e1=1;var e=rr(),t=$C();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]*$/,h={},m={};function _(i){return d.call(m,i)?!0:d.call(h,i)?!1:f.test(i)?m[i]=!0:(h[i]=!0,!1)}function y(i,o,c,p){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,c,p){if(o===null||typeof o=="undefined"||y(i,o,c,p))return!0;if(p)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,p,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=p,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 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);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,N);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,N);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,p){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:p||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,c,E,p)&&(c=null),p||E===null?_(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,p=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,p?i.setAttributeNS(p,o,c):i.setAttribute(o,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),M=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),oe=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),le=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 C=Object.assign,D;function J(i){if(D===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
|
|
17
|
+
`+D+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 p=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){p=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){p=Z}i()}}catch(Z){if(Z&&p&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
|
|
18
18
|
`),T=p.stack.split(`
|
|
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 ke(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 pe: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 ht(i){var o=Ke(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),p=""+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){p=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(S){p=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ot(i){i._valueTracker||(i._valueTracker=ht(i))}function Ut(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),p="";return i&&(p=Ke(i)?i.checked?"true":"false":i.value),i=p,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 C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Lt(i,o){var c=o.defaultValue==null?"":o.defaultValue,p=o.checked!=null?o.checked:o.defaultChecked;c=je(o.value!=null?o.value:c),i._wrapperState={initialChecked:p,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 Ne(i,o){Be(i,o);var c=je(o.value),p=o.type;if(c!=null)p==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(p==="submit"||p==="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 p=o.type;if(!(p!=="submit"&&p!=="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,p){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&&p&&(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,p&&(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 C({},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),p=je(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),p!=null&&(i.defaultValue=""+p)}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,p,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,p,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 p=c.indexOf("--")===0,E=Qn(c,o[c],p);c==="float"&&(c="cssFloat"),p?i.setProperty(c,E):i[c]=E}}var ps=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tn(i,o){if(o){if(ps[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 xh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var _h=null,To=null,bo=null;function Rx(i){if(i=au(i)){if(typeof _h!="function")throw Error(n(280));var o=i.stateNode;o&&(o=vc(o),_h(i.stateNode,i.type,o))}}function Lx(i){To?bo?bo.push(i):bo=[i]:To=i}function Dx(){if(To){var i=To,o=bo;if(bo=To=null,Rx(i),o)for(i=0;i<o.length;i++)Rx(o[i])}}function Mx(i,o){return i(o)}function Fx(){}var wh=!1;function Bx(i,o,c){if(wh)return i(o,c);wh=!0;try{return Mx(i,o,c)}finally{wh=!1,(To!==null||bo!==null)&&(Fx(),Dx())}}function Ha(i,o){var c=i.stateNode;if(c===null)return null;var p=vc(c);if(p===null)return null;c=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Sh=!1;if(l)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){Sh=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch(i){Sh=!1}function HF(i,o,c,p,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,rc=null,ic=!1,vh=null,jF={onError:function(i){$a=!0,rc=i}};function $F(i,o,c,p,E,T,S,B,$){$a=!1,rc=null,HF.apply(jF,arguments)}function zF(i,o,c,p,E,T,S,B,$){if($F.apply(this,arguments),$a){if($a){var Z=rc;$a=!1,rc=null}else throw Error(n(198));ic||(ic=!0,vh=Z)}}function hs(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 Ux(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 Hx(i){if(hs(i)!==i)throw Error(n(188))}function VF(i){var o=i.alternate;if(!o){if(o=hs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,p=o;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(p=E.return,p!==null){c=p;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return Hx(E),i;if(T===p)return Hx(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==p.return)c=E,p=T;else{for(var S=!1,B=E.child;B;){if(B===c){S=!0,c=E,p=T;break}if(B===p){S=!0,p=E,c=T;break}B=B.sibling}if(!S){for(B=T.child;B;){if(B===c){S=!0,c=T,p=E;break}if(B===p){S=!0,p=T,c=E;break}B=B.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==p)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function jx(i){return i=VF(i),i!==null?$x(i):null}function $x(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=$x(i);if(o!==null)return o;i=i.sibling}return null}var zx=t.unstable_scheduleCallback,Vx=t.unstable_cancelCallback,qF=t.unstable_shouldYield,YF=t.unstable_requestPaint,Dt=t.unstable_now,WF=t.unstable_getCurrentPriorityLevel,Ah=t.unstable_ImmediatePriority,qx=t.unstable_UserBlockingPriority,sc=t.unstable_NormalPriority,GF=t.unstable_LowPriority,Yx=t.unstable_IdlePriority,oc=null,Dr=null;function XF(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(oc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var pr=Math.clz32?Math.clz32:JF,QF=Math.log,KF=Math.LN2;function JF(i){return i>>>=0,i===0?32:31-(QF(i)/KF|0)|0}var ac=64,uc=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 lc(i,o){var c=i.pendingLanes;if(c===0)return 0;var p=0,E=i.suspendedLanes,T=i.pingedLanes,S=c&268435455;if(S!==0){var B=S&~E;B!==0?p=za(B):(T&=S,T!==0&&(p=za(T)))}else S=c&~E,S!==0?p=za(S):T!==0&&(p=za(T));if(p===0)return 0;if(o!==0&&o!==p&&(o&E)===0&&(E=p&-p,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((p&4)!==0&&(p|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=p;0<o;)c=31-pr(o),E=1<<c,p|=i[c],o&=~E;return p}function ZF(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 eB(i,o){for(var c=i.suspendedLanes,p=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-pr(T),B=1<<S,$=E[S];$===-1?((B&c)===0||(B&p)!==0)&&(E[S]=ZF(B,o)):$<=o&&(i.expiredLanes|=B),T&=~B}}function Ch(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Wx(){var i=ac;return ac<<=1,(ac&4194240)===0&&(ac=64),i}function Nh(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-pr(o),i[o]=c}function tB(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 p=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-pr(c),T=1<<E;o[E]=0,p[E]=-1,i[E]=-1,c&=~T}}function kh(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var p=31-pr(c),E=1<<p;E&o|i[p]&o&&(i[p]|=o),c&=~E}}var ft=0;function Gx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Xx,Oh,Qx,Kx,Jx,Ih=!1,cc=[],bi=null,xi=null,_i=null,qa=new Map,Ya=new Map,wi=[],nB="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 Zx(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,p,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:p,nativeEvent:T,targetContainers:[E]},o!==null&&(o=au(o),o!==null&&Oh(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function rB(i,o,c,p,E){switch(o){case"focusin":return bi=Wa(bi,i,o,c,p,E),!0;case"dragenter":return xi=Wa(xi,i,o,c,p,E),!0;case"mouseover":return _i=Wa(_i,i,o,c,p,E),!0;case"pointerover":var T=E.pointerId;return qa.set(T,Wa(qa.get(T)||null,i,o,c,p,E)),!0;case"gotpointercapture":return T=E.pointerId,Ya.set(T,Wa(Ya.get(T)||null,i,o,c,p,E)),!0}return!1}function e_(i){var o=ms(i.target);if(o!==null){var c=hs(o);if(c!==null){if(o=c.tag,o===13){if(o=Ux(c),o!==null){i.blockedOn=o,Jx(i.priority,function(){Qx(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function dc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Rh(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var p=new c.constructor(c.type,c);jn=p,c.target.dispatchEvent(p),jn=null}else return o=au(c),o!==null&&Oh(o),i.blockedOn=c,!1;o.shift()}return!0}function t_(i,o,c){dc(i)&&c.delete(o)}function iB(){Ih=!1,bi!==null&&dc(bi)&&(bi=null),xi!==null&&dc(xi)&&(xi=null),_i!==null&&dc(_i)&&(_i=null),qa.forEach(t_),Ya.forEach(t_)}function Ga(i,o){i.blockedOn===o&&(i.blockedOn=null,Ih||(Ih=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iB)))}function Xa(i){function o(E){return Ga(E,i)}if(0<cc.length){Ga(cc[0],i);for(var c=1;c<cc.length;c++){var p=cc[c];p.blockedOn===i&&(p.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++)p=wi[c],p.blockedOn===i&&(p.blockedOn=null);for(;0<wi.length&&(c=wi[0],c.blockedOn===null);)e_(c),c.blockedOn===null&&wi.shift()}var xo=U.ReactCurrentBatchConfig,fc=!0;function sB(i,o,c,p){var E=ft,T=xo.transition;xo.transition=null;try{ft=1,Ph(i,o,c,p)}finally{ft=E,xo.transition=T}}function oB(i,o,c,p){var E=ft,T=xo.transition;xo.transition=null;try{ft=4,Ph(i,o,c,p)}finally{ft=E,xo.transition=T}}function Ph(i,o,c,p){if(fc){var E=Rh(i,o,c,p);if(E===null)Qh(i,o,p,pc,c),Zx(i,p);else if(rB(E,i,o,c,p))p.stopPropagation();else if(Zx(i,p),o&4&&-1<nB.indexOf(i)){for(;E!==null;){var T=au(E);if(T!==null&&Xx(T),T=Rh(i,o,c,p),T===null&&Qh(i,o,p,pc,c),T===E)break;E=T}E!==null&&p.stopPropagation()}else Qh(i,o,p,null,c)}}var pc=null;function Rh(i,o,c,p){if(pc=null,i=xh(p),i=ms(i),i!==null)if(o=hs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=Ux(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 n_(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(WF()){case Ah:return 1;case qx:return 4;case sc:case GF:return 16;case Yx:return 536870912;default:return 16}default:return 16}}var Si=null,Lh=null,hc=null;function r_(){if(hc)return hc;var i,o=Lh,c=o.length,p,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(p=1;p<=S&&o[c-p]===E[T-p];p++);return hc=E.slice(i,1<p?1-p:void 0)}function mc(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 gc(){return!0}function i_(){return!1}function $n(i){function o(c,p,E,T,S){this._reactName=c,this._targetInst=E,this.type=p,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)?gc:i_,this.isPropagationStopped=i_,this}return C(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=gc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=gc)},persist:function(){},isPersistent:gc}),o}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dh=$n(_o),Qa=C({},_o,{view:0,detail:0}),aB=$n(Qa),Mh,Fh,Ka,Ec=C({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,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"?(Mh=i.screenX-Ka.screenX,Fh=i.screenY-Ka.screenY):Fh=Mh=0,Ka=i),Mh)},movementY:function(i){return"movementY"in i?i.movementY:Fh}}),s_=$n(Ec),uB=C({},Ec,{dataTransfer:0}),lB=$n(uB),cB=C({},Qa,{relatedTarget:0}),Bh=$n(cB),dB=C({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),fB=$n(dB),pB=C({},_o,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),hB=$n(pB),mB=C({},_o,{data:0}),o_=$n(mB),gB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EB={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"},yB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=yB[i])?!!o[i]:!1}function Uh(){return TB}var bB=C({},Qa,{key:function(i){if(i.key){var o=gB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=mc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?EB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(i){return i.type==="keypress"?mc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?mc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),xB=$n(bB),_B=C({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),a_=$n(_B),wB=C({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),SB=$n(wB),vB=C({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),AB=$n(vB),CB=C({},Ec,{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}),NB=$n(CB),kB=[9,13,27,32],Hh=l&&"CompositionEvent"in window,Ja=null;l&&"documentMode"in document&&(Ja=document.documentMode);var OB=l&&"TextEvent"in window&&!Ja,u_=l&&(!Hh||Ja&&8<Ja&&11>=Ja),l_=" ",c_=!1;function d_(i,o){switch(i){case"keyup":return kB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var wo=!1;function IB(i,o){switch(i){case"compositionend":return f_(o);case"keypress":return o.which!==32?null:(c_=!0,l_);case"textInput":return i=o.data,i===l_&&c_?null:i;default:return null}}function PB(i,o){if(wo)return i==="compositionend"||!Hh&&d_(i,o)?(i=r_(),hc=Lh=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 u_&&o.locale!=="ko"?null:o.data;default:return null}}var RB={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 p_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!RB[i.type]:o==="textarea"}function h_(i,o,c,p){Lx(p),o=_c(o,"onChange"),0<o.length&&(c=new Dh("onChange","change",null,c,p),i.push({event:c,listeners:o}))}var Za=null,eu=null;function LB(i){P_(i,0)}function yc(i){var o=No(i);if(Ut(o))return i}function DB(i,o){if(i==="change")return o}var m_=!1;if(l){var jh;if(l){var $h="oninput"in document;if(!$h){var g_=document.createElement("div");g_.setAttribute("oninput","return;"),$h=typeof g_.oninput=="function"}jh=$h}else jh=!1;m_=jh&&(!document.documentMode||9<document.documentMode)}function E_(){Za&&(Za.detachEvent("onpropertychange",y_),eu=Za=null)}function y_(i){if(i.propertyName==="value"&&yc(eu)){var o=[];h_(o,eu,i,xh(i)),Bx(LB,o)}}function MB(i,o,c){i==="focusin"?(E_(),Za=o,eu=c,Za.attachEvent("onpropertychange",y_)):i==="focusout"&&E_()}function FB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return yc(eu)}function BB(i,o){if(i==="click")return yc(o)}function UB(i,o){if(i==="input"||i==="change")return yc(o)}function HB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var hr=typeof Object.is=="function"?Object.is:HB;function tu(i,o){if(hr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),p=Object.keys(o);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var E=c[p];if(!d.call(o,E)||!hr(i[E],o[E]))return!1}return!0}function T_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function b_(i,o){var c=T_(i);i=0;for(var p;c;){if(c.nodeType===3){if(p=i+c.textContent.length,i<=o&&p>=o)return{node:c,offset:o-i};i=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=T_(c)}}function x_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?x_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function __(){for(var i=window,o=yn();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(p){c=!1}if(c)i=o.contentWindow;else break;o=yn(i.document)}return o}function zh(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 jB(i){var o=__(),c=i.focusedElem,p=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&x_(c.ownerDocument.documentElement,c)){if(p!==null&&zh(c)){if(o=p.start,i=p.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(p.start,E);p=p.end===void 0?T:Math.min(p.end,E),!i.extend&&T>p&&(E=p,p=T,T=E),E=b_(c,T);var S=b_(c,p);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>p?(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 $B=l&&"documentMode"in document&&11>=document.documentMode,So=null,Vh=null,nu=null,qh=!1;function w_(i,o,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;qh||So==null||So!==yn(p)||(p=So,"selectionStart"in p&&zh(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),nu&&tu(nu,p)||(nu=p,p=_c(Vh,"onSelect"),0<p.length&&(o=new Dh("onSelect","select",null,o,c),i.push({event:o,listeners:p}),o.target=So)))}function Tc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var vo={animationend:Tc("Animation","AnimationEnd"),animationiteration:Tc("Animation","AnimationIteration"),animationstart:Tc("Animation","AnimationStart"),transitionend:Tc("Transition","TransitionEnd")},Yh={},S_={};l&&(S_=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 bc(i){if(Yh[i])return Yh[i];if(!vo[i])return i;var o=vo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in S_)return Yh[i]=o[c];return i}var v_=bc("animationend"),A_=bc("animationiteration"),C_=bc("animationstart"),N_=bc("transitionend"),k_=new Map,O_="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){k_.set(i,o),a(o,[i])}for(var Wh=0;Wh<O_.length;Wh++){var Gh=O_[Wh],zB=Gh.toLowerCase(),VB=Gh[0].toUpperCase()+Gh.slice(1);vi(zB,"on"+VB)}vi(v_,"onAnimationEnd"),vi(A_,"onAnimationIteration"),vi(C_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(N_,"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(" "),qB=new Set("cancel close invalid load scroll toggle".split(" ").concat(ru));function I_(i,o,c){var p=i.type||"unknown-event";i.currentTarget=c,zF(p,o,void 0,i),i.currentTarget=null}function P_(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var p=i[c],E=p.event;p=p.listeners;e:{var T=void 0;if(o)for(var S=p.length-1;0<=S;S--){var B=p[S],$=B.instance,Z=B.currentTarget;if(B=B.listener,$!==T&&E.isPropagationStopped())break e;I_(E,B,Z),T=$}else for(S=0;S<p.length;S++){if(B=p[S],$=B.instance,Z=B.currentTarget,B=B.listener,$!==T&&E.isPropagationStopped())break e;I_(E,B,Z),T=$}}}if(ic)throw i=vh,ic=!1,vh=null,i}function _t(i,o){var c=o[nm];c===void 0&&(c=o[nm]=new Set);var p=i+"__bubble";c.has(p)||(R_(o,i,2,!1),c.add(p))}function Xh(i,o,c){var p=0;o&&(p|=4),R_(c,i,p,o)}var xc="_reactListening"+Math.random().toString(36).slice(2);function iu(i){if(!i[xc]){i[xc]=!0,r.forEach(function(c){c!=="selectionchange"&&(qB.has(c)||Xh(c,!1,i),Xh(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[xc]||(o[xc]=!0,Xh("selectionchange",!1,o))}}function R_(i,o,c,p){switch(n_(o)){case 1:var E=sB;break;case 4:E=oB;break;default:E=Ph}c=E.bind(null,o,c,i),E=void 0,!Sh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),p?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 Qh(i,o,c,p,E){var T=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var S=p.tag;if(S===3||S===4){var B=p.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(S===4)for(S=p.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){p=T=S;continue e}B=B.parentNode}}p=p.return}Bx(function(){var Z=T,Ee=xh(c),Te=[];e:{var he=k_.get(i);if(he!==void 0){var Oe=Dh,Pe=i;switch(i){case"keypress":if(mc(c)===0)break e;case"keydown":case"keyup":Oe=xB;break;case"focusin":Pe="focus",Oe=Bh;break;case"focusout":Pe="blur",Oe=Bh;break;case"beforeblur":case"afterblur":Oe=Bh;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=s_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=lB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=SB;break;case v_:case A_:case C_:Oe=fB;break;case N_:Oe=AB;break;case"scroll":Oe=aB;break;case"wheel":Oe=NB;break;case"copy":case"cut":case"paste":Oe=hB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=a_}var Re=(o&4)!==0,Mt=!Re&&i==="scroll",X=Re?he!==null?he+"Capture":null:he;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&&(he=new Oe(he,Pe,null,c,Ee),Te.push({event:he,listeners:Re}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",he&&c!==jn&&(Pe=c.relatedTarget||c.fromElement)&&(ms(Pe)||Pe[Qr]))break e;if((Oe||he)&&(he=Ee.window===Ee?Ee:(he=Ee.ownerDocument)?he.defaultView||he.parentWindow:window,Oe?(Pe=c.relatedTarget||c.toElement,Oe=Z,Pe=Pe?ms(Pe):null,Pe!==null&&(Mt=hs(Pe),Pe!==Mt||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Oe=null,Pe=Z),Oe!==Pe)){if(Re=s_,_e="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Re=a_,_e="onPointerLeave",X="onPointerEnter",q="pointer"),Mt=Oe==null?he:No(Oe),K=Pe==null?he:No(Pe),he=new Re(_e,q+"leave",Oe,c,Ee),he.target=Mt,he.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&&L_(Te,he,Oe,Re,!1),Pe!==null&&Mt!==null&&L_(Te,Mt,Pe,Re,!0)}}e:{if(he=Z?No(Z):window,Oe=he.nodeName&&he.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&he.type==="file")var De=DB;else if(p_(he))if(m_)De=UB;else{De=FB;var ze=MB}else(Oe=he.nodeName)&&Oe.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(De=BB);if(De&&(De=De(i,Z))){h_(Te,De,c,Ee);break e}ze&&ze(i,he,Z),i==="focusout"&&(ze=he._wrapperState)&&ze.controlled&&he.type==="number"&&et(he,"number",he.value)}switch(ze=Z?No(Z):window,i){case"focusin":(p_(ze)||ze.contentEditable==="true")&&(So=ze,Vh=Z,nu=null);break;case"focusout":nu=Vh=So=null;break;case"mousedown":qh=!0;break;case"contextmenu":case"mouseup":case"dragend":qh=!1,w_(Te,c,Ee);break;case"selectionchange":if($B)break;case"keydown":case"keyup":w_(Te,c,Ee)}var Ve;if(Hh)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?d_(i,c)&&(Ge="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ge="onCompositionStart");Ge&&(u_&&c.locale!=="ko"&&(wo||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&wo&&(Ve=r_()):(Si=Ee,Lh="value"in Si?Si.value:Si.textContent,wo=!0)),ze=_c(Z,Ge),0<ze.length&&(Ge=new o_(Ge,i,null,c,Ee),Te.push({event:Ge,listeners:ze}),Ve?Ge.data=Ve:(Ve=f_(c),Ve!==null&&(Ge.data=Ve)))),(Ve=OB?IB(i,c):PB(i,c))&&(Z=_c(Z,"onBeforeInput"),0<Z.length&&(Ee=new o_("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:Z}),Ee.data=Ve))}P_(Te,o)})}function su(i,o,c){return{instance:i,listener:o,currentTarget:c}}function _c(i,o){for(var c=o+"Capture",p=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ha(i,c),T!=null&&p.unshift(su(i,T,E)),T=Ha(i,o),T!=null&&p.push(su(i,T,E))),i=i.return}return p}function Ao(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function L_(i,o,c,p,E){for(var T=o._reactName,S=[];c!==null&&c!==p;){var B=c,$=B.alternate,Z=B.stateNode;if($!==null&&$===p)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 YB=/\r\n?/g,WB=/\u0000|\uFFFD/g;function D_(i){return(typeof i=="string"?i:""+i).replace(YB,`
|
|
21
|
-
`).replace(WB,"")}function wc(i,o,c){if(o=D_(o),D_(i)!==o&&c)throw Error(n(425))}function Sc(){}var Kh=null,Jh=null;function Zh(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 em=typeof setTimeout=="function"?setTimeout:void 0,GB=typeof clearTimeout=="function"?clearTimeout:void 0,M_=typeof Promise=="function"?Promise:void 0,XB=typeof queueMicrotask=="function"?queueMicrotask:typeof M_!="undefined"?function(i){return M_.resolve(null).then(i).catch(QB)}:em;function QB(i){setTimeout(function(){throw i})}function tm(i,o){var c=o,p=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(p===0){i.removeChild(E),Xa(o);return}p--}else c!=="$"&&c!=="$?"&&c!=="$!"||p++;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 F_(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 Co=Math.random().toString(36).slice(2),Mr="__reactFiber$"+Co,ou="__reactProps$"+Co,Qr="__reactContainer$"+Co,nm="__reactEvents$"+Co,KB="__reactListeners$"+Co,JB="__reactHandles$"+Co;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=F_(i);i!==null;){if(c=i[Mr])return c;i=F_(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 No(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function vc(i){return i[ou]||null}var rm=[],ko=-1;function Ci(i){return{current:i}}function wt(i){0>ko||(i.current=rm[ko],rm[ko]=null,ko--)}function yt(i,o){ko++,rm[ko]=i.current,i.current=o}var Ni={},fn=Ci(Ni),In=Ci(!1),gs=Ni;function Oo(i,o){var c=i.type.contextTypes;if(!c)return Ni;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===o)return p.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Pn(i){return i=i.childContextTypes,i!=null}function Ac(){wt(In),wt(fn)}function B_(i,o,c){if(fn.current!==Ni)throw Error(n(168));yt(fn,o),yt(In,c)}function U_(i,o,c){var p=i.stateNode;if(o=o.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var E in p)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return C({},c,p)}function Cc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ni,gs=fn.current,yt(fn,i),yt(In,In.current),!0}function H_(i,o,c){var p=i.stateNode;if(!p)throw Error(n(169));c?(i=U_(i,o,gs),p.__reactInternalMemoizedMergedChildContext=i,wt(In),wt(fn),yt(fn,i)):wt(In),yt(In,c)}var Kr=null,Nc=!1,im=!1;function j_(i){Kr===null?Kr=[i]:Kr.push(i)}function ZB(i){Nc=!0,j_(i)}function ki(){if(!im&&Kr!==null){im=!0;var i=0,o=ft;try{var c=Kr;for(ft=1;i<c.length;i++){var p=c[i];do p=p(!0);while(p!==null)}Kr=null,Nc=!1}catch(E){throw Kr!==null&&(Kr=Kr.slice(i+1)),zx(Ah,ki),E}finally{ft=o,im=!1}}return null}var Io=[],Po=0,kc=null,Oc=0,Kn=[],Jn=0,Es=null,Jr=1,Zr="";function ys(i,o){Io[Po++]=Oc,Io[Po++]=kc,kc=i,Oc=o}function $_(i,o,c){Kn[Jn++]=Jr,Kn[Jn++]=Zr,Kn[Jn++]=Es,Es=i;var p=Jr;i=Zr;var E=32-pr(p)-1;p&=~(1<<E),c+=1;var T=32-pr(o)+E;if(30<T){var S=E-E%5;T=(p&(1<<S)-1).toString(32),p>>=S,E-=S,Jr=1<<32-pr(o)+E|c<<E|p,Zr=T+i}else Jr=1<<T|c<<E|p,Zr=i}function sm(i){i.return!==null&&(ys(i,1),$_(i,1,0))}function om(i){for(;i===kc;)kc=Io[--Po],Io[Po]=null,Oc=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 z_(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 V_(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 am(i){return(i.mode&1)!==0&&(i.flags&128)===0}function um(i){if(At){var o=Vn;if(o){var c=o;if(!V_(i,o)){if(am(i))throw Error(n(418));o=Ai(c.nextSibling);var p=zn;o&&V_(i,o)?z_(p,c):(i.flags=i.flags&-4097|2,At=!1,zn=i)}}else{if(am(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,zn=i}}}function q_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;zn=i}function Ic(i){if(i!==zn)return!1;if(!At)return q_(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Zh(i.type,i.memoizedProps)),o&&(o=Vn)){if(am(i))throw Y_(),Error(n(418));for(;o;)z_(i,o),o=Ai(o.nextSibling)}if(q_(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 Y_(){for(var i=Vn;i;)i=Ai(i.nextSibling)}function Ro(){Vn=zn=null,At=!1}function lm(i){mr===null?mr=[i]:mr.push(i)}var e7=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 p=c.stateNode}if(!p)throw Error(n(147,i));var E=p,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 Pc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function W_(i){var o=i._init;return o(i._payload)}function G_(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 p(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=e0(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&&W_(De)===q.type)?(_e=E(q,K.props),_e.ref=uu(X,q,K),_e.return=X,_e):(_e=nd(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=t0(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=e0(""+q,X.mode,K),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return K=nd(q.type,q.key,q.props,null,X.mode,K),K.ref=uu(X,null,q),K.return=X,K;case L:return q=t0(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;Pc(X,q)}return null}function he(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,he(X,q,De(K._payload),_e)}if(se(K)||re(K))return De!==null?null:Ee(X,q,K,_e,null);Pc(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);Pc(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=he(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=p(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=he(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=p(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(R7){return o(X,R7)}),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&&W_(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=nd(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=t0(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);Pc(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=e0(K,X.mode,_e),q.return=X,X=q),S(X)):c(X,q)}return Mt}var Lo=G_(!0),X_=G_(!1),Rc=Ci(null),Lc=null,Do=null,cm=null;function dm(){cm=Do=Lc=null}function fm(i){var o=Rc.current;wt(Rc),i._currentValue=o}function pm(i,o,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===c)break;i=i.return}}function Mo(i,o){Lc=i,cm=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(cm!==i)if(i={context:i,memoizedValue:o,next:null},Do===null){if(Lc===null)throw Error(n(308));Do=i,Lc.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 Q_(i,o,c,p){var E=o.interleaved;return E===null?(c.next=c,hm(o)):(c.next=E.next,E.next=c),o.interleaved=c,ei(i,p)}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 mm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function K_(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 p=i.updateQueue;if(p===null)return null;if(p=p.shared,(ot&2)!==0){var E=p.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),p.pending=o,ei(i,c)}return E=p.interleaved,E===null?(o.next=o,hm(p)):(o.next=E.next,E.next=o),p.interleaved=o,ei(i,c)}function Dc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var p=o.lanes;p&=i.pendingLanes,c|=p,o.lanes=c,kh(i,c)}}function J_(i,o){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){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:p.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:p.shared,effects:p.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Mc(i,o,c,p){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 he=B.lane,Oe=B.eventTime;if((p&he)===he){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(he=o,Oe=c,Re.tag){case 1:if(Pe=Re.payload,typeof Pe=="function"){Te=Pe.call(Oe,Te,he);break e}Te=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Re.payload,he=typeof Pe=="function"?Pe.call(Oe,Te,he):Pe,he==null)break e;Te=C({},Te,he);break e;case 2:Oi=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,he=E.effects,he===null?E.effects=[B]:he.push(B))}else Oe={eventTime:Oe,lane:he,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(Z=Ee=Oe,$=Te):Ee=Ee.next=Oe,S|=he;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;he=B,B=he.next,he.next=null,E.lastBaseUpdate=he,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 Z_(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var p=i[o],E=p.callback;if(E!==null){if(p.callback=null,p=c,typeof E!="function")throw Error(n(191,E));E.call(p)}}}var lu={},Fr=Ci(lu),cu=Ci(lu),du=Ci(lu);function bs(i){if(i===lu)throw Error(n(174));return i}function gm(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 ew(i){bs(du.current);var o=bs(Fr.current),c=xe(o,i.type);o!==c&&(yt(cu,i),yt(Fr,c))}function Em(i){cu.current===i&&(wt(Fr),wt(cu))}var Ct=Ci(0);function Fc(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 ym=[];function Tm(){for(var i=0;i<ym.length;i++)ym[i]._workInProgressVersionPrimary=null;ym.length=0}var Bc=U.ReactCurrentDispatcher,bm=U.ReactCurrentBatchConfig,xs=0,Nt=null,zt=null,Xt=null,Uc=!1,fu=!1,pu=0,t7=0;function pn(){throw Error(n(321))}function xm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!hr(i[c],o[c]))return!1;return!0}function _m(i,o,c,p,E,T){if(xs=T,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Bc.current=i===null||i.memoizedState===null?s7:o7,i=c(p,E),fu){T=0;do{if(fu=!1,pu=0,25<=T)throw Error(n(301));T+=1,Xt=zt=null,o.updateQueue=null,Bc.current=a7,i=c(p,E)}while(fu)}if(Bc.current=$c,o=zt!==null&&zt.next!==null,xs=0,Xt=zt=Nt=null,Uc=!1,o)throw Error(n(300));return i}function wm(){var i=pu!==0;return pu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Nt.memoizedState=Xt=i:Xt=Xt.next=i,Xt}function er(){if(zt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var o=Xt===null?Nt.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?Nt.memoizedState=Xt=i:Xt=Xt.next=i}return Xt}function hu(i,o){return typeof o=="function"?o(i):o}function Sm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var p=zt,E=p.baseQueue,T=c.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}p.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,p=p.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}),p=Z.hasEagerState?Z.eagerState:i(p,Z.action);else{var Te={lane:Ee,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};$===null?(B=$=Te,S=p):$=$.next=Te,Nt.lanes|=Ee,_s|=Ee}Z=Z.next}while(Z!==null&&Z!==T);$===null?S=p:$.next=B,hr(p,o.memoizedState)||(Rn=!0),o.memoizedState=p,o.baseState=S,o.baseQueue=$,c.lastRenderedState=p}if(i=c.interleaved,i!==null){E=i;do T=E.lane,Nt.lanes|=T,_s|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function vm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var p=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);hr(T,o.memoizedState)||(Rn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,p]}function tw(){}function nw(i,o){var c=Nt,p=er(),E=o(),T=!hr(p.memoizedState,E);if(T&&(p.memoizedState=E,Rn=!0),p=p.queue,Am(sw.bind(null,c,p,i),[i]),p.getSnapshot!==o||T||Xt!==null&&Xt.memoizedState.tag&1){if(c.flags|=2048,mu(9,iw.bind(null,c,p,E,o),void 0,null),Qt===null)throw Error(n(349));(xs&30)!==0||rw(c,o,E)}return E}function rw(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function iw(i,o,c,p){o.value=c,o.getSnapshot=p,ow(o)&&aw(i)}function sw(i,o,c){return c(function(){ow(o)&&aw(i)})}function ow(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!hr(i,c)}catch(p){return!0}}function aw(i){var o=ei(i,1);o!==null&&Tr(o,i,1,-1)}function uw(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:hu,lastRenderedState:i},o.queue=i,i=i.dispatch=i7.bind(null,Nt,i),[o.memoizedState,i]}function mu(i,o,c,p){return i={tag:i,create:o,destroy:c,deps:p,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(p=c.next,c.next=i,i.next=p,o.lastEffect=i)),i}function lw(){return er().memoizedState}function Hc(i,o,c,p){var E=Br();Nt.flags|=i,E.memoizedState=mu(1|o,c,void 0,p===void 0?null:p)}function jc(i,o,c,p){var E=er();p=p===void 0?null:p;var T=void 0;if(zt!==null){var S=zt.memoizedState;if(T=S.destroy,p!==null&&xm(p,S.deps)){E.memoizedState=mu(o,c,T,p);return}}Nt.flags|=i,E.memoizedState=mu(1|o,c,T,p)}function cw(i,o){return Hc(8390656,8,i,o)}function Am(i,o){return jc(2048,8,i,o)}function dw(i,o){return jc(4,2,i,o)}function fw(i,o){return jc(4,4,i,o)}function pw(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 hw(i,o,c){return c=c!=null?c.concat([i]):null,jc(4,4,pw.bind(null,o,i),c)}function Cm(){}function mw(i,o){var c=er();o=o===void 0?null:o;var p=c.memoizedState;return p!==null&&o!==null&&xm(o,p[1])?p[0]:(c.memoizedState=[i,o],i)}function gw(i,o){var c=er();o=o===void 0?null:o;var p=c.memoizedState;return p!==null&&o!==null&&xm(o,p[1])?p[0]:(i=i(),c.memoizedState=[i,o],i)}function Ew(i,o,c){return(xs&21)===0?(i.baseState&&(i.baseState=!1,Rn=!0),i.memoizedState=c):(hr(c,o)||(c=Wx(),Nt.lanes|=c,_s|=c,i.baseState=!0),o)}function n7(i,o){var c=ft;ft=c!==0&&4>c?c:4,i(!0);var p=bm.transition;bm.transition={};try{i(!1),o()}finally{ft=c,bm.transition=p}}function yw(){return er().memoizedState}function r7(i,o,c){var p=Di(i);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},Tw(i))bw(o,c);else if(c=Q_(i,o,c,p),c!==null){var E=xn();Tr(c,i,p,E),xw(c,o,p)}}function i7(i,o,c){var p=Di(i),E={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(Tw(i))bw(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,hr(B,S)){var $=o.interleaved;$===null?(E.next=E,hm(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(Z){}c=Q_(i,o,E,p),c!==null&&(E=xn(),Tr(c,i,p,E),xw(c,o,p))}}function Tw(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function bw(i,o){fu=Uc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function xw(i,o,c){if((c&4194240)!==0){var p=o.lanes;p&=i.pendingLanes,c|=p,o.lanes=c,kh(i,c)}}var $c={readContext:Zn,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},s7={readContext:Zn,useCallback:function(i,o){return Br().memoizedState=[i,o===void 0?null:o],i},useContext:Zn,useEffect:cw,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Hc(4194308,4,pw.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Hc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Hc(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 p=Br();return o=c!==void 0?c(o):o,p.memoizedState=p.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},p.queue=i,i=i.dispatch=r7.bind(null,Nt,i),[p.memoizedState,i]},useRef:function(i){var o=Br();return i={current:i},o.memoizedState=i},useState:uw,useDebugValue:Cm,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=uw(!1),o=i[0];return i=n7.bind(null,i[1]),Br().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var p=Nt,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||rw(p,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,cw(sw.bind(null,p,T,i),[i]),p.flags|=2048,mu(9,iw.bind(null,p,T,c,o),void 0,null),c},useId:function(){var i=Br(),o=Qt.identifierPrefix;if(At){var c=Zr,p=Jr;c=(p&~(1<<32-pr(p)-1)).toString(32)+c,o=":"+o+"R"+c,c=pu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=t7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},o7={readContext:Zn,useCallback:mw,useContext:Zn,useEffect:Am,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:Sm,useRef:lw,useState:function(){return Sm(hu)},useDebugValue:Cm,useDeferredValue:function(i){var o=er();return Ew(o,zt.memoizedState,i)},useTransition:function(){var i=Sm(hu)[0],o=er().memoizedState;return[i,o]},useMutableSource:tw,useSyncExternalStore:nw,useId:yw,unstable_isNewReconciler:!1},a7={readContext:Zn,useCallback:mw,useContext:Zn,useEffect:Am,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:vm,useRef:lw,useState:function(){return vm(hu)},useDebugValue:Cm,useDeferredValue:function(i){var o=er();return zt===null?o.memoizedState=i:Ew(o,zt.memoizedState,i)},useTransition:function(){var i=vm(hu)[0],o=er().memoizedState;return[i,o]},useMutableSource:tw,useSyncExternalStore:nw,useId:yw,unstable_isNewReconciler:!1};function gr(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Nm(i,o,c,p){o=i.memoizedState,c=c(p,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var zc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var p=xn(),E=Di(i),T=ti(p,E);T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,p),Dc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var p=xn(),E=Di(i),T=ti(p,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,p),Dc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=xn(),p=Di(i),E=ti(c,p);E.tag=2,o!=null&&(E.callback=o),o=Ii(i,E,p),o!==null&&(Tr(o,i,p,c),Dc(o,i,p))}};function _w(i,o,c,p,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,T,S):o.prototype&&o.prototype.isPureReactComponent?!tu(c,p)||!tu(E,T):!0}function ww(i,o,c){var p=!1,E=Ni,T=o.contextType;return typeof T=="object"&&T!==null?T=Zn(T):(E=Pn(o)?gs:fn.current,p=o.contextTypes,T=(p=p!=null)?Oo(i,E):Ni),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=zc,i.stateNode=o,o._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Sw(i,o,c,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,p),o.state!==i&&zc.enqueueReplaceState(o,o.state,null)}function km(i,o,c,p){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},mm(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&&zc.enqueueReplaceState(E,E.state,null),Mc(i,c,E,p),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Bo(i,o){try{var c="",p=o;do c+=ke(p),p=p.return;while(p);var E=c}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 z=`
|
|
20
|
+
`+E[S].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=S&&0<=B);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function ke(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 M:return"Portal";case de:return"Profiler";case ie:return"StrictMode";case fe:return"Suspense";case pe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case $: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 ce: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 ht(i){var o=Ke(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),p=""+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){p=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(S){p=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ot(i){i._valueTracker||(i._valueTracker=ht(i))}function Ut(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),p="";return i&&(p=Ke(i)?i.checked?"true":"false":i.value),i=p,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 C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Lt(i,o){var c=o.defaultValue==null?"":o.defaultValue,p=o.checked!=null?o.checked:o.defaultChecked;c=je(o.value!=null?o.value:c),i._wrapperState={initialChecked:p,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 Ne(i,o){Be(i,o);var c=je(o.value),p=o.type;if(c!=null)p==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(p==="submit"||p==="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 p=o.type;if(!(p!=="submit"&&p!=="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,p){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&&p&&(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,p&&(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 C({},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),p=je(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),p!=null&&(i.defaultValue=""+p)}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 _e(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,p,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,p,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 p=c.indexOf("--")===0,E=Qn(c,o[c],p);c==="float"&&(c="cssFloat"),p?i.setProperty(c,E):i[c]=E}}var ps=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tn(i,o){if(o){if(ps[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 _h(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xh=null,To=null,bo=null;function R_(i){if(i=au(i)){if(typeof xh!="function")throw Error(n(280));var o=i.stateNode;o&&(o=vc(o),xh(i.stateNode,i.type,o))}}function L_(i){To?bo?bo.push(i):bo=[i]:To=i}function D_(){if(To){var i=To,o=bo;if(bo=To=null,R_(i),o)for(i=0;i<o.length;i++)R_(o[i])}}function M_(i,o){return i(o)}function F_(){}var wh=!1;function B_(i,o,c){if(wh)return i(o,c);wh=!0;try{return M_(i,o,c)}finally{wh=!1,(To!==null||bo!==null)&&(F_(),D_())}}function Ha(i,o){var c=i.stateNode;if(c===null)return null;var p=vc(c);if(p===null)return null;c=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Sh=!1;if(l)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){Sh=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch(i){Sh=!1}function $F(i,o,c,p,E,T,S,B,z){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(Ee){this.onError(Ee)}}var $a=!1,rc=null,ic=!1,vh=null,zF={onError:function(i){$a=!0,rc=i}};function VF(i,o,c,p,E,T,S,B,z){$a=!1,rc=null,$F.apply(zF,arguments)}function qF(i,o,c,p,E,T,S,B,z){if(VF.apply(this,arguments),$a){if($a){var Z=rc;$a=!1,rc=null}else throw Error(n(198));ic||(ic=!0,vh=Z)}}function hs(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 U_(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 H_(i){if(hs(i)!==i)throw Error(n(188))}function YF(i){var o=i.alternate;if(!o){if(o=hs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,p=o;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(p=E.return,p!==null){c=p;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return H_(E),i;if(T===p)return H_(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==p.return)c=E,p=T;else{for(var S=!1,B=E.child;B;){if(B===c){S=!0,c=E,p=T;break}if(B===p){S=!0,p=E,c=T;break}B=B.sibling}if(!S){for(B=T.child;B;){if(B===c){S=!0,c=T,p=E;break}if(B===p){S=!0,p=T,c=E;break}B=B.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==p)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function j_(i){return i=YF(i),i!==null?$_(i):null}function $_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=$_(i);if(o!==null)return o;i=i.sibling}return null}var z_=t.unstable_scheduleCallback,V_=t.unstable_cancelCallback,WF=t.unstable_shouldYield,GF=t.unstable_requestPaint,Dt=t.unstable_now,XF=t.unstable_getCurrentPriorityLevel,Ah=t.unstable_ImmediatePriority,q_=t.unstable_UserBlockingPriority,sc=t.unstable_NormalPriority,QF=t.unstable_LowPriority,Y_=t.unstable_IdlePriority,oc=null,Dr=null;function KF(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(oc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var pr=Math.clz32?Math.clz32:eB,JF=Math.log,ZF=Math.LN2;function eB(i){return i>>>=0,i===0?32:31-(JF(i)/ZF|0)|0}var ac=64,uc=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 lc(i,o){var c=i.pendingLanes;if(c===0)return 0;var p=0,E=i.suspendedLanes,T=i.pingedLanes,S=c&268435455;if(S!==0){var B=S&~E;B!==0?p=za(B):(T&=S,T!==0&&(p=za(T)))}else S=c&~E,S!==0?p=za(S):T!==0&&(p=za(T));if(p===0)return 0;if(o!==0&&o!==p&&(o&E)===0&&(E=p&-p,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((p&4)!==0&&(p|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=p;0<o;)c=31-pr(o),E=1<<c,p|=i[c],o&=~E;return p}function tB(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 nB(i,o){for(var c=i.suspendedLanes,p=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-pr(T),B=1<<S,z=E[S];z===-1?((B&c)===0||(B&p)!==0)&&(E[S]=tB(B,o)):z<=o&&(i.expiredLanes|=B),T&=~B}}function Ch(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function W_(){var i=ac;return ac<<=1,(ac&4194240)===0&&(ac=64),i}function Nh(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-pr(o),i[o]=c}function rB(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 p=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-pr(c),T=1<<E;o[E]=0,p[E]=-1,i[E]=-1,c&=~T}}function kh(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var p=31-pr(c),E=1<<p;E&o|i[p]&o&&(i[p]|=o),c&=~E}}var ft=0;function G_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var X_,Oh,Q_,K_,J_,Ih=!1,cc=[],bi=null,_i=null,xi=null,qa=new Map,Ya=new Map,wi=[],iB="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 Z_(i,o){switch(i){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":qa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ya.delete(o.pointerId)}}function Wa(i,o,c,p,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:p,nativeEvent:T,targetContainers:[E]},o!==null&&(o=au(o),o!==null&&Oh(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function sB(i,o,c,p,E){switch(o){case"focusin":return bi=Wa(bi,i,o,c,p,E),!0;case"dragenter":return _i=Wa(_i,i,o,c,p,E),!0;case"mouseover":return xi=Wa(xi,i,o,c,p,E),!0;case"pointerover":var T=E.pointerId;return qa.set(T,Wa(qa.get(T)||null,i,o,c,p,E)),!0;case"gotpointercapture":return T=E.pointerId,Ya.set(T,Wa(Ya.get(T)||null,i,o,c,p,E)),!0}return!1}function ex(i){var o=ms(i.target);if(o!==null){var c=hs(o);if(c!==null){if(o=c.tag,o===13){if(o=U_(c),o!==null){i.blockedOn=o,J_(i.priority,function(){Q_(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function dc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Rh(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var p=new c.constructor(c.type,c);jn=p,c.target.dispatchEvent(p),jn=null}else return o=au(c),o!==null&&Oh(o),i.blockedOn=c,!1;o.shift()}return!0}function tx(i,o,c){dc(i)&&c.delete(o)}function oB(){Ih=!1,bi!==null&&dc(bi)&&(bi=null),_i!==null&&dc(_i)&&(_i=null),xi!==null&&dc(xi)&&(xi=null),qa.forEach(tx),Ya.forEach(tx)}function Ga(i,o){i.blockedOn===o&&(i.blockedOn=null,Ih||(Ih=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,oB)))}function Xa(i){function o(E){return Ga(E,i)}if(0<cc.length){Ga(cc[0],i);for(var c=1;c<cc.length;c++){var p=cc[c];p.blockedOn===i&&(p.blockedOn=null)}}for(bi!==null&&Ga(bi,i),_i!==null&&Ga(_i,i),xi!==null&&Ga(xi,i),qa.forEach(o),Ya.forEach(o),c=0;c<wi.length;c++)p=wi[c],p.blockedOn===i&&(p.blockedOn=null);for(;0<wi.length&&(c=wi[0],c.blockedOn===null);)ex(c),c.blockedOn===null&&wi.shift()}var _o=U.ReactCurrentBatchConfig,fc=!0;function aB(i,o,c,p){var E=ft,T=_o.transition;_o.transition=null;try{ft=1,Ph(i,o,c,p)}finally{ft=E,_o.transition=T}}function uB(i,o,c,p){var E=ft,T=_o.transition;_o.transition=null;try{ft=4,Ph(i,o,c,p)}finally{ft=E,_o.transition=T}}function Ph(i,o,c,p){if(fc){var E=Rh(i,o,c,p);if(E===null)Qh(i,o,p,pc,c),Z_(i,p);else if(sB(E,i,o,c,p))p.stopPropagation();else if(Z_(i,p),o&4&&-1<iB.indexOf(i)){for(;E!==null;){var T=au(E);if(T!==null&&X_(T),T=Rh(i,o,c,p),T===null&&Qh(i,o,p,pc,c),T===E)break;E=T}E!==null&&p.stopPropagation()}else Qh(i,o,p,null,c)}}var pc=null;function Rh(i,o,c,p){if(pc=null,i=_h(p),i=ms(i),i!==null)if(o=hs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=U_(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 nx(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(XF()){case Ah:return 1;case q_:return 4;case sc:case QF:return 16;case Y_:return 536870912;default:return 16}default:return 16}}var Si=null,Lh=null,hc=null;function rx(){if(hc)return hc;var i,o=Lh,c=o.length,p,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(p=1;p<=S&&o[c-p]===E[T-p];p++);return hc=E.slice(i,1<p?1-p:void 0)}function mc(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 gc(){return!0}function ix(){return!1}function $n(i){function o(c,p,E,T,S){this._reactName=c,this._targetInst=E,this.type=p,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)?gc:ix,this.isPropagationStopped=ix,this}return C(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=gc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=gc)},persist:function(){},isPersistent:gc}),o}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dh=$n(xo),Qa=C({},xo,{view:0,detail:0}),lB=$n(Qa),Mh,Fh,Ka,Ec=C({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,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"?(Mh=i.screenX-Ka.screenX,Fh=i.screenY-Ka.screenY):Fh=Mh=0,Ka=i),Mh)},movementY:function(i){return"movementY"in i?i.movementY:Fh}}),sx=$n(Ec),cB=C({},Ec,{dataTransfer:0}),dB=$n(cB),fB=C({},Qa,{relatedTarget:0}),Bh=$n(fB),pB=C({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),hB=$n(pB),mB=C({},xo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),gB=$n(mB),EB=C({},xo,{data:0}),ox=$n(EB),yB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TB={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"},bB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _B(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=bB[i])?!!o[i]:!1}function Uh(){return _B}var xB=C({},Qa,{key:function(i){if(i.key){var o=yB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=mc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?TB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(i){return i.type==="keypress"?mc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?mc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),wB=$n(xB),SB=C({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ax=$n(SB),vB=C({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),AB=$n(vB),CB=C({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),NB=$n(CB),kB=C({},Ec,{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}),OB=$n(kB),IB=[9,13,27,32],Hh=l&&"CompositionEvent"in window,Ja=null;l&&"documentMode"in document&&(Ja=document.documentMode);var PB=l&&"TextEvent"in window&&!Ja,ux=l&&(!Hh||Ja&&8<Ja&&11>=Ja),lx=" ",cx=!1;function dx(i,o){switch(i){case"keyup":return IB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var wo=!1;function RB(i,o){switch(i){case"compositionend":return fx(o);case"keypress":return o.which!==32?null:(cx=!0,lx);case"textInput":return i=o.data,i===lx&&cx?null:i;default:return null}}function LB(i,o){if(wo)return i==="compositionend"||!Hh&&dx(i,o)?(i=rx(),hc=Lh=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 ux&&o.locale!=="ko"?null:o.data;default:return null}}var DB={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 px(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!DB[i.type]:o==="textarea"}function hx(i,o,c,p){L_(p),o=xc(o,"onChange"),0<o.length&&(c=new Dh("onChange","change",null,c,p),i.push({event:c,listeners:o}))}var Za=null,eu=null;function MB(i){Px(i,0)}function yc(i){var o=No(i);if(Ut(o))return i}function FB(i,o){if(i==="change")return o}var mx=!1;if(l){var jh;if(l){var $h="oninput"in document;if(!$h){var gx=document.createElement("div");gx.setAttribute("oninput","return;"),$h=typeof gx.oninput=="function"}jh=$h}else jh=!1;mx=jh&&(!document.documentMode||9<document.documentMode)}function Ex(){Za&&(Za.detachEvent("onpropertychange",yx),eu=Za=null)}function yx(i){if(i.propertyName==="value"&&yc(eu)){var o=[];hx(o,eu,i,_h(i)),B_(MB,o)}}function BB(i,o,c){i==="focusin"?(Ex(),Za=o,eu=c,Za.attachEvent("onpropertychange",yx)):i==="focusout"&&Ex()}function UB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return yc(eu)}function HB(i,o){if(i==="click")return yc(o)}function jB(i,o){if(i==="input"||i==="change")return yc(o)}function $B(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var hr=typeof Object.is=="function"?Object.is:$B;function tu(i,o){if(hr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),p=Object.keys(o);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var E=c[p];if(!d.call(o,E)||!hr(i[E],o[E]))return!1}return!0}function Tx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function bx(i,o){var c=Tx(i);i=0;for(var p;c;){if(c.nodeType===3){if(p=i+c.textContent.length,i<=o&&p>=o)return{node:c,offset:o-i};i=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Tx(c)}}function _x(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?_x(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function xx(){for(var i=window,o=yn();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(p){c=!1}if(c)i=o.contentWindow;else break;o=yn(i.document)}return o}function zh(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 zB(i){var o=xx(),c=i.focusedElem,p=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&_x(c.ownerDocument.documentElement,c)){if(p!==null&&zh(c)){if(o=p.start,i=p.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(p.start,E);p=p.end===void 0?T:Math.min(p.end,E),!i.extend&&T>p&&(E=p,p=T,T=E),E=bx(c,T);var S=bx(c,p);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>p?(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 VB=l&&"documentMode"in document&&11>=document.documentMode,So=null,Vh=null,nu=null,qh=!1;function wx(i,o,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;qh||So==null||So!==yn(p)||(p=So,"selectionStart"in p&&zh(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),nu&&tu(nu,p)||(nu=p,p=xc(Vh,"onSelect"),0<p.length&&(o=new Dh("onSelect","select",null,o,c),i.push({event:o,listeners:p}),o.target=So)))}function Tc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var vo={animationend:Tc("Animation","AnimationEnd"),animationiteration:Tc("Animation","AnimationIteration"),animationstart:Tc("Animation","AnimationStart"),transitionend:Tc("Transition","TransitionEnd")},Yh={},Sx={};l&&(Sx=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 bc(i){if(Yh[i])return Yh[i];if(!vo[i])return i;var o=vo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in Sx)return Yh[i]=o[c];return i}var vx=bc("animationend"),Ax=bc("animationiteration"),Cx=bc("animationstart"),Nx=bc("transitionend"),kx=new Map,Ox="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){kx.set(i,o),a(o,[i])}for(var Wh=0;Wh<Ox.length;Wh++){var Gh=Ox[Wh],qB=Gh.toLowerCase(),YB=Gh[0].toUpperCase()+Gh.slice(1);vi(qB,"on"+YB)}vi(vx,"onAnimationEnd"),vi(Ax,"onAnimationIteration"),vi(Cx,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(Nx,"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(" "),WB=new Set("cancel close invalid load scroll toggle".split(" ").concat(ru));function Ix(i,o,c){var p=i.type||"unknown-event";i.currentTarget=c,qF(p,o,void 0,i),i.currentTarget=null}function Px(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var p=i[c],E=p.event;p=p.listeners;e:{var T=void 0;if(o)for(var S=p.length-1;0<=S;S--){var B=p[S],z=B.instance,Z=B.currentTarget;if(B=B.listener,z!==T&&E.isPropagationStopped())break e;Ix(E,B,Z),T=z}else for(S=0;S<p.length;S++){if(B=p[S],z=B.instance,Z=B.currentTarget,B=B.listener,z!==T&&E.isPropagationStopped())break e;Ix(E,B,Z),T=z}}}if(ic)throw i=vh,ic=!1,vh=null,i}function xt(i,o){var c=o[nm];c===void 0&&(c=o[nm]=new Set);var p=i+"__bubble";c.has(p)||(Rx(o,i,2,!1),c.add(p))}function Xh(i,o,c){var p=0;o&&(p|=4),Rx(c,i,p,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"&&(WB.has(c)||Xh(c,!1,i),Xh(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[_c]||(o[_c]=!0,Xh("selectionchange",!1,o))}}function Rx(i,o,c,p){switch(nx(o)){case 1:var E=aB;break;case 4:E=uB;break;default:E=Ph}c=E.bind(null,o,c,i),E=void 0,!Sh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),p?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 Qh(i,o,c,p,E){var T=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var S=p.tag;if(S===3||S===4){var B=p.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(S===4)for(S=p.return;S!==null;){var z=S.tag;if((z===3||z===4)&&(z=S.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;S=S.return}for(;B!==null;){if(S=ms(B),S===null)return;if(z=S.tag,z===5||z===6){p=T=S;continue e}B=B.parentNode}}p=p.return}B_(function(){var Z=T,Ee=_h(c),Te=[];e:{var he=kx.get(i);if(he!==void 0){var Oe=Dh,Pe=i;switch(i){case"keypress":if(mc(c)===0)break e;case"keydown":case"keyup":Oe=wB;break;case"focusin":Pe="focus",Oe=Bh;break;case"focusout":Pe="blur",Oe=Bh;break;case"beforeblur":case"afterblur":Oe=Bh;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=sx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=dB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=AB;break;case vx:case Ax:case Cx:Oe=hB;break;case Nx:Oe=NB;break;case"scroll":Oe=lB;break;case"wheel":Oe=OB;break;case"copy":case"cut":case"paste":Oe=gB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=ax}var Re=(o&4)!==0,Mt=!Re&&i==="scroll",X=Re?he!==null?he+"Capture":null:he;Re=[];for(var q=Z,K;q!==null;){K=q;var xe=K.stateNode;if(K.tag===5&&xe!==null&&(K=xe,X!==null&&(xe=Ha(q,X),xe!=null&&Re.push(su(q,xe,K)))),Mt)break;q=q.return}0<Re.length&&(he=new Oe(he,Pe,null,c,Ee),Te.push({event:he,listeners:Re}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",he&&c!==jn&&(Pe=c.relatedTarget||c.fromElement)&&(ms(Pe)||Pe[Qr]))break e;if((Oe||he)&&(he=Ee.window===Ee?Ee:(he=Ee.ownerDocument)?he.defaultView||he.parentWindow:window,Oe?(Pe=c.relatedTarget||c.toElement,Oe=Z,Pe=Pe?ms(Pe):null,Pe!==null&&(Mt=hs(Pe),Pe!==Mt||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Oe=null,Pe=Z),Oe!==Pe)){if(Re=sx,xe="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Re=ax,xe="onPointerLeave",X="onPointerEnter",q="pointer"),Mt=Oe==null?he:No(Oe),K=Pe==null?he:No(Pe),he=new Re(xe,q+"leave",Oe,c,Ee),he.target=Mt,he.relatedTarget=K,xe=null,ms(Ee)===Z&&(Re=new Re(X,q+"enter",Pe,c,Ee),Re.target=K,Re.relatedTarget=Mt,xe=Re),Mt=xe,Oe&&Pe)t:{for(Re=Oe,X=Pe,q=0,K=Re;K;K=Ao(K))q++;for(K=0,xe=X;xe;xe=Ao(xe))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&&Lx(Te,he,Oe,Re,!1),Pe!==null&&Mt!==null&&Lx(Te,Mt,Pe,Re,!0)}}e:{if(he=Z?No(Z):window,Oe=he.nodeName&&he.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&he.type==="file")var De=FB;else if(px(he))if(mx)De=jB;else{De=UB;var ze=BB}else(Oe=he.nodeName)&&Oe.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(De=HB);if(De&&(De=De(i,Z))){hx(Te,De,c,Ee);break e}ze&&ze(i,he,Z),i==="focusout"&&(ze=he._wrapperState)&&ze.controlled&&he.type==="number"&&et(he,"number",he.value)}switch(ze=Z?No(Z):window,i){case"focusin":(px(ze)||ze.contentEditable==="true")&&(So=ze,Vh=Z,nu=null);break;case"focusout":nu=Vh=So=null;break;case"mousedown":qh=!0;break;case"contextmenu":case"mouseup":case"dragend":qh=!1,wx(Te,c,Ee);break;case"selectionchange":if(VB)break;case"keydown":case"keyup":wx(Te,c,Ee)}var Ve;if(Hh)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?dx(i,c)&&(Ge="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ge="onCompositionStart");Ge&&(ux&&c.locale!=="ko"&&(wo||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&wo&&(Ve=rx()):(Si=Ee,Lh="value"in Si?Si.value:Si.textContent,wo=!0)),ze=xc(Z,Ge),0<ze.length&&(Ge=new ox(Ge,i,null,c,Ee),Te.push({event:Ge,listeners:ze}),Ve?Ge.data=Ve:(Ve=fx(c),Ve!==null&&(Ge.data=Ve)))),(Ve=PB?RB(i,c):LB(i,c))&&(Z=xc(Z,"onBeforeInput"),0<Z.length&&(Ee=new ox("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:Z}),Ee.data=Ve))}Px(Te,o)})}function su(i,o,c){return{instance:i,listener:o,currentTarget:c}}function xc(i,o){for(var c=o+"Capture",p=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ha(i,c),T!=null&&p.unshift(su(i,T,E)),T=Ha(i,o),T!=null&&p.push(su(i,T,E))),i=i.return}return p}function Ao(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Lx(i,o,c,p,E){for(var T=o._reactName,S=[];c!==null&&c!==p;){var B=c,z=B.alternate,Z=B.stateNode;if(z!==null&&z===p)break;B.tag===5&&Z!==null&&(B=Z,E?(z=Ha(c,T),z!=null&&S.unshift(su(c,z,B))):E||(z=Ha(c,T),z!=null&&S.push(su(c,z,B)))),c=c.return}S.length!==0&&i.push({event:o,listeners:S})}var GB=/\r\n?/g,XB=/\u0000|\uFFFD/g;function Dx(i){return(typeof i=="string"?i:""+i).replace(GB,`
|
|
21
|
+
`).replace(XB,"")}function wc(i,o,c){if(o=Dx(o),Dx(i)!==o&&c)throw Error(n(425))}function Sc(){}var Kh=null,Jh=null;function Zh(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 em=typeof setTimeout=="function"?setTimeout:void 0,QB=typeof clearTimeout=="function"?clearTimeout:void 0,Mx=typeof Promise=="function"?Promise:void 0,KB=typeof queueMicrotask=="function"?queueMicrotask:typeof Mx!="undefined"?function(i){return Mx.resolve(null).then(i).catch(JB)}:em;function JB(i){setTimeout(function(){throw i})}function tm(i,o){var c=o,p=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(p===0){i.removeChild(E),Xa(o);return}p--}else c!=="$"&&c!=="$?"&&c!=="$!"||p++;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 Fx(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 Co=Math.random().toString(36).slice(2),Mr="__reactFiber$"+Co,ou="__reactProps$"+Co,Qr="__reactContainer$"+Co,nm="__reactEvents$"+Co,ZB="__reactListeners$"+Co,e7="__reactHandles$"+Co;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=Fx(i);i!==null;){if(c=i[Mr])return c;i=Fx(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 No(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function vc(i){return i[ou]||null}var rm=[],ko=-1;function Ci(i){return{current:i}}function wt(i){0>ko||(i.current=rm[ko],rm[ko]=null,ko--)}function yt(i,o){ko++,rm[ko]=i.current,i.current=o}var Ni={},fn=Ci(Ni),In=Ci(!1),gs=Ni;function Oo(i,o){var c=i.type.contextTypes;if(!c)return Ni;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===o)return p.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Pn(i){return i=i.childContextTypes,i!=null}function Ac(){wt(In),wt(fn)}function Bx(i,o,c){if(fn.current!==Ni)throw Error(n(168));yt(fn,o),yt(In,c)}function Ux(i,o,c){var p=i.stateNode;if(o=o.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var E in p)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return C({},c,p)}function Cc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ni,gs=fn.current,yt(fn,i),yt(In,In.current),!0}function Hx(i,o,c){var p=i.stateNode;if(!p)throw Error(n(169));c?(i=Ux(i,o,gs),p.__reactInternalMemoizedMergedChildContext=i,wt(In),wt(fn),yt(fn,i)):wt(In),yt(In,c)}var Kr=null,Nc=!1,im=!1;function jx(i){Kr===null?Kr=[i]:Kr.push(i)}function t7(i){Nc=!0,jx(i)}function ki(){if(!im&&Kr!==null){im=!0;var i=0,o=ft;try{var c=Kr;for(ft=1;i<c.length;i++){var p=c[i];do p=p(!0);while(p!==null)}Kr=null,Nc=!1}catch(E){throw Kr!==null&&(Kr=Kr.slice(i+1)),z_(Ah,ki),E}finally{ft=o,im=!1}}return null}var Io=[],Po=0,kc=null,Oc=0,Kn=[],Jn=0,Es=null,Jr=1,Zr="";function ys(i,o){Io[Po++]=Oc,Io[Po++]=kc,kc=i,Oc=o}function $x(i,o,c){Kn[Jn++]=Jr,Kn[Jn++]=Zr,Kn[Jn++]=Es,Es=i;var p=Jr;i=Zr;var E=32-pr(p)-1;p&=~(1<<E),c+=1;var T=32-pr(o)+E;if(30<T){var S=E-E%5;T=(p&(1<<S)-1).toString(32),p>>=S,E-=S,Jr=1<<32-pr(o)+E|c<<E|p,Zr=T+i}else Jr=1<<T|c<<E|p,Zr=i}function sm(i){i.return!==null&&(ys(i,1),$x(i,1,0))}function om(i){for(;i===kc;)kc=Io[--Po],Io[Po]=null,Oc=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 zx(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 Vx(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 am(i){return(i.mode&1)!==0&&(i.flags&128)===0}function um(i){if(At){var o=Vn;if(o){var c=o;if(!Vx(i,o)){if(am(i))throw Error(n(418));o=Ai(c.nextSibling);var p=zn;o&&Vx(i,o)?zx(p,c):(i.flags=i.flags&-4097|2,At=!1,zn=i)}}else{if(am(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,zn=i}}}function qx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;zn=i}function Ic(i){if(i!==zn)return!1;if(!At)return qx(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Zh(i.type,i.memoizedProps)),o&&(o=Vn)){if(am(i))throw Yx(),Error(n(418));for(;o;)zx(i,o),o=Ai(o.nextSibling)}if(qx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(o===0){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 Yx(){for(var i=Vn;i;)i=Ai(i.nextSibling)}function Ro(){Vn=zn=null,At=!1}function lm(i){mr===null?mr=[i]:mr.push(i)}var n7=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 p=c.stateNode}if(!p)throw Error(n(147,i));var E=p,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 Pc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Wx(i){var o=i._init;return o(i._payload)}function Gx(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 p(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,xe){return q===null||q.tag!==6?(q=e0(K,X.mode,xe),q.return=X,q):(q=E(q,K),q.return=X,q)}function z(X,q,K,xe){var De=K.type;return De===V?Ee(X,q,K.props.children,xe,K.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===we&&Wx(De)===q.type)?(xe=E(q,K.props),xe.ref=uu(X,q,K),xe.return=X,xe):(xe=nd(K.type,K.key,K.props,null,X.mode,xe),xe.ref=uu(X,q,K),xe.return=X,xe)}function Z(X,q,K,xe){return q===null||q.tag!==4||q.stateNode.containerInfo!==K.containerInfo||q.stateNode.implementation!==K.implementation?(q=t0(K,X.mode,xe),q.return=X,q):(q=E(q,K.children||[]),q.return=X,q)}function Ee(X,q,K,xe,De){return q===null||q.tag!==7?(q=As(K,X.mode,xe,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=e0(""+q,X.mode,K),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return K=nd(q.type,q.key,q.props,null,X.mode,K),K.ref=uu(X,null,q),K.return=X,K;case M:return q=t0(q,X.mode,K),q.return=X,q;case we:var xe=q._init;return Te(X,xe(q._payload),K)}if(se(q)||re(q))return q=As(q,X.mode,K,null),q.return=X,q;Pc(X,q)}return null}function he(X,q,K,xe){var De=q!==null?q.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return De!==null?null:B(X,q,""+K,xe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case G:return K.key===De?z(X,q,K,xe):null;case M:return K.key===De?Z(X,q,K,xe):null;case we:return De=K._init,he(X,q,De(K._payload),xe)}if(se(K)||re(K))return De!==null?null:Ee(X,q,K,xe,null);Pc(X,K)}return null}function Oe(X,q,K,xe,De){if(typeof xe=="string"&&xe!==""||typeof xe=="number")return X=X.get(K)||null,B(q,X,""+xe,De);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case G:return X=X.get(xe.key===null?K:xe.key)||null,z(q,X,xe,De);case M:return X=X.get(xe.key===null?K:xe.key)||null,Z(q,X,xe,De);case we:var ze=xe._init;return Oe(X,q,K,ze(xe._payload),De)}if(se(xe)||re(xe))return X=X.get(K)||null,Ee(q,X,xe,De,null);Pc(q,xe)}return null}function Pe(X,q,K,xe){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=he(X,Ve,K[Ge],xe);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],xe),Ve!==null&&(q=T(Ve,q,Ge),ze===null?De=Ve:ze.sibling=Ve,ze=Ve);return At&&ys(X,Ge),De}for(Ve=p(X,Ve);Ge<K.length;Ge++)Kt=Oe(Ve,X,Ge,K[Ge],xe),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,xe){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=he(X,Ve,ut.value,xe);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,xe),ut!==null&&(q=T(ut,q,Ge),ze===null?De=ut:ze.sibling=ut,ze=ut);return At&&ys(X,Ge),De}for(Ve=p(X,Ve);!ut.done;Ge++,ut=K.next())ut=Oe(Ve,X,Ge,ut.value,xe),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(D7){return o(X,D7)}),At&&ys(X,Ge),De}function Mt(X,q,K,xe){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&&Wx(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,xe,K.key),q.return=X,X=q):(xe=nd(K.type,K.key,K.props,null,X.mode,xe),xe.ref=uu(X,q,K),xe.return=X,X=xe)}return S(X);case M: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=t0(K,X.mode,xe),q.return=X,X=q}return S(X);case we:return ze=K._init,Mt(X,q,ze(K._payload),xe)}if(se(K))return Pe(X,q,K,xe);if(re(K))return Re(X,q,K,xe);Pc(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=e0(K,X.mode,xe),q.return=X,X=q),S(X)):c(X,q)}return Mt}var Lo=Gx(!0),Xx=Gx(!1),Rc=Ci(null),Lc=null,Do=null,cm=null;function dm(){cm=Do=Lc=null}function fm(i){var o=Rc.current;wt(Rc),i._currentValue=o}function pm(i,o,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===c)break;i=i.return}}function Mo(i,o){Lc=i,cm=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(cm!==i)if(i={context:i,memoizedValue:o,next:null},Do===null){if(Lc===null)throw Error(n(308));Do=i,Lc.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 Qx(i,o,c,p){var E=o.interleaved;return E===null?(c.next=c,hm(o)):(c.next=E.next,E.next=c),o.interleaved=c,ei(i,p)}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 mm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kx(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 p=i.updateQueue;if(p===null)return null;if(p=p.shared,(ot&2)!==0){var E=p.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),p.pending=o,ei(i,c)}return E=p.interleaved,E===null?(o.next=o,hm(p)):(o.next=E.next,E.next=o),p.interleaved=o,ei(i,c)}function Dc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var p=o.lanes;p&=i.pendingLanes,c|=p,o.lanes=c,kh(i,c)}}function Jx(i,o){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){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:p.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:p.shared,effects:p.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Mc(i,o,c,p){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 z=B,Z=z.next;z.next=null,S===null?T=Z:S.next=Z,S=z;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==S&&(B===null?Ee.firstBaseUpdate=Z:B.next=Z,Ee.lastBaseUpdate=z))}if(T!==null){var Te=E.baseState;S=0,Ee=Z=z=null,B=T;do{var he=B.lane,Oe=B.eventTime;if((p&he)===he){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(he=o,Oe=c,Re.tag){case 1:if(Pe=Re.payload,typeof Pe=="function"){Te=Pe.call(Oe,Te,he);break e}Te=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Re.payload,he=typeof Pe=="function"?Pe.call(Oe,Te,he):Pe,he==null)break e;Te=C({},Te,he);break e;case 2:Oi=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,he=E.effects,he===null?E.effects=[B]:he.push(B))}else Oe={eventTime:Oe,lane:he,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(Z=Ee=Oe,z=Te):Ee=Ee.next=Oe,S|=he;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;he=B,B=he.next,he.next=null,E.lastBaseUpdate=he,E.shared.pending=null}}while(!0);if(Ee===null&&(z=Te),E.baseState=z,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);xs|=S,i.lanes=S,i.memoizedState=Te}}function Zx(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var p=i[o],E=p.callback;if(E!==null){if(p.callback=null,p=c,typeof E!="function")throw Error(n(191,E));E.call(p)}}}var lu={},Fr=Ci(lu),cu=Ci(lu),du=Ci(lu);function bs(i){if(i===lu)throw Error(n(174));return i}function gm(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:_e(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=_e(o,i)}wt(Fr),yt(Fr,o)}function Fo(){wt(Fr),wt(cu),wt(du)}function ew(i){bs(du.current);var o=bs(Fr.current),c=_e(o,i.type);o!==c&&(yt(cu,i),yt(Fr,c))}function Em(i){cu.current===i&&(wt(Fr),wt(cu))}var Ct=Ci(0);function Fc(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 ym=[];function Tm(){for(var i=0;i<ym.length;i++)ym[i]._workInProgressVersionPrimary=null;ym.length=0}var Bc=U.ReactCurrentDispatcher,bm=U.ReactCurrentBatchConfig,_s=0,Nt=null,zt=null,Xt=null,Uc=!1,fu=!1,pu=0,r7=0;function pn(){throw Error(n(321))}function _m(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!hr(i[c],o[c]))return!1;return!0}function xm(i,o,c,p,E,T){if(_s=T,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Bc.current=i===null||i.memoizedState===null?a7:u7,i=c(p,E),fu){T=0;do{if(fu=!1,pu=0,25<=T)throw Error(n(301));T+=1,Xt=zt=null,o.updateQueue=null,Bc.current=l7,i=c(p,E)}while(fu)}if(Bc.current=$c,o=zt!==null&&zt.next!==null,_s=0,Xt=zt=Nt=null,Uc=!1,o)throw Error(n(300));return i}function wm(){var i=pu!==0;return pu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Nt.memoizedState=Xt=i:Xt=Xt.next=i,Xt}function er(){if(zt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var o=Xt===null?Nt.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?Nt.memoizedState=Xt=i:Xt=Xt.next=i}return Xt}function hu(i,o){return typeof o=="function"?o(i):o}function Sm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var p=zt,E=p.baseQueue,T=c.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}p.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,p=p.baseState;var B=S=null,z=null,Z=T;do{var Ee=Z.lane;if((_s&Ee)===Ee)z!==null&&(z=z.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),p=Z.hasEagerState?Z.eagerState:i(p,Z.action);else{var Te={lane:Ee,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};z===null?(B=z=Te,S=p):z=z.next=Te,Nt.lanes|=Ee,xs|=Ee}Z=Z.next}while(Z!==null&&Z!==T);z===null?S=p:z.next=B,hr(p,o.memoizedState)||(Rn=!0),o.memoizedState=p,o.baseState=S,o.baseQueue=z,c.lastRenderedState=p}if(i=c.interleaved,i!==null){E=i;do T=E.lane,Nt.lanes|=T,xs|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function vm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var p=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);hr(T,o.memoizedState)||(Rn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,p]}function tw(){}function nw(i,o){var c=Nt,p=er(),E=o(),T=!hr(p.memoizedState,E);if(T&&(p.memoizedState=E,Rn=!0),p=p.queue,Am(sw.bind(null,c,p,i),[i]),p.getSnapshot!==o||T||Xt!==null&&Xt.memoizedState.tag&1){if(c.flags|=2048,mu(9,iw.bind(null,c,p,E,o),void 0,null),Qt===null)throw Error(n(349));(_s&30)!==0||rw(c,o,E)}return E}function rw(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function iw(i,o,c,p){o.value=c,o.getSnapshot=p,ow(o)&&aw(i)}function sw(i,o,c){return c(function(){ow(o)&&aw(i)})}function ow(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!hr(i,c)}catch(p){return!0}}function aw(i){var o=ei(i,1);o!==null&&Tr(o,i,1,-1)}function uw(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:hu,lastRenderedState:i},o.queue=i,i=i.dispatch=o7.bind(null,Nt,i),[o.memoizedState,i]}function mu(i,o,c,p){return i={tag:i,create:o,destroy:c,deps:p,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(p=c.next,c.next=i,i.next=p,o.lastEffect=i)),i}function lw(){return er().memoizedState}function Hc(i,o,c,p){var E=Br();Nt.flags|=i,E.memoizedState=mu(1|o,c,void 0,p===void 0?null:p)}function jc(i,o,c,p){var E=er();p=p===void 0?null:p;var T=void 0;if(zt!==null){var S=zt.memoizedState;if(T=S.destroy,p!==null&&_m(p,S.deps)){E.memoizedState=mu(o,c,T,p);return}}Nt.flags|=i,E.memoizedState=mu(1|o,c,T,p)}function cw(i,o){return Hc(8390656,8,i,o)}function Am(i,o){return jc(2048,8,i,o)}function dw(i,o){return jc(4,2,i,o)}function fw(i,o){return jc(4,4,i,o)}function pw(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 hw(i,o,c){return c=c!=null?c.concat([i]):null,jc(4,4,pw.bind(null,o,i),c)}function Cm(){}function mw(i,o){var c=er();o=o===void 0?null:o;var p=c.memoizedState;return p!==null&&o!==null&&_m(o,p[1])?p[0]:(c.memoizedState=[i,o],i)}function gw(i,o){var c=er();o=o===void 0?null:o;var p=c.memoizedState;return p!==null&&o!==null&&_m(o,p[1])?p[0]:(i=i(),c.memoizedState=[i,o],i)}function Ew(i,o,c){return(_s&21)===0?(i.baseState&&(i.baseState=!1,Rn=!0),i.memoizedState=c):(hr(c,o)||(c=W_(),Nt.lanes|=c,xs|=c,i.baseState=!0),o)}function i7(i,o){var c=ft;ft=c!==0&&4>c?c:4,i(!0);var p=bm.transition;bm.transition={};try{i(!1),o()}finally{ft=c,bm.transition=p}}function yw(){return er().memoizedState}function s7(i,o,c){var p=Di(i);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},Tw(i))bw(o,c);else if(c=Qx(i,o,c,p),c!==null){var E=_n();Tr(c,i,p,E),_w(c,o,p)}}function o7(i,o,c){var p=Di(i),E={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(Tw(i))bw(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,hr(B,S)){var z=o.interleaved;z===null?(E.next=E,hm(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(Z){}c=Qx(i,o,E,p),c!==null&&(E=_n(),Tr(c,i,p,E),_w(c,o,p))}}function Tw(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function bw(i,o){fu=Uc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function _w(i,o,c){if((c&4194240)!==0){var p=o.lanes;p&=i.pendingLanes,c|=p,o.lanes=c,kh(i,c)}}var $c={readContext:Zn,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},a7={readContext:Zn,useCallback:function(i,o){return Br().memoizedState=[i,o===void 0?null:o],i},useContext:Zn,useEffect:cw,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Hc(4194308,4,pw.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Hc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Hc(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 p=Br();return o=c!==void 0?c(o):o,p.memoizedState=p.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},p.queue=i,i=i.dispatch=s7.bind(null,Nt,i),[p.memoizedState,i]},useRef:function(i){var o=Br();return i={current:i},o.memoizedState=i},useState:uw,useDebugValue:Cm,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=uw(!1),o=i[0];return i=i7.bind(null,i[1]),Br().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var p=Nt,E=Br();if(At){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),Qt===null)throw Error(n(349));(_s&30)!==0||rw(p,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,cw(sw.bind(null,p,T,i),[i]),p.flags|=2048,mu(9,iw.bind(null,p,T,c,o),void 0,null),c},useId:function(){var i=Br(),o=Qt.identifierPrefix;if(At){var c=Zr,p=Jr;c=(p&~(1<<32-pr(p)-1)).toString(32)+c,o=":"+o+"R"+c,c=pu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=r7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},u7={readContext:Zn,useCallback:mw,useContext:Zn,useEffect:Am,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:Sm,useRef:lw,useState:function(){return Sm(hu)},useDebugValue:Cm,useDeferredValue:function(i){var o=er();return Ew(o,zt.memoizedState,i)},useTransition:function(){var i=Sm(hu)[0],o=er().memoizedState;return[i,o]},useMutableSource:tw,useSyncExternalStore:nw,useId:yw,unstable_isNewReconciler:!1},l7={readContext:Zn,useCallback:mw,useContext:Zn,useEffect:Am,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:vm,useRef:lw,useState:function(){return vm(hu)},useDebugValue:Cm,useDeferredValue:function(i){var o=er();return zt===null?o.memoizedState=i:Ew(o,zt.memoizedState,i)},useTransition:function(){var i=vm(hu)[0],o=er().memoizedState;return[i,o]},useMutableSource:tw,useSyncExternalStore:nw,useId:yw,unstable_isNewReconciler:!1};function gr(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Nm(i,o,c,p){o=i.memoizedState,c=c(p,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var zc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var p=_n(),E=Di(i),T=ti(p,E);T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,p),Dc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var p=_n(),E=Di(i),T=ti(p,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,p),Dc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=_n(),p=Di(i),E=ti(c,p);E.tag=2,o!=null&&(E.callback=o),o=Ii(i,E,p),o!==null&&(Tr(o,i,p,c),Dc(o,i,p))}};function xw(i,o,c,p,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,T,S):o.prototype&&o.prototype.isPureReactComponent?!tu(c,p)||!tu(E,T):!0}function ww(i,o,c){var p=!1,E=Ni,T=o.contextType;return typeof T=="object"&&T!==null?T=Zn(T):(E=Pn(o)?gs:fn.current,p=o.contextTypes,T=(p=p!=null)?Oo(i,E):Ni),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=zc,i.stateNode=o,o._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Sw(i,o,c,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,p),o.state!==i&&zc.enqueueReplaceState(o,o.state,null)}function km(i,o,c,p){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},mm(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&&zc.enqueueReplaceState(E,E.state,null),Mc(i,c,E,p),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Bo(i,o){try{var c="",p=o;do c+=ke(p),p=p.return;while(p);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 Om(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Im(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var u7=typeof WeakMap=="function"?WeakMap:Map;function vw(i,o,c){c=ti(-1,c),c.tag=3,c.payload={element:null};var p=o.value;return c.callback=function(){Qc||(Qc=!0,Ym=p),Im(i,o)},c}function Aw(i,o,c){c=ti(-1,c),c.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var E=o.value;c.payload=function(){return p(E)},c.callback=function(){Im(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Im(i,o),typeof p!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),c}function Cw(i,o,c){var p=i.pingCache;if(p===null){p=i.pingCache=new u7;var E=new Set;p.set(o,E)}else E=p.get(o),E===void 0&&(E=new Set,p.set(o,E));E.has(c)||(E.add(c),i=_7.bind(null,i,o,c),o.then(i,i))}function Nw(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 kw(i,o,c,p,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 l7=U.ReactCurrentOwner,Rn=!1;function bn(i,o,c,p){o.child=i===null?X_(o,null,c,p):Lo(o,i.child,c,p)}function Ow(i,o,c,p,E){c=c.render;var T=o.ref;return Mo(o,E),p=_m(i,o,c,p,T,E),c=wm(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&c&&sm(o),o.flags|=1,bn(i,o,p,E),o.child)}function Iw(i,o,c,p,E){if(i===null){var T=c.type;return typeof T=="function"&&!Zm(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,Pw(i,o,T,p,E)):(i=nd(c.type,null,p,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,p)&&i.ref===o.ref)return ni(i,o,E)}return o.flags|=1,i=Fi(T,p),i.ref=o.ref,i.return=o,o.child=i}function Pw(i,o,c,p,E){if(i!==null){var T=i.memoizedProps;if(tu(T,p)&&i.ref===o.ref)if(Rn=!1,o.pendingProps=p=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Rn=!0);else return o.lanes=i.lanes,ni(i,o,E)}return Pm(i,o,c,p,E)}function Rw(i,o,c){var p=o.pendingProps,E=p.children,T=i!==null?i.memoizedState:null;if(p.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},p=T!==null?T.baseLanes:c,yt(Ho,qn),qn|=p}else T!==null?(p=T.baseLanes|c,o.memoizedState=null):p=c,yt(Ho,qn),qn|=p;return bn(i,o,E,c),o.child}function Lw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Pm(i,o,c,p,E){var T=Pn(c)?gs:fn.current;return T=Oo(o,T),Mo(o,E),c=_m(i,o,c,p,T,E),p=wm(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&p&&sm(o),o.flags|=1,bn(i,o,c,E),o.child)}function Dw(i,o,c,p,E){if(Pn(c)){var T=!0;Cc(o)}else T=!1;if(Mo(o,E),o.stateNode===null)qc(i,o),ww(o,c,p),km(o,c,p,E),p=!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!==p||$!==Z)&&Sw(o,S,p,Z),Oi=!1;var he=o.memoizedState;S.state=he,Mc(o,p,S,E),$=o.memoizedState,B!==p||he!==$||In.current||Oi?(typeof Ee=="function"&&(Nm(o,c,Ee,p),$=o.memoizedState),(B=Oi||_w(o,c,B,p,he,$,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=p,o.memoizedState=$),S.props=p,S.state=$,S.context=Z,p=B):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{S=o.stateNode,K_(i,o),B=o.memoizedProps,Z=o.type===o.elementType?B:gr(o.type,B),S.props=Z,Te=o.pendingProps,he=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||he!==$)&&Sw(o,S,p,$),Oi=!1,he=o.memoizedState,S.state=he,Mc(o,p,S,E);var Pe=o.memoizedState;B!==Te||he!==Pe||In.current||Oi?(typeof Oe=="function"&&(Nm(o,c,Oe,p),Pe=o.memoizedState),(Z=Oi||_w(o,c,Z,p,he,Pe,$)||!1)?(Ee||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,Pe,$),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,Pe,$)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=Pe),S.props=p,S.state=Pe,S.context=$,p=Z):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),p=!1)}return Rm(i,o,c,p,T,E)}function Rm(i,o,c,p,E,T){Lw(i,o);var S=(o.flags&128)!==0;if(!p&&!S)return E&&H_(o,c,!1),ni(i,o,T);p=o.stateNode,l7.current=o;var B=S&&typeof c.getDerivedStateFromError!="function"?null:p.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=p.state,E&&H_(o,c,!0),o.child}function Mw(i){var o=i.stateNode;o.pendingContext?B_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&B_(i,o.context,!1),gm(i,o.containerInfo)}function Fw(i,o,c,p,E){return Ro(),lm(E),o.flags|=256,bn(i,o,c,p),o.child}var Lm={dehydrated:null,treeContext:null,retryLane:0};function Dm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Bw(i,o,c){var p=o.pendingProps,E=Ct.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(Ct,E&1),i===null)return um(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=p.children,i=p.fallback,T?(p=o.mode,T=o.child,S={mode:"hidden",children:S},(p&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=rd(S,p,0,null),i=As(i,p,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Dm(c),o.memoizedState=Lm,i):Mm(o,S));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return c7(i,o,S,p,B,E,c);if(T){T=p.fallback,S=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:p.children};return(S&1)===0&&o.child!==E?(p=o.child,p.childLanes=0,p.pendingProps=$,o.deletions=null):(p=Fi(E,$),p.subtreeFlags=E.subtreeFlags&14680064),B!==null?T=Fi(B,T):(T=As(T,S,c,null),T.flags|=2),T.return=o,p.return=o,p.sibling=T,o.child=p,p=T,T=o.child,S=i.child.memoizedState,S=S===null?Dm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~c,o.memoizedState=Lm,p}return T=i.child,i=T.sibling,p=Fi(T,{mode:"visible",children:p.children}),(o.mode&1)===0&&(p.lanes=c),p.return=o,p.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=p,o.memoizedState=null,p}function Mm(i,o){return o=rd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Vc(i,o,c,p){return p!==null&&lm(p),Lo(o,i.child,null,c),i=Mm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function c7(i,o,c,p,E,T,S){if(c)return o.flags&256?(o.flags&=-257,p=Om(Error(n(422))),Vc(i,o,S,p)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=p.fallback,E=o.mode,p=rd({mode:"visible",children:p.children},E,0,null),T=As(T,E,S,null),T.flags|=2,p.return=o,T.return=o,p.sibling=T,o.child=p,(o.mode&1)!==0&&Lo(o,i.child,null,S),o.child.memoizedState=Dm(S),o.memoizedState=Lm,T);if((o.mode&1)===0)return Vc(i,o,S,null);if(E.data==="$!"){if(p=E.nextSibling&&E.nextSibling.dataset,p)var B=p.dgst;return p=B,T=Error(n(419)),p=Om(T,p,void 0),Vc(i,o,S,p)}if(B=(S&i.childLanes)!==0,Rn||B){if(p=Qt,p!==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&(p.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ei(i,E),Tr(p,i,E,-1))}return Jm(),p=Om(Error(n(421))),Vc(i,o,S,p)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=w7.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=Mm(o,p.children),o.flags|=4096,o)}function Uw(i,o,c){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),pm(i.return,o,c)}function Fm(i,o,c,p,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=p,T.tail=c,T.tailMode=E)}function Hw(i,o,c){var p=o.pendingProps,E=p.revealOrder,T=p.tail;if(bn(i,o,p.children,c),p=Ct.current,(p&2)!==0)p=p&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&&Uw(i,c,o);else if(i.tag===19)Uw(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}p&=1}if(yt(Ct,p),(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&&Fc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Fm(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&&Fc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Fm(o,!0,c,null,T);break;case"together":Fm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function qc(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 d7(i,o,c){switch(o.tag){case 3:Mw(o),Ro();break;case 5:ew(o);break;case 1:Pn(o.type)&&Cc(o);break;case 4:gm(o,o.stateNode.containerInfo);break;case 10:var p=o.type._context,E=o.memoizedProps.value;yt(Rc,p._currentValue),p._currentValue=E;break;case 13:if(p=o.memoizedState,p!==null)return p.dehydrated!==null?(yt(Ct,Ct.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Bw(i,o,c):(yt(Ct,Ct.current&1),i=ni(i,o,c),i!==null?i.sibling:null);yt(Ct,Ct.current&1);break;case 19:if(p=(c&o.childLanes)!==0,(i.flags&128)!==0){if(p)return Hw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),yt(Ct,Ct.current),p)break;return null;case 22:case 23:return o.lanes=0,Rw(i,o,c)}return ni(i,o,c)}var jw,Bm,$w,zw;jw=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}},Bm=function(){},$w=function(i,o,c,p){var E=i.memoizedProps;if(E!==p){i=o.stateNode,bs(Fr.current);var T=null;switch(c){case"input":E=Tn(i,E),p=Tn(i,p),T=[];break;case"select":E=C({},E,{value:void 0}),p=C({},p,{value:void 0}),T=[];break;case"textarea":E=ae(i,E),p=ae(i,p),T=[];break;default:typeof E.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Sc)}tn(c,p);var S;c=null;for(Z in E)if(!p.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 p){var $=p[Z];if(B=E!=null?E[Z]:void 0,p.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)}},zw=function(i,o,c,p){c!==p&&(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 p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function hn(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,p=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,p|=E.subtreeFlags&14680064,p|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,p|=E.subtreeFlags,p|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=p,i.childLanes=c,o}function f7(i,o,c){var p=o.pendingProps;switch(om(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(o),null;case 1:return Pn(o.type)&&Ac(),hn(o),null;case 3:return p=o.stateNode,Fo(),wt(In),wt(fn),Tm(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Ic(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,mr!==null&&(Xm(mr),mr=null))),Bm(i,o),hn(o),null;case 5:Em(o);var E=bs(du.current);if(c=o.type,i!==null&&o.stateNode!=null)$w(i,o,c,p,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!p){if(o.stateNode===null)throw Error(n(166));return hn(o),null}if(i=bs(Fr.current),Ic(o)){p=o.stateNode,c=o.type;var T=o.memoizedProps;switch(p[Mr]=o,p[ou]=T,i=(o.mode&1)!==0,c){case"dialog":_t("cancel",p),_t("close",p);break;case"iframe":case"object":case"embed":_t("load",p);break;case"video":case"audio":for(E=0;E<ru.length;E++)_t(ru[E],p);break;case"source":_t("error",p);break;case"img":case"image":case"link":_t("error",p),_t("load",p);break;case"details":_t("toggle",p);break;case"input":Lt(p,T),_t("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!T.multiple},_t("invalid",p);break;case"textarea":ve(p,T),_t("invalid",p)}tn(c,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var B=T[S];S==="children"?typeof B=="string"?p.textContent!==B&&(T.suppressHydrationWarning!==!0&&wc(p.textContent,B,i),E=["children",B]):typeof B=="number"&&p.textContent!==""+B&&(T.suppressHydrationWarning!==!0&&wc(p.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(S)&&B!=null&&S==="onScroll"&&_t("scroll",p)}switch(c){case"input":Ot(p),We(p,T,!0);break;case"textarea":Ot(p),dt(p);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(p.onclick=Sc)}p=E,o.updateQueue=p,p!==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 p.is=="string"?i=S.createElement(c,{is:p.is}):(i=S.createElement(c),c==="select"&&(S=i,p.multiple?S.multiple=!0:p.size&&(S.size=p.size))):i=S.createElementNS(i,c),i[Mr]=o,i[ou]=p,jw(i,o,!1,!1),o.stateNode=i;e:{switch(S=Lr(c,p),c){case"dialog":_t("cancel",i),_t("close",i),E=p;break;case"iframe":case"object":case"embed":_t("load",i),E=p;break;case"video":case"audio":for(E=0;E<ru.length;E++)_t(ru[E],i);E=p;break;case"source":_t("error",i),E=p;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=p;break;case"details":_t("toggle",i),E=p;break;case"input":Lt(i,p),E=Tn(i,p),_t("invalid",i);break;case"option":E=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},E=C({},p,{value:void 0}),_t("invalid",i);break;case"textarea":ve(i,p),E=ae(i,p),_t("invalid",i);break;default:E=p}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,p,!1);break;case"textarea":Ot(i),dt(i);break;case"option":p.value!=null&&i.setAttribute("value",""+je(p.value));break;case"select":i.multiple=!!p.multiple,T=p.value,T!=null?Se(i,!!p.multiple,T,!1):p.defaultValue!=null&&Se(i,!!p.multiple,p.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Sc)}switch(c){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return hn(o),null;case 6:if(i&&o.stateNode!=null)zw(i,o,i.memoizedProps,p);else{if(typeof p!="string"&&o.stateNode===null)throw Error(n(166));if(c=bs(du.current),bs(Fr.current),Ic(o)){if(p=o.stateNode,c=o.memoizedProps,p[Mr]=o,(T=p.nodeValue!==c)&&(i=zn,i!==null))switch(i.tag){case 3:wc(p.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&wc(p.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else p=(c.nodeType===9?c:c.ownerDocument).createTextNode(p),p[Mr]=o,o.stateNode=p}return hn(o),null;case 13:if(wt(Ct),p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Y_(),Ro(),o.flags|=98560,T=!1;else if(T=Ic(o),p!==null&&p.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;hn(o),T=!1}else mr!==null&&(Xm(mr),mr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Ct.current&1)!==0?Vt===0&&(Vt=3):Jm())),o.updateQueue!==null&&(o.flags|=4),hn(o),null);case 4:return Fo(),Bm(i,o),i===null&&iu(o.stateNode.containerInfo),hn(o),null;case 10:return fm(o.type._context),hn(o),null;case 17:return Pn(o.type)&&Ac(),hn(o),null;case 19:if(wt(Ct),T=o.memoizedState,T===null)return hn(o),null;if(p=(o.flags&128)!==0,S=T.rendering,S===null)if(p)gu(T,!1);else{if(Vt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Fc(i),S!==null){for(o.flags|=128,gu(T,!1),p=S.updateQueue,p!==null&&(o.updateQueue=p,o.flags|=4),o.subtreeFlags=0,p=c,c=o.child;c!==null;)T=c,i=p,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(Ct,Ct.current&1|2),o.child}i=i.sibling}T.tail!==null&&Dt()>jo&&(o.flags|=128,p=!0,gu(T,!1),o.lanes=4194304)}else{if(!p)if(i=Fc(S),i!==null){if(o.flags|=128,p=!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 hn(o),null}else 2*Dt()-T.renderingStartTime>jo&&c!==1073741824&&(o.flags|=128,p=!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=Ct.current,yt(Ct,p?c&1|2:c&1),o):(hn(o),null);case 22:case 23:return Km(),p=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(o.flags|=8192),p&&(o.mode&1)!==0?(qn&1073741824)!==0&&(hn(o),o.subtreeFlags&6&&(o.flags|=8192)):hn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function p7(i,o){switch(om(o),o.tag){case 1:return Pn(o.type)&&Ac(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Fo(),wt(In),wt(fn),Tm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Em(o),null;case 13:if(wt(Ct),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(Ct),null;case 4:return Fo(),null;case 10:return fm(o.type._context),null;case 22:case 23:return Km(),null;case 24:return null;default:return null}}var Yc=!1,mn=!1,h7=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(p){It(i,o,p)}else c.current=null}function Um(i,o,c){try{c()}catch(p){It(i,o,p)}}var Vw=!1;function m7(i,o){if(Kh=fc,i=__(),zh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var E=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{c.nodeType,T.nodeType}catch(_e){c=null;break e}var S=0,B=-1,$=-1,Z=0,Ee=0,Te=i,he=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=S+E),Te!==T||p!==0&&Te.nodeType!==3||($=S+p),Te.nodeType===3&&(S+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)he=Te,Te=Oe;for(;;){if(Te===i)break t;if(he===c&&++Z===E&&(B=S),he===T&&++Ee===p&&($=S),(Oe=Te.nextSibling)!==null)break;Te=he,he=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(Jh={focusedElem:i,selectionRange:c},fc=!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=Vw,Vw=!1,Pe}function Eu(i,o,c){var p=o.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var E=p=p.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Um(o,c,T)}E=E.next}while(E!==p)}}function Wc(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 p=c.create;c.destroy=p()}c=c.next}while(c!==o)}}function Hm(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 qw(i){var o=i.alternate;o!==null&&(i.alternate=null,qw(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[nm],delete o[KB],delete o[JB])),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 Yw(i){return i.tag===5||i.tag===3||i.tag===4}function Ww(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yw(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 jm(i,o,c){var p=i.tag;if(p===5||p===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=Sc));else if(p!==4&&(i=i.child,i!==null))for(jm(i,o,c),i=i.sibling;i!==null;)jm(i,o,c),i=i.sibling}function $m(i,o,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for($m(i,o,c),i=i.sibling;i!==null;)$m(i,o,c),i=i.sibling}var nn=null,Er=!1;function Pi(i,o,c){for(c=c.child;c!==null;)Gw(i,o,c),c=c.sibling}function Gw(i,o,c){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(oc,c)}catch(B){}switch(c.tag){case 5:mn||Uo(c,o);case 6:var p=nn,E=Er;nn=null,Pi(i,o,c),nn=p,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?tm(i.parentNode,c):i.nodeType===1&&tm(i,c),Xa(i)):tm(nn,c.stateNode));break;case 4:p=nn,E=Er,nn=c.stateNode.containerInfo,Er=!0,Pi(i,o,c),nn=p,Er=E;break;case 0:case 11:case 14:case 15:if(!mn&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){E=p=p.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Um(c,o,S),E=E.next}while(E!==p)}Pi(i,o,c);break;case 1:if(!mn&&(Uo(c,o),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.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=(p=mn)||c.memoizedState!==null,Pi(i,o,c),mn=p):Pi(i,o,c);break;default:Pi(i,o,c)}}function Xw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new h7),o.forEach(function(p){var E=S7.bind(null,i,p);c.has(p)||(c.add(p),p.then(E,E))})}}function yr(i,o){var c=o.deletions;if(c!==null)for(var p=0;p<c.length;p++){var E=c[p];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));Gw(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;)Qw(o,i),o=o.sibling}function Qw(i,o){var c=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(o,i),Ur(i),p&4){try{Eu(3,i,i.return),Wc(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),p&512&&c!==null&&Uo(c,c.return);break;case 5:if(yr(o,i),Ur(i),p&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(p&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":Ne(E,T);break;case"textarea":$e(E,T);break;case"select":var he=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?Se(E,!!T.multiple,Oe,!1):he!==!!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),p&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),p&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||(qm=Dt())),p&4&&Xw(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),p&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(he=Ie,Oe=he.child,he.tag){case 0:case 11:case 14:case 15:Eu(4,he,he.return);break;case 1:Uo(he,he.return);var Pe=he.stateNode;if(typeof Pe.componentWillUnmount=="function"){p=he,c=he.return;try{o=p,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Re){It(p,c,Re)}}break;case 5:Uo(he,he.return);break;case 22:if(he.memoizedState!==null){Zw(Te);continue}}Oe!==null?(Oe.return=he,Ie=Oe):Zw(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),p&4&&Xw(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(Yw(c)){var p=c;break e}c=c.return}throw Error(n(160))}switch(p.tag){case 5:var E=p.stateNode;p.flags&32&&(st(E,""),p.flags&=-33);var T=Ww(i);$m(i,T,E);break;case 3:case 4:var S=p.stateNode.containerInfo,B=Ww(i);jm(i,B,S);break;default:throw Error(n(161))}}catch($){It(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function g7(i,o,c){Ie=i,Kw(i)}function Kw(i,o,c){for(var p=(i.mode&1)!==0;Ie!==null;){var E=Ie,T=E.child;if(E.tag===22&&p){var S=E.memoizedState!==null||Yc;if(!S){var B=E.alternate,$=B!==null&&B.memoizedState!==null||mn;B=Yc;var Z=mn;if(Yc=S,(mn=$)&&!Z)for(Ie=E;Ie!==null;)S=Ie,$=S.child,S.tag===22&&S.memoizedState!==null?e2(E):$!==null?($.return=S,Ie=$):e2(E);for(;T!==null;)Ie=T,Kw(T),T=T.sibling;Ie=E,Yc=B,mn=Z}Jw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ie=T):Jw(i)}}function Jw(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||Wc(5,o);break;case 1:var p=o.stateNode;if(o.flags&4&&!mn)if(c===null)p.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:gr(o.type,c.memoizedProps);p.componentDidUpdate(E,c.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&Z_(o,T,p);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}Z_(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&&Hm(o)}catch(he){It(o,o.return,he)}}if(o===i){Ie=null;break}if(c=o.sibling,c!==null){c.return=o.return,Ie=c;break}Ie=o.return}}function Zw(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 e2(i){for(;Ie!==null;){var o=Ie;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Wc(4,o)}catch($){It(o,c,$)}break;case 1:var p=o.stateNode;if(typeof p.componentDidMount=="function"){var E=o.return;try{p.componentDidMount()}catch($){It(o,E,$)}}var T=o.return;try{Hm(o)}catch($){It(o,T,$)}break;case 5:var S=o.return;try{Hm(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 E7=Math.ceil,Gc=U.ReactCurrentDispatcher,zm=U.ReactCurrentOwner,tr=U.ReactCurrentBatchConfig,ot=0,Qt=null,Ht=null,rn=0,qn=0,Ho=Ci(0),Vt=0,yu=null,_s=0,Xc=0,Vm=0,Tu=null,Ln=null,qm=0,jo=1/0,ri=null,Qc=!1,Ym=null,Ri=null,Kc=!1,Li=null,Jc=0,bu=0,Wm=null,Zc=-1,ed=0;function xn(){return(ot&6)!==0?Dt():Zc!==-1?Zc:Zc=Dt()}function Di(i){return(i.mode&1)===0?1:(ot&2)!==0&&rn!==0?rn&-rn:e7.transition!==null?(ed===0&&(ed=Wx()),ed):(i=ft,i!==0||(i=window.event,i=i===void 0?16:n_(i.type)),i)}function Tr(i,o,c,p){if(50<bu)throw bu=0,Wm=null,Error(n(185));Va(i,c,p),((ot&2)===0||i!==Qt)&&(i===Qt&&((ot&2)===0&&(Xc|=c),Vt===4&&Mi(i,rn)),Dn(i,p),c===1&&ot===0&&(o.mode&1)===0&&(jo=Dt()+500,Nc&&ki()))}function Dn(i,o){var c=i.callbackNode;eB(i,o);var p=lc(i,i===Qt?rn:0);if(p===0)c!==null&&Vx(c),i.callbackNode=null,i.callbackPriority=0;else if(o=p&-p,i.callbackPriority!==o){if(c!=null&&Vx(c),o===1)i.tag===0?ZB(n2.bind(null,i)):j_(n2.bind(null,i)),XB(function(){(ot&6)===0&&ki()}),c=null;else{switch(Gx(p)){case 1:c=Ah;break;case 4:c=qx;break;case 16:c=sc;break;case 536870912:c=Yx;break;default:c=sc}c=c2(c,t2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function t2(i,o){if(Zc=-1,ed=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if($o()&&i.callbackNode!==c)return null;var p=lc(i,i===Qt?rn:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||o)o=td(i,p);else{o=p;var E=ot;ot|=2;var T=i2();(Qt!==i||rn!==o)&&(ri=null,jo=Dt()+500,Ss(i,o));do try{b7();break}catch(B){r2(i,B)}while(!0);dm(),Gc.current=T,ot=E,Ht!==null?o=0:(Qt=null,rn=0,o=Vt)}if(o!==0){if(o===2&&(E=Ch(i),E!==0&&(p=E,o=Gm(i,E))),o===1)throw c=yu,Ss(i,0),Mi(i,p),Dn(i,Dt()),c;if(o===6)Mi(i,p);else{if(E=i.current.alternate,(p&30)===0&&!y7(E)&&(o=td(i,p),o===2&&(T=Ch(i),T!==0&&(p=T,o=Gm(i,T))),o===1))throw c=yu,Ss(i,0),Mi(i,p),Dn(i,Dt()),c;switch(i.finishedWork=E,i.finishedLanes=p,o){case 0:case 1:throw Error(n(345));case 2:vs(i,Ln,ri);break;case 3:if(Mi(i,p),(p&130023424)===p&&(o=qm+500-Dt(),10<o)){if(lc(i,0)!==0)break;if(E=i.suspendedLanes,(E&p)!==p){xn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=em(vs.bind(null,i,Ln,ri),o);break}vs(i,Ln,ri);break;case 4:if(Mi(i,p),(p&4194240)===p)break;for(o=i.eventTimes,E=-1;0<p;){var S=31-pr(p);T=1<<S,S=o[S],S>E&&(E=S),p&=~T}if(p=E,p=Dt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*E7(p/1960))-p,10<p){i.timeoutHandle=em(vs.bind(null,i,Ln,ri),p);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?t2.bind(null,i):null}function Gm(i,o){var c=Tu;return i.current.memoizedState.isDehydrated&&(Ss(i,o).flags|=256),i=td(i,o),i!==2&&(o=Ln,Ln=c,o!==null&&Xm(o)),i}function Xm(i){Ln===null?Ln=i:Ln.push.apply(Ln,i)}function y7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var p=0;p<c.length;p++){var E=c[p],T=E.getSnapshot;E=E.value;try{if(!hr(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&=~Vm,o&=~Xc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-pr(o),p=1<<c;i[c]=-1,o&=~p}}function n2(i){if((ot&6)!==0)throw Error(n(327));$o();var o=lc(i,0);if((o&1)===0)return Dn(i,Dt()),null;var c=td(i,o);if(i.tag!==0&&c===2){var p=Ch(i);p!==0&&(o=p,c=Gm(i,p))}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 Qm(i,o){var c=ot;ot|=1;try{return i(o)}finally{ot=c,ot===0&&(jo=Dt()+500,Nc&&ki())}}function ws(i){Li!==null&&Li.tag===0&&(ot&6)===0&&$o();var o=ot;ot|=1;var c=tr.transition,p=ft;try{if(tr.transition=null,ft=1,i)return i()}finally{ft=p,tr.transition=c,ot=o,(ot&6)===0&&ki()}}function Km(){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,GB(c)),Ht!==null)for(c=Ht.return;c!==null;){var p=c;switch(om(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Ac();break;case 3:Fo(),wt(In),wt(fn),Tm();break;case 5:Em(p);break;case 4:Fo();break;case 13:wt(Ct);break;case 19:wt(Ct);break;case 10:fm(p.type._context);break;case 22:case 23:Km()}c=c.return}if(Qt=i,Ht=i=Fi(i.current,null),rn=qn=o,Vt=0,yu=null,Vm=Xc=_s=0,Ln=Tu=null,Ts!==null){for(o=0;o<Ts.length;o++)if(c=Ts[o],p=c.interleaved,p!==null){c.interleaved=null;var E=p.next,T=c.pending;if(T!==null){var S=T.next;T.next=E,p.next=S}c.pending=p}Ts=null}return i}function r2(i,o){do{var c=Ht;try{if(dm(),Bc.current=$c,Uc){for(var p=Nt.memoizedState;p!==null;){var E=p.queue;E!==null&&(E.pending=null),p=p.next}Uc=!1}if(xs=0,Xt=zt=Nt=null,fu=!1,pu=0,zm.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 he=Ee.alternate;he?(Ee.updateQueue=he.updateQueue,Ee.memoizedState=he.memoizedState,Ee.lanes=he.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=Nw(S);if(Oe!==null){Oe.flags&=-257,kw(Oe,S,B,T,o),Oe.mode&1&&Cw(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){Cw(T,Z,o),Jm();break e}$=Error(n(426))}}else if(At&&B.mode&1){var Mt=Nw(S);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),kw(Mt,S,B,T,o),lm(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=vw(T,$,o);J_(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=Aw(T,B,o);J_(T,_e);break e}}T=T.return}while(T!==null)}o2(c)}catch(De){o=De,Ht===c&&c!==null&&(Ht=c=c.return);continue}break}while(!0)}function i2(){var i=Gc.current;return Gc.current=$c,i===null?$c:i}function Jm(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Qt===null||(_s&268435455)===0&&(Xc&268435455)===0||Mi(Qt,rn)}function td(i,o){var c=ot;ot|=2;var p=i2();(Qt!==i||rn!==o)&&(ri=null,Ss(i,o));do try{T7();break}catch(E){r2(i,E)}while(!0);if(dm(),ot=c,Gc.current=p,Ht!==null)throw Error(n(261));return Qt=null,rn=0,Vt}function T7(){for(;Ht!==null;)s2(Ht)}function b7(){for(;Ht!==null&&!qF();)s2(Ht)}function s2(i){var o=l2(i.alternate,i,qn);i.memoizedProps=i.pendingProps,o===null?o2(i):Ht=o,zm.current=null}function o2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=f7(c,o,qn),c!==null){Ht=c;return}}else{if(c=p7(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 p=ft,E=tr.transition;try{tr.transition=null,ft=1,x7(i,o,c,p)}finally{tr.transition=E,ft=p}return null}function x7(i,o,c,p){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(tB(i,T),i===Qt&&(Ht=Qt=null,rn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Kc||(Kc=!0,c2(sc,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,zm.current=null,m7(i,c),Qw(c,i),jB(Jh),fc=!!Kh,Jh=Kh=null,i.current=c,g7(c),YF(),ot=B,ft=S,tr.transition=T}else i.current=c;if(Kc&&(Kc=!1,Li=i,Jc=E),T=i.pendingLanes,T===0&&(Ri=null),XF(c.stateNode),Dn(i,Dt()),o!==null)for(p=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],p(E.value,{componentStack:E.stack,digest:E.digest});if(Qc)throw Qc=!1,i=Ym,Ym=null,i;return(Jc&1)!==0&&i.tag!==0&&$o(),T=i.pendingLanes,(T&1)!==0?i===Wm?bu++:(bu=0,Wm=i):bu=0,ki(),null}function $o(){if(Li!==null){var i=Gx(Jc),o=tr.transition,c=ft;try{if(tr.transition=null,ft=16>i?16:i,Li===null)var p=!1;else{if(i=Li,Li=null,Jc=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 he=Ee.sibling,Oe=Ee.return;if(qw(Ee),Ee===Z){Ie=null;break}if(he!==null){he.return=Oe,Ie=he;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:Wc(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,ki(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(oc,i)}catch(De){}p=!0}return p}finally{ft=c,tr.transition=o}}return!1}function a2(i,o,c){o=Bo(c,o),o=vw(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)a2(i,i,c);else for(;o!==null;){if(o.tag===3){a2(o,i,c);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ri===null||!Ri.has(p))){i=Bo(c,i),i=Aw(o,i,1),o=Ii(o,i,1),i=xn(),o!==null&&(Va(o,1,i),Dn(o,i));break}}o=o.return}}function _7(i,o,c){var p=i.pingCache;p!==null&&p.delete(o),o=xn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(rn&c)===c&&(Vt===4||Vt===3&&(rn&130023424)===rn&&500>Dt()-qm?Ss(i,0):Vm|=c),Dn(i,o)}function u2(i,o){o===0&&((i.mode&1)===0?o=1:(o=uc,uc<<=1,(uc&130023424)===0&&(uc=4194304)));var c=xn();i=ei(i,o),i!==null&&(Va(i,o,c),Dn(i,c))}function w7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),u2(i,c)}function S7(i,o){var c=0;switch(i.tag){case 13:var p=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(o),u2(i,c)}var l2;l2=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,d7(i,o,c);Rn=(i.flags&131072)!==0}else Rn=!1,At&&(o.flags&1048576)!==0&&$_(o,Oc,o.index);switch(o.lanes=0,o.tag){case 2:var p=o.type;qc(i,o),i=o.pendingProps;var E=Oo(o,fn.current);Mo(o,c),E=_m(null,o,p,i,E,c);var T=wm();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(p)?(T=!0,Cc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,mm(o),E.updater=zc,o.stateNode=E,E._reactInternals=o,km(o,p,i,c),o=Rm(null,o,p,!0,T,c)):(o.tag=0,At&&T&&sm(o),bn(null,o,E,c),o=o.child),o;case 16:p=o.elementType;e:{switch(qc(i,o),i=o.pendingProps,E=p._init,p=E(p._payload),o.type=p,E=o.tag=A7(p),i=gr(p,i),E){case 0:o=Pm(null,o,p,i,c);break e;case 1:o=Dw(null,o,p,i,c);break e;case 11:o=Ow(null,o,p,i,c);break e;case 14:o=Iw(null,o,p,gr(p.type,i),c);break e}throw Error(n(306,p,""))}return o;case 0:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Pm(i,o,p,E,c);case 1:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Dw(i,o,p,E,c);case 3:e:{if(Mw(o),i===null)throw Error(n(387));p=o.pendingProps,T=o.memoizedState,E=T.element,K_(i,o),Mc(o,p,null,c);var S=o.memoizedState;if(p=S.element,T.isDehydrated)if(T={element:p,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=Fw(i,o,p,c,E);break e}else if(p!==E){E=Bo(Error(n(424)),o),o=Fw(i,o,p,c,E);break e}else for(Vn=Ai(o.stateNode.containerInfo.firstChild),zn=o,At=!0,mr=null,c=X_(o,null,p,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ro(),p===E){o=ni(i,o,c);break e}bn(i,o,p,c)}o=o.child}return o;case 5:return ew(o),i===null&&um(o),p=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Zh(p,E)?S=null:T!==null&&Zh(p,T)&&(o.flags|=32),Lw(i,o),bn(i,o,S,c),o.child;case 6:return i===null&&um(o),null;case 13:return Bw(i,o,c);case 4:return gm(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Lo(o,null,p,c):bn(i,o,p,c),o.child;case 11:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Ow(i,o,p,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(p=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,yt(Rc,p._currentValue),p._currentValue=S,T!==null)if(hr(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===p){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),pm(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),pm(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,p=o.pendingProps.children,Mo(o,c),E=Zn(E),p=p(E),o.flags|=1,bn(i,o,p,c),o.child;case 14:return p=o.type,E=gr(p,o.pendingProps),E=gr(p.type,E),Iw(i,o,p,E,c);case 15:return Pw(i,o,o.type,o.pendingProps,c);case 17:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),qc(i,o),o.tag=1,Pn(p)?(i=!0,Cc(o)):i=!1,Mo(o,c),ww(o,p,E),km(o,p,E,c),Rm(null,o,p,!0,i,c);case 19:return Hw(i,o,c);case 22:return Rw(i,o,c)}throw Error(n(156,o.tag))};function c2(i,o){return zx(i,o)}function v7(i,o,c,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,o,c,p){return new v7(i,o,c,p)}function Zm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function A7(i){if(typeof i=="function")return Zm(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 nd(i,o,c,p,E,T){var S=2;if(p=i,typeof i=="function")Zm(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 pe:return i=nr(19,c,o,E),i.elementType=pe,i.lanes=T,i;case ce:return rd(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,p=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=nr(S,c,o,E),o.elementType=i,o.type=p,o.lanes=T,o}function As(i,o,c,p){return i=nr(7,i,p,o),i.lanes=c,i}function rd(i,o,c,p){return i=nr(22,i,p,o),i.elementType=ce,i.lanes=c,i.stateNode={isHidden:!1},i}function e0(i,o,c){return i=nr(6,i,null,o),i.lanes=c,i}function t0(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 C7(i,o,c,p,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=Nh(0),this.expirationTimes=Nh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nh(0),this.identifierPrefix=p,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function n0(i,o,c,p,E,T,S,B,$){return i=new C7(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:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(T),i}function N7(i,o,c){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:p==null?null:""+p,children:i,containerInfo:o,implementation:c}}function d2(i){if(!i)return Ni;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(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 U_(i,c,o)}return o}function f2(i,o,c,p,E,T,S,B,$){return i=n0(c,p,!0,i,E,T,S,B,$),i.context=d2(null),c=i.current,p=xn(),E=Di(c),T=ti(p,E),T.callback=o!=null?o:null,Ii(c,T,E),i.current.lanes=E,Va(i,E,p),Dn(i,p),i}function id(i,o,c,p){var E=o.current,T=xn(),S=Di(E);return c=d2(c),o.context===null?o.context=c:o.pendingContext=c,o=ti(T,S),o.payload={element:i},p=p===void 0?null:p,p!==null&&(o.callback=p),i=Ii(E,o,S),i!==null&&(Tr(i,E,S,T),Dc(i,E,S)),S}function sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function p2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function r0(i,o){p2(i,o),(i=i.alternate)&&p2(i,o)}function k7(){return null}var h2=typeof reportError=="function"?reportError:function(i){console.error(i)};function i0(i){this._internalRoot=i}od.prototype.render=i0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));id(i,o,null,null)},od.prototype.unmount=i0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ws(function(){id(null,i,null,null)}),o[Qr]=null}};function od(i){this._internalRoot=i}od.prototype.unstable_scheduleHydration=function(i){if(i){var o=Kx();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&&e_(i)}};function s0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function m2(){}function O7(i,o,c,p,E){if(E){if(typeof p=="function"){var T=p;p=function(){var Z=sd(S);T.call(Z)}}var S=f2(o,p,i,0,null,!1,!1,"",m2);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 p=="function"){var B=p;p=function(){var Z=sd($);B.call(Z)}}var $=n0(i,0,!1,null,null,!1,!1,"",m2);return i._reactRootContainer=$,i[Qr]=$.current,iu(i.nodeType===8?i.parentNode:i),ws(function(){id(o,$,c,p)}),$}function ud(i,o,c,p,E){var T=c._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var B=E;E=function(){var $=sd(S);B.call($)}}id(o,S,i,E)}else S=O7(c,o,i,E,p);return sd(S)}Xx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=za(o.pendingLanes);c!==0&&(kh(o,c|1),Dn(o,Dt()),(ot&6)===0&&(jo=Dt()+500,ki()))}break;case 13:ws(function(){var p=ei(i,1);if(p!==null){var E=xn();Tr(p,i,1,E)}}),r0(i,1)}},Oh=function(i){if(i.tag===13){var o=ei(i,134217728);if(o!==null){var c=xn();Tr(o,i,134217728,c)}r0(i,134217728)}},Qx=function(i){if(i.tag===13){var o=Di(i),c=ei(i,o);if(c!==null){var p=xn();Tr(c,i,o,p)}r0(i,o)}},Kx=function(){return ft},Jx=function(i,o){var c=ft;try{return ft=i,o()}finally{ft=c}},_h=function(i,o,c){switch(o){case"input":if(Ne(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var p=c[o];if(p!==i&&p.form===i.form){var E=vc(p);if(!E)throw Error(n(90));Ut(p),Ne(p,E)}}}break;case"textarea":$e(i,c);break;case"select":o=c.value,o!=null&&Se(i,!!c.multiple,o,!1)}},Mx=Qm,Fx=ws;var I7={usingClientEntryPoint:!1,Events:[au,No,vc,Lx,Dx,Qm]},xu={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},P7={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=jx(i),i===null?null:i.stateNode},findFiberByHostInstance:xu.findFiberByHostInstance||k7,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 ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ld.isDisabled&&ld.supportsFiber)try{oc=ld.inject(P7),Dr=ld}catch(i){}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I7,vn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s0(o))throw Error(n(200));return N7(i,o,null,c)},vn.createRoot=function(i,o){if(!s0(i))throw Error(n(299));var c=!1,p="",E=h2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=n0(i,1,!1,null,null,c,!1,p,E),i[Qr]=o.current,iu(i.nodeType===8?i.parentNode:i),new i0(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=jx(o),i=i===null?null:i.stateNode,i},vn.flushSync=function(i){return ws(i)},vn.hydrate=function(i,o,c){if(!ad(o))throw Error(n(200));return ud(null,i,o,!0,c)},vn.hydrateRoot=function(i,o,c){if(!s0(i))throw Error(n(405));var p=c!=null&&c.hydratedSources||null,E=!1,T="",S=h2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),o=f2(o,null,i,1,c!=null?c:null,E,!1,T,S),i[Qr]=o.current,iu(i),p)for(i=0;i<p.length;i++)c=p[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new od(o)},vn.render=function(i,o,c){if(!ad(o))throw Error(n(200));return ud(null,i,o,!1,c)},vn.unmountComponentAtNode=function(i){if(!ad(i))throw Error(n(40));return i._reactRootContainer?(ws(function(){ud(null,null,i,!1,function(){i._reactRootContainer=null,i[Qr]=null})}),!0):!1},vn.unstable_batchedUpdates=Qm,vn.unstable_renderSubtreeIntoContainer=function(i,o,c,p){if(!ad(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ud(i,o,c,!1,p)},vn.version="18.3.1-next-f1338f8080-20240426",vn}var t1;function n1(){if(t1)return df.exports;t1=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=jC(),df.exports}var Bs=n1();function r1(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=r1(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=r1(e))&&(r&&(r+=" "),r+=t);return r}var i1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s1=Hi.createContext&&Hi.createContext(i1),$C=["attr","size","title"];function zC(e,t){if(e==null)return{};var n=VC(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 VC(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 o1(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?o1(Object(n),!0).forEach(function(r){qC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qC(e,t,n){return t=YC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e){var t=WC(e,"string");return typeof t=="symbol"?t:t+""}function WC(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 a1(e){return e&&e.map((t,n)=>Hi.createElement(t.tag,el({key:n},t.attr),a1(t.child)))}function lt(e){return t=>Hi.createElement(GC,Zu({attr:el({},e.attr)},t),a1(e.child))}function GC(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=zC(e,$C),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 s1!==void 0?Hi.createElement(s1.Consumer,null,n=>t(n)):t(i1)}function XC(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 QC(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 KC(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,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),JC="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",ZC=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ct(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(KC,{className:F(t,`${k}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||JC,alt:"Copilot",className:F(t,`${k}-minimized-icon-img`)});return _.jsx(ar,{className:F(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},eN=()=>{const{globalClassName:e,themeVariables:t}=ct(),n=()=>{Ou(!1),jr(!0)};return Bs.createPortal(_.jsx("div",{className:F(e,`${k}-minimized-container`),style:t,children:_.jsx(ZC,{onClick:n})}),document.body)};function tN(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 nN=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 rN(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 iN(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 u1(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 sN(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 hf(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 oN(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 aN(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 uN(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 l1(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 c1(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 lN(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 cN(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 dN(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 d1(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(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),fN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(hf,{size:"16px"})},pN=({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`,`${k}-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(hf,{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`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(fN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function uU(){}function lU(){}function f1(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 p1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const hN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gN={};function h1(e,t){return(gN.jsx?mN:hN).test(e)}const EN=/[ \t\n\f\r]/g;function yN(e){return typeof e=="object"?e.type==="text"?m1(e.value):!1:m1(e)}function m1(e){return e.replace(EN,"")===""}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 g1(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 TN=0;const Qe=Qi(),Bt=Qi(),mf=Qi(),be=Qi(),mt=Qi(),Xi=Qi(),Bn=Qi();function Qi(){return dd(2,++TN)}const gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qe,booleanish:Bt,commaOrSpaceSeparated:Bn,commaSeparated:Xi,number:be,overloadedBoolean:mf,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Ef=Object.keys(gf);class yf extends An{constructor(t,n,r,s){let a=-1;if(super(t,n),E1(this,"space",s),typeof r=="number")for(;++a<Ef.length;){const u=Ef[a];E1(this,Ef[a],(r&gf[u])===gf[u])}}}yf.prototype.defined=!0;function E1(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 yf(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 y1=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 T1(e,t){return t in e?e[t]:t}function b1(e,t){return T1(e,t.toLowerCase())}const bN=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:mf,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:mf,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:b1}),xN=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:T1}),x1=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()}}),_1=Us({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:b1}),w1=Us({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_N={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"},wN=/[A-Z]/g,S1=/-[a-z]/g,SN=/^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"&&SN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(S1,AN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!S1.test(a)){let u=a.replace(wN,vN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=yf}return new s(r,t)}function vN(e){return"-"+e.toLowerCase()}function AN(e){return e.charAt(1).toUpperCase()}const sa=g1([y1,bN,x1,_1,w1],"html"),ui=g1([y1,xN,x1,_1,w1],"svg");function v1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function A1(e){return e.join(" ").trim()}var Hs={},Tf,C1;function CN(){if(C1)return Tf;C1=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="/",h="*",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 N=1,I=1;function U(pe){var de=pe.match(t);de&&(N+=de.length);var we=pe.lastIndexOf(d);I=~we?pe.length-we:I+pe.length}function G(){var pe={line:N,column:I};return function(de){return de.position=new L(pe),le(),de}}function L(pe){this.start=pe,this.end={line:N,column:I},this.source=w.source}L.prototype.content=A;function V(pe){var de=new Error(w.source+":"+N+":"+I+": "+pe);if(de.reason=pe,de.filename=w.source,de.line=N,de.column=I,de.source=A,!w.silent)throw de}function ie(pe){var de=pe.exec(A);if(de){var we=de[0];return U(we),A=A.slice(we.length),de}}function le(){ie(n)}function z(pe){var de;for(pe=pe||[];de=oe();)de!==!1&&pe.push(de);return pe}function oe(){var pe=G();if(!(f!=A.charAt(0)||h!=A.charAt(1))){for(var de=2;m!=A.charAt(de)&&(h!=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,pe({type:x,comment:we})}}function te(){var pe=G(),de=ie(r);if(de){if(oe(),!ie(s))return V("property missing ':'");var we=ie(a),ce=pe({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 pe=[];z(pe);for(var de;de=te();)de!==!1&&(pe.push(de),z(pe));return pe}return le(),fe()}function v(A){return A?A.replace(l,m):m}return Tf=b,Tf}var N1;function NN(){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(CN());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:h}=d;l?s(f,h,d):h&&(a=a||{},a[f]=h)}),a}return Hs}var oa={},k1;function kN(){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,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return oa.camelCase=d,oa}var aa,O1;function ON(){if(O1)return aa;O1=1;var e=aa&&aa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(NN()),n=kN();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 IN=ON();const PN=tt(IN),rl=I1("end"),wr=I1("start");function I1(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 P1(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?R1(e.position):"start"in e||"end"in e?R1(e):"line"in e||"column"in e?bf(e):""}function bf(e){return L1(e&&e.line)+":"+L1(e&&e.column)}function R1(e){return bf(e&&e.start)+"-"+bf(e&&e.end)}function L1(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 xf={}.hasOwnProperty,RN=new Map,LN=/[A-Z]/g,DN=new Set(["table","tbody","thead","tfoot","tr"]),MN=new Set(["td","th"]),D1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FN(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=qN(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=VN(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=M1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function M1(e,t,n){if(t.type==="element")return BN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return UN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jN(e,t,n);if(t.type==="mdxjsEsm")return HN(e,t);if(t.type==="root")return $N(e,t,n);if(t.type==="text")return zN(e,t)}function BN(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=B1(e,t.tagName,!1),u=YN(e,t);let l=wf(e,t);return DN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!yN(d):!0})),F1(e,u,a,t),_f(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function UN(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 HN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function jN(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:B1(e,t.name,!0),u=WN(e,t),l=wf(e,t);return F1(e,u,a,t),_f(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function $N(e,t,n){const r={};return _f(r,wf(e,t)),e.create(t,e.Fragment,r,n)}function zN(e,t){return t.value}function F1(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 VN(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 qN(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 YN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&xf.call(t.properties,s)){const a=GN(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&MN.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 WN(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 wf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:RN;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=M1(e,a,u);l!==void 0&&n.push(l)}return n}function GN(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?p1(n):A1(n)),r.property==="style"){let s=typeof n=="object"?n:XN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=QN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?_N[r.property]||r.property:r.attribute,n]}}function XN(e,t){try{return PN(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=D1+"#cannot-parse-style-attribute",s}}function B1(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 xf.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=D1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QN(e){const t={};let n;for(n in e)xf.call(e,n)&&(t[KN(n)]=e[n]);return t}function KN(e){let t=e.replace(LN,JN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JN(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"]},ZN={};function vf(e,t){const n=ZN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return U1(e,r,s)}function U1(e,t,n){if(ek(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 H1(e.children,t,n)}return Array.isArray(e)?H1(e,t,n):""}function H1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=U1(e[s],t,n);return r.join("")}function ek(e){return!!(e&&typeof e=="object")}const j1=document.createElement("i");function Af(e){const t="&"+e+";";j1.innerHTML=t;const n=j1.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 $1={}.hasOwnProperty;function z1(e){const t={};let n=-1;for(;++n<e.length;)tk(t,e[n]);return t}function tk(e,t){let n;for(n in t){const s=($1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){$1.call(s,u)||(s[u]=[]);const l=a[u];nk(s[u],Array.isArray(l)?l:l?[l]:[])}}}function nk(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 V1(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]/),rk=li(/[#-'*+\--9=?A-Z^-~]/);function il(e){return e!==null&&(e<32||e===127)}const Cf=li(/\d/),ik=li(/[\dA-Fa-f]/),sk=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 ok={tokenize:ak};function ak(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 uk={tokenize:lk},q1={tokenize:ck};function lk(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&&N();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(q1,h,m)(I)}function h(I){return s&&N(),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(q1,y,b)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),x(I)}function b(I){if(I===null){s&&N(),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 N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function ck(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 Nf={name:"attention",resolveAll:dk,tokenize:fk};function dk(e,t){let n=-1,r,s,a,u,l,d,f,h;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);Y1(m,-d),Y1(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?(h=2,f=Wn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Un(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function fk(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"),h=$s(d),m=!h||h===2&&s||n.includes(d),x=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!x)),f._close=!!(a===42?x:x&&(h||!m)),t(d)}}function Y1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pk={name:"autolink",tokenize:hk};function hk(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),h):rk(y)?(e.consume(y),f):n(y)}function h(y){return ln(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):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:mk};function mk(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 W1={continuation:{tokenize:Ek},exit:yk,name:"blockQuote",tokenize:gk};function gk(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 Ek(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(W1,t,n)(u)}}function yk(e){e.exit("blockQuote")}const G1={name:"characterEscape",tokenize:Tk};function Tk(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 sk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const X1={name:"characterReference",tokenize:bk};function bk(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,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=ik,h):(e.enter("characterReferenceValue"),a=7,u=Cf,h(m))}function h(m){if(m===59&&s){const x=e.exit("characterReferenceValue");return u===ln&&!Af(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),h):n(m)}}const Q1={partial:!0,tokenize:_k},K1={concrete:!0,name:"codeFenced",tokenize:xk};function xk(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"),h(L)}function h(L){return L===l?(u++,e.consume(L),h):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(Q1,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,N,"linePrefix",a+1)(L):N(L)}function N(L){return L===null||He(L)?e.check(Q1,v,U)(L):(e.enter("codeFlowValue"),I(L))}function I(L){return L===null||He(L)?(e.exit("codeFlowValue"),N(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,pe,"whitespace")(de):pe(de)):ie(de)}function pe(de){return de===null||He(de)?(L.exit("codeFencedFence"),V(de)):ie(de)}}}function _k(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 kf={name:"codeIndented",tokenize:Sk},wk={partial:!0,tokenize:vk};function Sk(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 h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(wk,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 vk(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 Ak={name:"codeText",previous:Nk,resolve:Ck,tokenize:kk};function Ck(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 Nk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kk(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,h(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 h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class Ok{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 J1(e){const t={};let n=-1,r,s,a,u,l,d,f;const h=new Ok(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.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,Ik(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=h.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(h.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({},h.get(s)[1].start),l=h.slice(s,n),l.unshift(r),h.splice(s,n-s+1,l))}}return Un(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function Ik(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 h,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||(h=r.sliceStream(y),y.next||h.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(h),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]),N=a.pop();d.push([N,N+w.length-1]),e.splice(N,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 Pk={resolve:Lk,tokenize:Dk},Rk={partial:!0,tokenize:Mk};function Lk(e){return J1(e),e}function Dk(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(Rk,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 Mk(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 Z1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let h=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!h&&(w===null||w===41||gt(w))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(w)):h<f&&w===40?(e.consume(w),h++,v):w===41?(e.consume(w),h--,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 eE(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),h}function h(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"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||l++>999?(e.exit("chunkString"),h(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 tE(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"}),h(x))}function h(x){return x===u||x===null||He(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?m:h)}function m(x){return x===u||x===92?(e.consume(x),h):h(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 Fk={name:"definition",tokenize:Uk},Bk={partial:!0,tokenize:Hk};function Uk(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return eE.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 Z1(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Bk,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 Hk(e,t,n){return r;function r(l){return gt(l)?fa(e,s)(l):n(l)}function s(l){return tE(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 jk={name:"hardBreakEscape",tokenize:$k};function $k(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 zk={name:"headingAtx",resolve:Vk,tokenize:qk};function Vk(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 qk(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),u(h)}function u(h){return h===35&&r++<6?(e.consume(h),u):h===null||gt(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||He(h)?(e.exit("atxHeading"),t(h)):nt(h)?it(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||gt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const Yk=["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"],nE=["pre","script","style","textarea"],Wk={concrete:!0,name:"htmlFlow",resolveTo:Qk,tokenize:Kk},Gk={partial:!0,tokenize:Zk},Xk={partial:!0,tokenize:Jk};function Qk(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 Kk(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return h(P)}function h(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:C):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:C):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:C):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,ke=u.toLowerCase();return!Ae&&!a&&nE.includes(ke)?(s=1,r.interrupt?t(P):te(P)):Yk.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?N(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 N(P){return nt(P)?(e.consume(P),N):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),C):P===93&&s===5?(e.consume(P),re):He(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Gk,J,fe)(P)):P===null||He(P)?(e.exit("htmlFlowData"),fe(P)):(e.consume(P),te)}function fe(P){return e.check(Xk,pe,J)(P)}function pe(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),C):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 nE.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),C):te(P)}function C(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),C):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 Jk(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 Zk(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ca,t,n)}}const e3={name:"htmlText",tokenize:t3};function t3(e,t,n){const r=this;let s,a,u;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),G):C===63?(e.consume(C),I):En(C)?(e.consume(C),ie):n(C)}function f(C){return C===45?(e.consume(C),h):C===91?(e.consume(C),a=0,b):En(C)?(e.consume(C),N):n(C)}function h(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),x):He(C)?(u=m,ce(C)):(e.consume(C),m)}function x(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?we(C):C===45?x(C):m(C)}function b(C){const M="CDATA[";return C===M.charCodeAt(a++)?(e.consume(C),a===M.length?v:b):n(C)}function v(C){return C===null?n(C):C===93?(e.consume(C),A):He(C)?(u=v,ce(C)):(e.consume(C),v)}function A(C){return C===93?(e.consume(C),w):v(C)}function w(C){return C===62?we(C):C===93?(e.consume(C),w):v(C)}function N(C){return C===null||C===62?we(C):He(C)?(u=N,ce(C)):(e.consume(C),N)}function I(C){return C===null?n(C):C===63?(e.consume(C),U):He(C)?(u=I,ce(C)):(e.consume(C),I)}function U(C){return C===62?we(C):I(C)}function G(C){return En(C)?(e.consume(C),L):n(C)}function L(C){return C===45||ln(C)?(e.consume(C),L):V(C)}function V(C){return He(C)?(u=V,ce(C)):nt(C)?(e.consume(C),V):we(C)}function ie(C){return C===45||ln(C)?(e.consume(C),ie):C===47||C===62||gt(C)?le(C):n(C)}function le(C){return C===47?(e.consume(C),we):C===58||C===95||En(C)?(e.consume(C),z):He(C)?(u=le,ce(C)):nt(C)?(e.consume(C),le):we(C)}function z(C){return C===45||C===46||C===58||C===95||ln(C)?(e.consume(C),z):oe(C)}function oe(C){return C===61?(e.consume(C),te):He(C)?(u=oe,ce(C)):nt(C)?(e.consume(C),oe):le(C)}function te(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,fe):He(C)?(u=te,ce(C)):nt(C)?(e.consume(C),te):(e.consume(C),pe)}function fe(C){return C===s?(e.consume(C),s=void 0,de):C===null?n(C):He(C)?(u=fe,ce(C)):(e.consume(C),fe)}function pe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||gt(C)?le(C):(e.consume(C),pe)}function de(C){return C===47||C===62||gt(C)?le(C):n(C)}function we(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function ce(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),W}function W(C){return nt(C)?it(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):re(C)}function re(C){return e.enter("htmlTextData"),u(C)}}const Of={name:"labelEnd",resolveAll:s3,resolveTo:o3,tokenize:a3},n3={tokenize:u3},r3={tokenize:l3},i3={tokenize:c3};function s3(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 o3(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)},h={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",h,t]]),l=Wn(l,ol(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Wn(l,[["exit",h,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 a3(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(n3,h,u?h:m)(x):x===91?e.attempt(r3,h,u?f:m)(x):u?h(x):m(x)}function f(x){return e.attempt(i3,h,m)(x)}function h(x){return t(x)}function m(x){return a._balanced=!0,n(x)}}function u3(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?h(m):Z1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return gt(m)?fa(e,d)(m):h(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?tE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return gt(m)?fa(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function l3(e,t,n){const r=this;return s;function s(l){return eE.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 c3(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 d3={name:"labelStartImage",resolveAll:Of.resolveAll,tokenize:f3};function f3(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 p3={name:"labelStartLink",resolveAll:Of.resolveAll,tokenize:h3};function h3(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:m3};function m3(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:g3};function g3(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 Cn={continuation:{tokenize:b3},exit:_3,name:"list",tokenize:T3},E3={partial:!0,tokenize:w3},y3={partial:!0,tokenize:x3};function T3(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:Cf(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 Cf(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:h,e.attempt(E3,x,m))}function h(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 b3(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(y3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Cn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function x3(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 _3(e){e.exit(this.containerState.type)}function w3(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 rE={name:"setextUnderline",resolveTo:S3,tokenize:v3};function S3(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 v3(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][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 A3={tokenize:C3};function C3(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(Pk,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 N3={resolveAll:sE()},k3=iE("string"),O3=iE("text");function iE(e){return{resolveAll:sE(e==="text"?I3: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(h){return f(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];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 sE(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 I3(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 P3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Fk},disable:{null:[]},document:{42:Cn,43:Cn,45:Cn,48:Cn,49:Cn,50:Cn,51:Cn,52:Cn,53:Cn,54:Cn,55:Cn,56:Cn,57:Cn,62:W1},flow:{35:zk,42:al,45:[rE,al],60:Wk,61:rE,95:al,96:K1,126:K1},flowInitial:{[-2]:kf,[-1]:kf,32:kf},insideSpan:{null:[Nf,N3]},string:{38:X1,92:G1},text:{[-5]:If,[-4]:If,[-3]:If,33:d3,38:X1,42:Nf,60:[pk,e3],91:p3,92:[jk,G1],93:Of,95:Nf,96:Ak}},Symbol.toStringTag,{value:"Module"}));function R3(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:N,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 h=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 D3(y(oe),te)}function y(oe){return L3(u,oe)}function b(){const{_bufferIndex:oe,_index:te,line:fe,column:pe,offset:de}=r;return{_bufferIndex:oe,_index:te,line:fe,column:pe,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){h=h(oe)}function N(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(pe,de,we){let ce,W,re,C;return Array.isArray(pe)?J(pe):"tokenize"in pe?J([pe]):M(pe);function M(ge){return Le;function Le(je){const Ke=je!==null&&ge[je],ht=je!==null&&ge.null,Ot=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];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 C=le(),re=ge,ge.partial||(f.currentConstruct=ge),ge.name&&f.parser.constructs.disable.null.includes(ge.name)?ke():ge.tokenize.call(te?Object.assign(Object.create(f),te):f,d,Ae,ke)(je)}}function Ae(ge){return oe(re,C),de}function ke(ge){return C.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,pe=f.events.length,de=Array.from(l);return{from:pe,restore:we};function we(){r=oe,f.previous=te,f.currentConstruct=fe,f.events.length=pe,l=de,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function L3(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 D3(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 Om(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Im(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var c7=typeof WeakMap=="function"?WeakMap:Map;function vw(i,o,c){c=ti(-1,c),c.tag=3,c.payload={element:null};var p=o.value;return c.callback=function(){Qc||(Qc=!0,Ym=p),Im(i,o)},c}function Aw(i,o,c){c=ti(-1,c),c.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var E=o.value;c.payload=function(){return p(E)},c.callback=function(){Im(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Im(i,o),typeof p!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),c}function Cw(i,o,c){var p=i.pingCache;if(p===null){p=i.pingCache=new c7;var E=new Set;p.set(o,E)}else E=p.get(o),E===void 0&&(E=new Set,p.set(o,E));E.has(c)||(E.add(c),i=S7.bind(null,i,o,c),o.then(i,i))}function Nw(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 kw(i,o,c,p,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 d7=U.ReactCurrentOwner,Rn=!1;function bn(i,o,c,p){o.child=i===null?Xx(o,null,c,p):Lo(o,i.child,c,p)}function Ow(i,o,c,p,E){c=c.render;var T=o.ref;return Mo(o,E),p=xm(i,o,c,p,T,E),c=wm(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&c&&sm(o),o.flags|=1,bn(i,o,p,E),o.child)}function Iw(i,o,c,p,E){if(i===null){var T=c.type;return typeof T=="function"&&!Zm(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,Pw(i,o,T,p,E)):(i=nd(c.type,null,p,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,p)&&i.ref===o.ref)return ni(i,o,E)}return o.flags|=1,i=Fi(T,p),i.ref=o.ref,i.return=o,o.child=i}function Pw(i,o,c,p,E){if(i!==null){var T=i.memoizedProps;if(tu(T,p)&&i.ref===o.ref)if(Rn=!1,o.pendingProps=p=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Rn=!0);else return o.lanes=i.lanes,ni(i,o,E)}return Pm(i,o,c,p,E)}function Rw(i,o,c){var p=o.pendingProps,E=p.children,T=i!==null?i.memoizedState:null;if(p.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},p=T!==null?T.baseLanes:c,yt(Ho,qn),qn|=p}else T!==null?(p=T.baseLanes|c,o.memoizedState=null):p=c,yt(Ho,qn),qn|=p;return bn(i,o,E,c),o.child}function Lw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Pm(i,o,c,p,E){var T=Pn(c)?gs:fn.current;return T=Oo(o,T),Mo(o,E),c=xm(i,o,c,p,T,E),p=wm(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&p&&sm(o),o.flags|=1,bn(i,o,c,E),o.child)}function Dw(i,o,c,p,E){if(Pn(c)){var T=!0;Cc(o)}else T=!1;if(Mo(o,E),o.stateNode===null)qc(i,o),ww(o,c,p),km(o,c,p,E),p=!0;else if(i===null){var S=o.stateNode,B=o.memoizedProps;S.props=B;var z=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!==p||z!==Z)&&Sw(o,S,p,Z),Oi=!1;var he=o.memoizedState;S.state=he,Mc(o,p,S,E),z=o.memoizedState,B!==p||he!==z||In.current||Oi?(typeof Ee=="function"&&(Nm(o,c,Ee,p),z=o.memoizedState),(B=Oi||xw(o,c,B,p,he,z,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=p,o.memoizedState=z),S.props=p,S.state=z,S.context=Z,p=B):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{S=o.stateNode,Kx(i,o),B=o.memoizedProps,Z=o.type===o.elementType?B:gr(o.type,B),S.props=Z,Te=o.pendingProps,he=S.context,z=c.contextType,typeof z=="object"&&z!==null?z=Zn(z):(z=Pn(c)?gs:fn.current,z=Oo(o,z));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(B!==Te||he!==z)&&Sw(o,S,p,z),Oi=!1,he=o.memoizedState,S.state=he,Mc(o,p,S,E);var Pe=o.memoizedState;B!==Te||he!==Pe||In.current||Oi?(typeof Oe=="function"&&(Nm(o,c,Oe,p),Pe=o.memoizedState),(Z=Oi||xw(o,c,Z,p,he,Pe,z)||!1)?(Ee||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,Pe,z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,Pe,z)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=Pe),S.props=p,S.state=Pe,S.context=z,p=Z):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),p=!1)}return Rm(i,o,c,p,T,E)}function Rm(i,o,c,p,E,T){Lw(i,o);var S=(o.flags&128)!==0;if(!p&&!S)return E&&Hx(o,c,!1),ni(i,o,T);p=o.stateNode,d7.current=o;var B=S&&typeof c.getDerivedStateFromError!="function"?null:p.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=p.state,E&&Hx(o,c,!0),o.child}function Mw(i){var o=i.stateNode;o.pendingContext?Bx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&Bx(i,o.context,!1),gm(i,o.containerInfo)}function Fw(i,o,c,p,E){return Ro(),lm(E),o.flags|=256,bn(i,o,c,p),o.child}var Lm={dehydrated:null,treeContext:null,retryLane:0};function Dm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Bw(i,o,c){var p=o.pendingProps,E=Ct.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(Ct,E&1),i===null)return um(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=p.children,i=p.fallback,T?(p=o.mode,T=o.child,S={mode:"hidden",children:S},(p&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=rd(S,p,0,null),i=As(i,p,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Dm(c),o.memoizedState=Lm,i):Mm(o,S));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return f7(i,o,S,p,B,E,c);if(T){T=p.fallback,S=o.mode,E=i.child,B=E.sibling;var z={mode:"hidden",children:p.children};return(S&1)===0&&o.child!==E?(p=o.child,p.childLanes=0,p.pendingProps=z,o.deletions=null):(p=Fi(E,z),p.subtreeFlags=E.subtreeFlags&14680064),B!==null?T=Fi(B,T):(T=As(T,S,c,null),T.flags|=2),T.return=o,p.return=o,p.sibling=T,o.child=p,p=T,T=o.child,S=i.child.memoizedState,S=S===null?Dm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~c,o.memoizedState=Lm,p}return T=i.child,i=T.sibling,p=Fi(T,{mode:"visible",children:p.children}),(o.mode&1)===0&&(p.lanes=c),p.return=o,p.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=p,o.memoizedState=null,p}function Mm(i,o){return o=rd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Vc(i,o,c,p){return p!==null&&lm(p),Lo(o,i.child,null,c),i=Mm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function f7(i,o,c,p,E,T,S){if(c)return o.flags&256?(o.flags&=-257,p=Om(Error(n(422))),Vc(i,o,S,p)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=p.fallback,E=o.mode,p=rd({mode:"visible",children:p.children},E,0,null),T=As(T,E,S,null),T.flags|=2,p.return=o,T.return=o,p.sibling=T,o.child=p,(o.mode&1)!==0&&Lo(o,i.child,null,S),o.child.memoizedState=Dm(S),o.memoizedState=Lm,T);if((o.mode&1)===0)return Vc(i,o,S,null);if(E.data==="$!"){if(p=E.nextSibling&&E.nextSibling.dataset,p)var B=p.dgst;return p=B,T=Error(n(419)),p=Om(T,p,void 0),Vc(i,o,S,p)}if(B=(S&i.childLanes)!==0,Rn||B){if(p=Qt,p!==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&(p.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ei(i,E),Tr(p,i,E,-1))}return Jm(),p=Om(Error(n(421))),Vc(i,o,S,p)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=v7.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=Mm(o,p.children),o.flags|=4096,o)}function Uw(i,o,c){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),pm(i.return,o,c)}function Fm(i,o,c,p,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=p,T.tail=c,T.tailMode=E)}function Hw(i,o,c){var p=o.pendingProps,E=p.revealOrder,T=p.tail;if(bn(i,o,p.children,c),p=Ct.current,(p&2)!==0)p=p&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&&Uw(i,c,o);else if(i.tag===19)Uw(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}p&=1}if(yt(Ct,p),(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&&Fc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Fm(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&&Fc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Fm(o,!0,c,null,T);break;case"together":Fm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function qc(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),xs|=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 p7(i,o,c){switch(o.tag){case 3:Mw(o),Ro();break;case 5:ew(o);break;case 1:Pn(o.type)&&Cc(o);break;case 4:gm(o,o.stateNode.containerInfo);break;case 10:var p=o.type._context,E=o.memoizedProps.value;yt(Rc,p._currentValue),p._currentValue=E;break;case 13:if(p=o.memoizedState,p!==null)return p.dehydrated!==null?(yt(Ct,Ct.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Bw(i,o,c):(yt(Ct,Ct.current&1),i=ni(i,o,c),i!==null?i.sibling:null);yt(Ct,Ct.current&1);break;case 19:if(p=(c&o.childLanes)!==0,(i.flags&128)!==0){if(p)return Hw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),yt(Ct,Ct.current),p)break;return null;case 22:case 23:return o.lanes=0,Rw(i,o,c)}return ni(i,o,c)}var jw,Bm,$w,zw;jw=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}},Bm=function(){},$w=function(i,o,c,p){var E=i.memoizedProps;if(E!==p){i=o.stateNode,bs(Fr.current);var T=null;switch(c){case"input":E=Tn(i,E),p=Tn(i,p),T=[];break;case"select":E=C({},E,{value:void 0}),p=C({},p,{value:void 0}),T=[];break;case"textarea":E=ae(i,E),p=ae(i,p),T=[];break;default:typeof E.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Sc)}tn(c,p);var S;c=null;for(Z in E)if(!p.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 p){var z=p[Z];if(B=E!=null?E[Z]:void 0,p.hasOwnProperty(Z)&&z!==B&&(z!=null||B!=null))if(Z==="style")if(B){for(S in B)!B.hasOwnProperty(S)||z&&z.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in z)z.hasOwnProperty(S)&&B[S]!==z[S]&&(c||(c={}),c[S]=z[S])}else c||(T||(T=[]),T.push(Z,c)),c=z;else Z==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,B=B?B.__html:void 0,z!=null&&B!==z&&(T=T||[]).push(Z,z)):Z==="children"?typeof z!="string"&&typeof z!="number"||(T=T||[]).push(Z,""+z):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(z!=null&&Z==="onScroll"&&xt("scroll",i),T||B===z||(T=[])):(T=T||[]).push(Z,z))}c&&(T=T||[]).push("style",c);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},zw=function(i,o,c,p){c!==p&&(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 p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function hn(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,p=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,p|=E.subtreeFlags&14680064,p|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,p|=E.subtreeFlags,p|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=p,i.childLanes=c,o}function h7(i,o,c){var p=o.pendingProps;switch(om(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(o),null;case 1:return Pn(o.type)&&Ac(),hn(o),null;case 3:return p=o.stateNode,Fo(),wt(In),wt(fn),Tm(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Ic(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,mr!==null&&(Xm(mr),mr=null))),Bm(i,o),hn(o),null;case 5:Em(o);var E=bs(du.current);if(c=o.type,i!==null&&o.stateNode!=null)$w(i,o,c,p,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!p){if(o.stateNode===null)throw Error(n(166));return hn(o),null}if(i=bs(Fr.current),Ic(o)){p=o.stateNode,c=o.type;var T=o.memoizedProps;switch(p[Mr]=o,p[ou]=T,i=(o.mode&1)!==0,c){case"dialog":xt("cancel",p),xt("close",p);break;case"iframe":case"object":case"embed":xt("load",p);break;case"video":case"audio":for(E=0;E<ru.length;E++)xt(ru[E],p);break;case"source":xt("error",p);break;case"img":case"image":case"link":xt("error",p),xt("load",p);break;case"details":xt("toggle",p);break;case"input":Lt(p,T),xt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!T.multiple},xt("invalid",p);break;case"textarea":ve(p,T),xt("invalid",p)}tn(c,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var B=T[S];S==="children"?typeof B=="string"?p.textContent!==B&&(T.suppressHydrationWarning!==!0&&wc(p.textContent,B,i),E=["children",B]):typeof B=="number"&&p.textContent!==""+B&&(T.suppressHydrationWarning!==!0&&wc(p.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(S)&&B!=null&&S==="onScroll"&&xt("scroll",p)}switch(c){case"input":Ot(p),We(p,T,!0);break;case"textarea":Ot(p),dt(p);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(p.onclick=Sc)}p=E,o.updateQueue=p,p!==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 p.is=="string"?i=S.createElement(c,{is:p.is}):(i=S.createElement(c),c==="select"&&(S=i,p.multiple?S.multiple=!0:p.size&&(S.size=p.size))):i=S.createElementNS(i,c),i[Mr]=o,i[ou]=p,jw(i,o,!1,!1),o.stateNode=i;e:{switch(S=Lr(c,p),c){case"dialog":xt("cancel",i),xt("close",i),E=p;break;case"iframe":case"object":case"embed":xt("load",i),E=p;break;case"video":case"audio":for(E=0;E<ru.length;E++)xt(ru[E],i);E=p;break;case"source":xt("error",i),E=p;break;case"img":case"image":case"link":xt("error",i),xt("load",i),E=p;break;case"details":xt("toggle",i),E=p;break;case"input":Lt(i,p),E=Tn(i,p),xt("invalid",i);break;case"option":E=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},E=C({},p,{value:void 0}),xt("invalid",i);break;case"textarea":ve(i,p),E=ae(i,p),xt("invalid",i);break;default:E=p}tn(c,E),B=E;for(T in B)if(B.hasOwnProperty(T)){var z=B[T];T==="style"?Ti(i,z):T==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Je(i,z)):T==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&st(i,z):typeof z=="number"&&st(i,""+z):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?z!=null&&T==="onScroll"&&xt("scroll",i):z!=null&&I(i,T,z,S))}switch(c){case"input":Ot(i),We(i,p,!1);break;case"textarea":Ot(i),dt(i);break;case"option":p.value!=null&&i.setAttribute("value",""+je(p.value));break;case"select":i.multiple=!!p.multiple,T=p.value,T!=null?Se(i,!!p.multiple,T,!1):p.defaultValue!=null&&Se(i,!!p.multiple,p.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Sc)}switch(c){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return hn(o),null;case 6:if(i&&o.stateNode!=null)zw(i,o,i.memoizedProps,p);else{if(typeof p!="string"&&o.stateNode===null)throw Error(n(166));if(c=bs(du.current),bs(Fr.current),Ic(o)){if(p=o.stateNode,c=o.memoizedProps,p[Mr]=o,(T=p.nodeValue!==c)&&(i=zn,i!==null))switch(i.tag){case 3:wc(p.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&wc(p.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else p=(c.nodeType===9?c:c.ownerDocument).createTextNode(p),p[Mr]=o,o.stateNode=p}return hn(o),null;case 13:if(wt(Ct),p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Yx(),Ro(),o.flags|=98560,T=!1;else if(T=Ic(o),p!==null&&p.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;hn(o),T=!1}else mr!==null&&(Xm(mr),mr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Ct.current&1)!==0?Vt===0&&(Vt=3):Jm())),o.updateQueue!==null&&(o.flags|=4),hn(o),null);case 4:return Fo(),Bm(i,o),i===null&&iu(o.stateNode.containerInfo),hn(o),null;case 10:return fm(o.type._context),hn(o),null;case 17:return Pn(o.type)&&Ac(),hn(o),null;case 19:if(wt(Ct),T=o.memoizedState,T===null)return hn(o),null;if(p=(o.flags&128)!==0,S=T.rendering,S===null)if(p)gu(T,!1);else{if(Vt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Fc(i),S!==null){for(o.flags|=128,gu(T,!1),p=S.updateQueue,p!==null&&(o.updateQueue=p,o.flags|=4),o.subtreeFlags=0,p=c,c=o.child;c!==null;)T=c,i=p,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(Ct,Ct.current&1|2),o.child}i=i.sibling}T.tail!==null&&Dt()>jo&&(o.flags|=128,p=!0,gu(T,!1),o.lanes=4194304)}else{if(!p)if(i=Fc(S),i!==null){if(o.flags|=128,p=!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 hn(o),null}else 2*Dt()-T.renderingStartTime>jo&&c!==1073741824&&(o.flags|=128,p=!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=Ct.current,yt(Ct,p?c&1|2:c&1),o):(hn(o),null);case 22:case 23:return Km(),p=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(o.flags|=8192),p&&(o.mode&1)!==0?(qn&1073741824)!==0&&(hn(o),o.subtreeFlags&6&&(o.flags|=8192)):hn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function m7(i,o){switch(om(o),o.tag){case 1:return Pn(o.type)&&Ac(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Fo(),wt(In),wt(fn),Tm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Em(o),null;case 13:if(wt(Ct),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(Ct),null;case 4:return Fo(),null;case 10:return fm(o.type._context),null;case 22:case 23:return Km(),null;case 24:return null;default:return null}}var Yc=!1,mn=!1,g7=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(p){It(i,o,p)}else c.current=null}function Um(i,o,c){try{c()}catch(p){It(i,o,p)}}var Vw=!1;function E7(i,o){if(Kh=fc,i=xx(),zh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var E=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{c.nodeType,T.nodeType}catch(xe){c=null;break e}var S=0,B=-1,z=-1,Z=0,Ee=0,Te=i,he=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=S+E),Te!==T||p!==0&&Te.nodeType!==3||(z=S+p),Te.nodeType===3&&(S+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)he=Te,Te=Oe;for(;;){if(Te===i)break t;if(he===c&&++Z===E&&(B=S),he===T&&++Ee===p&&(z=S),(Oe=Te.nextSibling)!==null)break;Te=he,he=Te.parentNode}Te=Oe}c=B===-1||z===-1?null:{start:B,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Jh={focusedElem:i,selectionRange:c},fc=!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(xe){It(o,o.return,xe)}if(i=o.sibling,i!==null){i.return=o.return,Ie=i;break}Ie=o.return}return Pe=Vw,Vw=!1,Pe}function Eu(i,o,c){var p=o.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var E=p=p.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Um(o,c,T)}E=E.next}while(E!==p)}}function Wc(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 p=c.create;c.destroy=p()}c=c.next}while(c!==o)}}function Hm(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 qw(i){var o=i.alternate;o!==null&&(i.alternate=null,qw(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[nm],delete o[ZB],delete o[e7])),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 Yw(i){return i.tag===5||i.tag===3||i.tag===4}function Ww(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yw(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 jm(i,o,c){var p=i.tag;if(p===5||p===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=Sc));else if(p!==4&&(i=i.child,i!==null))for(jm(i,o,c),i=i.sibling;i!==null;)jm(i,o,c),i=i.sibling}function $m(i,o,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for($m(i,o,c),i=i.sibling;i!==null;)$m(i,o,c),i=i.sibling}var nn=null,Er=!1;function Pi(i,o,c){for(c=c.child;c!==null;)Gw(i,o,c),c=c.sibling}function Gw(i,o,c){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(oc,c)}catch(B){}switch(c.tag){case 5:mn||Uo(c,o);case 6:var p=nn,E=Er;nn=null,Pi(i,o,c),nn=p,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?tm(i.parentNode,c):i.nodeType===1&&tm(i,c),Xa(i)):tm(nn,c.stateNode));break;case 4:p=nn,E=Er,nn=c.stateNode.containerInfo,Er=!0,Pi(i,o,c),nn=p,Er=E;break;case 0:case 11:case 14:case 15:if(!mn&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){E=p=p.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Um(c,o,S),E=E.next}while(E!==p)}Pi(i,o,c);break;case 1:if(!mn&&(Uo(c,o),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.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=(p=mn)||c.memoizedState!==null,Pi(i,o,c),mn=p):Pi(i,o,c);break;default:Pi(i,o,c)}}function Xw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new g7),o.forEach(function(p){var E=A7.bind(null,i,p);c.has(p)||(c.add(p),p.then(E,E))})}}function yr(i,o){var c=o.deletions;if(c!==null)for(var p=0;p<c.length;p++){var E=c[p];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));Gw(T,S,E),nn=null,Er=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(Z){It(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Qw(o,i),o=o.sibling}function Qw(i,o){var c=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(o,i),Ur(i),p&4){try{Eu(3,i,i.return),Wc(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),p&512&&c!==null&&Uo(c,c.return);break;case 5:if(yr(o,i),Ur(i),p&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(p&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=c!==null?c.memoizedProps:T,B=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==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<z.length;S+=2){var Ee=z[S],Te=z[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":Ne(E,T);break;case"textarea":$e(E,T);break;case"select":var he=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?Se(E,!!T.multiple,Oe,!1):he!==!!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),p&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),p&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||(qm=Dt())),p&4&&Xw(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),p&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(he=Ie,Oe=he.child,he.tag){case 0:case 11:case 14:case 15:Eu(4,he,he.return);break;case 1:Uo(he,he.return);var Pe=he.stateNode;if(typeof Pe.componentWillUnmount=="function"){p=he,c=he.return;try{o=p,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Re){It(p,c,Re)}}break;case 5:Uo(he,he.return);break;case 22:if(he.memoizedState!==null){Zw(Te);continue}}Oe!==null?(Oe.return=he,Ie=Oe):Zw(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,z=Te.memoizedProps.style,S=z!=null&&z.hasOwnProperty("display")?z.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),p&4&&Xw(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(Yw(c)){var p=c;break e}c=c.return}throw Error(n(160))}switch(p.tag){case 5:var E=p.stateNode;p.flags&32&&(st(E,""),p.flags&=-33);var T=Ww(i);$m(i,T,E);break;case 3:case 4:var S=p.stateNode.containerInfo,B=Ww(i);jm(i,B,S);break;default:throw Error(n(161))}}catch(z){It(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function y7(i,o,c){Ie=i,Kw(i)}function Kw(i,o,c){for(var p=(i.mode&1)!==0;Ie!==null;){var E=Ie,T=E.child;if(E.tag===22&&p){var S=E.memoizedState!==null||Yc;if(!S){var B=E.alternate,z=B!==null&&B.memoizedState!==null||mn;B=Yc;var Z=mn;if(Yc=S,(mn=z)&&!Z)for(Ie=E;Ie!==null;)S=Ie,z=S.child,S.tag===22&&S.memoizedState!==null?e2(E):z!==null?(z.return=S,Ie=z):e2(E);for(;T!==null;)Ie=T,Kw(T),T=T.sibling;Ie=E,Yc=B,mn=Z}Jw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ie=T):Jw(i)}}function Jw(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||Wc(5,o);break;case 1:var p=o.stateNode;if(o.flags&4&&!mn)if(c===null)p.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:gr(o.type,c.memoizedProps);p.componentDidUpdate(E,c.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&Zx(o,T,p);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}Zx(o,S,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var 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&&Hm(o)}catch(he){It(o,o.return,he)}}if(o===i){Ie=null;break}if(c=o.sibling,c!==null){c.return=o.return,Ie=c;break}Ie=o.return}}function Zw(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 e2(i){for(;Ie!==null;){var o=Ie;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Wc(4,o)}catch(z){It(o,c,z)}break;case 1:var p=o.stateNode;if(typeof p.componentDidMount=="function"){var E=o.return;try{p.componentDidMount()}catch(z){It(o,E,z)}}var T=o.return;try{Hm(o)}catch(z){It(o,T,z)}break;case 5:var S=o.return;try{Hm(o)}catch(z){It(o,S,z)}}}catch(z){It(o,o.return,z)}if(o===i){Ie=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Ie=B;break}Ie=o.return}}var T7=Math.ceil,Gc=U.ReactCurrentDispatcher,zm=U.ReactCurrentOwner,tr=U.ReactCurrentBatchConfig,ot=0,Qt=null,Ht=null,rn=0,qn=0,Ho=Ci(0),Vt=0,yu=null,xs=0,Xc=0,Vm=0,Tu=null,Ln=null,qm=0,jo=1/0,ri=null,Qc=!1,Ym=null,Ri=null,Kc=!1,Li=null,Jc=0,bu=0,Wm=null,Zc=-1,ed=0;function _n(){return(ot&6)!==0?Dt():Zc!==-1?Zc:Zc=Dt()}function Di(i){return(i.mode&1)===0?1:(ot&2)!==0&&rn!==0?rn&-rn:n7.transition!==null?(ed===0&&(ed=W_()),ed):(i=ft,i!==0||(i=window.event,i=i===void 0?16:nx(i.type)),i)}function Tr(i,o,c,p){if(50<bu)throw bu=0,Wm=null,Error(n(185));Va(i,c,p),((ot&2)===0||i!==Qt)&&(i===Qt&&((ot&2)===0&&(Xc|=c),Vt===4&&Mi(i,rn)),Dn(i,p),c===1&&ot===0&&(o.mode&1)===0&&(jo=Dt()+500,Nc&&ki()))}function Dn(i,o){var c=i.callbackNode;nB(i,o);var p=lc(i,i===Qt?rn:0);if(p===0)c!==null&&V_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=p&-p,i.callbackPriority!==o){if(c!=null&&V_(c),o===1)i.tag===0?t7(n2.bind(null,i)):jx(n2.bind(null,i)),KB(function(){(ot&6)===0&&ki()}),c=null;else{switch(G_(p)){case 1:c=Ah;break;case 4:c=q_;break;case 16:c=sc;break;case 536870912:c=Y_;break;default:c=sc}c=c2(c,t2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function t2(i,o){if(Zc=-1,ed=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if($o()&&i.callbackNode!==c)return null;var p=lc(i,i===Qt?rn:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||o)o=td(i,p);else{o=p;var E=ot;ot|=2;var T=i2();(Qt!==i||rn!==o)&&(ri=null,jo=Dt()+500,Ss(i,o));do try{x7();break}catch(B){r2(i,B)}while(!0);dm(),Gc.current=T,ot=E,Ht!==null?o=0:(Qt=null,rn=0,o=Vt)}if(o!==0){if(o===2&&(E=Ch(i),E!==0&&(p=E,o=Gm(i,E))),o===1)throw c=yu,Ss(i,0),Mi(i,p),Dn(i,Dt()),c;if(o===6)Mi(i,p);else{if(E=i.current.alternate,(p&30)===0&&!b7(E)&&(o=td(i,p),o===2&&(T=Ch(i),T!==0&&(p=T,o=Gm(i,T))),o===1))throw c=yu,Ss(i,0),Mi(i,p),Dn(i,Dt()),c;switch(i.finishedWork=E,i.finishedLanes=p,o){case 0:case 1:throw Error(n(345));case 2:vs(i,Ln,ri);break;case 3:if(Mi(i,p),(p&130023424)===p&&(o=qm+500-Dt(),10<o)){if(lc(i,0)!==0)break;if(E=i.suspendedLanes,(E&p)!==p){_n(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=em(vs.bind(null,i,Ln,ri),o);break}vs(i,Ln,ri);break;case 4:if(Mi(i,p),(p&4194240)===p)break;for(o=i.eventTimes,E=-1;0<p;){var S=31-pr(p);T=1<<S,S=o[S],S>E&&(E=S),p&=~T}if(p=E,p=Dt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*T7(p/1960))-p,10<p){i.timeoutHandle=em(vs.bind(null,i,Ln,ri),p);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?t2.bind(null,i):null}function Gm(i,o){var c=Tu;return i.current.memoizedState.isDehydrated&&(Ss(i,o).flags|=256),i=td(i,o),i!==2&&(o=Ln,Ln=c,o!==null&&Xm(o)),i}function Xm(i){Ln===null?Ln=i:Ln.push.apply(Ln,i)}function b7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var p=0;p<c.length;p++){var E=c[p],T=E.getSnapshot;E=E.value;try{if(!hr(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&=~Vm,o&=~Xc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-pr(o),p=1<<c;i[c]=-1,o&=~p}}function n2(i){if((ot&6)!==0)throw Error(n(327));$o();var o=lc(i,0);if((o&1)===0)return Dn(i,Dt()),null;var c=td(i,o);if(i.tag!==0&&c===2){var p=Ch(i);p!==0&&(o=p,c=Gm(i,p))}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 Qm(i,o){var c=ot;ot|=1;try{return i(o)}finally{ot=c,ot===0&&(jo=Dt()+500,Nc&&ki())}}function ws(i){Li!==null&&Li.tag===0&&(ot&6)===0&&$o();var o=ot;ot|=1;var c=tr.transition,p=ft;try{if(tr.transition=null,ft=1,i)return i()}finally{ft=p,tr.transition=c,ot=o,(ot&6)===0&&ki()}}function Km(){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 p=c;switch(om(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Ac();break;case 3:Fo(),wt(In),wt(fn),Tm();break;case 5:Em(p);break;case 4:Fo();break;case 13:wt(Ct);break;case 19:wt(Ct);break;case 10:fm(p.type._context);break;case 22:case 23:Km()}c=c.return}if(Qt=i,Ht=i=Fi(i.current,null),rn=qn=o,Vt=0,yu=null,Vm=Xc=xs=0,Ln=Tu=null,Ts!==null){for(o=0;o<Ts.length;o++)if(c=Ts[o],p=c.interleaved,p!==null){c.interleaved=null;var E=p.next,T=c.pending;if(T!==null){var S=T.next;T.next=E,p.next=S}c.pending=p}Ts=null}return i}function r2(i,o){do{var c=Ht;try{if(dm(),Bc.current=$c,Uc){for(var p=Nt.memoizedState;p!==null;){var E=p.queue;E!==null&&(E.pending=null),p=p.next}Uc=!1}if(_s=0,Xt=zt=Nt=null,fu=!1,pu=0,zm.current=null,c===null||c.return===null){Vt=1,yu=o,Ht=null;break}e:{var T=i,S=c.return,B=c,z=o;if(o=rn,B.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Z=z,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var he=Ee.alternate;he?(Ee.updateQueue=he.updateQueue,Ee.memoizedState=he.memoizedState,Ee.lanes=he.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=Nw(S);if(Oe!==null){Oe.flags&=-257,kw(Oe,S,B,T,o),Oe.mode&1&&Cw(T,Z,o),o=Oe,z=Z;var Pe=o.updateQueue;if(Pe===null){var Re=new Set;Re.add(z),o.updateQueue=Re}else Pe.add(z);break e}else{if((o&1)===0){Cw(T,Z,o),Jm();break e}z=Error(n(426))}}else if(At&&B.mode&1){var Mt=Nw(S);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),kw(Mt,S,B,T,o),lm(Bo(z,B));break e}}T=z=Bo(z,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=vw(T,z,o);Jx(T,X);break e;case 1:B=z;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 xe=Aw(T,B,o);Jx(T,xe);break e}}T=T.return}while(T!==null)}o2(c)}catch(De){o=De,Ht===c&&c!==null&&(Ht=c=c.return);continue}break}while(!0)}function i2(){var i=Gc.current;return Gc.current=$c,i===null?$c:i}function Jm(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Qt===null||(xs&268435455)===0&&(Xc&268435455)===0||Mi(Qt,rn)}function td(i,o){var c=ot;ot|=2;var p=i2();(Qt!==i||rn!==o)&&(ri=null,Ss(i,o));do try{_7();break}catch(E){r2(i,E)}while(!0);if(dm(),ot=c,Gc.current=p,Ht!==null)throw Error(n(261));return Qt=null,rn=0,Vt}function _7(){for(;Ht!==null;)s2(Ht)}function x7(){for(;Ht!==null&&!WF();)s2(Ht)}function s2(i){var o=l2(i.alternate,i,qn);i.memoizedProps=i.pendingProps,o===null?o2(i):Ht=o,zm.current=null}function o2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=h7(c,o,qn),c!==null){Ht=c;return}}else{if(c=m7(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 p=ft,E=tr.transition;try{tr.transition=null,ft=1,w7(i,o,c,p)}finally{tr.transition=E,ft=p}return null}function w7(i,o,c,p){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(rB(i,T),i===Qt&&(Ht=Qt=null,rn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Kc||(Kc=!0,c2(sc,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,zm.current=null,E7(i,c),Qw(c,i),zB(Jh),fc=!!Kh,Jh=Kh=null,i.current=c,y7(c),GF(),ot=B,ft=S,tr.transition=T}else i.current=c;if(Kc&&(Kc=!1,Li=i,Jc=E),T=i.pendingLanes,T===0&&(Ri=null),KF(c.stateNode),Dn(i,Dt()),o!==null)for(p=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],p(E.value,{componentStack:E.stack,digest:E.digest});if(Qc)throw Qc=!1,i=Ym,Ym=null,i;return(Jc&1)!==0&&i.tag!==0&&$o(),T=i.pendingLanes,(T&1)!==0?i===Wm?bu++:(bu=0,Wm=i):bu=0,ki(),null}function $o(){if(Li!==null){var i=G_(Jc),o=tr.transition,c=ft;try{if(tr.transition=null,ft=16>i?16:i,Li===null)var p=!1;else{if(i=Li,Li=null,Jc=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 z=0;z<B.length;z++){var Z=B[z];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 he=Ee.sibling,Oe=Ee.return;if(qw(Ee),Ee===Z){Ie=null;break}if(he!==null){he.return=Oe,Ie=he;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:Wc(9,B)}}catch(De){It(B,B.return,De)}if(B===S){Ie=null;break e}var xe=B.sibling;if(xe!==null){xe.return=B.return,Ie=xe;break e}Ie=B.return}}if(ot=E,ki(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(oc,i)}catch(De){}p=!0}return p}finally{ft=c,tr.transition=o}}return!1}function a2(i,o,c){o=Bo(c,o),o=vw(i,o,1),i=Ii(i,o,1),o=_n(),i!==null&&(Va(i,1,o),Dn(i,o))}function It(i,o,c){if(i.tag===3)a2(i,i,c);else for(;o!==null;){if(o.tag===3){a2(o,i,c);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ri===null||!Ri.has(p))){i=Bo(c,i),i=Aw(o,i,1),o=Ii(o,i,1),i=_n(),o!==null&&(Va(o,1,i),Dn(o,i));break}}o=o.return}}function S7(i,o,c){var p=i.pingCache;p!==null&&p.delete(o),o=_n(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(rn&c)===c&&(Vt===4||Vt===3&&(rn&130023424)===rn&&500>Dt()-qm?Ss(i,0):Vm|=c),Dn(i,o)}function u2(i,o){o===0&&((i.mode&1)===0?o=1:(o=uc,uc<<=1,(uc&130023424)===0&&(uc=4194304)));var c=_n();i=ei(i,o),i!==null&&(Va(i,o,c),Dn(i,c))}function v7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),u2(i,c)}function A7(i,o){var c=0;switch(i.tag){case 13:var p=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(o),u2(i,c)}var l2;l2=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,p7(i,o,c);Rn=(i.flags&131072)!==0}else Rn=!1,At&&(o.flags&1048576)!==0&&$x(o,Oc,o.index);switch(o.lanes=0,o.tag){case 2:var p=o.type;qc(i,o),i=o.pendingProps;var E=Oo(o,fn.current);Mo(o,c),E=xm(null,o,p,i,E,c);var T=wm();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(p)?(T=!0,Cc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,mm(o),E.updater=zc,o.stateNode=E,E._reactInternals=o,km(o,p,i,c),o=Rm(null,o,p,!0,T,c)):(o.tag=0,At&&T&&sm(o),bn(null,o,E,c),o=o.child),o;case 16:p=o.elementType;e:{switch(qc(i,o),i=o.pendingProps,E=p._init,p=E(p._payload),o.type=p,E=o.tag=N7(p),i=gr(p,i),E){case 0:o=Pm(null,o,p,i,c);break e;case 1:o=Dw(null,o,p,i,c);break e;case 11:o=Ow(null,o,p,i,c);break e;case 14:o=Iw(null,o,p,gr(p.type,i),c);break e}throw Error(n(306,p,""))}return o;case 0:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Pm(i,o,p,E,c);case 1:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Dw(i,o,p,E,c);case 3:e:{if(Mw(o),i===null)throw Error(n(387));p=o.pendingProps,T=o.memoizedState,E=T.element,Kx(i,o),Mc(o,p,null,c);var S=o.memoizedState;if(p=S.element,T.isDehydrated)if(T={element:p,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=Fw(i,o,p,c,E);break e}else if(p!==E){E=Bo(Error(n(424)),o),o=Fw(i,o,p,c,E);break e}else for(Vn=Ai(o.stateNode.containerInfo.firstChild),zn=o,At=!0,mr=null,c=Xx(o,null,p,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ro(),p===E){o=ni(i,o,c);break e}bn(i,o,p,c)}o=o.child}return o;case 5:return ew(o),i===null&&um(o),p=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Zh(p,E)?S=null:T!==null&&Zh(p,T)&&(o.flags|=32),Lw(i,o),bn(i,o,S,c),o.child;case 6:return i===null&&um(o),null;case 13:return Bw(i,o,c);case 4:return gm(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Lo(o,null,p,c):bn(i,o,p,c),o.child;case 11:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),Ow(i,o,p,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(p=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,yt(Rc,p._currentValue),p._currentValue=S,T!==null)if(hr(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 z=B.firstContext;z!==null;){if(z.context===p){if(T.tag===1){z=ti(-1,c&-c),z.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var Ee=Z.pending;Ee===null?z.next=z:(z.next=Ee.next,Ee.next=z),Z.pending=z}}T.lanes|=c,z=T.alternate,z!==null&&(z.lanes|=c),pm(T.return,c,o),B.lanes|=c;break}z=z.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),pm(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,p=o.pendingProps.children,Mo(o,c),E=Zn(E),p=p(E),o.flags|=1,bn(i,o,p,c),o.child;case 14:return p=o.type,E=gr(p,o.pendingProps),E=gr(p.type,E),Iw(i,o,p,E,c);case 15:return Pw(i,o,o.type,o.pendingProps,c);case 17:return p=o.type,E=o.pendingProps,E=o.elementType===p?E:gr(p,E),qc(i,o),o.tag=1,Pn(p)?(i=!0,Cc(o)):i=!1,Mo(o,c),ww(o,p,E),km(o,p,E,c),Rm(null,o,p,!0,i,c);case 19:return Hw(i,o,c);case 22:return Rw(i,o,c)}throw Error(n(156,o.tag))};function c2(i,o){return z_(i,o)}function C7(i,o,c,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,o,c,p){return new C7(i,o,c,p)}function Zm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function N7(i){if(typeof i=="function")return Zm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===ce)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 nd(i,o,c,p,E,T){var S=2;if(p=i,typeof i=="function")Zm(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 de:return i=nr(12,c,o,E|2),i.elementType=de,i.lanes=T,i;case fe:return i=nr(13,c,o,E),i.elementType=fe,i.lanes=T,i;case pe:return i=nr(19,c,o,E),i.elementType=pe,i.lanes=T,i;case le:return rd(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:S=10;break e;case oe:S=9;break e;case te:S=11;break e;case ce:S=14;break e;case we:S=16,p=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=nr(S,c,o,E),o.elementType=i,o.type=p,o.lanes=T,o}function As(i,o,c,p){return i=nr(7,i,p,o),i.lanes=c,i}function rd(i,o,c,p){return i=nr(22,i,p,o),i.elementType=le,i.lanes=c,i.stateNode={isHidden:!1},i}function e0(i,o,c){return i=nr(6,i,null,o),i.lanes=c,i}function t0(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 k7(i,o,c,p,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=Nh(0),this.expirationTimes=Nh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nh(0),this.identifierPrefix=p,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function n0(i,o,c,p,E,T,S,B,z){return i=new k7(i,o,c,B,z),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:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(T),i}function O7(i,o,c){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:p==null?null:""+p,children:i,containerInfo:o,implementation:c}}function d2(i){if(!i)return Ni;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(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 Ux(i,c,o)}return o}function f2(i,o,c,p,E,T,S,B,z){return i=n0(c,p,!0,i,E,T,S,B,z),i.context=d2(null),c=i.current,p=_n(),E=Di(c),T=ti(p,E),T.callback=o!=null?o:null,Ii(c,T,E),i.current.lanes=E,Va(i,E,p),Dn(i,p),i}function id(i,o,c,p){var E=o.current,T=_n(),S=Di(E);return c=d2(c),o.context===null?o.context=c:o.pendingContext=c,o=ti(T,S),o.payload={element:i},p=p===void 0?null:p,p!==null&&(o.callback=p),i=Ii(E,o,S),i!==null&&(Tr(i,E,S,T),Dc(i,E,S)),S}function sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function p2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function r0(i,o){p2(i,o),(i=i.alternate)&&p2(i,o)}function I7(){return null}var h2=typeof reportError=="function"?reportError:function(i){console.error(i)};function i0(i){this._internalRoot=i}od.prototype.render=i0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));id(i,o,null,null)},od.prototype.unmount=i0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ws(function(){id(null,i,null,null)}),o[Qr]=null}};function od(i){this._internalRoot=i}od.prototype.unstable_scheduleHydration=function(i){if(i){var o=K_();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&&ex(i)}};function s0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function m2(){}function P7(i,o,c,p,E){if(E){if(typeof p=="function"){var T=p;p=function(){var Z=sd(S);T.call(Z)}}var S=f2(o,p,i,0,null,!1,!1,"",m2);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 p=="function"){var B=p;p=function(){var Z=sd(z);B.call(Z)}}var z=n0(i,0,!1,null,null,!1,!1,"",m2);return i._reactRootContainer=z,i[Qr]=z.current,iu(i.nodeType===8?i.parentNode:i),ws(function(){id(o,z,c,p)}),z}function ud(i,o,c,p,E){var T=c._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var B=E;E=function(){var z=sd(S);B.call(z)}}id(o,S,i,E)}else S=P7(c,o,i,E,p);return sd(S)}X_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=za(o.pendingLanes);c!==0&&(kh(o,c|1),Dn(o,Dt()),(ot&6)===0&&(jo=Dt()+500,ki()))}break;case 13:ws(function(){var p=ei(i,1);if(p!==null){var E=_n();Tr(p,i,1,E)}}),r0(i,1)}},Oh=function(i){if(i.tag===13){var o=ei(i,134217728);if(o!==null){var c=_n();Tr(o,i,134217728,c)}r0(i,134217728)}},Q_=function(i){if(i.tag===13){var o=Di(i),c=ei(i,o);if(c!==null){var p=_n();Tr(c,i,o,p)}r0(i,o)}},K_=function(){return ft},J_=function(i,o){var c=ft;try{return ft=i,o()}finally{ft=c}},xh=function(i,o,c){switch(o){case"input":if(Ne(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var p=c[o];if(p!==i&&p.form===i.form){var E=vc(p);if(!E)throw Error(n(90));Ut(p),Ne(p,E)}}}break;case"textarea":$e(i,c);break;case"select":o=c.value,o!=null&&Se(i,!!c.multiple,o,!1)}},M_=Qm,F_=ws;var R7={usingClientEntryPoint:!1,Events:[au,No,vc,L_,D_,Qm]},_u={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},L7={bundleType:_u.bundleType,version:_u.version,rendererPackageName:_u.rendererPackageName,rendererConfig:_u.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=j_(i),i===null?null:i.stateNode},findFiberByHostInstance:_u.findFiberByHostInstance||I7,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 ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ld.isDisabled&&ld.supportsFiber)try{oc=ld.inject(L7),Dr=ld}catch(i){}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R7,vn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s0(o))throw Error(n(200));return O7(i,o,null,c)},vn.createRoot=function(i,o){if(!s0(i))throw Error(n(299));var c=!1,p="",E=h2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=n0(i,1,!1,null,null,c,!1,p,E),i[Qr]=o.current,iu(i.nodeType===8?i.parentNode:i),new i0(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=j_(o),i=i===null?null:i.stateNode,i},vn.flushSync=function(i){return ws(i)},vn.hydrate=function(i,o,c){if(!ad(o))throw Error(n(200));return ud(null,i,o,!0,c)},vn.hydrateRoot=function(i,o,c){if(!s0(i))throw Error(n(405));var p=c!=null&&c.hydratedSources||null,E=!1,T="",S=h2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),o=f2(o,null,i,1,c!=null?c:null,E,!1,T,S),i[Qr]=o.current,iu(i),p)for(i=0;i<p.length;i++)c=p[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new od(o)},vn.render=function(i,o,c){if(!ad(o))throw Error(n(200));return ud(null,i,o,!1,c)},vn.unmountComponentAtNode=function(i){if(!ad(i))throw Error(n(40));return i._reactRootContainer?(ws(function(){ud(null,null,i,!1,function(){i._reactRootContainer=null,i[Qr]=null})}),!0):!1},vn.unstable_batchedUpdates=Qm,vn.unstable_renderSubtreeIntoContainer=function(i,o,c,p){if(!ad(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ud(i,o,c,!1,p)},vn.version="18.3.1-next-f1338f8080-20240426",vn}var t1;function n1(){if(t1)return df.exports;t1=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=zC(),df.exports}var Bs=n1();function r1(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=r1(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=r1(e))&&(r&&(r+=" "),r+=t);return r}var i1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s1=Hi.createContext&&Hi.createContext(i1),VC=["attr","size","title"];function qC(e,t){if(e==null)return{};var n=YC(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 YC(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 o1(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?o1(Object(n),!0).forEach(function(r){WC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WC(e,t,n){return t=GC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GC(e){var t=XC(e,"string");return typeof t=="symbol"?t:t+""}function XC(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 a1(e){return e&&e.map((t,n)=>Hi.createElement(t.tag,el({key:n},t.attr),a1(t.child)))}function lt(e){return t=>Hi.createElement(QC,Zu({attr:el({},e.attr)},t),a1(e.child))}function QC(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=qC(e,VC),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 s1!==void 0?Hi.createElement(s1.Consumer,null,n=>t(n)):t(i1)}function KC(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 JC(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 ZC(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:x.jsx("button",{className:F(e,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?x.jsx("img",{className:F(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),eN="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",tN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ct(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?x.jsx(ZC,{className:F(t,`${k}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||eN,alt:"Copilot",className:F(t,`${k}-minimized-icon-img`)});return x.jsx(ar,{className:F(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},nN=()=>{const{globalClassName:e,themeVariables:t}=ct(),n=()=>{Ou(!1),jr(!0)};return Bs.createPortal(x.jsx("div",{className:F(e,`${k}-minimized-container`),style:t,children:x.jsx(tN,{onClick:n})}),document.body)};function rN(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=L.useContext(Ng);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const iN=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 sN(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 oN(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 u1(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 aN(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 hf(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 uN(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 lN(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 cN(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 l1(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 c1(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 dN(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 fN(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 pN(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 d1(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})=>x.jsx("button",{className:F(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),hN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:F(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(hf,{size:"16px"})},mN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(ar,{className:F(e,n,`cim-${r}-component`,`${k}-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:x.jsx(hf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(tl,{className:F(e,n,`cim-${r}-component`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&x.jsx(hN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function cU(){}function dU(){}function f1(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 p1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yN={};function h1(e,t){return(yN.jsx?EN:gN).test(e)}const TN=/[ \t\n\f\r]/g;function bN(e){return typeof e=="object"?e.type==="text"?m1(e.value):!1:m1(e)}function m1(e){return e.replace(TN,"")===""}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 g1(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 _N=0;const Qe=Qi(),Bt=Qi(),mf=Qi(),be=Qi(),mt=Qi(),Xi=Qi(),Bn=Qi();function Qi(){return dd(2,++_N)}const gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qe,booleanish:Bt,commaOrSpaceSeparated:Bn,commaSeparated:Xi,number:be,overloadedBoolean:mf,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Ef=Object.keys(gf);class yf extends An{constructor(t,n,r,s){let a=-1;if(super(t,n),E1(this,"space",s),typeof r=="number")for(;++a<Ef.length;){const u=Ef[a];E1(this,Ef[a],(r&gf[u])===gf[u])}}}yf.prototype.defined=!0;function E1(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 yf(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 y1=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 T1(e,t){return t in e?e[t]:t}function b1(e,t){return T1(e,t.toLowerCase())}const xN=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:mf,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:mf,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:b1}),wN=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:T1}),_1=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:b1}),w1=Us({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),SN={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"},vN=/[A-Z]/g,S1=/-[a-z]/g,AN=/^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"&&AN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(S1,NN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!S1.test(a)){let u=a.replace(vN,CN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=yf}return new s(r,t)}function CN(e){return"-"+e.toLowerCase()}function NN(e){return e.charAt(1).toUpperCase()}const sa=g1([y1,xN,_1,x1,w1],"html"),ui=g1([y1,wN,_1,x1,w1],"svg");function v1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function A1(e){return e.join(" ").trim()}var Hs={},Tf,C1;function kN(){if(C1)return Tf;C1=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="/",h="*",m="",_="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 N=1,I=1;function U(pe){var ce=pe.match(t);ce&&(N+=ce.length);var we=pe.lastIndexOf(d);I=~we?pe.length-we:I+pe.length}function G(){var pe={line:N,column:I};return function(ce){return ce.position=new M(pe),de(),ce}}function M(pe){this.start=pe,this.end={line:N,column:I},this.source=w.source}M.prototype.content=A;function V(pe){var ce=new Error(w.source+":"+N+":"+I+": "+pe);if(ce.reason=pe,ce.filename=w.source,ce.line=N,ce.column=I,ce.source=A,!w.silent)throw ce}function ie(pe){var ce=pe.exec(A);if(ce){var we=ce[0];return U(we),A=A.slice(we.length),ce}}function de(){ie(n)}function $(pe){var ce;for(pe=pe||[];ce=oe();)ce!==!1&&pe.push(ce);return pe}function oe(){var pe=G();if(!(f!=A.charAt(0)||h!=A.charAt(1))){for(var ce=2;m!=A.charAt(ce)&&(h!=A.charAt(ce)||f!=A.charAt(ce+1));)++ce;if(ce+=2,m===A.charAt(ce-1))return V("End of comment missing");var we=A.slice(2,ce-2);return I+=2,U(we),A=A.slice(ce),I+=2,pe({type:_,comment:we})}}function te(){var pe=G(),ce=ie(r);if(ce){if(oe(),!ie(s))return V("property missing ':'");var we=ie(a),le=pe({type:y,property:v(ce[0].replace(e,m)),value:we?v(we[0].replace(e,m)):m});return ie(u),le}}function fe(){var pe=[];$(pe);for(var ce;ce=te();)ce!==!1&&(pe.push(ce),$(pe));return pe}return de(),fe()}function v(A){return A?A.replace(l,m):m}return Tf=b,Tf}var N1;function ON(){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(kN());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:h}=d;l?s(f,h,d):h&&(a=a||{},a[f]=h)}),a}return Hs}var oa={},k1;function IN(){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,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return oa.camelCase=d,oa}var aa,O1;function PN(){if(O1)return aa;O1=1;var e=aa&&aa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(ON()),n=IN();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 RN=PN();const LN=tt(RN),rl=I1("end"),wr=I1("start");function I1(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 P1(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?R1(e.position):"start"in e||"end"in e?R1(e):"line"in e||"column"in e?bf(e):""}function bf(e){return L1(e&&e.line)+":"+L1(e&&e.column)}function R1(e){return bf(e&&e.start)+"-"+bf(e&&e.end)}function L1(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,DN=new Map,MN=/[A-Z]/g,FN=new Set(["table","tbody","thead","tfoot","tr"]),BN=new Set(["td","th"]),D1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UN(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=WN(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=YN(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=M1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function M1(e,t,n){if(t.type==="element")return HN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zN(e,t,n);if(t.type==="mdxjsEsm")return $N(e,t);if(t.type==="root")return VN(e,t,n);if(t.type==="text")return qN(e,t)}function HN(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=B1(e,t.tagName,!1),u=GN(e,t);let l=wf(e,t);return FN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!bN(d):!0})),F1(e,u,a,t),xf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function jN(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 $N(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function zN(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:B1(e,t.name,!0),u=XN(e,t),l=wf(e,t);return F1(e,u,a,t),xf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function VN(e,t,n){const r={};return xf(r,wf(e,t)),e.create(t,e.Fragment,r,n)}function qN(e,t){return t.value}function F1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function YN(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 WN(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 GN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&_f.call(t.properties,s)){const a=QN(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&BN.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 XN(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 wf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:DN;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=M1(e,a,u);l!==void 0&&n.push(l)}return n}function QN(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?p1(n):A1(n)),r.property==="style"){let s=typeof n=="object"?n:KN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=JN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?SN[r.property]||r.property:r.attribute,n]}}function KN(e,t){try{return LN(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=D1+"#cannot-parse-style-attribute",s}}function B1(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=D1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function JN(e){const t={};let n;for(n in e)_f.call(e,n)&&(t[ZN(n)]=e[n]);return t}function ZN(e){let t=e.replace(MN,ek);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ek(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"]},tk={};function vf(e,t){const n=tk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return U1(e,r,s)}function U1(e,t,n){if(nk(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 H1(e.children,t,n)}return Array.isArray(e)?H1(e,t,n):""}function H1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=U1(e[s],t,n);return r.join("")}function nk(e){return!!(e&&typeof e=="object")}const j1=document.createElement("i");function Af(e){const t="&"+e+";";j1.innerHTML=t;const n=j1.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 $1={}.hasOwnProperty;function z1(e){const t={};let n=-1;for(;++n<e.length;)rk(t,e[n]);return t}function rk(e,t){let n;for(n in t){const s=($1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){$1.call(s,u)||(s[u]=[]);const l=a[u];ik(s[u],Array.isArray(l)?l:l?[l]:[])}}}function ik(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 V1(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]/),sk=li(/[#-'*+\--9=?A-Z^-~]/);function il(e){return e!==null&&(e<32||e===127)}const Cf=li(/\d/),ok=li(/[\dA-Fa-f]/),ak=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 uk={tokenize:lk};function lk(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 ck={tokenize:dk},q1={tokenize:fk};function dk(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&&N();const U=t.events.length;let G=U,M;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){M=t.events[G][1].end;break}w(r);let V=U;for(;V<t.events.length;)t.events[V][1].end=j({},M),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 _(I);if(s.currentConstruct&&s.currentConstruct.concrete)return b(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(q1,h,m)(I)}function h(I){return s&&N(),w(r),_(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,b(I)}function _(I){return t.containerState={},e.attempt(q1,y,b)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),_(I)}function b(I){if(I===null){s&&N(),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 M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<u&&(!s.events[M][1].end||s.events[M][1].end.offset>u))return;const V=t.events.length;let ie=V,de,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(de){$=t.events[ie][1].end;break}de=!0}for(w(r),M=V;M<t.events.length;)t.events[M][1].end=j({},$),M++;Un(t.events,ie+1,0,t.events.slice(V)),t.events.length=M}}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 N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function fk(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 Nf={name:"attention",resolveAll:pk,tokenize:hk};function pk(e,t){let n=-1,r,s,a,u,l,d,f,h;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),_=j({},e[n][1].start);Y1(m,-d),Y1(_,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:_},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?(h=2,f=Wn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Un(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hk(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"),h=$s(d),m=!h||h===2&&s||n.includes(d),_=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!_)),f._close=!!(a===42?_:_&&(h||!m)),t(d)}}function Y1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mk={name:"autolink",tokenize:gk};function gk(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),h):sk(y)?(e.consume(y),f):n(y)}function h(y){return ln(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):_(y)}function _(y){if((y===45||ln(y))&&r++<63){const b=y===45?_:m;return e.consume(y),b}return n(y)}}const ca={partial:!0,tokenize:Ek};function Ek(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 W1={continuation:{tokenize:Tk},exit:bk,name:"blockQuote",tokenize:yk};function yk(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 Tk(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(W1,t,n)(u)}}function bk(e){e.exit("blockQuote")}const G1={name:"characterEscape",tokenize:_k};function _k(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 ak(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const X1={name:"characterReference",tokenize:xk};function xk(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,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=ok,h):(e.enter("characterReferenceValue"),a=7,u=Cf,h(m))}function h(m){if(m===59&&s){const _=e.exit("characterReferenceValue");return u===ln&&!Af(r.sliceSerialize(_))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),h):n(m)}}const Q1={partial:!0,tokenize:Sk},K1={concrete:!0,name:"codeFenced",tokenize:wk};function wk(e,t,n){const r=this,s={partial:!0,tokenize:G};let a=0,u=0,l;return d;function d(M){return f(M)}function f(M){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(M)}function h(M){return M===l?(u++,e.consume(M),h):u<3?n(M):(e.exit("codeFencedFenceSequence"),nt(M)?it(e,m,"whitespace")(M):m(M))}function m(M){return M===null||He(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(Q1,v,U)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(M))}function _(M){return M===null||He(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(M)):nt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(M)):M===96&&M===l?n(M):(e.consume(M),_)}function y(M){return M===null||He(M)?m(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(M))}function b(M){return M===null||He(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(M)):M===96&&M===l?n(M):(e.consume(M),b)}function v(M){return e.attempt(s,U,A)(M)}function A(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),w}function w(M){return a>0&&nt(M)?it(e,N,"linePrefix",a+1)(M):N(M)}function N(M){return M===null||He(M)?e.check(Q1,v,U)(M):(e.enter("codeFlowValue"),I(M))}function I(M){return M===null||He(M)?(e.exit("codeFlowValue"),N(M)):(e.consume(M),I)}function U(M){return e.exit("codeFenced"),t(M)}function G(M,V,ie){let de=0;return $;function $(ce){return M.enter("lineEnding"),M.consume(ce),M.exit("lineEnding"),oe}function oe(ce){return M.enter("codeFencedFence"),nt(ce)?it(M,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):te(ce)}function te(ce){return ce===l?(M.enter("codeFencedFenceSequence"),fe(ce)):ie(ce)}function fe(ce){return ce===l?(de++,M.consume(ce),fe):de>=u?(M.exit("codeFencedFenceSequence"),nt(ce)?it(M,pe,"whitespace")(ce):pe(ce)):ie(ce)}function pe(ce){return ce===null||He(ce)?(M.exit("codeFencedFence"),V(ce)):ie(ce)}}}function Sk(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 kf={name:"codeIndented",tokenize:Ak},vk={partial:!0,tokenize:Ck};function Ak(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 h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(vk,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 Ck(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 Nk={name:"codeText",previous:Ok,resolve:kk,tokenize:Ik};function kk(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 Ok(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ik(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,h(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 h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class Pk{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 J1(e){const t={};let n=-1,r,s,a,u,l,d,f;const h=new Pk(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.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,Rk(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=h.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(h.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({},h.get(s)[1].start),l=h.slice(s,n),l.unshift(r),h.splice(s,n-s+1,l))}}return Un(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function Rk(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 h,m,_=-1,y=n,b=0,v=0;const A=[v];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(h),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++_<l.length;)l[_][0]==="exit"&&l[_-1][0]==="enter"&&l[_][1].type===l[_-1][1].type&&l[_][1].start.line!==l[_][1].end.line&&(v=_+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(),_=A.length;_--;){const w=l.slice(A[_],A[_+1]),N=a.pop();d.push([N,N+w.length-1]),e.splice(N,2,w)}for(d.reverse(),_=-1;++_<d.length;)f[b+d[_][0]]=b+d[_][1],b+=d[_][1]-d[_][0]-1;return f}const Lk={resolve:Mk,tokenize:Fk},Dk={partial:!0,tokenize:Bk};function Mk(e){return J1(e),e}function Fk(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(Dk,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 Bk(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 Z1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),_):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 _(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),_(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!h&&(w===null||w===41||gt(w))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(w)):h<f&&w===40?(e.consume(w),h++,v):w===41?(e.consume(w),h--,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 eE(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),h}function h(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"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||l++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!nt(y)),y===92?_:m)}function _(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function tE(e,t,n,r,s,a){let u;return l;function l(_){return _===34||_===39||_===40?(e.enter(r),e.enter(s),e.consume(_),e.exit(s),u=_===40?41:_,d):n(_)}function d(_){return _===u?(e.enter(s),e.consume(_),e.exit(s),e.exit(r),t):(e.enter(a),f(_))}function f(_){return _===u?(e.exit(a),d(u)):_===null?n(_):He(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===u||_===null||He(_)?(e.exit("chunkString"),f(_)):(e.consume(_),_===92?m:h)}function m(_){return _===u||_===92?(e.consume(_),h):h(_)}}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 Uk={name:"definition",tokenize:jk},Hk={partial:!0,tokenize:$k};function jk(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return eE.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 Z1(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Hk,m,m)(y)}function m(y){return nt(y)?it(e,_,"whitespace")(y):_(y)}function _(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function $k(e,t,n){return r;function r(l){return gt(l)?fa(e,s)(l):n(l)}function s(l){return tE(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 zk={name:"hardBreakEscape",tokenize:Vk};function Vk(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 qk={name:"headingAtx",resolve:Yk,tokenize:Wk};function Yk(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 Wk(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),u(h)}function u(h){return h===35&&r++<6?(e.consume(h),u):h===null||gt(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||He(h)?(e.exit("atxHeading"),t(h)):nt(h)?it(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||gt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const Gk=["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"],nE=["pre","script","style","textarea"],Xk={concrete:!0,name:"htmlFlow",resolveTo:Jk,tokenize:Zk},Qk={partial:!0,tokenize:t3},Kk={partial:!0,tokenize:e3};function Jk(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 Zk(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return h(P)}function h(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),_):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),s=3,r.interrupt?t:C):En(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function _(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:C):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:C):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,ke=u.toLowerCase();return!Ae&&!a&&nE.includes(ke)?(s=1,r.interrupt?t(P):te(P)):Gk.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?N(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 N(P){return nt(P)?(e.consume(P),N):$(P)}function I(P){return P===47?(e.consume(P),$):P===58||P===95||En(P)?(e.consume(P),U):nt(P)?(e.consume(P),I):$(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),M):nt(P)?(e.consume(P),G):I(P)}function M(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),M):ie(P)}function V(P){return P===d?(e.consume(P),d=null,de):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 de(P){return P===47||P===62||nt(P)?I(P):n(P)}function $(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),le):P===62&&s===4?(e.consume(P),D):P===63&&s===3?(e.consume(P),C):P===93&&s===5?(e.consume(P),re):He(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Qk,J,fe)(P)):P===null||He(P)?(e.exit("htmlFlowData"),fe(P)):(e.consume(P),te)}function fe(P){return e.check(Kk,pe,J)(P)}function pe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ce}function ce(P){return P===null||He(P)?fe(P):(e.enter("htmlFlowData"),te(P))}function we(P){return P===45?(e.consume(P),C):te(P)}function le(P){return P===47?(e.consume(P),u="",W):te(P)}function W(P){if(P===62){const Ae=u.toLowerCase();return nE.includes(Ae)?(e.consume(P),D):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),C):te(P)}function C(P){return P===62?(e.consume(P),D):P===45&&s===2?(e.consume(P),C):te(P)}function D(P){return P===null||He(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),D)}function J(P){return e.exit("htmlFlow"),t(P)}}function e3(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 t3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ca,t,n)}}const n3={name:"htmlText",tokenize:r3};function r3(e,t,n){const r=this;let s,a,u;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),G):C===63?(e.consume(C),I):En(C)?(e.consume(C),ie):n(C)}function f(C){return C===45?(e.consume(C),h):C===91?(e.consume(C),a=0,b):En(C)?(e.consume(C),N):n(C)}function h(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),_):He(C)?(u=m,le(C)):(e.consume(C),m)}function _(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?we(C):C===45?_(C):m(C)}function b(C){const D="CDATA[";return C===D.charCodeAt(a++)?(e.consume(C),a===D.length?v:b):n(C)}function v(C){return C===null?n(C):C===93?(e.consume(C),A):He(C)?(u=v,le(C)):(e.consume(C),v)}function A(C){return C===93?(e.consume(C),w):v(C)}function w(C){return C===62?we(C):C===93?(e.consume(C),w):v(C)}function N(C){return C===null||C===62?we(C):He(C)?(u=N,le(C)):(e.consume(C),N)}function I(C){return C===null?n(C):C===63?(e.consume(C),U):He(C)?(u=I,le(C)):(e.consume(C),I)}function U(C){return C===62?we(C):I(C)}function G(C){return En(C)?(e.consume(C),M):n(C)}function M(C){return C===45||ln(C)?(e.consume(C),M):V(C)}function V(C){return He(C)?(u=V,le(C)):nt(C)?(e.consume(C),V):we(C)}function ie(C){return C===45||ln(C)?(e.consume(C),ie):C===47||C===62||gt(C)?de(C):n(C)}function de(C){return C===47?(e.consume(C),we):C===58||C===95||En(C)?(e.consume(C),$):He(C)?(u=de,le(C)):nt(C)?(e.consume(C),de):we(C)}function $(C){return C===45||C===46||C===58||C===95||ln(C)?(e.consume(C),$):oe(C)}function oe(C){return C===61?(e.consume(C),te):He(C)?(u=oe,le(C)):nt(C)?(e.consume(C),oe):de(C)}function te(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,fe):He(C)?(u=te,le(C)):nt(C)?(e.consume(C),te):(e.consume(C),pe)}function fe(C){return C===s?(e.consume(C),s=void 0,ce):C===null?n(C):He(C)?(u=fe,le(C)):(e.consume(C),fe)}function pe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||gt(C)?de(C):(e.consume(C),pe)}function ce(C){return C===47||C===62||gt(C)?de(C):n(C)}function we(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function le(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),W}function W(C){return nt(C)?it(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):re(C)}function re(C){return e.enter("htmlTextData"),u(C)}}const Of={name:"labelEnd",resolveAll:a3,resolveTo:u3,tokenize:l3},i3={tokenize:c3},s3={tokenize:d3},o3={tokenize:f3};function a3(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 u3(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)},h={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",h,t]]),l=Wn(l,ol(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Wn(l,[["exit",h,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 l3(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(_){return a?a._inactive?m(_):(u=r.parser.defined.includes(ur(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),d):n(_)}function d(_){return _===40?e.attempt(i3,h,u?h:m)(_):_===91?e.attempt(s3,h,u?f:m)(_):u?h(_):m(_)}function f(_){return e.attempt(o3,h,m)(_)}function h(_){return t(_)}function m(_){return a._balanced=!0,n(_)}}function c3(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?h(m):Z1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return gt(m)?fa(e,d)(m):h(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?tE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return gt(m)?fa(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function d3(e,t,n){const r=this;return s;function s(l){return eE.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 f3(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 p3={name:"labelStartImage",resolveAll:Of.resolveAll,tokenize:h3};function h3(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 m3={name:"labelStartLink",resolveAll:Of.resolveAll,tokenize:g3};function g3(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:E3};function E3(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:y3};function y3(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 Cn={continuation:{tokenize:x3},exit:S3,name:"list",tokenize:_3},T3={partial:!0,tokenize:v3},b3={partial:!0,tokenize:w3};function _3(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:Cf(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 Cf(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:h,e.attempt(T3,_,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,_(y)}function m(y){return nt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),_):n(y)}function _(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function x3(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(b3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Cn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function w3(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 S3(e){e.exit(this.containerState.type)}function v3(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 rE={name:"setextUnderline",resolveTo:A3,tokenize:C3};function A3(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 C3(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][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 N3={tokenize:k3};function k3(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(Lk,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 O3={resolveAll:sE()},I3=iE("string"),P3=iE("text");function iE(e){return{resolveAll:sE(e==="text"?R3: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(h){return f(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];let _=-1;if(m)for(;++_<m.length;){const y=m[_];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function sE(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 R3(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 L3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Uk},disable:{null:[]},document:{42:Cn,43:Cn,45:Cn,48:Cn,49:Cn,50:Cn,51:Cn,52:Cn,53:Cn,54:Cn,55:Cn,56:Cn,57:Cn,62:W1},flow:{35:qk,42:al,45:[rE,al],60:Xk,61:rE,95:al,96:K1,126:K1},flowInitial:{[-2]:kf,[-1]:kf,32:kf},insideSpan:{null:[Nf,O3]},string:{38:X1,92:G1},text:{[-5]:If,[-4]:If,[-3]:If,33:p3,38:X1,42:Nf,60:[mk,n3],91:m3,92:[zk,G1],93:Of,95:Nf,96:Nk}},Symbol.toStringTag,{value:"Module"}));function D3(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(M),consume:N,enter:I,exit:U,interrupt:V(M,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:_,sliceStream:y,write:m};let h=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 _(oe,te){return F3(y(oe),te)}function y(oe){return M3(u,oe)}function b(){const{_bufferIndex:oe,_index:te,line:fe,column:pe,offset:ce}=r;return{_bufferIndex:oe,_index:te,line:fe,column:pe,offset:ce}}function v(oe){s[oe.line]=oe.column,$()}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){h=h(oe)}function N(oe){He(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,$()):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 M(oe,te){te.restore()}function V(oe,te){return fe;function fe(pe,ce,we){let le,W,re,C;return Array.isArray(pe)?J(pe):"tokenize"in pe?J([pe]):D(pe);function D(ge){return Le;function Le(je){const Ke=je!==null&&ge[je],ht=je!==null&&ge.null,Ot=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];return J(Ot)(je)}}function J(ge){return le=ge,W=0,ge.length===0?we:P(ge[W])}function P(ge){return Le;function Le(je){return C=de(),re=ge,ge.partial||(f.currentConstruct=ge),ge.name&&f.parser.constructs.disable.null.includes(ge.name)?ke():ge.tokenize.call(te?Object.assign(Object.create(f),te):f,d,Ae,ke)(je)}}function Ae(ge){return oe(re,C),ce}function ke(ge){return C.restore(),++W<le.length?P(le[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 de(){const oe=b(),te=f.previous,fe=f.currentConstruct,pe=f.events.length,ce=Array.from(l);return{from:pe,restore:we};function we(){r=oe,f.previous=te,f.currentConstruct=fe,f.events.length=pe,l=ce,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function M3(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 F3(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 M3(e){const r={constructs:z1([P3,...(e||{}).extensions||[]]),content:s(ok),defined:[],document:s(uk),flow:s(A3),lazy:{},string:s(k3),text:s(O3)};return r;function s(a){return u;function u(l){return R3(r,a,l)}}}function F3(e){for(;!J1(e););return e}const oE=/[\0\t\n\r]/g;function B3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,h,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(oE.lastIndex=m,f=oE.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(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)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 U3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H3(e){return e.replace(U3,j3)}function j3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return V1(n.slice(a?2:1),a?16:10)}return Af(n)||e}const aE={}.hasOwnProperty;function $3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),z3(n)(F3(M3(n).document().write(B3()(e,t,!0))))}function z3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(et),autolinkProtocol:le,autolinkEmail:le,atxHeading:a(Lt),blockQuote:a(ht),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(Ne,u),htmlFlowData:le,htmlText:a(Ne,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:ke,characterReferenceMarkerNumeric:ke,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:N,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(fe),htmlFlowData:z,htmlText:d(pe),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:C,resourceTitleString:M,resource:J,setextHeading:d(ie),setextHeadingLineSequence:V,setextHeadingText:L,strong:d(),thematicBreak:d()}};uE(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:h,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]];aE.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]||lE).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,ps;for(;++Je<=qe;){const tn=ee[Je];switch(tn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tn[0]==="enter"?st++:st--,ps=void 0;break}case"lineEndingBlank":{tn[0]==="enter"&&(Xr&&!ps&&!st&&!Ti&&(Ti=Je),ps=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ps=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,ps=!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]||lE).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 h(){return vf(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 N(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 pe(){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=H3(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 C(){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 ke(ee){this.data.characterReferenceType=ee.type}function ge(ee){const xe=this.sliceSerialize(ee),qe=this.data.characterReferenceType;let Je;qe?(Je=V1(xe,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=Af(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 ht(){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 Ne(){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 uE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?uE(e,r):V3(e,r)}}function V3(e,t){let n;for(n in t)if(aE.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 lE(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 q3(e){const t=this;t.parser=n;function n(r){return $3(r,ue(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function Y3(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 W3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
-
`}]}function
|
|
28
|
-
`:"",r={},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
|
|
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 B3(e){const r={constructs:z1([L3,...(e||{}).extensions||[]]),content:s(uk),defined:[],document:s(ck),flow:s(N3),lazy:{},string:s(I3),text:s(P3)};return r;function s(a){return u;function u(l){return D3(r,a,l)}}}function U3(e){for(;!J1(e););return e}const oE=/[\0\t\n\r]/g;function H3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,h,m,_,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(oE.lastIndex=m,f=oE.exec(a),_=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(_),!f){t=a.slice(m);break}if(y===10&&m===_&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<_&&(d.push(a.slice(m,_)),e+=_-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=_+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const j3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $3(e){return e.replace(j3,z3)}function z3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return V1(n.slice(a?2:1),a?16:10)}return Af(n)||e}const aE={}.hasOwnProperty;function V3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),q3(n)(U3(B3(n).document().write(H3()(e,t,!0))))}function q3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(et),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Lt),blockQuote:a(ht),characterEscape:de,characterReference:de,codeFenced:a(Ot),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ot,u),codeText:a(Ut,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(yn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Tn),hardBreakEscape:a(Be),hardBreakTrailing:a(Be),htmlFlow:a(Ne,u),htmlFlowData:de,htmlText:a(Ne,u),htmlTextData:de,image:a(We),label:u,link:a(et),listItem:a(Se),listItemValue:_,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:$,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:ge,characterReference:Le,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:$,codeIndented:d(w),codeText:d(ce),codeTextData:$,data:$,definition:d(),definitionDestinationString:U,definitionLabelString:N,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(fe),htmlFlowData:$,htmlText:d(pe),htmlTextData:$,image:d(le),label:re,labelText:W,lineEnding:oe,link:d(we),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ae,resourceDestinationString:C,resourceTitleString:D,resource:J,setextHeading:d(ie),setextHeadingLineSequence:V,setextHeadingText:M,strong:d(),thematicBreak:d()}};uE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let _e={type:"root",children:[]};const qe={stack:[_e],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:h,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]];aE.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]||lE).call(qe,void 0,en[0])}for(_e.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;)_e=t.transforms[st](_e)||_e;return _e}function s(ee,_e,qe){let Je=_e-1,st=-1,en=!1,Xr,Qn,Ti,ps;for(;++Je<=qe;){const tn=ee[Je];switch(tn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tn[0]==="enter"?st++:st--,ps=void 0;break}case"lineEndingBlank":{tn[0]==="enter"&&(Xr&&!ps&&!st&&!Ti&&(Ti=Je),ps=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ps=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,ps=!0}}}return ee[_e][1]._spread=en,qe}function a(ee,_e){return qe;function qe(Je){l.call(this,ee(Je),Je),_e&&_e.call(this,Je)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ee,_e,qe){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([_e,qe||void 0]),ee.position={start:ci(_e.start),end:void 0}}function d(ee){return _e;function _e(qe){ee&&ee.call(this,qe),f.call(this,qe)}}function f(ee,_e){const qe=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==ee.type&&(_e?_e.call(this,ee,Je[0]):(Je[1]||lE).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 h(){return vf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function _(ee){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ee}function b(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ee}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ee.replace(/(\r?\n|\r)$/g,"")}function N(ee){const _e=this.resume(),qe=this.stack[this.stack.length-1];qe.label=_e,qe.identifier=ur(this.sliceSerialize(ee)).toLowerCase()}function I(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ee}function U(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ee}function G(ee){const _e=this.stack[this.stack.length-1];if(!_e.depth){const qe=this.sliceSerialize(ee).length;_e.depth=qe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function V(ee){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function de(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 $(ee){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ee),_e.position.end=ci(ee.end)}function oe(ee){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=_e.children[_e.children.length-1];qe.position.end=ci(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(de.call(this,ee),$.call(this,ee))}function te(){this.data.atHardBreak=!0}function fe(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ee}function pe(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ee}function ce(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ee}function we(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=_e,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function le(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=_e,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function W(ee){const _e=this.sliceSerialize(ee),qe=this.stack[this.stack.length-2];qe.label=$3(_e),qe.identifier=ur(_e).toLowerCase()}function re(){const ee=this.stack[this.stack.length-1],_e=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=_e}function C(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ee}function D(){const ee=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ee}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Ae(ee){const _e=this.resume(),qe=this.stack[this.stack.length-1];qe.label=_e,qe.identifier=ur(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function ke(ee){this.data.characterReferenceType=ee.type}function ge(ee){const _e=this.sliceSerialize(ee),qe=this.data.characterReferenceType;let Je;qe?(Je=V1(_e,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=Af(_e);const st=this.stack[this.stack.length-1];st.value+=Je}function Le(ee){const _e=this.stack.pop();_e.position.end=ci(ee.end)}function je(ee){$.call(this,ee);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ee)}function Ke(ee){$.call(this,ee);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(ee)}function ht(){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 Ne(){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 uE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?uE(e,r):Y3(e,r)}}function Y3(e,t){let n;for(n in t)if(aE.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 lE(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 W3(e){const t=this;t.parser=n;function n(r){return V3(r,ue(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function G3(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 X3(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 K3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z3(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 eO(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 tO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cE(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 nO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cE(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 rO(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 iO(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 sO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cE(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 oO(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 aO(e,t,n){const r=e.all(t),s=n?uO(n):dE(t),a={},u=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(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 h=r[l];(s||l!==0||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
|
|
29
29
|
`}),h.type==="element"&&h.tagName==="p"&&!s?u.push(...h.children):u.push(h)}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
|
|
30
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function uO(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=dE(n[r])}return t}function dE(e){const t=e.spread;return t==null?e.children.length>1:t}function lO(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 cO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pO(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 hO(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],_={},y=u?u[d]:void 0;y&&(_.align=y);let b={type:"element",tagName:a,properties:_,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function mO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fE=9,pE=32;function gO(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===fE||a===pE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===fE||a===pE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function EO(e,t){const n={type:"text",value:gO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const TO={blockquote:G3,break:X3,code:Q3,delete:K3,emphasis:J3,footnoteReference:Z3,heading:eO,html:tO,imageReference:nO,image:rO,inlineCode:iO,linkReference:sO,link:oO,listItem:aO,list:lO,paragraph:cO,root:dO,strong:fO,table:pO,tableCell:mO,tableRow:hO,text:EO,thematicBreak:yO,toml:ul,yaml:ul,definition:ul,footnoteDefinition:ul};function ul(){}const mE=-1,ll=0,pa=1,cl=2,Pf=3,Rf=4,Lf=5,Df=6,gE=7,EE=8,yE=typeof self=="object"?self:globalThis,TE=(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 yE[e](t)},bO=(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 mE:return n(u,s);case pa:{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 Pf:return n(new Date(u),s);case Rf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Lf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Df:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case gE:{const{name:l,message:d}=u;return n(typeof yE[l]=="function"?TE(l,d):new Error(d),s)}case EE: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(TE(a,u),s)};return r},bE=e=>bO(new Map,e)(0),Ji="",{toString:_O}={},{keys:xO}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[ll,t];const n=_O.call(e).slice(8,-1);switch(n){case"Array":return[pa,Ji];case"Object":return[cl,Ji];case"Date":return[Pf,Ji];case"RegExp":return[Rf,Ji];case"Map":return[Lf,Ji];case"Set":return[Df,Ji];case"DataView":return[pa,n]}return n.includes("Array")?[pa,n]:e instanceof Error?[gE,e.name||"Error"]:[cl,n]},dl=([e,t])=>e===ll&&(t==="function"||t==="symbol"),wO=(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]=ha(u);switch(l){case ll:{let h=u;switch(d){case"bigint":l=EE,h=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([mE],u)}return s([l,h],u)}case pa:{if(d){let _=u;return d==="DataView"?_=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(_=new Uint8Array(u)),s([d,[..._]],u)}const h=[],m=s([l,h],u);for(const _ of u)h.push(a(_));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 h=[],m=s([l,h],u);for(const _ of xO(u))(e||!dl(ha(u[_])))&&h.push([a(_),a(u[_])]);return m}case Pf:return s([l,isNaN(u.getTime())?Ji:u.toISOString()],u);case Rf:{const{source:h,flags:m}=u;return s([l,{source:h,flags:m}],u)}case Lf:{const h=[],m=s([l,h],u);for(const[_,y]of u)(e||!(dl(ha(_))||dl(ha(y))))&&h.push([a(_),a(y)]);return m}case Df:{const h=[],m=s([l,h],u);for(const _ of u)(e||!dl(ha(_)))&&h.push(a(_));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},_E=(e,{json:t,lossy:n}={})=>{const r=[];return wO(!(t||n),!!t,new Map,r)(e),r},Zi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?bE(_E(e,t)):structuredClone(e):(e,t)=>bE(_E(e,t));function SO(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 vO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||SO,r=e.options.footnoteBackLabel||vO,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 h=e.all(f),m=String(f.identifier).toUpperCase(),_=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 N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+_+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const A=h[h.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const N=A.children[A.children.length-1];N&&N.type==="text"?N.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...b)}else h.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+_},children:e.wrap(h,!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
31
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
32
|
-
`}]}}const fl=(function(e){if(e==null)return
|
|
32
|
+
`}]}}const fl=(function(e){if(e==null)return OO;if(typeof e=="function")return pl(e);if(typeof e=="object")return Array.isArray(e)?CO(e):NO(e);if(typeof e=="string")return kO(e);throw new Error("Expected function, string, or object as test")});function CO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fl(e[n]);return pl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function NO(e){const t=e;return pl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function kO(e){return pl(t);function t(n){return n&&n.type===e}}function pl(e){return t;function t(n,r,s){return!!(IO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function OO(){return!0}function IO(e){return e!==null&&typeof e=="object"&&"type"in e}function _U(e){return e}const xE=[],PO=!0,Mf=!1,RO="skip";function wE(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,h){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(_,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return _;function _(){let y=xE,b,v,A;if((!t||a(d,f,h[h.length-1]||void 0))&&(y=LO(n(d,h)),y[0]===Mf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==RO)for(v=(r?w.children.length:-1)+u,A=h.concat(w);v>-1&&v<w.children.length;){const N=w.children[v];if(b=l(N,v,A)(),b[0]===Mf)return b;v=typeof b[1]=="number"?b[1]:v+u}}return y}}}function LO(e){return Array.isArray(e)?e:typeof e=="number"?[PO,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),wE(e,a,l,s);function l(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return u(d,m,h)}}const Ff={}.hasOwnProperty,DO={};function MO(e,t){const n=t||DO,r=new Map,s=new Map,a=new Map,u=j(j({},TO),n.handlers),l={all:f,applyData:BO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:FO,wrap:HO};return hl(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,_=String(h.identifier).toUpperCase();m.has(_)||m.set(_,h)}}),l;function d(h,m){const _=h.type,y=l.handlers[_];if(Ff.call(l.handlers,_)&&y)return y(l,h,m);if(l.options.passThrough&&l.options.passThrough.includes(_)){if("children"in h){const v=h,{children:A}=v,w=xn(v,["children"]),N=Zi(w);return N.children=l.all(h),N}return Zi(h)}return(l.options.unknownHandler||UO)(l,h,m)}function f(h){const m=[];if("children"in h){const _=h.children;let y=-1;for(;++y<_.length;){const b=l.one(_[y],h);if(b){if(y&&_[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=SE(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=SE(v.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function FO(e,t){e.position&&(t.position=P1(e))}function BO(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 UO(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 HO(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 SE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vE(e,t){const n=
|
|
36
|
-
`},s),a}function UO(e,t){return e&&"run"in e?function(n,r){return Fe(this,null,function*(){const s=vE(n,j({file:r},t));yield e.run(s,r)})}:function(n,r){return vE(n,j({file:r},e||t))}}function AE(e){if(e)throw e}var Bf,CE;function HO(){if(CE)return Bf;CE=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 h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var x;for(x in f);return typeof x=="undefined"||e.call(f,x)},u=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Bf=function d(){var f,h,m,x,y,b,v=arguments[0],A=1,w=arguments.length,N=!1;for(typeof v=="boolean"&&(N=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(h in f)m=l(v,h),x=l(f,h),v!==x&&(N&&x&&(a(x)||(y=s(x)))?(y?(y=!1,b=m&&s(m)?m:[]):b=m&&a(m)?m:{},u(v,{name:h,newValue:d(N,b,x)})):typeof x!="undefined"&&u(v,{name:h,newValue:x}));return v},Bf}var jO=HO();const Uf=tt(jO);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 $O(){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 h=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,h?zO(h,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 zO(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 h=f;if(l&&n)throw h;return s(h)}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:VO,dirname:qO,extname:YO,join:WO,sep:"/"};function VO(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 qO(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 YO(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 WO(...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?".":GO(n)}function GO(e){ma(e);const t=e.codePointAt(0)===47;let n=XO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function XO(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 QO={cwd:KO};function KO(){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 JO(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 ZO(e)}function ZO(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 NE{constructor(t){let n;t?jf(t)?n={path:t}:typeof t=="string"||eI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QO.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"?Sr.basename(this.path):void 0}set basename(t){Vf(t,"basename"),zf(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(zf(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){jf(t)&&(t=JO(t)),Vf(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){Vf(t,"stem"),zf(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 zf(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function Vf(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 eI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),nI={}.hasOwnProperty;class qf extends tI{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=$O()}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):nI.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=ml(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 l=ml(t),d=r.parse(l);r.run(d,l,function(h,m,x){if(h||!m||!x)return f(h);const y=m,b=r.stringify(y,x);sI(b)?x.value=b:x.result=b,f(h,x)});function f(h,m){h||!m?u(h):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),IE("processSync","process",n),r;function s(a,u){n=!0,AE(a),r=u}}run(t,n,r){OE(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(h,m,x){const y=m||t;h?l(h):u?u(y):r(void 0,y,x)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),IE("runSync","run",r),s;function a(u,l){AE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ml(n),s=this.compiler||this.Compiler;return Wf("stringify",s),OE(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)?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[h,...m]=f;d(h,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=Uf(!0,s.settings,f.settings))}function l(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,x=-1;for(;++m<r.length;)if(r[m][0]===f){x=m;break}if(x===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[x][1];Hf(v)&&Hf(y)&&(y=Uf(!0,v,y)),r[x]=[f,y,...b]}}}}const rI=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 OE(e){if(!Hf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function IE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ml(e){return iI(e)?e:new NE(e)}function iI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sI(e){return typeof e=="string"||oI(e)}function oI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",PE=[],RE={allowDangerousHtml:!0},uI=/^(https?|ircs?|mailto|xmpp)$/i,lI=[{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 LE(e){const t=cI(e),n=dI(e);return fI(t.runSync(t.parse(n),n),e)}function cI(e){const t=e.rehypePlugins||PE,n=e.remarkPlugins||PE,r=e.remarkRehypeOptions?j(j({},e.remarkRehypeOptions),RE):RE;return rI().use(q3).use(n).use(UO,r).use(t)}function dI(e){const t=e.children||"",n=new NE;return typeof t=="string"&&(n.value=t),n}function fI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||pI;for(const h of lI)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+aI+h.id,void 0);return hl(e,f),FN(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(h,m,x){if(h.type==="raw"&&x&&typeof m=="number")return u?x.children.splice(m,1):x.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Sf)if(Object.hasOwn(Sf,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=Sf[y];(v===null||v.includes(h.tagName))&&(h.properties[y]=d(String(b||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,x)),y&&x&&typeof m=="number")return l&&h.children?x.children.splice(m,1,...h.children):x.children.splice(m,1),m}}}function pI(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||uI.test(e.slice(0,t))?e:""}const DE=/[#.]/g;function hI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){DE.lastIndex=s;const l=DE.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 ME(e,t,n){const r=n?yI(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=hI(a,t);const f=d.tagName.toLowerCase(),h=r?r.get(f):void 0;if(d.tagName=h||f,mI(u))l.unshift(u);else for(const[m,x]of Object.entries(u))gI(e,d.properties,m,x)}for(const f of l)Xf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function mI(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 gI(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=v1(r):s.commaSeparated?a=f1(r):s.commaOrSpaceSeparated?a=v1(f1(r).join(" ")):a=FE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?EI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(FE(s,s.property,l));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 FE(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 EI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function yI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const TI=["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"],bI=ME(sa,"div"),xI=ME(ui,"g",TI);function _I(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=BE(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=BE(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 BE(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/"},UE={}.hasOwnProperty,wI=Object.prototype;function SI(e,t){const n=t||{};return Qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ui:sa,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},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:HE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=_I(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=vI(e,t),n}}function HE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Qf(e,t[n]);r.push(s)}return r}function vI(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;UE.call(wI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?xI:bI)(t.tagName,s,HE(e,t.childNodes));if(gl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&zs(d.startTag),h=d&&d.endTag&&zs(d.endTag),m=Qf(e,l.content);f&&h&&e.file&&(m.position={start:f.end,end:h.start}),u.content=m}return e.schema=n,u}function gl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=AI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function AI(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)UE.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=jE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=jE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function jE(e){return e.line&&e.column?e:void 0}const $E={}.hasOwnProperty;function zE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&$E.call(s,e)){const d=String(s[e]);u=$E.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 CI={},NI={}.hasOwnProperty,VE=zE("type",{handlers:{root:OI,element:DI,text:RI,comment:LI,doctype:PI}});function kI(e,t){const r=(t||CI).space;return VE(e,r==="svg"?ui:sa)}function OI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Vs(e,n),n}function II(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Vs(e,n),n}function PI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vs(e,t),t}function RI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vs(e,t),t}function LI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vs(e,t),t}function DI(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"&&NI.call(e.properties,a)){const d=MI(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=Kf(e.children,l,r),Vs(e,l),e.tagName==="template"&&e.content&&(l.content=II(e.content,r)),l}function MI(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?p1(n):A1(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 Kf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=VE(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 FI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],BI=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 Nn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function qE(e){return e>=55296&&e<=57343}function UI(e){return e>=56320&&e<=57343}function HI(e,t){return(e-55296)*1024+9216+t}function YE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function WE(e){return e>=64976&&e<=65007||BI.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 jI=65536;class $I{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=jI,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(UI(n))return this.pos++,this._addGap(),HI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,qE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){YE(t)?this._err(ne.controlCharacterInInputStream):WE(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 GE(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 zI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),VI=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function qI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=VI.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 YI=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 Jf(e){return e>=qt.ZERO&&e<=qt.NINE}function WI(e){return e>=qt.UPPER_A&&e<=qt.UPPER_F||e>=qt.LOWER_A&&e<=qt.LOWER_F}function GI(e){return e>=qt.UPPER_A&&e<=qt.UPPER_Z||e>=qt.LOWER_A&&e<=qt.LOWER_Z||Jf(e)}function XI(e){return e===qt.EQUALS||GI(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 QI{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)|YI)===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(Jf(s)||WI(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===qt.SEMI)this.consumed+=1;else if(this.decodeMode===$r.Strict)return 0;return this.emitCodePoint(qI(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=KI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===$r.Attribute&&(a===0||XI(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 KI(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 JI=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=JI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,ZI={[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},Zf=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 eP(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 tP(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function fi(e){return tP(e)||ga(e)}function XE(e){return fi(e)||eP(e)}function El(e){return e+32}function QE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function KE(e){return QE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function nP(e){return e===O.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:qE(e)?ne.surrogateCharacterReference:WE(e)?ne.noncharacterCharacterReference:YE(e)||e===O.CARRIAGE_RETURN?ne.controlCharacterReference:null}class rP{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 $I(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new QI(zI,(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=nP(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(GE(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=QE(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(Nn.SCRIPT,!1)&&KE(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.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(Nn.SCRIPT,!1)&&KE(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.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(Nn.DASH_DASH,!0)?(this._createCommentToken(Nn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Nn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Nn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Nn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(Nn.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(Nn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Nn.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()&&XE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){XE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const JE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ZE=new Set([...JE,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]),iP=new Set([...yl,g.OL,g.UL]),sP=new Set([...yl,g.BUTTON]),ey=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ty=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),oP=new Set([g.TR,g.TEMPLATE,g.HTML]),aP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),uP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),lP=new Set([g.TD,g.TH]);class cP{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(Zf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(lP,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(uP,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(aP,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(oP,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(ty.has(s))return!1;break}case me.MATHML:{if(ey.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,yl)}hasInListItemScope(t){return this.hasInDynamicScope(t,iP)}hasInButtonScope(t){return this.hasInDynamicScope(t,sP)}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(Zf.has(n))return!0;if(yl.has(n))return!1;break}case me.SVG:{if(ty.has(n))return!1;break}case me.MATHML:{if(ey.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&&JE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ZE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ZE.has(this.currentTagId);)this.pop()}}const ep=3;var vr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vr||(vr={}));const ny={type:vr.Marker};class dP{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 h=this.treeAdapter.getAttrList(f);h.length===s&&r.push({idx:l,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ep)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ep)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>=ep&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(ny)}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(ny);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 pi={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};pi.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(pi.isTextNode(n)){n.value+=t;return}}pi.appendChild(e,pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pi.isTextNode(r)?r.value+=t:pi.insertBefore(e,pi.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)}},ry="html",fP="about:legacy-compat",pP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",iy=["+//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//"],hP=[...iy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),sy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],gP=[...sy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oy(e,t){return t.some(n=>e.startsWith(n))}function EP(e){return e.name===ry&&e.publicId===null&&(e.systemId===null||e.systemId===fP)}function yP(e){if(e.name!==ry)return Gn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===pP)return Gn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),mP.has(n))return Gn.QUIRKS;let r=t===null?hP:iy;if(oy(n,r))return Gn.QUIRKS;if(r=t===null?sy:gP,oy(n,r))return Gn.LIMITED_QUIRKS}return Gn.NO_QUIRKS}const ay={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},TP="definitionurl",bP="definitionURL",xP=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])),_P=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}]]),wP=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])),SP=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 vP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ts.COLOR||r===ts.SIZE||r===ts.FACE)||SP.has(t)}function uy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===TP){e.attrs[t].name=bP;break}}function ly(e){for(let t=0;t<e.attrs.length;t++){const n=xP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function tp(e){for(let t=0;t<e.attrs.length;t++){const n=_P.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 AP(e){const t=wP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=qs(e.tagName))}function CP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function NP(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===ay.TEXT_HTML||s===ay.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function kP(e,t,n,r){return(!r||r===me.HTML)&&NP(e,t,n)||(!r||r===me.MATHML)&&CP(e,t)}const OP="hidden",IP=8,PP=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 RP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},cy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),dy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pi,onParseError:null};class fy{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({},dy),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 rP(this.options,this),this.activeFormattingElements=new dP(this.treeAdapter),this.fragmentContextID=r?qs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new cP(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({},dy),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:RP,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:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:h})}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 kP(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 cy.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 ZI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){l6(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:{sp(this,t);break}case H.IN_TABLE_TEXT:{_y(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){u6(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:{sp(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){rp(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:{rp(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.AFTER_BODY:{HP(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{jP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{$P(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)?c6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{zP(this,t);break}case H.BEFORE_HEAD:{qP(this,t);break}case H.IN_HEAD:{lr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{GP(this,t);break}case H.AFTER_HEAD:{QP(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:{YR(this,t);break}case H.IN_COLUMN_GROUP:{op(this,t);break}case H.IN_TABLE_BODY:{_l(this,t);break}case H.IN_ROW:{wl(this,t);break}case H.IN_CELL:{XR(this,t);break}case H.IN_SELECT:{vy(this,t);break}case H.IN_SELECT_IN_TABLE:{KR(this,t);break}case H.IN_TEMPLATE:{ZR(this,t);break}case H.AFTER_BODY:{t6(this,t);break}case H.IN_FRAMESET:{n6(this,t);break}case H.AFTER_FRAMESET:{i6(this,t);break}case H.AFTER_AFTER_BODY:{o6(this,t);break}case H.AFTER_AFTER_FRAMESET:{a6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?d6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{VP(this,t);break}case H.BEFORE_HEAD:{YP(this,t);break}case H.IN_HEAD:{WP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{XP(this,t);break}case H.AFTER_HEAD:{KP(this,t);break}case H.IN_BODY:{bl(this,t);break}case H.TEXT:{MR(this,t);break}case H.IN_TABLE:{wa(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_CAPTION:{WR(this,t);break}case H.IN_COLUMN_GROUP:{GR(this,t);break}case H.IN_TABLE_BODY:{ap(this,t);break}case H.IN_ROW:{Sy(this,t);break}case H.IN_CELL:{QR(this,t);break}case H.IN_SELECT:{Ay(this,t);break}case H.IN_SELECT_IN_TABLE:{JR(this,t);break}case H.IN_TEMPLATE:{e6(this,t);break}case H.AFTER_BODY:{Ny(this,t);break}case H.IN_FRAMESET:{r6(this,t);break}case H.AFTER_FRAMESET:{s6(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:{by(this,t);break}case H.TEXT:{FR(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_TEMPLATE:{Cy(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:{ip(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:{py(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{sp(this,t);break}case H.IN_TABLE_TEXT:{xy(this,t);break}}}}function LP(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):Ty(e,t),n}function DP(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 MP(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>=PP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=FP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function FP(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 BP(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 UP(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 np(e,t){for(let n=0;n<IP;n++){const r=LP(e,t);if(!r)break;const s=DP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=MP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&BP(e,u,a),UP(e,s,r)}}function rp(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function HP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function jP(e,t){e._appendCommentNode(t,e.document)}function ip(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 $P(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gn.QUIRKS:yP(t);EP(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 zP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=H.BEFORE_HEAD):ya(e,t)}function VP(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 qP(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 YP(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 WP(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 GP(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 XP(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 QP(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 KP(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:{py(e,t);break}case Ze.COMMENT:{rp(e,t);break}case Ze.START_TAG:{cn(e,t);break}case Ze.END_TAG:{bl(e,t);break}case Ze.EOF:{by(e,t);break}}}function py(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function JP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ZP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eR(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 tR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function nR(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,me.HTML)}function rR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function iR(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 sR(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 oR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Rt.PLAINTEXT}function aR(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 uR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(np(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 lR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(np(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fR(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 my(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gy(e){const t=GE(e,ts.TYPE);return t!=null&&t.toLowerCase()===OP}function pR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),gy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function hR(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function mR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gR(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,my(e,t)}function ER(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 yR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function TR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function Ey(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function bR(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 xR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function _R(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function wR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function SR(e,t){e._reconstructActiveFormattingElements(),uy(t),tp(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function vR(e,t){e._reconstructActiveFormattingElements(),ly(t),tp(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function yy(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:{lR(e,t);break}case g.A:{uR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{nR(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:{tR(e,t);break}case g.LI:case g.DD:case g.DT:{sR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{my(e,t);break}case g.HR:{mR(e,t);break}case g.RB:case g.RTC:{_R(e,t);break}case g.RT:case g.RP:{wR(e,t);break}case g.PRE:case g.LISTING:{rR(e,t);break}case g.XMP:{yR(e,t);break}case g.SVG:{vR(e,t);break}case g.HTML:{JP(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:{ZP(e,t);break}case g.FORM:{iR(e,t);break}case g.NOBR:{cR(e,t);break}case g.MATH:{SR(e,t);break}case g.TABLE:{fR(e,t);break}case g.INPUT:{pR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{hR(e,t);break}case g.IMAGE:{gR(e,t);break}case g.BUTTON:{aR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{dR(e,t);break}case g.IFRAME:{TR(e,t);break}case g.SELECT:{bR(e,t);break}case g.OPTION:case g.OPTGROUP:{xR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ey(e,t);break}case g.FRAMESET:{eR(e,t);break}case g.TEXTAREA:{ER(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ey(e,t):yy(e,t);break}case g.PLAINTEXT:{oR(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:yy(e,t)}}function AR(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 CR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,Ny(e,t))}function NR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kR(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 OR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function IR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function PR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function RR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function LR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function DR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ty(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:{np(e,t);break}case g.P:{OR(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:{NR(e,t);break}case g.LI:{IR(e);break}case g.DD:case g.DT:{PR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{RR(e);break}case g.BR:{DR(e);break}case g.BODY:{AR(e,t);break}case g.HTML:{CR(e,t);break}case g.FORM:{kR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{LR(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:Ty(e,t)}}function by(e,t){e.tmplInsertionModeStack.length>0?Cy(e,t):ip(e,t)}function MR(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 FR(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function sp(e,t){if(e.openElements.currentTagId!==void 0&&cy.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:{_y(e,t);break}case Ze.WHITESPACE_CHARACTER:{xy(e,t);break}}else Sa(e,t)}function BR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_CAPTION}function UR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function HR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,op(e,t)}function jR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_TABLE_BODY}function $R(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,_l(e,t)}function zR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VR(e,t){gy(t)?e._appendElement(t,me.HTML):Sa(e,t),t.ackSelfClosing=!0}function qR(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:{$R(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{lr(e,t);break}case g.COL:{HR(e,t);break}case g.FORM:{qR(e,t);break}case g.TABLE:{zR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{jR(e,t);break}case g.INPUT:{VR(e,t);break}case g.CAPTION:{BR(e,t);break}case g.COLGROUP:{UR(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 xy(e,t){e.pendingCharacterTokens.push(t)}function _y(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 wy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function YR(e,t){const n=t.tagID;wy.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 WR(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 op(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 GR(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 ap(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 Sy(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,ap(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,ap(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 XR(e,t){const n=t.tagID;wy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),wl(e,t)):cn(e,t)}function QR(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(),Sy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:bl(e,t)}}function vy(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 Ay(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 KR(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)):vy(e,t)}function JR(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)):Ay(e,t)}function ZR(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,op(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 e6(e,t){t.tagID===g.TEMPLATE&&ns(e,t)}function Cy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ip(e,t)}function t6(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 n6(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 r6(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 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.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function o6(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 a6(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.NOFRAMES:{lr(e,t);break}}}function u6(e,t){t.chars=St,e._insertCharacters(t)}function l6(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 c6(e,t){if(vP(t))ky(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?uy(t):r===me.SVG&&(AP(t),ly(t)),tp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function d6(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 f6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,p6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Oy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Iy(e,t){const n=w6(e),r=zE("type",{handlers:{root:h6,element:m6,text:g6,comment:Ry,doctype:E6,raw:T6},unknown:b6}),s={parser:n?new fy(Oy):fy.getFragmentParser(void 0,Oy),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=SI(a,{file:s.options.file});return s.stitches&&hl(u,"comment",function(l,d,f){const h=l;if(h.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=h.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Py(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function h6(e,t){Py(e.children,t)}function m6(e,t){x6(e,t),Py(e.children,t),_6(e,t)}function g6(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 E6(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 y6(e,t){t.stitches=!0;const n=S6(e);if("children"in e&&"children"in n){const r=Iy({type:"root",children:e.children},t.options);n.children=r.children}Ry({type:"comment",value:{stitch:n}},t)}function Ry(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 T6(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,Ly(t,wr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(f6,"<$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 b6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))y6(n,t);else{let r="";throw p6.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){Ly(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 Ly(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 x6(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=kI(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 _6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&FI.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 w6(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 S6(e){return"children"in e?Zi(ue(j({},e),{children:[]})):Zi(e)}function Dy(e){return function(t,n){return Iy(t,ue(j({},e),{file:n}))}}const rs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],My={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"]},hi={}.hasOwnProperty;function v6(e,t){let n={type:"root",children:[]};const r={schema:t?j(j({},My),t):My,stack:[]},s=Fy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Fy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return A6(e,n);case"doctype":return C6(e,n);case"element":return N6(e,n);case"root":return k6(e,n);case"text":return O6(e,n)}}}function A6(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 Ca(a,t),a}}function C6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ca(n,t),n}}function N6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=By(e,t.children),s=I6(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&&hi.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 Ca(u,t),u}function k6(e,t){const r={type:"root",children:By(e,t.children)};return Ca(r,t),r}function O6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ca(r,t),r}function By(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Fy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function I6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&hi.call(r,n)?r[n]:void 0,u=r&&hi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(hi.call(l,f)){const h=l[f];let m=Uy(e,jy(a,f),f,h);m==null&&(m=Uy(e,jy(u,f),f,h)),m!=null&&(d[f]=m)}if(s&&hi.call(s,n)){const h=s[n];for(f in h)hi.call(h,f)&&!hi.call(d,f)&&(d[f]=h[f])}return d}function Uy(e,t,n,r){return t?Array.isArray(r)?P6(e,t,n,r):Hy(e,t,n,r):void 0}function P6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Hy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Hy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&R6(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 R6(e,t,n){const r=e.schema.protocols&&hi.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 h=r[f];if(a===h.length&&s.slice(0,h.length)===h)return!0}return!1}function Ca(e,t){const n=P1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function jy(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 L6(e){return function(t){return v6(t,e)}}const $y=({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,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},D6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ct();return!e&&!t?null:_.jsx("div",{className:F(n,`${k}-disclaimer`),children:t?_.jsx(LE,{rehypePlugins:[Dy,L6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${k}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${k}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx($y,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${k}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:e})})},up=({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),h=t||!s&&!a,m=D.useRef(t);D.useEffect(()=>{var v;const b=m.current&&!t;m.current=t,b&&!h&&((v=f.current)==null||v.focus({preventScroll:!0}))},[t,h]);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`,`${k}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:x,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:h}),_.jsx(pN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:h}),d&&_.jsx(ar,{className:F(u,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:y,icon:_.jsx(tN,{})})]}),_.jsx(D6,{})]})};function M6(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 F6(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 zy=D.createContext({isOpen:!1}),lp=D.createContext(null),Vy=D.createContext(null),Gs=()=>{var n,r;const e=D.useContext(lp),t=D.useContext(Vy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},qy=({onClearChat:e,componentType:t})=>{const n=Gs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(F6,{}),"Clear chat"]})},Yy=({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(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(M6,{}),"Download transcript"]})};function B6(e){return e==null?[]:Array.isArray(e)?e:[e]}var U6=(e,...t)=>e.concat(t),H6=(e,...t)=>e.filter(n=>!t.includes(n)),j6=e=>Array.from(new Set(e));function Wy(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 $6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Wy(e,t,{step:-r,loop:s})}var z6=e=>Array.isArray(e),Gy=e=>e!=null&&typeof e=="object",V6=e=>Gy(e)&&!z6(e),Al=e=>typeof e=="string",Xs=e=>typeof e=="function",q6=e=>e==null,Y6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),W6=e=>Object.prototype.toString.call(e),Xy=Function.prototype.toString,G6=Xy.call(Object),X6=e=>{if(!Gy(e)||W6(e)!="[object Object]"||J6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Y6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Xy.call(n)==G6},Q6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,K6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,J6=e=>Q6(e)||K6(e),Z6=e=>e(),e4=()=>{},cp=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function t4(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:n4,max:r4}=Math,i4=e=>Number.isNaN(e),s4=e=>i4(e)?0:e,Qy=(e,t,n)=>n4(r4(s4(e),t),n);function dp(e){if(!X6(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]=dp(s))}return n}function fp(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function o4(e,t){if(e==null)throw new Error(t())}function a4(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 u4=Object.defineProperty,l4=(e,t,n)=>t in e?u4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pp=(e,t,n)=>l4(e,typeof t!="symbol"?t+"":t,n),Ky=()=>{},Cl=e=>typeof e=="object"&&e!==null,Qs=e=>e?"":void 0,Jy=e=>e?"true":void 0,c4=1,d4=9,f4=11,Wt=e=>Cl(e)&&e.nodeType===c4&&typeof e.nodeName=="string",Nl=e=>Cl(e)&&e.nodeType===d4,p4=e=>Cl(e)&&e===e.window,Zy=e=>Wt(e)?e.localName||"":"#document";function h4(e){return["html","body","#document"].includes(Zy(e))}var m4=e=>Cl(e)&&e.nodeType!==void 0,is=e=>m4(e)&&e.nodeType===f4&&"host"in e,g4=e=>Wt(e)&&e.localName==="input",E4=e=>Wt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Na(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var y4=/(textarea|select)/;function T4(e){if(e==null||!Wt(e))return!1;try{return g4(e)&&e.selectionStart!=null||y4.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 Nl(e)?e:p4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function b4(e){return Ar(e).documentElement}function Js(e){var t,n,r;return is(e)?Js(e.host):Nl(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 x4(e){if(Zy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||is(e)&&e.host||b4(e);return is(t)?t.host:t}function hp(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Nl(t)||is(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var mp=new WeakMap;function eo(e){return mp.has(e)||mp.set(e,Js(e).getComputedStyle(e)),mp.get(e)}var gp=new Set(["menu","listbox","dialog","grid","tree","region"]),_4=e=>gp.has(e),eT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function tT(e,t){const n=new Set,r=hp(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=eT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const h=r.getElementById(f);if(h){const m=h.getAttribute("role"),x=h.getAttribute("aria-modal")==="true";if(m&&_4(m)&&!x&&(h===t||h.contains(t)||s(h)))return!0}}}return!1};return s(e)}function nT(e,t){const n=hp(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=eT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const h=n.getElementById(f);if(h){const m=h.getAttribute("role"),x=h.getAttribute("aria-modal")==="true";m&&gp.has(m)&&!x&&(t(h),s(h))}}}};s(e)}function w4(e){const t=new Set;return nT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function S4(e){const t=e.getAttribute("role");return!!(t&&gp.has(t))}function v4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function A4(e){var t;return v4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function C4(e){if(!e.id)return!1;const t=hp(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&S4(e))}var Ep=()=>typeof document!="undefined";function N4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var yp=e=>Ep()&&e.test(N4()),k4=e=>Ep()&&e.test(navigator.vendor),rT=()=>Ep()&&!!navigator.maxTouchPoints,O4=()=>yp(/^iPhone/i),I4=()=>yp(/^iPad/i)||Tp()&&navigator.maxTouchPoints>1,kl=()=>O4()||I4(),P4=()=>Tp()||kl(),Tp=()=>yp(/^Mac/i),R4=()=>P4()&&k4(/apple/i);function L4(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=L4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var iT=e=>e.button===0,D4=e=>e.button===2||Tp()&&e.ctrlKey&&e.button===0,M4=e=>"touches"in e&&e.touches.length>0,F4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},sT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function B4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=F4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in sT&&(s=sT[s]),s}function oT(e,t="client"){const n=M4(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)}},aT=e=>Wt(e)&&e.tagName==="IFRAME",U4=/^(audio|video|details)$/;function uT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var H4=e=>!Number.isNaN(uT(e)),j4=e=>uT(e)<0;function $4(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 lT(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=$4(d,t);if(f){const h=Array.from(f.querySelectorAll(Ol)).filter(n),m=u.get(d);if(m!==void 0){const x=m+1;r.splice(x,0,...h),h.forEach((y,b)=>{u.set(y,x+b)});for(let y=x+h.length;y<r.length;y++)u.set(r[y],y)}else{const x=r.length;r.push(...h),h.forEach((y,b)=>{u.set(y,x+b)})}s.push(...h)}}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",cT=(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)&&Cr(e)&&s.unshift(e);const u=[];for(const l of s)if(Cr(l)){if(aT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...cT(d,{getShadowRoot:r}));continue}u.push(l)}return r?lT(u,r,Cr):u};function Cr(e){return!Wt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&E4(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(aT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...to(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=lT(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:Cr(e)&&!j4(e)}function z4(e,t={}){const n=to(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function V4(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 ka(e){return e.tabIndex<0&&(U4.test(e.localName)||T4(e))&&!H4(e)?0:e.tabIndex}function dT(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 q4=class x2{constructor(){pp(this,"id",null),pp(this,"fn_cleanup"),pp(this,"cleanup",()=>{this.cancel()})}static create(){return new x2}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=q4.create();return t.request(e),t.cleanup}function fT(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 bp(e){const t=x4(e);return h4(t)?Ar(t).body:Wt(t)&&G4(t)?t:bp(t)}var Y4=/auto|scroll|overlay|hidden|clip/,W4=new Set(["inline","contents"]);function G4(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return Y4.test(n+s+r)&&!W4.has(a)}var no="default",xp="",Il=new WeakMap;function X4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return kl()?(no==="default"&&(xp=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),no="disabled"):t&&(Il.set(t,t.style.userSelect),t.style.userSelect="none"),()=>Q4({target:t,doc:r})}function Q4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(kl()){if(no!=="disabled")return;no="restoring",setTimeout(()=>{fT(()=>{no==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=xp||""),xp="",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 K4(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(X4(ue(j({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function J4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=oT(l),f=Math.sqrt(dd(d.x,2)+dd(d.y,2)),h=l.pointerType==="touch"?10:5;if(!(f<h)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=oT(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),K4({doc:e})];return()=>{u.forEach(l=>l())}}function Z4(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 h=null;const[m,x]=z4(e,{includeContainer:!0,getShadowRoot:a}),y=V4(l,{current:n,getShadowRoot:a}),b=!m&&!x;f.shiftKey&&Na(y)?(s==null||s(),h=x):f.shiftKey&&(Na(m)||b)?h=n:!f.shiftKey&&Na(n)?(s==null||s(),h=m):!f.shiftKey&&(Na(x)||b)&&(h=y),h&&(f.preventDefault(),typeof r=="function"?r(h):h.focus())}return Gt(u,"keydown",d,!0)}function eL(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(Z4(d,j({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function tL(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Pl(e,t){if(!e)return Ky;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 nL(e,t,n){if(!e)return Ky;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 rL(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 iL(e,t){const{timeout:n,rootNode:r}=t,s=Js(r),a=Ar(r),u=new s.AbortController;return rL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const h=e();h&&h.isConnected&&(f.disconnect(),l(h))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var sL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),oL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,pT=e=>{const t={};let n;for(;n=oL.exec(e);)t[n[1]]=n[2];return t},aL=(e,t)=>{if(Al(e)){if(Al(t))return`${e};${t}`;e=pT(e)}else Al(t)&&(t=pT(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]=cp(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=sL(t[s],n[s]);continue}if(s==="style"){t[s]=aL(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 bU(e){return e}var ro=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ro||{}),_p="__init__";function uL(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:Na,getById:a})}function lL(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 h(){return u?e().value:s}return{initial:r,ref:l,get:h,set(y){(e().sync?Bs.flushSync:Z6)(()=>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 cL(e){const t=D.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var dL=(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,pe,de,we;const n=D.useMemo(()=>{const{id:ce,ids:W,getRootNode:re}=t;return uL({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:dp(t),scope:n}))!=null?te:t,a=fL(s),u=(fe=e.context)==null?void 0:fe.call(e,{prop:a,bindable:Rl,scope:n,flush:gT,getContext(){return d},getComputed(){return G},getRefs(){return v},getEvent(){return y()}}),l=mT(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,C;const W=(re=l.current)==null?void 0:re[ce].get();return(C=l.current)==null?void 0:C[ce].hash(W)}},f=D.useRef(new Map),h=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=cL((de=(pe=e.refs)==null?void 0:pe.call(e,{prop:a,context:d}))!=null?de:{}),A=()=>({state:b(),context:d,event:y(),prop:a,send:z,action:w,guard:N,track:dL,refs:v,computed:G,flush:gT,scope:n,choose:U}),w=ce=>{const W=Xs(ce)?ce(A()):ce;if(!W)return;const re=W.map(C=>{var J,P;const M=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[C];return M||fp(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),M});for(const C of re)C==null||C(A())},N=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||fp(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),J}),C=[];for(const M of re){const J=M==null?void 0:M(A());J&&C.push(J)}return()=>C.forEach(M=>M==null?void 0:M())},U=ce=>B6(ce).find(W=>{let re=!W.guard;return Al(W.guard)?re=!!N(W.guard):Xs(W.guard)&&(re=W.guard(A())),re}),G=ce=>{o4(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 C,M,J,P;if(W){const Ae=f.current.get(W);Ae==null||Ae(),f.current.delete(W)}W&&w((C=e.states[W])==null?void 0:C.exit),w((M=h.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===_p){w(e.entry);const Ae=I(e.effects);Ae&&f.current.set(_p,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 C=(M=V.current)!=null?M:L.initial;L.invoke(C,re?L.get():_p)});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,h.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const le=()=>"ref"in L?L.ref.current:L.get(),z=ce=>{queueMicrotask(()=>{var P,Ae,ke,ge,Le;if(ie.current!==ro.Started)return;m.current=x.current,x.current=ce;let W=le();const re=(ke=(P=e.states[W].on)==null?void 0:P[ce.type])!=null?ke:(Ae=e.on)==null?void 0:Ae[ce.type],C=U(re);if(!C)return;h.current=C;const M=(ge=C.target)!=null?ge:W;r("transition",ce.type,C.target||W,`(${C.actions})`);const J=M!==W;J?Bs.flushSync(()=>L.set(M)):C.reenter&&!J?L.invoke(W,W):w((Le=C.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 mT(e){const t=D.useRef(e);return t.current=e,t}function fL(e){const t=mT(e);return function(r){return t.current[r]}}function gT(e){queueMicrotask(()=>{Bs.flushSync(()=>e())})}var wp=lL(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 pL(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 Sp=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=pL(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(Sp,{apply(t,n,r){return Sp(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Sp(r)),e.get(r)}})})();function hL(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 h;const f=D.useContext(l);if(!f&&n){const m=new Error(a!=null?a:hL(r,s));throw m.name="ContextError",(h=Error.captureStackTrace)==null||h.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[mL,vp]=os({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ET,Oa]=os({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),yT=D.forwardRef((e,t)=>{const n=vp(),r=Oa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(dn.div,ue(j({},s),{ref:Dl(r.ref,t)}))});yT.displayName="PopoverContent";const TT=D.forwardRef((e,t)=>{const n=vp(),r=Oa(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(dn.div,ue(j({},s),{ref:t}))});TT.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)]),bT=e=>Ia()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function gL(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 EL={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 h,m,x;((x=(m=(h=d.composedPath)==null?void 0:h.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),fT(()=>l())}}}}};function Ml(e){return(e==null?void 0:e.animationName)||"none"}io()(["onExitComplete","present","immediate"]);function yL(e,t={}){const{sync:n=!1}=t,r=TL(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 TL(e){const t=D.useRef(e);return t.current=e,t}const Ap=(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:yL(e.onExitComplete)}),d=Ll(EL,l),f=gL(d);f.present&&(u.current=!0);const h=!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:h}};var as=(e,t=[])=>({parts:(...n)=>{if(bL(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(),bL=e=>e.length===0;const xL=["top","right","bottom","left"],mi=Math.min,zr=Math.max,Fl=Math.round,Bl=Math.floor,Nr=e=>({x:e,y:e}),_L={left:"right",right:"left",bottom:"top",top:"bottom"};function xT(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 Cp(e){return e==="x"?"y":"x"}function Np(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function kp(e){return Cp(kr(e))}function wL(e,t,n){n===void 0&&(n=!1);const r=oo(e),s=kp(e),a=Np(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 SL(e){const t=Ul(e);return[Op(e),t,Op(t)]}function Op(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _T=["left","right"],wT=["right","left"],vL=["top","bottom"],AL=["bottom","top"];function CL(e,t,n){switch(e){case"top":case"bottom":return n?t?wT:_T:t?_T:wT;case"left":case"right":return t?vL:AL;default:return[]}}function NL(e,t,n,r){const s=oo(e);let a=CL(gi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Op)))),a}function Ul(e){const t=gi(e);return _L[t]+e.slice(t.length)}function kL(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 ST(e){return typeof e!="number"?kL(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 vT(e,t,n){let{reference:r,floating:s}=e;const a=kr(t),u=kp(t),l=Np(u),d=gi(t),f=a==="y",h=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:h,y:r.y-s.height};break;case"bottom":y={x:h,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 OL(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:h="viewport",elementContext:m="floating",altBoundary:x=!1,padding:y=0}=Vr(t,e),b=ST(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:h,strategy:d})),N=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:N,offsetParent:I,strategy:d}):N);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 IL=50,PL=(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:OL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=vT(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:N}=A,{x:I,y:U,data:G,reset:L}=yield N({x:h,y:m,initialPlacement:r,placement:x,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=I!=null?I:h,m=U!=null?U:m,b[w]=j(j({},b[w]),G),L&&y<IL&&(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:h,y:m}=vT(f,x,d)),v=-1)}return{x:h,y:m,placement:x,strategy:s,middlewareData:b}}),RL=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:h,padding:m=0}=Vr(e,n)||{};if(h==null)return{};const x=ST(m),y={x:r,y:s},b=kp(a),v=Np(b),A=yield l.getDimensions(h),w=b==="y",N=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(h);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[N],z),te=mi(x[I],z),fe=ie-A[v]-te,pe=ie/2-A[v]/2+le,de=xT(oe,pe,fe),we=!f.arrow&&oo(a)!=null&&pe!==de&&u.reference[v]/2-(pe<oe?oe:te)-A[v]/2<0,ce=we?pe<oe?pe-oe:pe-fe:0;return{[b]:y[b]+ce,data:j({[b]:de,centerOffset:pe-de-ce},we&&{alignmentOffset:ce}),reset:we}})}}),LL=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:h}=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 N=gi(a),I=kr(d),U=gi(d)===d,G=yield f.isRTL==null?void 0:f.isRTL(h.floating),L=y||(U||!A?[Ul(d)]:SL(d)),V=v!=="none";!y&&V&&L.push(...NL(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[N]),x){const we=wL(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!==kr(ce):!1)||oe.every(C=>kr(C.placement)===I?C.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,C)=>re.overflows[1]-C.overflows[1])[0])==null?void 0:fe.placement;if(!W)switch(b){case"bestFit":{var pe;const re=(pe=oe.filter(C=>{if(V){const M=kr(C.placement);return M===I||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:pe[0];re&&(W=re);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function AT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CT(e){return xL.some(t=>e[t]>=0)}const DL=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=AT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:CT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(j({},u),{altBoundary:!0})),f=AT(d,r.floating);return{data:{escapedOffsets:f,escaped:CT(f)}}}default:return{}}})}}},NT=new Set(["left","top"]);function ML(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=kr(n)==="y",f=NT.has(u)?-1:1,h=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*h,y:x*f}:{x:x*f,y:y*h}})}const FL=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 ML(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})}})}}},BL=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,h=_n(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},x=yield u.detectOverflow(n,h),y=kr(a),b=Cp(y);let v=m[b],A=m[y];const w=(U,G)=>xT(G+x[U==="y"?"top":"left"],G,G-x[U==="y"?"bottom":"right"]);l&&(v=w(b,v)),d&&(A=w(y,A));const N=f.fn(ue(j({},n),{[b]:v,[y]:A}));return ue(j({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[b]:l,[y]:d}}})})}}},UL=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:h=!0,crossAxis:m=!0}=Vr(e,t),x={x:s,y:a},y=kr(u),b=Cp(y);let v=x[b],A=x[y];const w=Vr(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(h){const G=b==="y"?"height":"width",L=l.reference[b]-l.floating[G]+N.mainAxis,V=l.reference[b]+l.reference[G]-N.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:N.crossAxis),ie=l.reference[y]+l.reference[G]+(L?0:((U=d.offset)==null?void 0:U[y])||0)-(L?N.crossAxis:0);A<V?A=V:A>ie&&(A=ie)}return{[b]:v,[y]:A}}}},HL=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),h=gi(r),m=oo(r),x=kr(r)==="y",{width:y,height:b}=s.floating;let v,A;h==="top"||h==="bottom"?(v=h,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=h,v=m==="end"?"top":"bottom");const w=b-f.top-f.bottom,N=y-f.left-f.right,I=mi(b-f[v],w),U=mi(y-f[A],N),G=n.middlewareData.shift,L=!G;let V=I,ie=U;G!=null&&G.enabled.x&&(ie=N),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 OT(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 jL(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 $L=/transform|translate|scale|rotate|perspective|filter/,zL=/paint|layout|strict|content/,us=e=>!!e&&e!=="none";let Ip;function Pp(e){const t=dr(e)?fr(e):e;return us(t.transform)||us(t.translate)||us(t.scale)||us(t.rotate)||us(t.perspective)||!Rp()&&(us(t.backdropFilter)||us(t.filter))||$L.test(t.willChange||"")||zL.test(t.contain||"")}function VL(e){let t=Ei(e);for(;Ir(t)&&!uo(t);){if(Pp(t))return t;if($l(t))return null;t=Ei(t)}return null}function Rp(){return Ip==null&&(Ip=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ip}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||OT(e)&&e.host||Or(e);return OT(t)?t.host:t}function IT(e){const t=Ei(e);return uo(t)?(e.ownerDocument||e).body:Ir(t)&&Pa(t)?t:IT(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=IT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Hn(s);if(a){const l=Lp(u);return t.concat(u,u.visualViewport||[],Pa(s)?s:[],l&&n?Ra(l):[])}else return t.concat(s,Ra(s,[],n))}function Lp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PT(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 Dp(e){return dr(e)?e:e.contextElement}function lo(e){const t=Dp(e);if(!Ir(t))return Nr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=PT(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 qL=Nr(0);function RT(e){const t=Hn(e);return!Rp()||!t.visualViewport?qL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YL(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=Dp(e);let u=Nr(1);t&&(r?dr(r)&&(u=lo(r)):u=lo(e));const l=YL(a,n,r)?RT(a):Nr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,h=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=Lp(b);for(;v&&r&&y!==b;){const A=lo(v),w=v.getBoundingClientRect(),N=fr(v),I=w.left+(v.clientLeft+parseFloat(N.paddingLeft))*A.x,U=w.top+(v.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,f*=A.y,h*=A.x,m*=A.y,d+=I,f+=U,b=Hn(v),v=Lp(b)}}return Hl({width:h,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 LT(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 WL(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=Nr(1);const h=Nr(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),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const x=u&&!m&&!a?LT(u,d):Nr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+x.x,y:n.y*f.y-d.scrollTop*f.y+h.y+x.y}}function GL(e){return Array.from(e.getClientRects())}function XL(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 DT=25;function QL(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 h=Rp();(!h||h&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Vl(r);if(f<=0){const h=r.ownerDocument,m=h.body,x=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-y);b<=DT&&(a-=b)}else f<=DT&&(a+=f);return{width:a,height:u,x:l,y:d}}const KL=new Set(["absolute","fixed"]);function JL(e,t){const n=ls(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Ir(e)?lo(e):Nr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function MT(e,t,n){let r;if(t==="viewport")r=QL(e,n);else if(t==="document")r=XL(Or(e));else if(dr(t))r=JL(t,n);else{const s=RT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Hl(r)}function FT(e,t){const n=Ei(e);return n===t||!dr(n)||uo(n)?!1:fr(n).position==="fixed"||FT(n,t)}function ZL(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=Pp(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&KL.has(s.position)||Pa(u)&&!d&&FT(e,u))?r=r.filter(h=>h!==u):s=l,u=Ei(u)}return t.set(e,r),r}function e5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?$l(t)?[]:ZL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,h)=>{const m=MT(t,h,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},MT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function t5(e){const{width:t,height:n}=PT(e);return{width:t,height:n}}function n5(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=Nr(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 h=s&&!r&&!a?LT(s,l):Nr(0),m=u.left+l.scrollLeft-d.x-h.x,x=u.top+l.scrollTop-d.y-h.y;return{x:m,y:x,width:u.width,height:u.height}}function Mp(e){return fr(e).position==="static"}function BT(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 UT(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)&&!Mp(s))return s;s=Ei(s)}return n}let r=BT(e,t);for(;r&&jL(r)&&Mp(r);)r=BT(r,t);return r&&uo(r)&&Mp(r)&&!Pp(r)?n:r||VL(e)||n}const r5=function(e){return Fe(this,null,function*(){const t=this.getOffsetParent||UT,n=this.getDimensions,r=yield n(e.floating);return{reference:n5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function i5(e){return fr(e).direction==="rtl"}const s5={convertOffsetParentRelativeRectToViewportRelativeRect:WL,getDocumentElement:Or,getClippingRect:e5,getOffsetParent:UT,getElementRects:r5,getClientRects:GL,getDimensions:t5,getScale:lo,isElement:dr,isRTL:i5};function HT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o5(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:h,top:m,width:x,height:y}=f;if(l||t(),!x||!y)return;const b=Bl(m),v=Bl(s.clientWidth-(h+x)),A=Bl(s.clientHeight-(m+y)),w=Bl(h),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&&!HT(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 a5(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=Dp(e),h=s||a?[...f?Ra(f):[],...Ra(t)]:[];h.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&l?o5(f,n):null;let x=-1,y=null;u&&(y=new ResizeObserver(w=>{let[N]=w;N&&N.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&&!HT(v,w)&&n(),v=w,b=requestAnimationFrame(A)}return n(),()=>{var w;h.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const u5=FL,l5=BL,c5=LL,d5=HL,f5=DL,p5=RL,h5=UL,m5=(e,t,n)=>{const r=new Map,s=j({platform:s5},n),a=ue(j({},s.platform),{_c:r});return PL(e,t,ue(j({},s),{platform:a}))};function jT(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 g5(e){if(!e)return jT();const{x:t,y:n,width:r,height:s}=e;return jT(t,n,r,s)}function E5(e,t){return{contextElement:Wt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?g5(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")},y5=e=>e==="top"||e==="bottom"?"y":"x";function T5(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=y5(d),h=((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=h+x/2,v=m+y/2,A=Math.abs(((oe=s.shift)==null?void 0:oe.y)||0),w=u.reference.height/2,N=y/2,I=(fe=(te=e.offset)==null?void 0:te.mainAxis)!=null?fe:e.gutter,U=typeof I=="number"?I+N:I!=null?I:N,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 b5={name:"rects",fn({rects:e}){return{data:e}}},x5=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 _5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var w5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function $T(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Fp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function S5(e,t,n){const r=e||t.createElement("div");return p5({element:r,padding:n.arrowPadding})}function v5(e,t){var n;if(!q6((n=t.offset)!=null?n:t.gutter))return u5(({placement:r})=>{var h,m,x,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(h=t.offset)==null?void 0:h.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=_5(r),d=l?void 0:t.shift,f=(y=(x=t.offset)==null?void 0:x.crossAxis)!=null?y:d;return dp({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function A5(e){if(!e.flip)return;const t=Fp(e.boundary);return c5(ue(j({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function C5(e){if(!e.slide&&!e.overlap)return;const t=Fp(e.boundary);return l5(ue(j({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:h5()}))}function N5(e){return d5({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 k5(e){var t;if(e.hideWhenDetached)return f5({strategy:"referenceHidden",boundary:(t=Fp(e.boundary))!=null?t:"clippingAncestors"})}function O5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function I5(e,t,n={}){const r=E5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},w5,n),a=t.querySelector("[data-part=arrow]"),u=[v5(a,s),A5(s),C5(s),S5(a,t.ownerDocument,s),x5(a),T5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),N5(s),k5(s),b5],{placement:l,strategy:d,onComplete:f,onPositioned:h}=s,m=()=>Fe(null,null,function*(){var U;if(!r||!t)return;const v=yield m5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),h==null||h({placed:!0});const A=Js(t),w=$T(A,v.x),N=$T(A,v.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${N}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}),h==null||h({placed:!0})):yield m()}),y=O5(s.listeners),b=s.listeners?a5(r,t,x,y):e4;return x(),()=>{b==null||b(),h==null||h({placed:!1})}}function zT(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(I5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var P5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function R5(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?P5[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={},Bp=0,VT=e=>e&&(e.host||VT(e.parentNode)),L5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=VT(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),D5=new Set(["script","output","status","next-route-announcer"]),M5=e=>D5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),F5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=L5(n,Array.isArray(e)?e:[e]);Yl[r]||(Yl[r]=new WeakMap);const l=Yl[r],d=[],f=new Set,h=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Wt(y)&&nT(y,b=>{m(b)})});const x=y=>{!y||h.has(y)||Array.prototype.forEach.call(y.children,b=>{if(f.has(b))x(b);else try{if(M5(b))return;const A=b.getAttribute(s)==="true",w=(co.get(b)||0)+1,N=(l.get(b)||0)+1;co.set(b,w),l.set(b,N),d.push(b),w===1&&A&&ql.set(b,!0),N===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(),Bp++,()=>{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)}),Bp--,Bp||(co=new WeakMap,co=new WeakMap,ql=new WeakMap,Yl={})}},B5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,U5=(e,t=B5(e),n="data-aria-hidden",r=!0)=>{if(t)return F5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},H5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function qT(e,t={}){const{defer:n=!0}=t,r=n?H5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(U5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function j5(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 $5(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 YT="pointerdown.outside",WT="focus.outside";function z5(e){for(const t of e)if(Wt(t)&&Cr(t))return!0;return!1}var GT=e=>"clientY"in e;function V5(e,t){if(!GT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function q5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function XT(e,t){if(!t||!GT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return q5(u,l)?r||a:!1}function Y5(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),h=j5(f),m=$5(f);function x(I,U){if(!Wt(U)||!U.isConnected||Ks(e,U)||V5(e,I)||l&&tT(e,U))return!1;const G=d.querySelector(`[aria-controls="${e.id}"]`);if(G){const V=bp(G);if(XT(I,V))return!1}const L=bp(e);return XT(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&&!rT()?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=cp(s,a);e.addEventListener(YT,te,{once:!0})}QT(e,YT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:D4(V),focusable:z5(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(h.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(h.addEventListener("pointerdown",v,!0))},0);function N(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=cp(r,a);e.addEventListener(WT,le,{once:!0})}QT(e,WT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Cr(L),target:L}})}})}return rT()||(A.add(Gt(d,"focusin",N,!0)),A.add(m.addEventListener("focusin",N,!0)),A.add(h.addEventListener("focusin",N,!0))),()=>{clearTimeout(w),y.forEach(I=>I()),A.forEach(I=>I())}}function W5(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(Y5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function QT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function G5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Gt(Ar(e),"keydown",n,{capture:!0})}var KT="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];Q5(e,KT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),X5(e,KT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function X5(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 Q5(e,t,n){e.addEventListener(t,n,{once:!0})}var JT;function ZT(){Xn.layers.forEach(({node:e})=>{e.style.pointerEvents=Xn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function K5(e){e.style.pointerEvents=""}function J5(e,t){const n=Ar(e),r=[];return Xn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(JT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=iL(()=>{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=JT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function Z5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){fp("[@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),ZT();function h(v){var w,N;const A=cr(v.detail.originalEvent);Xn.isBelowPointerBlockingLayer(e)||Xn.isInBranch(A)||((w=t.onPointerDownOutside)==null||w.call(t,v),(N=t.onInteractOutside)==null||N.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var w,N;const A=cr(v.detail.originalEvent);Xn.isInBranch(A)||((w=t.onFocusOutside)==null||w.call(t,v),(N=t.onInteractOutside)==null||N.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],N=(I=t.persistentElements)==null?void 0:I.map(U=>U()).filter(Wt);return N&&w.push(...N),w.some(U=>Ks(U,v))||Xn.isInNestedLayer(e,v)}const b=[a?J5(e,t.persistentElements):void 0,G5(e,x),W5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:h,defer:t.defer})];return()=>{Xn.remove(e),ZT(),K5(e),b.forEach(v=>v==null?void 0:v())}}function eb(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=Xs(e)?e():e;s.push(Z5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var eD=Object.defineProperty,tD=(e,t,n)=>t in e?eD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>tD(e,typeof t!="symbol"?t+"":t,n),tb={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()}},nD=[],rD=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||Nl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(ka(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const h=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<f.length&&(u=f[h+1],l=!1):h-1>=0&&(u=f[h-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>ka(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=>{iD(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 A4(f)?!0:f.id&&!this.state.containers.some(h=>h.contains(f))?C4(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&&!Cr(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,sD(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(),tb.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=()=>{nb(()=>{if(d){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}u==null||u()})};if(d&&l){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(h).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 h=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Cr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(h=d),h>=0){const m=h===0?this.state.tabbableGroups.length-1:h-1,x=this.state.tabbableGroups[m];l=ka(u)>=0?x.lastTabbableNode:x.lastDomTabbableNode}else Da(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Cr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(h=d),h>=0){const m=h===this.state.tabbableGroups.length-1?0:h+1,x=this.state.tabbableGroups[m];l=ka(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||nD;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=>{w4(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?tT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=to(e,{getShadowRoot:this.config.getShadowRoot}),n=cT(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(ka(t[f])>0){l=!0;break}function d(f,h=!0){const m=t.indexOf(f);if(m>=0)return t[m+(h?1:-1)];const x=n.indexOf(f);if(!(x<0)){if(h){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 tb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?nb(()=>{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,iD=e=>!e.isComposing&&e.key==="Escape",nb=e=>setTimeout(e,0),sD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function rb(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new rD(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 Up="data-scroll-lock";function oD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function ib(e){const t=eo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function sb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Up))return;const u=ib(r)||ib(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Up,"");const d=()=>nL(r,"--scrollbar-width",`${l}px`),f=oD(r),h=()=>{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,N=(L=A==null?void 0:A.offsetTop)!=null?L:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(N))}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(),kl()?m():h()];return()=>{x.forEach(b=>b==null?void 0:b()),s.removeAttribute(Up)}}var aD=as("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=aD.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ub=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},uD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},jp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},lD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},lb=e=>e.getById(ob(e)),fo=e=>e.getById(ab(e)),po=e=>e.getById(Hp(e)),cb=e=>e.getById(ub(e)),cD=e=>e.getById(jp(e)),dD=e=>e.getById($p(e));function fD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),h=a("currentPortalled"),m=r.get("renderedElements"),x=R5(ue(j({},u("positioning")),{placement:f}));return{portalled:h,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:uD(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:ob(l)}))},getTriggerProps(){return t.button(ue(j({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:ab(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Hp(l),onPointerDown(y){iT(y)&&R4()&&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:ub(l)},Pr.positioner.attrs),{dir:u("dir"),style:x.floating}))},getContentProps(){return t.element(ue(j({},Pr.content.attrs),{dir:u("dir"),id:Hp(l),tabIndex:-1,role:"dialog","aria-modal":Jy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Qs(d),"aria-labelledby":m.title?jp(l):void 0,"aria-describedby":m.description?$p(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(j({},Pr.title.attrs),{id:jp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(j({},Pr.description.attrs),{id:$p(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(j({},Pr.closeTrigger.attrs),{dir:u("dir"),id:lD(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var pD={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=lb(n))!=null?a:fo(n);return zT(r,()=>cb(n),ue(j({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>po(n);let s=!0;return eb(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:eL(()=>po(t),{triggerElement:fo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?qT(()=>[po(t),fo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return sb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?rb(()=>po(t),{initialFocus:()=>dT({root:po(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=lb(n))!=null?u:fo(n);zT(s,()=>cb(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:!!cD(t),description:!!dD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=dT({root:po(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=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[_U,Wl]=os({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[wU,zp]=os({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),hD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(pD,s);return fD(a,wp)},mD=e=>{const[t,u]=bT(e),l=u,{children:n}=l,r=_n(l,["children"]),s=hD(r),a=Ap($t({present:s.open},t));return _.jsx(mL,{value:s,children:_.jsx(ET,{value:a,children:n})})},db=D.forwardRef((e,t)=>{const n=vp(),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}))});db.displayName="PopoverTrigger";function gD(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 ED(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 fb(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 pb(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 yD(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 TD(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 Vp(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 bD=({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(mD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(db,{"aria-label":`Overflow menu for ${t}`,className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(hb,{})}),_.jsx(TT,{children:_.jsx(yT,{className:F(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Vy.Provider,{value:d,children:n})})})]})};function mb(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 gb(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[xD,cs]=os({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),qp=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getControlProps(),e);return _.jsx(dn.div,ue(j(j({},r),e),{ref:t}))});qp.displayName="CarouselControl";const Yp=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}))});Yp.displayName="CarouselIndicator";const Wp=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getIndicatorGroupProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});Wp.displayName="CarouselIndicatorGroup";const Gp=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}))});Gp.displayName="CarouselItem";const Xp=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getItemGroupProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});Xp.displayName="CarouselItemGroup";const Qp=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getNextTriggerProps(),e);return _.jsx(dn.button,ue(j({},r),{ref:t}))});Qp.displayName="CarouselNextTrigger";const Kp=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getPrevTriggerProps(),e);return _.jsx(dn.button,ue(j({},r),{ref:t}))});Kp.displayName="CarouselPrevTrigger";function _D(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),h=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:h},y:{before:f,after:m}}}function wD(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 Eb(e){let t=[];for(const n of e.children)t=t.concat(n,Eb(n));return t}function yb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Eb(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 h of s){const m=h.getBoundingClientRect();if(!wD(n,m,u))continue;const x=eo(h);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:h,position:A});break;case"center":r[a].center.push({node:h,position:A+m[d]/2});break;case"end":r[a].end.push({node:h,position:A+m[d]});break}}}return r}function Tb(e){const t=e.getBoundingClientRect(),n=_D(e),r=yb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:bb([...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(xb(0,s.x))),y:bb([...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(xb(0,s.y)))}}function SD(e,t,n){const r=yb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var bb=e=>[...new Set(e)],xb=(e,t)=>n=>Math.max(e,Math.min(t,n)),vD=as("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Yr=vD.build(),AD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},CD=(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`},ND=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},kD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},OD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},_b=(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}`},kn=e=>e.getById(Gl(e)),wb=e=>tL(kn(e),"[data-part=item]"),ID=(e,t)=>e.getById(_b(e,t)),Sb=e=>{const t=kn(e);if(!t)return;const n=to(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function PD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),h=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:h,canScrollPrev:m,getProgress(){return b/y.length},scrollToIndex(N,I){a({type:"INDEX.SET",index:N,instant:I})},scrollTo(N,I){a({type:"PAGE.SET",index:N,instant:I})},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(ue(j({},Yr.root.attrs),{id:AD(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(N){Ks(N.currentTarget,cr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){Ks(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!l("allowMouseDrag")||!iT(N))return;const I=cr(N);Cr(I)&&I!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:t4(N=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";N[I]<0&&!s("canScrollPrev")||N[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(N){const I=r.get("slidesInView").includes(N.index);return t.element(ue(j({},Yr.item.attrs),{id:CD(u,N.index),dir:l("dir"),role:"group","data-index":N.index,"data-inview":Qs(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":w.item(N.index,l("slideCount")),"aria-hidden":Jy(!I),style:{scrollSnapAlign:(()=>{var ie;const U=(ie=N.snapAlign)!=null?ie:"start",G=l("slidesPerMove"),L=G==="auto"?Math.floor(l("slidesPerPage")):G;return(N.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:kD(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":w.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(j({},Yr.nextTrigger.attrs),{dir:l("dir"),id:ND(u),type:"button","aria-label":w.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),disabled:!h,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(j({},Yr.indicatorGroup.attrs),{dir:l("dir"),id:OD(u),"data-orientation":l("orientation"),onKeyDown(N){if(N.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=B4(N,{dir:l("dir"),orientation:l("orientation")}),L=U[G];L==null||L(N)}}))},getIndicatorProps(N){return t.button(ue(j({},Yr.indicator.attrs),{dir:l("dir"),id:_b(u,N.index),type:"button","data-orientation":l("orientation"),"data-index":N.index,"data-readonly":Qs(N.readOnly),"data-current":Qs(N.index===b),"aria-label":w.indicator(N.index),onClick(I){I.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.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(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var RD={props({props:e}){return a4(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:LD(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 V6(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(kn(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=kn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Sb(e)});return Sb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!kn(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 wb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=kn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var x;const h=f.target,m=Number((x=h.dataset.index)!=null?x:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?U6(d,m):H6(d,m)},n.get("slidesInView"));n.set("slidesInView",j6(l))},{root:r,threshold:t("inViewThreshold")});return wb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=kn(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 J4(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=Qy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=kn(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=kn(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=Wy(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=$6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=kn(r);if(!s)return;const a=SD(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=Qy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=kn(n);if(!r)return;const s=Tb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=kn(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=kn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=kn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Tb(r),l=u.x.reduce((f,h)=>Math.abs(h-s)<Math.abs(f-s)?h:f,u.x[0]),d=u.y.reduce((f,h)=>Math.abs(h-a)<Math.abs(f-a)?h: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 h=r.dataset.scrollSnapType;h&&(r.style.setProperty("scroll-snap-type",h),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=ID(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 LD(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 DD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(RD,s);return PD(a,wp)},Jp=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=DD(n),a=$t(s.getRootProps(),r);return _.jsx(xD,{value:s,children:_.jsx(dn.div,ue(j({},a),{ref:t}))})});Jp.displayName="CarouselRoot";const MD=180,FD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},BD=({globalClassName:e,className:t,itemMinWidth:n=MD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:h})=>{const m=Array.from(h).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}=RC();D.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,x]);const w=FD(r),N=n+w,I=b>0?(b+w)/N: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(Jp,{ref:y,className:F(e,t,`${k}-carousel`),slidesPerPage:V,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:x,onPageChange:d,"aria-label":f,children:[_.jsx(Xp,{className:F(e,`${k}-carousel__item-group`,{"carousel-row-container":!G}),children:m.map(({node:ie,key:le},z)=>_.jsx(Gp,{index:z,className:F(e,`${k}-carousel__item`),children:ie},le))}),l&&G&&_.jsxs(qp,{className:F(e,`${k}-carousel__control`),children:[_.jsx(Kp,{className:F(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(fb,{size:"16px"})}),_.jsx(Qp,{className:F(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(pb,{size:"16px"})})]}),u&&G&&_.jsx(Wp,{className:F(e,`${k}-carousel__indicator-group`),children:Array.from({length:L},(ie,le)=>_.jsx(Yp,{index:le,className:F(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${le+1}`},le))})]})},UD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${k}-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"})})}),[HD,jD]=os({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),$D=e=>Ia()(e,["lazyMount","unmountOnExit"]),[zD,Fa]=os({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),vb=D.forwardRef((e,t)=>{const n=Fa(),r=jD(),s=Ap(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)}))});vb.displayName="DialogBackdrop";const Zp=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)}))});Zp.displayName="DialogContent";const eh=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getDescriptionProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});eh.displayName="DialogDescription";const th=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getPositionerProps(),e);return Oa().unmounted?null:_.jsx(dn.div,ue(j({},r),{ref:t}))});th.displayName="DialogPositioner";var VD=as("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ds=VD.build(),Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},nh=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`},rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ih=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(nh(e)),qD=e=>e.getById(Ab(e)),YD=e=>e.getById(Cb(e)),WD=e=>e.getById(Nb(e)),GD=e=>e.getById(rh(e)),XD=e=>e.getById(ih(e)),QD=e=>e.getById(kb(e));function KD(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":nh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(j({},ds.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Cb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(j({},ds.positioner.attrs),{dir:a("dir"),id:Ab(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:nh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:rh(u),"aria-describedby":f.description?ih(u):void 0}))},getTitleProps(){return t.element(ue(j({},ds.title.attrs),{dir:a("dir"),id:rh(u)}))},getDescriptionProps(){return t.element(ue(j({},ds.description.attrs),{dir:a("dir"),id:ih(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 JD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>QD(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 eb(()=>Xl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[WD(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 sb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?rb(()=>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")?qT(()=>[Xl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!GD(t),description:!!XD(t)})})},syncZIndex({scope:e}){jt(()=>{const t=Xl(e);if(!t)return;const n=eo(t);[qD(e),YD(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 ZD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,getRootNode:n,dir:r},e),a=Ll(JD,s);return KD(a,wp)},Ob=e=>{const[t,l]=bT(e),d=l,{children:n}=d,r=_n(d,["children"]),[s]=$D(t),a=ZD(r),u=Ap($t({present:a.open},t));return _.jsx(zD,{value:a,children:_.jsx(HD,{value:s,children:_.jsx(ET,{value:u,children:n})})})},Ib=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getTitleProps(),e);return _.jsx(dn.h2,ue(j({},r),{ref:t}))});Ib.displayName="DialogTitle";const e8=({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(lp.Provider,{value:r,children:_.jsx(zy.Provider,{value:s,children:e})})},Pb=()=>D.useContext(zy),Rb=()=>{const e=D.useContext(lp);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},t8=`${k}-overflow-menu-button-trigger`,n8=({componentType:e,children:t})=>{const{isOpen:n}=Pb(),{closeMenu:r}=Rb(),{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(`.${t8}`)||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(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},r8=({componentType:e,className:t})=>{const{toggleMenu:n}=Rb(),{isOpen:r}=Pb(),{globalClassName:s}=ct();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(hb,{})})};class i8{constructor(){Xe(this,"initialState",qg);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 a8(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 i8,s8=e=>{window.addEventListener(kd,e)},o8=e=>{window.removeEventListener(kd,e)},a8=(e,t)=>{const n=new CustomEvent(kd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Lb=e=>{const t=yi.isOpen,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isOpen=n},u8=e=>{const t=yi.isInline,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isInline=n},l8=({elementId:e,entryType:t,params:n,isInline:r})=>{yi.promptsStateProxy.elementId=e,t&&(yi.promptsStateProxy.entryType=t),typeof r=="boolean"&&u8(r),n&&yi.updatePromptsParamsProxy(n),yi.isOpen||Lb(!0)},c8=()=>{const e=D.useContext(Xg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},d8=()=>{const e=D.useContext(Wg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Ql=()=>{const e=D.useContext(Yg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},f8=({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,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(mb,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(mb,{}),"Show ",r||"dialog"]})},p8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{isModalFullscreen:r}=ai(),s=Gs(),a=()=>{Id(!r),s()},u=r?lN:cN,l="Toggle Fullscreen";return t?_.jsx(ar,{ariaLabel:l,title:l,className:F(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},h8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{dialogPosition:r}=ai(),s=Gs(),a=r==="bottom-left",u=()=>{Pd(a?"bottom-right":"bottom-left"),s()},l=a?ED:gD,d=a?"Move right":"Move left";return t?_.jsx(ar,{className:F(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},Db=({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,h=d==="standalone",m=e==="modal",x=m?f8:Bb,y=m?p8:h8,b=D.useMemo(()=>s?nN(s):{},[s]);return _.jsx(e8,{children:_.jsxs("div",{className:F(a,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${k}-${e}-header`,{standalone:h,embedded:!h}),style:b,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${k}-${e}-logo`,{standalone:h,embedded:!h}),src:s.logoUrl}),_.jsx(Ib,{className:F(a,`${k}-${e}-title`,{standalone:h,embedded:!h}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${k}-${e}-controls`),children:[_.jsx(x,{componentType:e,isIcon:!0}),_.jsx(r8,{componentType:e}),_.jsx(UD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(n8,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(T8,{componentType:e}),_.jsx(qy,{componentType:e,onClearChat:t}),f&&_.jsx(Yy,{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}`}},m8=({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}},Mb=e=>typeof e=="number"&&Number.isFinite(e),g8=({priceBreakdown:e,currencyCode:t=Kl})=>{if(!e)return null;const n=t||Kl,r=[e.sales,e.original],s=r.map(h=>h==null?void 0:h.min).filter(Mb),a=r.map(h=>h==null?void 0:h.max).filter(Mb);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}},sh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=m8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${k}-price`),style:f,children:[_.jsx("span",{className:F(s,`${k}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${k}-price__compare`),children:l})]})},E8={sparkle:Vp,plus:yD,"paper-plane":TD},Fb=({icon:e,className:t})=>{const n=E8[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},y8=({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",h=b=>()=>{a(b)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},x=b=>_.jsxs(_.Fragment,{children:[l&&_.jsx(Fb,{icon:l,className:`${k}-suggestion-button-icon`}),_.jsx("span",{children:b})]});return _.jsx("div",{className:F(t,`${k}-suggestion-container ${f}`,e),children:n.map(b=>s?_.jsx(tl,{disabled:r,className:F(t,`${k}-suggestion-button standalone`,m),onClick:h(b),children:x(b)},b):_.jsx("button",{disabled:r,className:F(t,`${k}-suggestion-button embedded`,m),onClick:h(b),children:x(b)},b))})},T8=({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,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(u1,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(u1,{}),"Minimize"]})},Bb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),r=Gs(),s=()=>{Iu("modal"),r()};return t?_.jsx(ar,{className:F(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(gb,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(gb,{}),"Show modal"]})},b8=["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"],x8=3e3,_8=400,w8=({globalClassName:e,isWidgetStandalone:t,messages:n=b8})=>{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)},_8)},x8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${k}-connecting-pulse`}),_.jsx("div",{className:`${k}-connecting-ring`})]}),_.jsx("span",{className:F(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},S8=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${k}-processing-text`,children:t}):null,v8=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,oh=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(S8,{shouldShow:!!n,loadingText:n}),_.jsx(v8,{shouldShow:!n})]});function Ub(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 A8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function C8(e,t,n){const s=fl((n||{}).ignore||[]),a=N8(t);let u=-1;for(;++u<a.length;)wE(e,"text",l);function l(f,h){let m=-1,x;for(;++m<h.length;){const y=h[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,h)}function d(f,h){const m=h[h.length-1],x=a[u][0],y=a[u][1];let b=0;const A=m.children.indexOf(f);let w=!1,N=[];x.lastIndex=0;let I=x.exec(f.value);for(;I;){const U=I.index,G={index:I.index,input:I.input,stack:[...h,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&&N.push({type:"text",value:f.value.slice(b,U)}),Array.isArray(L)?N.push(...L):L&&N.push(L),b=U+I[0].length,w=!0),!x.global)break;I=x.exec(f.value)}return w?(b<f.value.length&&N.push({type:"text",value:f.value.slice(b)}),m.children.splice(A,1,...N)):N=[f],A+N.length}}function N8(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([k8(s[0]),O8(s[1])])}return t}function k8(e){return typeof e=="string"?new RegExp(A8(e),"g"):e}function O8(e){return typeof e=="function"?e:function(){return e}}const ah="phrasing",uh=["autolink","link","image","label"];function I8(){return{transforms:[B8],enter:{literalAutolink:R8,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:F8,literalAutolinkEmail:M8,literalAutolinkHttp:L8,literalAutolinkWww:D8}}}function P8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ah,notInConstruct:uh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ah,notInConstruct:uh},{character:":",before:"[ps]",after:"\\/",inConstruct:ah,notInConstruct:uh}]}}function R8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lh(e){this.config.enter.autolinkProtocol.call(this,e)}function L8(e){this.config.exit.autolinkProtocol.call(this,e)}function D8(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 M8(e){this.config.exit.autolinkEmail.call(this,e)}function F8(e){this.exit(e)}function B8(e){C8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H8]],{ignore:["link","linkReference"]})}function U8(e,t,n,r,s){let a="";if(!Hb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!j8(n)))return!1;const u=$8(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 H8(e,t,n,r){return!Hb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function j8(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 $8(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=Ub(e,"(");let a=Ub(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 Hb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||sl(n))&&(!t||n!==47)}jb.peek=K8;function z8(){this.buffer()}function V8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W8(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 G8(e){this.exit(e)}function X8(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 K8(){return"["}function jb(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 J8(){return{enter:{gfmFootnoteCallString:z8,gfmFootnoteCall:V8,gfmFootnoteDefinitionLabelString:q8,gfmFootnoteDefinition:Y8},exit:{gfmFootnoteCallString:W8,gfmFootnoteCall:G8,gfmFootnoteDefinitionLabelString:X8,gfmFootnoteDefinition:Q8}}}function Z8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:jb},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"),h=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),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?$b:
|
|
39
|
-
`)}function
|
|
40
|
-
`&&
|
|
41
|
-
`}function
|
|
35
|
+
`}),n}function SE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vE(e,t){const n=MO(e,t),r=n.one(e,void 0),s=AO(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 jO(e,t){return e&&"run"in e?function(n,r){return Fe(this,null,function*(){const s=vE(n,j({file:r},t));yield e.run(s,r)})}:function(n,r){return vE(n,j({file:r},e||t))}}function AE(e){if(e)throw e}var Bf,CE;function $O(){if(CE)return Bf;CE=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 h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var _;for(_ in f);return typeof _=="undefined"||e.call(f,_)},u=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Bf=function d(){var f,h,m,_,y,b,v=arguments[0],A=1,w=arguments.length,N=!1;for(typeof v=="boolean"&&(N=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(h in f)m=l(v,h),_=l(f,h),v!==_&&(N&&_&&(a(_)||(y=s(_)))?(y?(y=!1,b=m&&s(m)?m:[]):b=m&&a(m)?m:{},u(v,{name:h,newValue:d(N,b,_)})):typeof _!="undefined"&&u(v,{name:h,newValue:_}));return v},Bf}var zO=$O();const Uf=tt(zO);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 VO(){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 h=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,h?qO(h,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 qO(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 h=f;if(l&&n)throw h;return s(h)}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:YO,dirname:WO,extname:GO,join:XO,sep:"/"};function YO(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 WO(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 GO(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 XO(...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=KO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function KO(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 JO={cwd:ZO};function ZO(){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 eI(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 tI(e)}function tI(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 NE{constructor(t){let n;t?jf(t)?n={path:t}:typeof t=="string"||nI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JO.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"?Sr.basename(this.path):void 0}set basename(t){Vf(t,"basename"),zf(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(zf(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){jf(t)&&(t=eI(t)),Vf(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){Vf(t,"stem"),zf(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 zf(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function Vf(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 nI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),iI={}.hasOwnProperty;class qf extends rI{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=VO()}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):iI.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=ml(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 l=ml(t),d=r.parse(l);r.run(d,l,function(h,m,_){if(h||!m||!_)return f(h);const y=m,b=r.stringify(y,_);aI(b)?_.value=b:_.result=b,f(h,_)});function f(h,m){h||!m?u(h):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),IE("processSync","process",n),r;function s(a,u){n=!0,AE(a),r=u}}run(t,n,r){OE(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(h,m,_){const y=m||t;h?l(h):u?u(y):r(void 0,y,_)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),IE("runSync","run",r),s;function a(u,l){AE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ml(n),s=this.compiler||this.Compiler;return Wf("stringify",s),OE(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)?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[h,...m]=f;d(h,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=Uf(!0,s.settings,f.settings))}function l(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,_=-1;for(;++m<r.length;)if(r[m][0]===f){_=m;break}if(_===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[_][1];Hf(v)&&Hf(y)&&(y=Uf(!0,v,y)),r[_]=[f,y,...b]}}}}const sI=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 OE(e){if(!Hf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function IE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ml(e){return oI(e)?e:new NE(e)}function oI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aI(e){return typeof e=="string"||uI(e)}function uI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",PE=[],RE={allowDangerousHtml:!0},cI=/^(https?|ircs?|mailto|xmpp)$/i,dI=[{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 LE(e){const t=fI(e),n=pI(e);return hI(t.runSync(t.parse(n),n),e)}function fI(e){const t=e.rehypePlugins||PE,n=e.remarkPlugins||PE,r=e.remarkRehypeOptions?j(j({},e.remarkRehypeOptions),RE):RE;return sI().use(W3).use(n).use(jO,r).use(t)}function pI(e){const t=e.children||"",n=new NE;return typeof t=="string"&&(n.value=t),n}function hI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||mI;for(const h of dI)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+lI+h.id,void 0);return hl(e,f),UN(e,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function f(h,m,_){if(h.type==="raw"&&_&&typeof m=="number")return u?_.children.splice(m,1):_.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Sf)if(Object.hasOwn(Sf,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=Sf[y];(v===null||v.includes(h.tagName))&&(h.properties[y]=d(String(b||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,_)),y&&_&&typeof m=="number")return l&&h.children?_.children.splice(m,1,...h.children):_.children.splice(m,1),m}}}function mI(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||cI.test(e.slice(0,t))?e:""}const DE=/[#.]/g;function gI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){DE.lastIndex=s;const l=DE.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 ME(e,t,n){const r=n?bI(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=gI(a,t);const f=d.tagName.toLowerCase(),h=r?r.get(f):void 0;if(d.tagName=h||f,EI(u))l.unshift(u);else for(const[m,_]of Object.entries(u))yI(e,d.properties,m,_)}for(const f of l)Xf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function EI(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 yI(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=v1(r):s.commaSeparated?a=f1(r):s.commaOrSpaceSeparated?a=v1(f1(r).join(" ")):a=FE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?TI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(FE(s,s.property,l));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 FE(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 TI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function bI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const _I=["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"],xI=ME(sa,"div"),wI=ME(ui,"g",_I);function SI(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=BE(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=BE(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 BE(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/"},UE={}.hasOwnProperty,vI=Object.prototype;function AI(e,t){const n=t||{};return Qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ui:sa,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},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:HE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=SI(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=CI(e,t),n}}function HE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Qf(e,t[n]);r.push(s)}return r}function CI(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;UE.call(vI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?wI:xI)(t.tagName,s,HE(e,t.childNodes));if(gl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&zs(d.startTag),h=d&&d.endTag&&zs(d.endTag),m=Qf(e,l.content);f&&h&&e.file&&(m.position={start:f.end,end:h.start}),u.content=m}return e.schema=n,u}function gl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=NI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function NI(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)UE.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=jE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=jE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function jE(e){return e.line&&e.column?e:void 0}const $E={}.hasOwnProperty;function zE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&$E.call(s,e)){const d=String(s[e]);u=$E.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 kI={},OI={}.hasOwnProperty,VE=zE("type",{handlers:{root:PI,element:FI,text:DI,comment:MI,doctype:LI}});function II(e,t){const r=(t||kI).space;return VE(e,r==="svg"?ui:sa)}function PI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Vs(e,n),n}function RI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Vs(e,n),n}function LI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vs(e,t),t}function DI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vs(e,t),t}function MI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vs(e,t),t}function FI(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"&&OI.call(e.properties,a)){const d=BI(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=Kf(e.children,l,r),Vs(e,l),e.tagName==="template"&&e.content&&(l.content=RI(e.content,r)),l}function BI(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?p1(n):A1(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 Kf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=VE(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 UI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],HI=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 Nn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function qE(e){return e>=55296&&e<=57343}function jI(e){return e>=56320&&e<=57343}function $I(e,t){return(e-55296)*1024+9216+t}function YE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function WE(e){return e>=64976&&e<=65007||HI.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 zI=65536;class VI{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=zI,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(jI(n))return this.pos++,this._addGap(),$I(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,qE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){YE(t)?this._err(ne.controlCharacterInInputStream):WE(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 GE(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 qI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),YI=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 WI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=YI.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 GI=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 Jf(e){return e>=qt.ZERO&&e<=qt.NINE}function XI(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||Jf(e)}function KI(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 JI{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)|GI)===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(Jf(s)||XI(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===qt.SEMI)this.consumed+=1;else if(this.decodeMode===$r.Strict)return 0;return this.emitCodePoint(WI(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=ZI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===$r.Attribute&&(a===0||KI(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 ZI(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 eP=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=eP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,tP={[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},Zf=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 nP(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 rP(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function fi(e){return rP(e)||ga(e)}function XE(e){return fi(e)||nP(e)}function El(e){return e+32}function QE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function KE(e){return QE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function iP(e){return e===O.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:qE(e)?ne.surrogateCharacterReference:WE(e)?ne.noncharacterCharacterReference:YE(e)||e===O.CARRIAGE_RETURN?ne.controlCharacterReference:null}class sP{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 VI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new JI(qI,(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=iP(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(GE(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=QE(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(Nn.SCRIPT,!1)&&KE(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.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(Nn.SCRIPT,!1)&&KE(this.preprocessor.peek(Nn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Nn.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(Nn.DASH_DASH,!0)?(this._createCommentToken(Nn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Nn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Nn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Nn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(Nn.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(Nn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Nn.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()&&XE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){XE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const JE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ZE=new Set([...JE,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]),oP=new Set([...yl,g.OL,g.UL]),aP=new Set([...yl,g.BUTTON]),ey=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ty=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),uP=new Set([g.TR,g.TEMPLATE,g.HTML]),lP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),cP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),dP=new Set([g.TD,g.TH]);class fP{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(Zf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(dP,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(cP,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(lP,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(uP,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(ty.has(s))return!1;break}case me.MATHML:{if(ey.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,yl)}hasInListItemScope(t){return this.hasInDynamicScope(t,oP)}hasInButtonScope(t){return this.hasInDynamicScope(t,aP)}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(Zf.has(n))return!0;if(yl.has(n))return!1;break}case me.SVG:{if(ty.has(n))return!1;break}case me.MATHML:{if(ey.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&&JE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ZE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ZE.has(this.currentTagId);)this.pop()}}const ep=3;var vr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vr||(vr={}));const ny={type:vr.Marker};class pP{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 h=this.treeAdapter.getAttrList(f);h.length===s&&r.push({idx:l,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ep)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ep)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>=ep&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(ny)}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(ny);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 pi={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};pi.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(pi.isTextNode(n)){n.value+=t;return}}pi.appendChild(e,pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pi.isTextNode(r)?r.value+=t:pi.insertBefore(e,pi.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)}},ry="html",hP="about:legacy-compat",mP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",iy=["+//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//"],gP=[...iy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],EP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),sy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],yP=[...sy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oy(e,t){return t.some(n=>e.startsWith(n))}function TP(e){return e.name===ry&&e.publicId===null&&(e.systemId===null||e.systemId===hP)}function bP(e){if(e.name!==ry)return Gn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===mP)return Gn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),EP.has(n))return Gn.QUIRKS;let r=t===null?gP:iy;if(oy(n,r))return Gn.QUIRKS;if(r=t===null?sy:yP,oy(n,r))return Gn.LIMITED_QUIRKS}return Gn.NO_QUIRKS}const ay={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},_P="definitionurl",xP="definitionURL",wP=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])),SP=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}]]),vP=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])),AP=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 CP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ts.COLOR||r===ts.SIZE||r===ts.FACE)||AP.has(t)}function uy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===_P){e.attrs[t].name=xP;break}}function ly(e){for(let t=0;t<e.attrs.length;t++){const n=wP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function tp(e){for(let t=0;t<e.attrs.length;t++){const n=SP.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 NP(e){const t=vP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=qs(e.tagName))}function kP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function OP(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===ay.TEXT_HTML||s===ay.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function IP(e,t,n,r){return(!r||r===me.HTML)&&OP(e,t,n)||(!r||r===me.MATHML)&&kP(e,t)}const PP="hidden",RP=8,LP=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 DP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},cy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),dy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pi,onParseError:null};class fy{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({},dy),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 sP(this.options,this),this.activeFormattingElements=new pP(this.treeAdapter),this.fragmentContextID=r?qs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new fP(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({},dy),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:DP,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:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:h})}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 IP(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 cy.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 tP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){d6(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:{_a(this,t);break}case H.AFTER_HEAD:{xa(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:{sp(this,t);break}case H.IN_TABLE_TEXT:{xy(this,t);break}case H.IN_COLUMN_GROUP:{_l(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){c6(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:{_a(this,t);break}case H.AFTER_HEAD:{xa(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{sp(this,t);break}case H.IN_COLUMN_GROUP:{_l(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){rp(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:{rp(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.AFTER_BODY:{$P(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{zP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{VP(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)?f6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{qP(this,t);break}case H.BEFORE_HEAD:{WP(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:{JP(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:{GR(this,t);break}case H.IN_COLUMN_GROUP:{op(this,t);break}case H.IN_TABLE_BODY:{xl(this,t);break}case H.IN_ROW:{wl(this,t);break}case H.IN_CELL:{KR(this,t);break}case H.IN_SELECT:{vy(this,t);break}case H.IN_SELECT_IN_TABLE:{ZR(this,t);break}case H.IN_TEMPLATE:{t6(this,t);break}case H.AFTER_BODY:{r6(this,t);break}case H.IN_FRAMESET:{i6(this,t);break}case H.AFTER_FRAMESET:{o6(this,t);break}case H.AFTER_AFTER_BODY:{u6(this,t);break}case H.AFTER_AFTER_FRAMESET:{l6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?p6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{YP(this,t);break}case H.BEFORE_HEAD:{GP(this,t);break}case H.IN_HEAD:{XP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{KP(this,t);break}case H.AFTER_HEAD:{ZP(this,t);break}case H.IN_BODY:{bl(this,t);break}case H.TEXT:{BR(this,t);break}case H.IN_TABLE:{wa(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_CAPTION:{XR(this,t);break}case H.IN_COLUMN_GROUP:{QR(this,t);break}case H.IN_TABLE_BODY:{ap(this,t);break}case H.IN_ROW:{Sy(this,t);break}case H.IN_CELL:{JR(this,t);break}case H.IN_SELECT:{Ay(this,t);break}case H.IN_SELECT_IN_TABLE:{e6(this,t);break}case H.IN_TEMPLATE:{n6(this,t);break}case H.AFTER_BODY:{Ny(this,t);break}case H.IN_FRAMESET:{s6(this,t);break}case H.AFTER_FRAMESET:{a6(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:{_a(this,t);break}case H.AFTER_HEAD:{xa(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:{by(this,t);break}case H.TEXT:{UR(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_TEMPLATE:{Cy(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:{ip(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:{py(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{sp(this,t);break}case H.IN_TABLE_TEXT:{_y(this,t);break}}}}function MP(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):Ty(e,t),n}function FP(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 BP(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>=LP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=UP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function UP(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 HP(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 jP(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 np(e,t){for(let n=0;n<RP;n++){const r=MP(e,t);if(!r)break;const s=FP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=BP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&HP(e,u,a),jP(e,s,r)}}function rp(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $P(e,t){e._appendCommentNode(t,e.openElements.items[0])}function zP(e,t){e._appendCommentNode(t,e.document)}function ip(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 VP(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gn.QUIRKS:bP(t);TP(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 qP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=H.BEFORE_HEAD):ya(e,t)}function YP(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 WP(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 GP(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 XP(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:_a(e,t)}}function KP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case g.BR:{_a(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function _a(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 JP(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:xa(e,t)}}function ZP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{xa(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function xa(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:{py(e,t);break}case Ze.COMMENT:{rp(e,t);break}case Ze.START_TAG:{cn(e,t);break}case Ze.END_TAG:{bl(e,t);break}case Ze.EOF:{by(e,t);break}}}function py(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function eR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function tR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function nR(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 rR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function iR(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,me.HTML)}function sR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function oR(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 aR(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 uR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Rt.PLAINTEXT}function lR(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 cR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(np(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 dR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(np(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hR(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 my(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gy(e){const t=GE(e,ts.TYPE);return t!=null&&t.toLowerCase()===PP}function mR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),gy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function gR(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function ER(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function yR(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,my(e,t)}function TR(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 bR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function _R(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function Ey(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function xR(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 wR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function SR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function vR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function AR(e,t){e._reconstructActiveFormattingElements(),uy(t),tp(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function CR(e,t){e._reconstructActiveFormattingElements(),ly(t),tp(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function yy(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:{dR(e,t);break}case g.A:{cR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{iR(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:{rR(e,t);break}case g.LI:case g.DD:case g.DT:{aR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{my(e,t);break}case g.HR:{ER(e,t);break}case g.RB:case g.RTC:{SR(e,t);break}case g.RT:case g.RP:{vR(e,t);break}case g.PRE:case g.LISTING:{sR(e,t);break}case g.XMP:{bR(e,t);break}case g.SVG:{CR(e,t);break}case g.HTML:{eR(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:{tR(e,t);break}case g.FORM:{oR(e,t);break}case g.NOBR:{fR(e,t);break}case g.MATH:{AR(e,t);break}case g.TABLE:{hR(e,t);break}case g.INPUT:{mR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{gR(e,t);break}case g.IMAGE:{yR(e,t);break}case g.BUTTON:{lR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{pR(e,t);break}case g.IFRAME:{_R(e,t);break}case g.SELECT:{xR(e,t);break}case g.OPTION:case g.OPTGROUP:{wR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ey(e,t);break}case g.FRAMESET:{nR(e,t);break}case g.TEXTAREA:{TR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ey(e,t):yy(e,t);break}case g.PLAINTEXT:{uR(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:yy(e,t)}}function NR(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 kR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,Ny(e,t))}function OR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function IR(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 PR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function RR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function LR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function DR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function MR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function FR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ty(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:{np(e,t);break}case g.P:{PR(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:{OR(e,t);break}case g.LI:{RR(e);break}case g.DD:case g.DT:{LR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{DR(e);break}case g.BR:{FR(e);break}case g.BODY:{NR(e,t);break}case g.HTML:{kR(e,t);break}case g.FORM:{IR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{MR(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:Ty(e,t)}}function by(e,t){e.tmplInsertionModeStack.length>0?Cy(e,t):ip(e,t)}function BR(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 UR(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function sp(e,t){if(e.openElements.currentTagId!==void 0&&cy.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:{_y(e,t);break}}else Sa(e,t)}function HR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_CAPTION}function jR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function $R(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,op(e,t)}function zR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_TABLE_BODY}function VR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,xl(e,t)}function qR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function YR(e,t){gy(t)?e._appendElement(t,me.HTML):Sa(e,t),t.ackSelfClosing=!0}function WR(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:{VR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{lr(e,t);break}case g.COL:{$R(e,t);break}case g.FORM:{WR(e,t);break}case g.TABLE:{qR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{zR(e,t);break}case g.INPUT:{YR(e,t);break}case g.CAPTION:{HR(e,t);break}case g.COLGROUP:{jR(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 _y(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 wy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function GR(e,t){const n=t.tagID;wy.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 XR(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 op(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:_l(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:_l(e,t)}}function _l(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function xl(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 ap(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,xl(e,t));break}default:Ys(e,t)}}function Sy(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,ap(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,ap(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 KR(e,t){const n=t.tagID;wy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),wl(e,t)):cn(e,t)}function JR(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(),Sy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:bl(e,t)}}function vy(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 Ay(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 ZR(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)):vy(e,t)}function e6(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)):Ay(e,t)}function t6(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,op(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,xl(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 n6(e,t){t.tagID===g.TEMPLATE&&ns(e,t)}function Cy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ip(e,t)}function r6(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 i6(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 s6(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 o6(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.NOFRAMES:{lr(e,t);break}}}function a6(e,t){t.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function u6(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 l6(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.NOFRAMES:{lr(e,t);break}}}function c6(e,t){t.chars=St,e._insertCharacters(t)}function d6(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 f6(e,t){if(CP(t))ky(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?uy(t):r===me.SVG&&(NP(t),ly(t)),tp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function p6(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 h6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,m6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Oy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Iy(e,t){const n=v6(e),r=zE("type",{handlers:{root:g6,element:E6,text:y6,comment:Ry,doctype:T6,raw:_6},unknown:x6}),s={parser:n?new fy(Oy):fy.getFragmentParser(void 0,Oy),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=AI(a,{file:s.options.file});return s.stitches&&hl(u,"comment",function(l,d,f){const h=l;if(h.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=h.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Py(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function g6(e,t){Py(e.children,t)}function E6(e,t){w6(e,t),Py(e.children,t),S6(e,t)}function y6(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 T6(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 b6(e,t){t.stitches=!0;const n=A6(e);if("children"in e&&"children"in n){const r=Iy({type:"root",children:e.children},t.options);n.children=r.children}Ry({type:"comment",value:{stitch:n}},t)}function Ry(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 _6(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,Ly(t,wr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(h6,"<$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 x6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))b6(n,t);else{let r="";throw m6.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){Ly(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 Ly(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 w6(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=II(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 S6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&UI.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 v6(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 A6(e){return"children"in e?Zi(ue(j({},e),{children:[]})):Zi(e)}function Dy(e){return function(t,n){return Iy(t,ue(j({},e),{file:n}))}}const rs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],My={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"]},hi={}.hasOwnProperty;function C6(e,t){let n={type:"root",children:[]};const r={schema:t?j(j({},My),t):My,stack:[]},s=Fy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Fy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return N6(e,n);case"doctype":return k6(e,n);case"element":return O6(e,n);case"root":return I6(e,n);case"text":return P6(e,n)}}}function N6(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 Ca(a,t),a}}function k6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ca(n,t),n}}function O6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=By(e,t.children),s=R6(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&&hi.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 Ca(u,t),u}function I6(e,t){const r={type:"root",children:By(e,t.children)};return Ca(r,t),r}function P6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ca(r,t),r}function By(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Fy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function R6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&hi.call(r,n)?r[n]:void 0,u=r&&hi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(hi.call(l,f)){const h=l[f];let m=Uy(e,jy(a,f),f,h);m==null&&(m=Uy(e,jy(u,f),f,h)),m!=null&&(d[f]=m)}if(s&&hi.call(s,n)){const h=s[n];for(f in h)hi.call(h,f)&&!hi.call(d,f)&&(d[f]=h[f])}return d}function Uy(e,t,n,r){return t?Array.isArray(r)?L6(e,t,n,r):Hy(e,t,n,r):void 0}function L6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Hy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Hy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&D6(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 D6(e,t,n){const r=e.schema.protocols&&hi.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 h=r[f];if(a===h.length&&s.slice(0,h.length)===h)return!0}return!1}function Ca(e,t){const n=P1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function jy(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 M6(e){return function(t){return C6(t,e)}}const $y=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",ue(j(j({className:F(e,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},F6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ct();return!e&&!t?null:x.jsx("div",{className:F(n,`${k}-disclaimer`),children:t?x.jsx(LE,{rehypePlugins:[Dy,M6],components:{ul:({children:r})=>x.jsx("ul",{className:F(n,`${k}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:F(n,`${k}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:F(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>x.jsx($y,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>x.jsx("img",{className:F(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>x.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:F(n,`${k}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:e})})},up=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=an(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=ct(),f=L.useRef(null),h=t||!s&&!a,m=L.useRef(t);L.useEffect(()=>{var v;const b=m.current&&!t;m.current=t,b&&!h&&((v=f.current)==null||v.focus({preventScroll:!0}))},[t,h]);const _=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 x.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar-wrapper`),children:[x.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:_,children:[x.jsx("input",{className:F(u,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:h}),x.jsx(mN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:h}),d&&x.jsx(ar,{className:F(u,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:y,icon:x.jsx(rN,{})})]}),x.jsx(F6,{})]})};function B6(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 U6(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 zy=L.createContext({isOpen:!1}),lp=L.createContext(null),Vy=L.createContext(null),Gs=()=>{var n,r;const e=L.useContext(lp),t=L.useContext(Vy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},qy=({onClearChat:e,componentType:t})=>{const n=Gs(),r=()=>{e(),n()};return x.jsxs("button",{className:F(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(U6,{}),"Clear chat"]})},Yy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ct(),r=Gs(),[s,a]=L.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 x.jsxs("button",{className:F(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[x.jsx(B6,{}),"Download transcript"]})};function H6(e){return e==null?[]:Array.isArray(e)?e:[e]}var j6=(e,...t)=>e.concat(t),$6=(e,...t)=>e.filter(n=>!t.includes(n)),z6=e=>Array.from(new Set(e));function Wy(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 V6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Wy(e,t,{step:-r,loop:s})}var q6=e=>Array.isArray(e),Gy=e=>e!=null&&typeof e=="object",Y6=e=>Gy(e)&&!q6(e),Al=e=>typeof e=="string",Xs=e=>typeof e=="function",W6=e=>e==null,G6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),X6=e=>Object.prototype.toString.call(e),Xy=Function.prototype.toString,Q6=Xy.call(Object),K6=e=>{if(!Gy(e)||X6(e)!="[object Object]"||e4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=G6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Xy.call(n)==Q6},J6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Z6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,e4=e=>J6(e)||Z6(e),t4=e=>e(),n4=()=>{},cp=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function r4(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:i4,max:s4}=Math,o4=e=>Number.isNaN(e),a4=e=>o4(e)?0:e,Qy=(e,t,n)=>i4(s4(a4(e),t),n);function dp(e){if(!K6(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]=dp(s))}return n}function fp(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function u4(e,t){if(e==null)throw new Error(t())}function l4(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 c4=Object.defineProperty,d4=(e,t,n)=>t in e?c4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pp=(e,t,n)=>d4(e,typeof t!="symbol"?t+"":t,n),Ky=()=>{},Cl=e=>typeof e=="object"&&e!==null,Qs=e=>e?"":void 0,Jy=e=>e?"true":void 0,f4=1,p4=9,h4=11,Wt=e=>Cl(e)&&e.nodeType===f4&&typeof e.nodeName=="string",Nl=e=>Cl(e)&&e.nodeType===p4,m4=e=>Cl(e)&&e===e.window,Zy=e=>Wt(e)?e.localName||"":"#document";function g4(e){return["html","body","#document"].includes(Zy(e))}var E4=e=>Cl(e)&&e.nodeType!==void 0,is=e=>E4(e)&&e.nodeType===h4&&"host"in e,y4=e=>Wt(e)&&e.localName==="input",T4=e=>Wt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Na(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var b4=/(textarea|select)/;function _4(e){if(e==null||!Wt(e))return!1;try{return y4(e)&&e.selectionStart!=null||b4.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 Nl(e)?e:m4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function x4(e){return Ar(e).documentElement}function Js(e){var t,n,r;return is(e)?Js(e.host):Nl(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 w4(e){if(Zy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||is(e)&&e.host||x4(e);return is(t)?t.host:t}function hp(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Nl(t)||is(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var mp=new WeakMap;function eo(e){return mp.has(e)||mp.set(e,Js(e).getComputedStyle(e)),mp.get(e)}var gp=new Set(["menu","listbox","dialog","grid","tree","region"]),S4=e=>gp.has(e),eT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function tT(e,t){const n=new Set,r=hp(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=eT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const h=r.getElementById(f);if(h){const m=h.getAttribute("role"),_=h.getAttribute("aria-modal")==="true";if(m&&S4(m)&&!_&&(h===t||h.contains(t)||s(h)))return!0}}}return!1};return s(e)}function nT(e,t){const n=hp(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=eT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const h=n.getElementById(f);if(h){const m=h.getAttribute("role"),_=h.getAttribute("aria-modal")==="true";m&&gp.has(m)&&!_&&(t(h),s(h))}}}};s(e)}function v4(e){const t=new Set;return nT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function A4(e){const t=e.getAttribute("role");return!!(t&&gp.has(t))}function C4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function N4(e){var t;return C4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function k4(e){if(!e.id)return!1;const t=hp(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&A4(e))}var Ep=()=>typeof document!="undefined";function O4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var yp=e=>Ep()&&e.test(O4()),I4=e=>Ep()&&e.test(navigator.vendor),rT=()=>Ep()&&!!navigator.maxTouchPoints,P4=()=>yp(/^iPhone/i),R4=()=>yp(/^iPad/i)||Tp()&&navigator.maxTouchPoints>1,kl=()=>P4()||R4(),L4=()=>Tp()||kl(),Tp=()=>yp(/^Mac/i),D4=()=>L4()&&I4(/apple/i);function M4(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=M4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var iT=e=>e.button===0,F4=e=>e.button===2||Tp()&&e.ctrlKey&&e.button===0,B4=e=>"touches"in e&&e.touches.length>0,U4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},sT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function H4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=U4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in sT&&(s=sT[s]),s}function oT(e,t="client"){const n=B4(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)}},aT=e=>Wt(e)&&e.tagName==="IFRAME",j4=/^(audio|video|details)$/;function uT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var $4=e=>!Number.isNaN(uT(e)),z4=e=>uT(e)<0;function V4(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 lT(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=V4(d,t);if(f){const h=Array.from(f.querySelectorAll(Ol)).filter(n),m=u.get(d);if(m!==void 0){const _=m+1;r.splice(_,0,...h),h.forEach((y,b)=>{u.set(y,_+b)});for(let y=_+h.length;y<r.length;y++)u.set(r[y],y)}else{const _=r.length;r.push(...h),h.forEach((y,b)=>{u.set(y,_+b)})}s.push(...h)}}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",cT=(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)&&Cr(e)&&s.unshift(e);const u=[];for(const l of s)if(Cr(l)){if(aT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...cT(d,{getShadowRoot:r}));continue}u.push(l)}return r?lT(u,r,Cr):u};function Cr(e){return!Wt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&T4(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(aT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...to(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=lT(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:Cr(e)&&!z4(e)}function q4(e,t={}){const n=to(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function Y4(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 ka(e){return e.tabIndex<0&&(j4.test(e.localName)||_4(e))&&!$4(e)?0:e.tabIndex}function dT(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 W4=class _2{constructor(){pp(this,"id",null),pp(this,"fn_cleanup"),pp(this,"cleanup",()=>{this.cancel()})}static create(){return new _2}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=W4.create();return t.request(e),t.cleanup}function fT(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 bp(e){const t=w4(e);return g4(t)?Ar(t).body:Wt(t)&&Q4(t)?t:bp(t)}var G4=/auto|scroll|overlay|hidden|clip/,X4=new Set(["inline","contents"]);function Q4(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return G4.test(n+s+r)&&!X4.has(a)}var no="default",_p="",Il=new WeakMap;function K4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return kl()?(no==="default"&&(_p=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),no="disabled"):t&&(Il.set(t,t.style.userSelect),t.style.userSelect="none"),()=>J4({target:t,doc:r})}function J4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(kl()){if(no!=="disabled")return;no="restoring",setTimeout(()=>{fT(()=>{no==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=_p||""),_p="",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 Z4(e={}){const u=e,{defer:t,target:n}=u,r=xn(u,["defer","target"]),s=t?jt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(K4(ue(j({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function eL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=oT(l),f=Math.sqrt(dd(d.x,2)+dd(d.y,2)),h=l.pointerType==="touch"?10:5;if(!(f<h)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=oT(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),Z4({doc:e})];return()=>{u.forEach(l=>l())}}function tL(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 h=null;const[m,_]=q4(e,{includeContainer:!0,getShadowRoot:a}),y=Y4(l,{current:n,getShadowRoot:a}),b=!m&&!_;f.shiftKey&&Na(y)?(s==null||s(),h=_):f.shiftKey&&(Na(m)||b)?h=n:!f.shiftKey&&Na(n)?(s==null||s(),h=m):!f.shiftKey&&(Na(_)||b)&&(h=y),h&&(f.preventDefault(),typeof r=="function"?r(h):h.focus())}return Gt(u,"keydown",d,!0)}function nL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=xn(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(tL(d,j({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function rL(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Pl(e,t){if(!e)return Ky;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 iL(e,t,n){if(!e)return Ky;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 sL(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 oL(e,t){const{timeout:n,rootNode:r}=t,s=Js(r),a=Ar(r),u=new s.AbortController;return sL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const h=e();h&&h.isConnected&&(f.disconnect(),l(h))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var aL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),uL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,pT=e=>{const t={};let n;for(;n=uL.exec(e);)t[n[1]]=n[2];return t},lL=(e,t)=>{if(Al(e)){if(Al(t))return`${e};${t}`;e=pT(e)}else Al(t)&&(t=pT(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]=cp(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=aL(t[s],n[s]);continue}if(s==="style"){t[s]=lL(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 xU(e){return e}var ro=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ro||{}),xp="__init__";function cL(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:Na,getById:a})}function dL(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"?L.useLayoutEffect:L.useEffect;function Rl(e){var m,_;const t=(m=e().value)!=null?m:e().defaultValue,n=(_=e().isEqual)!=null?_:Object.is,[r]=L.useState(t),[s,a]=L.useState(r),u=e().value!==void 0,l=L.useRef(s);l.current=u?e().value:s;const d=L.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 h(){return u?e().value:s}return{initial:r,ref:l,get:h,set(y){(e().sync?Bs.flushSync:t4)(()=>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=>{L.useEffect(()=>e,[])},Rl.ref=e=>{const t=L.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function fL(e){const t=L.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var pL=(e,t)=>{const n=L.useRef(!1),r=L.useRef(!1);L.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),L.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Ll(e,t={}){var oe,te,fe,pe,ce,we;const n=L.useMemo(()=>{const{id:le,ids:W,getRootNode:re}=t;return cL({id:le,ids:W,getRootNode:re})},[t]),r=(...le)=>{e.debug&&console.log(...le)},s=(te=(oe=e.props)==null?void 0:oe.call(e,{props:dp(t),scope:n}))!=null?te:t,a=hL(s),u=(fe=e.context)==null?void 0:fe.call(e,{prop:a,bindable:Rl,scope:n,flush:gT,getContext(){return d},getComputed(){return G},getRefs(){return v},getEvent(){return y()}}),l=mT(u),d={get(le){var W;return(W=l.current)==null?void 0:W[le].ref.current},set(le,W){var re;(re=l.current)==null||re[le].set(W)},initial(le){var W;return(W=l.current)==null?void 0:W[le].initial},hash(le){var re,C;const W=(re=l.current)==null?void 0:re[le].get();return(C=l.current)==null?void 0:C[le].hash(W)}},f=L.useRef(new Map),h=L.useRef(null),m=L.useRef(null),_=L.useRef({type:""}),y=()=>ue(j({},_.current),{current(){return _.current},previous(){return m.current}}),b=()=>ue(j({},M),{matches(...le){return le.includes(M.ref.current)},hasTag(le){var W,re;return!!((re=(W=e.states[M.ref.current])==null?void 0:W.tags)!=null&&re.includes(le))}}),v=fL((ce=(pe=e.refs)==null?void 0:pe.call(e,{prop:a,context:d}))!=null?ce:{}),A=()=>({state:b(),context:d,event:y(),prop:a,send:$,action:w,guard:N,track:pL,refs:v,computed:G,flush:gT,scope:n,choose:U}),w=le=>{const W=Xs(le)?le(A()):le;if(!W)return;const re=W.map(C=>{var J,P;const D=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[C];return D||fp(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),D});for(const C of re)C==null||C(A())},N=le=>{var W,re;return Xs(le)?le(A()):(re=(W=e.implementations)==null?void 0:W.guards)==null?void 0:re[le](A())},I=le=>{const W=Xs(le)?le(A()):le;if(!W)return;const re=W.map(D=>{var P,Ae;const J=(Ae=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Ae[D];return J||fp(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),J}),C=[];for(const D of re){const J=D==null?void 0:D(A());J&&C.push(J)}return()=>C.forEach(D=>D==null?void 0:D())},U=le=>H6(le).find(W=>{let re=!W.guard;return Al(W.guard)?re=!!N(W.guard):Xs(W.guard)&&(re=W.guard(A())),re}),G=le=>{u4(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[le];return W({context:d,event:y(),prop:a,refs:v,scope:n,computed:G})},M=Rl(()=>({defaultValue:e.initialState({prop:a}),onChange(le,W){var C,D,J,P;if(W){const Ae=f.current.get(W);Ae==null||Ae(),f.current.delete(W)}W&&w((C=e.states[W])==null?void 0:C.exit),w((D=h.current)==null?void 0:D.actions);const re=I((J=e.states[le])==null?void 0:J.effects);if(re&&f.current.set(le,re),W===xp){w(e.entry);const Ae=I(e.effects);Ae&&f.current.set(xp,Ae)}w((P=e.states[le])==null?void 0:P.entry)}})),V=L.useRef(void 0),ie=L.useRef(ro.NotStarted);hT(()=>{queueMicrotask(()=>{var D;const re=ie.current===ro.Started;ie.current=ro.Started,r(re?"rehydrating...":"initializing...");const C=(D=V.current)!=null?D:M.initial;M.invoke(C,re?M.get():xp)});const le=f.current,W=M.ref.current;return()=>{r("unmounting..."),V.current=W,ie.current=ro.Stopped,le.forEach(re=>re==null?void 0:re()),f.current=new Map,h.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const de=()=>"ref"in M?M.ref.current:M.get(),$=le=>{queueMicrotask(()=>{var P,Ae,ke,ge,Le;if(ie.current!==ro.Started)return;m.current=_.current,_.current=le;let W=de();const re=(ke=(P=e.states[W].on)==null?void 0:P[le.type])!=null?ke:(Ae=e.on)==null?void 0:Ae[le.type],C=U(re);if(!C)return;h.current=C;const D=(ge=C.target)!=null?ge:W;r("transition",le.type,C.target||W,`(${C.actions})`);const J=D!==W;J?Bs.flushSync(()=>M.set(D)):C.reenter&&!J?M.invoke(W,W):w((Le=C.actions)!=null?Le:[])})};return(we=e.watch)==null||we.call(e,A()),{state:b(),send:$,context:d,prop:a,scope:n,refs:v,computed:G,event:y(),getStatus:()=>ie.current}}function mT(e){const t=L.useRef(e);return t.current=e,t}function hL(e){const t=mT(e);return function(r){return t.current[r]}}function gT(e){queueMicrotask(()=>{Bs.flushSync(()=>e())})}var wp=dL(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 mL(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 Sp=e=>{const t=L.memo(L.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=xn(f,["asChild","children"]);if(!s)return L.createElement(e,ue(j({},u),{ref:r}),a);if(!L.isValidElement(a))return null;const l=L.Children.only(a),d=mL(l);return L.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(Sp,{apply(t,n,r){return Sp(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Sp(r)),e.get(r)}})})();function gL(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=L.createContext(u);l.displayName=t;function d(){var h;const f=L.useContext(l);if(!f&&n){const m=new Error(a!=null?a:gL(r,s));throw m.name="ContextError",(h=Error.captureStackTrace)==null||h.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[EL,vp]=os({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ET,Oa]=os({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),yT=L.forwardRef((e,t)=>{const n=vp(),r=Oa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(dn.div,ue(j({},s),{ref:Dl(r.ref,t)}))});yT.displayName="PopoverContent";const TT=L.forwardRef((e,t)=>{const n=vp(),r=Oa(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(dn.div,ue(j({},s),{ref:t}))});TT.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)]),bT=e=>Ia()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function yL(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 TL={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 h,m,_;((_=(m=(h=d.composedPath)==null?void 0:h.call(d))==null?void 0:m[0])!=null?_: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),fT(()=>l())}}}}};function Ml(e){return(e==null?void 0:e.animationName)||"none"}io()(["onExitComplete","present","immediate"]);function bL(e,t={}){const{sync:n=!1}=t,r=_L(e);return L.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 _L(e){const t=L.useRef(e);return t.current=e,t}const Ap=(e={})=>{const _=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=_,a=xn(_,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=L.useRef(!1),l=ue(j({},a),{present:r,onExitComplete:bL(e.onExitComplete)}),d=Ll(TL,l),f=yL(d);f.present&&(u.current=!0);const h=!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:h}};var as=(e,t=[])=>({parts:(...n)=>{if(xL(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(),xL=e=>e.length===0;const wL=["top","right","bottom","left"],mi=Math.min,zr=Math.max,Fl=Math.round,Bl=Math.floor,Nr=e=>({x:e,y:e}),SL={left:"right",right:"left",bottom:"top",top:"bottom"};function _T(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 Cp(e){return e==="x"?"y":"x"}function Np(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function kp(e){return Cp(kr(e))}function vL(e,t,n){n===void 0&&(n=!1);const r=oo(e),s=kp(e),a=Np(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 AL(e){const t=Ul(e);return[Op(e),t,Op(t)]}function Op(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xT=["left","right"],wT=["right","left"],CL=["top","bottom"],NL=["bottom","top"];function kL(e,t,n){switch(e){case"top":case"bottom":return n?t?wT:xT:t?xT:wT;case"left":case"right":return t?CL:NL;default:return[]}}function OL(e,t,n,r){const s=oo(e);let a=kL(gi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Op)))),a}function Ul(e){const t=gi(e);return SL[t]+e.slice(t.length)}function IL(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 ST(e){return typeof e!="number"?IL(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 vT(e,t,n){let{reference:r,floating:s}=e;const a=kr(t),u=kp(t),l=Np(u),d=gi(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,_=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,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]+=_*(b==="end"?1:-1)*(n&&f?-1:1)),y}function PL(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:h="viewport",elementContext:m="floating",altBoundary:_=!1,padding:y=0}=Vr(t,e),b=ST(y),A=l[_?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:h,strategy:d})),N=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:N,offsetParent:I,strategy:d}):N);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 RL=50,LL=(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:PL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=vT(f,r,d),_=r,y=0;const b={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:w,fn:N}=A,{x:I,y:U,data:G,reset:M}=yield N({x:h,y:m,initialPlacement:r,placement:_,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=I!=null?I:h,m=U!=null?U:m,b[w]=j(j({},b[w]),G),M&&y<RL&&(y++,typeof M=="object"&&(M.placement&&(_=M.placement),M.rects&&(f=M.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):M.rects),{x:h,y:m}=vT(f,_,d)),v=-1)}return{x:h,y:m,placement:_,strategy:s,middlewareData:b}}),DL=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:h,padding:m=0}=Vr(e,n)||{};if(h==null)return{};const _=ST(m),y={x:r,y:s},b=kp(a),v=Np(b),A=yield l.getDimensions(h),w=b==="y",N=w?"top":"left",I=w?"bottom":"right",U=w?"clientHeight":"clientWidth",G=u.reference[v]+u.reference[b]-y[b]-u.floating[v],M=y[b]-u.reference[b],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(h);let ie=V?V[U]:0;(!ie||!(yield l.isElement==null?void 0:l.isElement(V)))&&(ie=d.floating[U]||u.floating[v]);const de=G/2-M/2,$=ie/2-A[v]/2-1,oe=mi(_[N],$),te=mi(_[I],$),fe=ie-A[v]-te,pe=ie/2-A[v]/2+de,ce=_T(oe,pe,fe),we=!f.arrow&&oo(a)!=null&&pe!==ce&&u.reference[v]/2-(pe<oe?oe:te)-A[v]/2<0,le=we?pe<oe?pe-oe:pe-fe:0;return{[b]:y[b]+le,data:j({[b]:ce,centerOffset:pe-ce-le},we&&{alignmentOffset:le}),reset:we}})}}),ML=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:h}=n,ce=Vr(e,n),{mainAxis:m=!0,crossAxis:_=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=ce,w=xn(ce,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=gi(a),I=kr(d),U=gi(d)===d,G=yield f.isRTL==null?void 0:f.isRTL(h.floating),M=y||(U||!A?[Ul(d)]:AL(d)),V=v!=="none";!y&&V&&M.push(...OL(d,A,v,G));const ie=[d,...M],de=yield f.detectOverflow(n,w),$=[];let oe=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(de[N]),_){const we=vL(a,l,G);$.push(de[we[0]],de[we[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(we=>we<=0)){var te,fe;const we=(((te=u.flip)==null?void 0:te.index)||0)+1,le=ie[we];if(le&&(!(_==="alignment"?I!==kr(le):!1)||oe.every(C=>kr(C.placement)===I?C.overflows[0]>0:!0)))return{data:{index:we,overflows:oe},reset:{placement:le}};let W=(fe=oe.filter(re=>re.overflows[0]<=0).sort((re,C)=>re.overflows[1]-C.overflows[1])[0])==null?void 0:fe.placement;if(!W)switch(b){case"bestFit":{var pe;const re=(pe=oe.filter(C=>{if(V){const D=kr(C.placement);return D===I||D==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(D=>D>0).reduce((D,J)=>D+J,0)]).sort((C,D)=>C[1]-D[1])[0])==null?void 0:pe[0];re&&(W=re);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function AT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CT(e){return wL.some(t=>e[t]>=0)}const FL=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=xn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ue(j({},u),{elementContext:"reference"})),f=AT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:CT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(j({},u),{altBoundary:!0})),f=AT(d,r.floating);return{data:{escapedOffsets:f,escaped:CT(f)}}}default:return{}}})}}},NT=new Set(["left","top"]);function BL(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=kr(n)==="y",f=NT.has(u)?-1:1,h=a&&d?-1:1,m=Vr(t,e);let{mainAxis:_,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*h,y:_*f}:{x:_*f,y:y*h}})}const UL=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 BL(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})}})}}},HL=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:M}=U;return{x:G,y:M}}}}=I,h=xn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},_=yield u.detectOverflow(n,h),y=kr(a),b=Cp(y);let v=m[b],A=m[y];const w=(U,G)=>_T(G+_[U==="y"?"top":"left"],G,G-_[U==="y"?"bottom":"right"]);l&&(v=w(b,v)),d&&(A=w(y,A));const N=f.fn(ue(j({},n),{[b]:v,[y]:A}));return ue(j({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[b]:l,[y]:d}}})})}}},jL=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:h=!0,crossAxis:m=!0}=Vr(e,t),_={x:s,y:a},y=kr(u),b=Cp(y);let v=_[b],A=_[y];const w=Vr(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(h){const G=b==="y"?"height":"width",M=l.reference[b]-l.floating[G]+N.mainAxis,V=l.reference[b]+l.reference[G]-N.mainAxis;v<M?v=M:v>V&&(v=V)}if(m){var I,U;const G=b==="y"?"width":"height",M=NT.has(gi(u)),V=l.reference[y]-l.floating[G]+(M&&((I=d.offset)==null?void 0:I[y])||0)+(M?0:N.crossAxis),ie=l.reference[y]+l.reference[G]+(M?0:((U=d.offset)==null?void 0:U[y])||0)-(M?N.crossAxis:0);A<V?A=V:A>ie&&(A=ie)}return{[b]:v,[y]:A}}}},$L=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,$=Vr(e,n),{apply:l=()=>{}}=$,d=xn($,["apply"]),f=yield a.detectOverflow(n,d),h=gi(r),m=oo(r),_=kr(r)==="y",{width:y,height:b}=s.floating;let v,A;h==="top"||h==="bottom"?(v=h,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=h,v=m==="end"?"top":"bottom");const w=b-f.top-f.bottom,N=y-f.left-f.right,I=mi(b-f[v],w),U=mi(y-f[A],N),G=n.middlewareData.shift,M=!G;let V=I,ie=U;G!=null&&G.enabled.x&&(ie=N),G!=null&&G.enabled.y&&(V=w),M&&!m&&(_?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 de=yield a.getDimensions(u.floating);return y!==de.width||b!==de.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 OT(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 zL(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 VL=/transform|translate|scale|rotate|perspective|filter/,qL=/paint|layout|strict|content/,us=e=>!!e&&e!=="none";let Ip;function Pp(e){const t=dr(e)?fr(e):e;return us(t.transform)||us(t.translate)||us(t.scale)||us(t.rotate)||us(t.perspective)||!Rp()&&(us(t.backdropFilter)||us(t.filter))||VL.test(t.willChange||"")||qL.test(t.contain||"")}function YL(e){let t=Ei(e);for(;Ir(t)&&!uo(t);){if(Pp(t))return t;if($l(t))return null;t=Ei(t)}return null}function Rp(){return Ip==null&&(Ip=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ip}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||OT(e)&&e.host||Or(e);return OT(t)?t.host:t}function IT(e){const t=Ei(e);return uo(t)?(e.ownerDocument||e).body:Ir(t)&&Pa(t)?t:IT(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=IT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Hn(s);if(a){const l=Lp(u);return t.concat(u,u.visualViewport||[],Pa(s)?s:[],l&&n?Ra(l):[])}else return t.concat(s,Ra(s,[],n))}function Lp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PT(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 Dp(e){return dr(e)?e:e.contextElement}function lo(e){const t=Dp(e);if(!Ir(t))return Nr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=PT(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 WL=Nr(0);function RT(e){const t=Hn(e);return!Rp()||!t.visualViewport?WL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GL(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=Dp(e);let u=Nr(1);t&&(r?dr(r)&&(u=lo(r)):u=lo(e));const l=GL(a,n,r)?RT(a):Nr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,h=s.width/u.x,m=s.height/u.y;if(a){const _=Hn(a),y=r&&dr(r)?Hn(r):r;let b=_,v=Lp(b);for(;v&&r&&y!==b;){const A=lo(v),w=v.getBoundingClientRect(),N=fr(v),I=w.left+(v.clientLeft+parseFloat(N.paddingLeft))*A.x,U=w.top+(v.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,f*=A.y,h*=A.x,m*=A.y,d+=I,f+=U,b=Hn(v),v=Lp(b)}}return Hl({width:h,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 LT(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 XL(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=Nr(1);const h=Nr(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),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const _=u&&!m&&!a?LT(u,d):Nr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+_.x,y:n.y*f.y-d.scrollTop*f.y+h.y+_.y}}function QL(e){return Array.from(e.getClientRects())}function KL(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 DT=25;function JL(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 h=Rp();(!h||h&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Vl(r);if(f<=0){const h=r.ownerDocument,m=h.body,_=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(_.marginLeft)+parseFloat(_.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-y);b<=DT&&(a-=b)}else f<=DT&&(a+=f);return{width:a,height:u,x:l,y:d}}const ZL=new Set(["absolute","fixed"]);function e5(e,t){const n=ls(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Ir(e)?lo(e):Nr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function MT(e,t,n){let r;if(t==="viewport")r=JL(e,n);else if(t==="document")r=KL(Or(e));else if(dr(t))r=e5(t,n);else{const s=RT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Hl(r)}function FT(e,t){const n=Ei(e);return n===t||!dr(n)||uo(n)?!1:fr(n).position==="fixed"||FT(n,t)}function t5(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=Pp(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&ZL.has(s.position)||Pa(u)&&!d&&FT(e,u))?r=r.filter(h=>h!==u):s=l,u=Ei(u)}return t.set(e,r),r}function n5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?$l(t)?[]:t5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,h)=>{const m=MT(t,h,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},MT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function r5(e){const{width:t,height:n}=PT(e);return{width:t,height:n}}function i5(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=Nr(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 h=s&&!r&&!a?LT(s,l):Nr(0),m=u.left+l.scrollLeft-d.x-h.x,_=u.top+l.scrollTop-d.y-h.y;return{x:m,y:_,width:u.width,height:u.height}}function Mp(e){return fr(e).position==="static"}function BT(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 UT(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)&&!Mp(s))return s;s=Ei(s)}return n}let r=BT(e,t);for(;r&&zL(r)&&Mp(r);)r=BT(r,t);return r&&uo(r)&&Mp(r)&&!Pp(r)?n:r||YL(e)||n}const s5=function(e){return Fe(this,null,function*(){const t=this.getOffsetParent||UT,n=this.getDimensions,r=yield n(e.floating);return{reference:i5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function o5(e){return fr(e).direction==="rtl"}const a5={convertOffsetParentRelativeRectToViewportRelativeRect:XL,getDocumentElement:Or,getClippingRect:n5,getOffsetParent:UT,getElementRects:s5,getClientRects:QL,getDimensions:r5,getScale:lo,isElement:dr,isRTL:o5};function HT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function u5(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:h,top:m,width:_,height:y}=f;if(l||t(),!_||!y)return;const b=Bl(m),v=Bl(s.clientWidth-(h+_)),A=Bl(s.clientHeight-(m+y)),w=Bl(h),I={rootMargin:-b+"px "+-v+"px "+-A+"px "+-w+"px",threshold:zr(0,mi(1,d))||1};let U=!0;function G(M){const V=M[0].intersectionRatio;if(V!==d){if(!U)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!HT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(G,ue(j({},I),{root:s.ownerDocument}))}catch(M){n=new IntersectionObserver(G,I)}n.observe(e)}return u(!0),a}function l5(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=Dp(e),h=s||a?[...f?Ra(f):[],...Ra(t)]:[];h.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&l?u5(f,n):null;let _=-1,y=null;u&&(y=new ResizeObserver(w=>{let[N]=w;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(_),_=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&&!HT(v,w)&&n(),v=w,b=requestAnimationFrame(A)}return n(),()=>{var w;h.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const c5=UL,d5=HL,f5=ML,p5=$L,h5=FL,m5=DL,g5=jL,E5=(e,t,n)=>{const r=new Map,s=j({platform:a5},n),a=ue(j({},s.platform),{_c:r});return LL(e,t,ue(j({},s),{platform:a}))};function jT(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 y5(e){if(!e)return jT();const{x:t,y:n,width:r,height:s}=e;return jT(t,n,r,s)}function T5(e,t){return{contextElement:Wt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?y5(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")},b5=e=>e==="top"||e==="bottom"?"y":"x";function _5(e,t){return{name:"transformOrigin",fn(n){var de,$,oe,te,fe;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=b5(d),h=((de=s.arrow)==null?void 0:de.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,_=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,b=h+_/2,v=m+y/2,A=Math.abs(((oe=s.shift)==null?void 0:oe.y)||0),w=u.reference.height/2,N=y/2,I=(fe=(te=e.offset)==null?void 0:te.mainAxis)!=null?fe:e.gutter,U=typeof I=="number"?I+N:I!=null?I:N,G=A>U,M={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:M),{data:{transformOrigin:ie?V:M}}}}}var x5={name:"rects",fn({rects:e}){return{data:e}}},w5=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 S5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var v5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function $T(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Fp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function A5(e,t,n){const r=e||t.createElement("div");return m5({element:r,padding:n.arrowPadding})}function C5(e,t){var n;if(!W6((n=t.offset)!=null?n:t.gutter))return c5(({placement:r})=>{var h,m,_,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(h=t.offset)==null?void 0:h.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=S5(r),d=l?void 0:t.shift,f=(y=(_=t.offset)==null?void 0:_.crossAxis)!=null?y:d;return dp({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function N5(e){if(!e.flip)return;const t=Fp(e.boundary);return f5(ue(j({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function k5(e){if(!e.slide&&!e.overlap)return;const t=Fp(e.boundary);return d5(ue(j({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:g5()}))}function O5(e){return p5({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 I5(e){var t;if(e.hideWhenDetached)return h5({strategy:"referenceHidden",boundary:(t=Fp(e.boundary))!=null?t:"clippingAncestors"})}function P5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function R5(e,t,n={}){const r=T5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},v5,n),a=t.querySelector("[data-part=arrow]"),u=[C5(a,s),N5(s),k5(s),A5(a,t.ownerDocument,s),w5(a),_5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),O5(s),I5(s),x5],{placement:l,strategy:d,onComplete:f,onPositioned:h}=s,m=()=>Fe(null,null,function*(){var U;if(!r||!t)return;const v=yield E5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),h==null||h({placed:!0});const A=Js(t),w=$T(A,v.x),N=$T(A,v.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${N}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)}}),_=()=>Fe(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),y=P5(s.listeners),b=s.listeners?l5(r,t,_,y):n4;return _(),()=>{b==null||b(),h==null||h({placed:!1})}}function zT(e,t,n={}){const l=n,{defer:r}=l,s=xn(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(R5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var L5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function D5(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?L5[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={},Bp=0,VT=e=>e&&(e.host||VT(e.parentNode)),M5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=VT(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),F5=new Set(["script","output","status","next-route-announcer"]),B5=e=>F5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),U5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=M5(n,Array.isArray(e)?e:[e]);Yl[r]||(Yl[r]=new WeakMap);const l=Yl[r],d=[],f=new Set,h=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Wt(y)&&nT(y,b=>{m(b)})});const _=y=>{!y||h.has(y)||Array.prototype.forEach.call(y.children,b=>{if(f.has(b))_(b);else try{if(B5(b))return;const A=b.getAttribute(s)==="true",w=(co.get(b)||0)+1,N=(l.get(b)||0)+1;co.set(b,w),l.set(b,N),d.push(b),w===1&&A&&ql.set(b,!0),N===1&&b.setAttribute(r,""),A||b.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",b,v)}})};return _(n),f.clear(),Bp++,()=>{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)}),Bp--,Bp||(co=new WeakMap,co=new WeakMap,ql=new WeakMap,Yl={})}},H5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,j5=(e,t=H5(e),n="data-aria-hidden",r=!0)=>{if(t)return U5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},$5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function qT(e,t={}){const{defer:n=!0}=t,r=n?$5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(j5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function z5(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 V5(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 YT="pointerdown.outside",WT="focus.outside";function q5(e){for(const t of e)if(Wt(t)&&Cr(t))return!0;return!1}var GT=e=>"clientY"in e;function Y5(e,t){if(!GT(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 W5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function XT(e,t){if(!t||!GT(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 W5(u,l)?r||a:!1}function G5(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),h=z5(f),m=V5(f);function _(I,U){if(!Wt(U)||!U.isConnected||Ks(e,U)||Y5(e,I)||l&&tT(e,U))return!1;const G=d.querySelector(`[aria-controls="${e.id}"]`);if(G){const V=bp(G);if(XT(I,V))return!1}const M=bp(e);return XT(I,M)?!1:!(n!=null&&n(U))}const y=new Set,b=is(e==null?void 0:e.getRootNode());function v(I){function U(G){var de,$;const M=u&&!rT()?jt:oe=>oe(),V=G!=null?G:I,ie=($=(de=V==null?void 0:V.composedPath)==null?void 0:de.call(V))!=null?$:[V==null?void 0:V.target];M(()=>{const oe=b?ie[0]:cr(I);if(!(!e||!_(I,oe))){if(s||a){const te=cp(s,a);e.addEventListener(YT,te,{once:!0})}QT(e,YT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:F4(V),focusable:q5(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(h.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(h.addEventListener("pointerdown",v,!0))},0);function N(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],M=b?G[0]:cr(I);if(!(!e||!_(I,M))){if(r||a){const de=cp(r,a);e.addEventListener(WT,de,{once:!0})}QT(e,WT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Cr(M),target:M}})}})}return rT()||(A.add(Gt(d,"focusin",N,!0)),A.add(m.addEventListener("focusin",N,!0)),A.add(h.addEventListener("focusin",N,!0))),()=>{clearTimeout(w),y.forEach(I=>I()),A.forEach(I=>I())}}function X5(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(G5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function QT(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 KT="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];J5(e,KT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),K5(e,KT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function K5(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 J5(e,t,n){e.addEventListener(t,n,{once:!0})}var JT;function ZT(){Xn.layers.forEach(({node:e})=>{e.style.pointerEvents=Xn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function Z5(e){e.style.pointerEvents=""}function eD(e,t){const n=Ar(e),r=[];return Xn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(JT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=oL(()=>{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=JT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function tD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){fp("[@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),ZT();function h(v){var w,N;const A=cr(v.detail.originalEvent);Xn.isBelowPointerBlockingLayer(e)||Xn.isInBranch(A)||((w=t.onPointerDownOutside)==null||w.call(t,v),(N=t.onInteractOutside)==null||N.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var w,N;const A=cr(v.detail.originalEvent);Xn.isInBranch(A)||((w=t.onFocusOutside)==null||w.call(t,v),(N=t.onInteractOutside)==null||N.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function _(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],N=(I=t.persistentElements)==null?void 0:I.map(U=>U()).filter(Wt);return N&&w.push(...N),w.some(U=>Ks(U,v))||Xn.isInNestedLayer(e,v)}const b=[a?eD(e,t.persistentElements):void 0,Q5(e,_),X5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:h,defer:t.defer})];return()=>{Xn.remove(e),ZT(),Z5(e),b.forEach(v=>v==null?void 0:v())}}function eb(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=Xs(e)?e():e;s.push(tD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var nD=Object.defineProperty,rD=(e,t,n)=>t in e?nD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>rD(e,typeof t!="symbol"?t+"":t,n),tb={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()}},iD=[],sD=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||Nl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(ka(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const h=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<f.length&&(u=f[h+1],l=!1):h-1>=0&&(u=f[h-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>ka(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=>{oD(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 N4(f)?!0:f.id&&!this.state.containers.some(h=>h.contains(f))?k4(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&&!Cr(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,aD(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(),tb.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=()=>{nb(()=>{if(d){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}u==null||u()})};if(d&&l){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(h).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 h=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Cr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(h=d),h>=0){const m=h===0?this.state.tabbableGroups.length-1:h-1,_=this.state.tabbableGroups[m];l=ka(u)>=0?_.lastTabbableNode:_.lastDomTabbableNode}else Da(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Cr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(h=d),h>=0){const m=h===this.state.tabbableGroups.length-1?0:h+1,_=this.state.tabbableGroups[m];l=ka(u)>=0?_.firstTabbableNode:_.firstDomTabbableNode}else Da(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||iD;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=>{v4(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?tT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=to(e,{getShadowRoot:this.config.getShadowRoot}),n=cT(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(ka(t[f])>0){l=!0;break}function d(f,h=!0){const m=t.indexOf(f);if(m>=0)return t[m+(h?1:-1)];const _=n.indexOf(f);if(!(_<0)){if(h){for(let y=_+1;y<n.length;y++)if(ss(n[y]))return n[y]}else for(let y=_-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 tb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?nb(()=>{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,oD=e=>!e.isComposing&&e.key==="Escape",nb=e=>setTimeout(e,0),aD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function rb(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new sD(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 Up="data-scroll-lock";function uD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function ib(e){const t=eo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function sb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Up))return;const u=ib(r)||ib(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Up,"");const d=()=>iL(r,"--scrollbar-width",`${l}px`),f=uD(r),h=()=>{const b={overflow:"hidden"};return!u&&l>0&&(b[f]=`${l}px`),Pl(s,b)},m=()=>{var G,M;const{scrollX:b,scrollY:v,visualViewport:A}=n,w=(G=A==null?void 0:A.offsetLeft)!=null?G:0,N=(M=A==null?void 0:A.offsetTop)!=null?M:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(N))}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"})}},_=[d(),kl()?m():h()];return()=>{_.forEach(b=>b==null?void 0:b()),s.removeAttribute(Up)}}var lD=as("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=lD.build(),ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ub=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},cD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},jp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},$p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},dD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},lb=e=>e.getById(ob(e)),fo=e=>e.getById(ab(e)),po=e=>e.getById(Hp(e)),cb=e=>e.getById(ub(e)),fD=e=>e.getById(jp(e)),pD=e=>e.getById($p(e));function hD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),h=a("currentPortalled"),m=r.get("renderedElements"),_=D5(ue(j({},u("positioning")),{placement:f}));return{portalled:h,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:cD(l)},Pr.arrow.attrs),{dir:u("dir"),style:_.arrow}))},getArrowTipProps(){return t.element(ue(j({},Pr.arrowTip.attrs),{dir:u("dir"),style:_.arrowTip}))},getAnchorProps(){return t.element(ue(j({},Pr.anchor.attrs),{dir:u("dir"),id:ob(l)}))},getTriggerProps(){return t.button(ue(j({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:ab(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Hp(l),onPointerDown(y){iT(y)&&D4()&&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:ub(l)},Pr.positioner.attrs),{dir:u("dir"),style:_.floating}))},getContentProps(){return t.element(ue(j({},Pr.content.attrs),{dir:u("dir"),id:Hp(l),tabIndex:-1,role:"dialog","aria-modal":Jy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Qs(d),"aria-labelledby":m.title?jp(l):void 0,"aria-describedby":m.description?$p(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(j({},Pr.title.attrs),{id:jp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(j({},Pr.description.attrs),{id:$p(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(j({},Pr.closeTrigger.attrs),{dir:u("dir"),id:dD(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var mD={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=lb(n))!=null?a:fo(n);return zT(r,()=>cb(n),ue(j({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>po(n);let s=!0;return eb(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:nL(()=>po(t),{triggerElement:fo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?qT(()=>[po(t),fo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return sb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?rb(()=>po(t),{initialFocus:()=>dT({root:po(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=lb(n))!=null?u:fo(n);zT(s,()=>cb(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:!!fD(t),description:!!pD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=dT({root:po(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=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[SU,Wl]=os({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[vU,zp]=os({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),gD=e=>{const t=L.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(mD,s);return hD(a,wp)},ED=e=>{const[t,u]=bT(e),l=u,{children:n}=l,r=xn(l,["children"]),s=gD(r),a=Ap($t({present:s.open},t));return x.jsx(EL,{value:s,children:x.jsx(ET,{value:a,children:n})})},db=L.forwardRef((e,t)=>{const n=vp(),r=Oa(),s=$t(ue(j({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(dn.button,ue(j({},s),{ref:t}))});db.displayName="PopoverTrigger";function yD(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 TD(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 fb(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 pb(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 bD(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 _D(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 Vp(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 xD=({className:e,componentType:t,children:n})=>{const[r,s]=L.useState(!1),{globalClassName:a}=ct(),u=f=>{s(f.open)},l=L.useCallback(()=>{s(!1)},[]),d=L.useMemo(()=>({closeMenu:l}),[l]);return x.jsxs(ED,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(db,{"aria-label":`Overflow menu for ${t}`,className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(hb,{})}),x.jsx(TT,{children:x.jsx(yT,{className:F(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Vy.Provider,{value:d,children:n})})})]})};function mb(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 gb(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[wD,cs]=os({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),qp=L.forwardRef((e,t)=>{const n=cs(),r=$t(n.getControlProps(),e);return x.jsx(dn.div,ue(j(j({},r),e),{ref:t}))});qp.displayName="CarouselControl";const Yp=L.forwardRef((e,t)=>{const[n,r]=Ia()(e,["readOnly","index"]),s=cs(),a=$t(s.getIndicatorProps(n),r);return x.jsx(dn.button,ue(j({},a),{ref:t}))});Yp.displayName="CarouselIndicator";const Wp=L.forwardRef((e,t)=>{const n=cs(),r=$t(n.getIndicatorGroupProps(),e);return x.jsx(dn.div,ue(j({},r),{ref:t}))});Wp.displayName="CarouselIndicatorGroup";const Gp=L.forwardRef((e,t)=>{const[n,r]=Ia()(e,["index","snapAlign"]),s=cs(),a=$t(s.getItemProps(n),r);return x.jsx(dn.div,ue(j({},a),{ref:t}))});Gp.displayName="CarouselItem";const Xp=L.forwardRef((e,t)=>{const n=cs(),r=$t(n.getItemGroupProps(),e);return x.jsx(dn.div,ue(j({},r),{ref:t}))});Xp.displayName="CarouselItemGroup";const Qp=L.forwardRef((e,t)=>{const n=cs(),r=$t(n.getNextTriggerProps(),e);return x.jsx(dn.button,ue(j({},r),{ref:t}))});Qp.displayName="CarouselNextTrigger";const Kp=L.forwardRef((e,t)=>{const n=cs(),r=$t(n.getPrevTriggerProps(),e);return x.jsx(dn.button,ue(j({},r),{ref:t}))});Kp.displayName="CarouselPrevTrigger";function SD(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(_,y){let b=parseFloat(_);return/%/.test(_)&&(b/=100,b*=y),Number.isNaN(b)?0:b}let d=l(r,n.width),f=l(s,n.height),h=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:h},y:{before:f,after:m}}}function vD(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 Eb(e){let t=[];for(const n of e.children)t=t.concat(n,Eb(n));return t}function yb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Eb(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 h of s){const m=h.getBoundingClientRect();if(!vD(n,m,u))continue;const _=eo(h);let[y,b]=_.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:h,position:A});break;case"center":r[a].center.push({node:h,position:A+m[d]/2});break;case"end":r[a].end.push({node:h,position:A+m[d]});break}}}return r}function Tb(e){const t=e.getBoundingClientRect(),n=SD(e),r=yb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:bb([...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(_b(0,s.x))),y:bb([...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(_b(0,s.y)))}}function AD(e,t,n){const r=yb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var bb=e=>[...new Set(e)],_b=(e,t)=>n=>Math.max(e,Math.min(t,n)),CD=as("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Yr=CD.build(),ND=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},kD=(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`},OD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},PD=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}`},kn=e=>e.getById(Gl(e)),wb=e=>rL(kn(e),"[data-part=item]"),RD=(e,t)=>e.getById(xb(e,t)),Sb=e=>{const t=kn(e);if(!t)return;const n=to(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function LD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),h=s("canScrollNext"),m=s("canScrollPrev"),_=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:h,canScrollPrev:m,getProgress(){return b/y.length},scrollToIndex(N,I){a({type:"INDEX.SET",index:N,instant:I})},scrollTo(N,I){a({type:"PAGE.SET",index:N,instant:I})},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(ue(j({},Yr.root.attrs),{id:ND(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(N){Ks(N.currentTarget,cr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){Ks(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!l("allowMouseDrag")||!iT(N))return;const I=cr(N);Cr(I)&&I!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:r4(N=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";N[I]<0&&!s("canScrollPrev")||N[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[_?"x":"y",l("snapType")].join(" "),gridAutoFlow:_?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[_?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[_?"scrollPaddingInline":"scrollPaddingBlock"]:A,[_?"paddingInline":"paddingBlock"]:A,[_?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const I=r.get("slidesInView").includes(N.index);return t.element(ue(j({},Yr.item.attrs),{id:kD(u,N.index),dir:l("dir"),role:"group","data-index":N.index,"data-inview":Qs(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":w.item(N.index,l("slideCount")),"aria-hidden":Jy(!I),style:{scrollSnapAlign:(()=>{var ie;const U=(ie=N.snapAlign)!=null?ie:"start",G=l("slidesPerMove"),M=G==="auto"?Math.floor(l("slidesPerPage")):G;return(N.index+M)%M===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:ID(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":w.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(j({},Yr.nextTrigger.attrs),{dir:l("dir"),id:OD(u),type:"button","aria-label":w.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),disabled:!h,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(j({},Yr.indicatorGroup.attrs),{dir:l("dir"),id:PD(u),"data-orientation":l("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const I="indicator",U={ArrowDown(V){_||(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowUp(V){_||(a({type:"PAGE.PREV",src:I}),V.preventDefault())},ArrowRight(V){_&&(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowLeft(V){_&&(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=H4(N,{dir:l("dir"),orientation:l("orientation")}),M=U[G];M==null||M(N)}}))},getIndicatorProps(N){return t.button(ue(j({},Yr.indicator.attrs),{dir:l("dir"),id:xb(u,N.index),type:"button","data-orientation":l("orientation"),"data-index":N.index,"data-readonly":Qs(N.readOnly),"data-current":Qs(N.index===b),"aria-label":w.indicator(N.index),onClick(I){I.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.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(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var DD={props({props:e}){return l4(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:MD(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 Y6(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(kn(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=kn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Sb(e)});return Sb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!kn(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 wb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=kn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var _;const h=f.target,m=Number((_=h.dataset.index)!=null?_:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?j6(d,m):$6(d,m)},n.get("slidesInView"));n.set("slidesInView",z6(l))},{root:r,threshold:t("inViewThreshold")});return wb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=kn(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 eL(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=Qy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=kn(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=kn(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=Wy(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=V6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=kn(r);if(!s)return;const a=AD(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=Qy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=kn(n);if(!r)return;const s=Tb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=kn(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=kn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=kn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Tb(r),l=u.x.reduce((f,h)=>Math.abs(h-s)<Math.abs(f-s)?h:f,u.x[0]),d=u.y.reduce((f,h)=>Math.abs(h-a)<Math.abs(f-a)?h: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 h=r.dataset.scrollSnapType;h&&(r.style.setProperty("scroll-snap-type",h),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=RD(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 MD(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 FD=e=>{const t=L.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(DD,s);return LD(a,wp)},Jp=L.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=FD(n),a=$t(s.getRootProps(),r);return x.jsx(wD,{value:s,children:x.jsx(dn.div,ue(j({},a),{ref:t}))})});Jp.displayName="CarouselRoot";const BD=180,UD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},HD=({globalClassName:e,className:t,itemMinWidth:n=BD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:h})=>{const m=Array.from(h).map((ie,de)=>({node:ie,key:L.isValidElement(ie)&&ie.key!=null?ie.key:`carousel-item-${de}`})),_=m.length,y=L.useRef(null),[b,v]=L.useState(0),{width:A}=DC();L.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,_]);const w=UD(r),N=n+w,I=b>0?(b+w)/N:1,U=Math.max(1,Math.floor(I));if(_===0)return null;const G=_>U,M=Math.ceil(_/U),V=G?Math.max(1,I):U;return x.jsxs(Jp,{ref:y,className:F(e,t,`${k}-carousel`),slidesPerPage:V,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:_,onPageChange:d,"aria-label":f,children:[x.jsx(Xp,{className:F(e,`${k}-carousel__item-group`,{"carousel-row-container":!G}),children:m.map(({node:ie,key:de},$)=>x.jsx(Gp,{index:$,className:F(e,`${k}-carousel__item`),children:ie},de))}),l&&G&&x.jsxs(qp,{className:F(e,`${k}-carousel__control`),children:[x.jsx(Kp,{className:F(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(fb,{size:"16px"})}),x.jsx(Qp,{className:F(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(pb,{size:"16px"})})]}),u&&G&&x.jsx(Wp,{className:F(e,`${k}-carousel__indicator-group`),children:Array.from({length:M},(ie,de)=>x.jsx(Yp,{index:de,className:F(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},jD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:F(e,`${k}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[$D,zD]=os({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),VD=e=>Ia()(e,["lazyMount","unmountOnExit"]),[qD,Fa]=os({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),vb=L.forwardRef((e,t)=>{const n=Fa(),r=zD(),s=Ap(ue(j({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:x.jsx(dn.div,ue(j({},a),{ref:Dl(s.ref,t)}))});vb.displayName="DialogBackdrop";const Zp=L.forwardRef((e,t)=>{const n=Fa(),r=Oa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(dn.div,ue(j({},s),{ref:Dl(r.ref,t)}))});Zp.displayName="DialogContent";const eh=L.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getDescriptionProps(),e);return x.jsx(dn.div,ue(j({},r),{ref:t}))});eh.displayName="DialogDescription";const th=L.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getPositionerProps(),e);return Oa().unmounted?null:x.jsx(dn.div,ue(j({},r),{ref:t}))});th.displayName="DialogPositioner";var YD=as("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ds=YD.build(),Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},nh=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`},rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ih=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(nh(e)),WD=e=>e.getById(Ab(e)),GD=e=>e.getById(Cb(e)),XD=e=>e.getById(Nb(e)),QD=e=>e.getById(rh(e)),KD=e=>e.getById(ih(e)),JD=e=>e.getById(kb(e));function ZD(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":nh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(j({},ds.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Cb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(j({},ds.positioner.attrs),{dir:a("dir"),id:Ab(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:nh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:rh(u),"aria-describedby":f.description?ih(u):void 0}))},getTitleProps(){return t.element(ue(j({},ds.title.attrs),{dir:a("dir"),id:rh(u)}))},getDescriptionProps(){return t.element(ue(j({},ds.description.attrs),{dir:a("dir"),id:ih(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 e8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>JD(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 eb(()=>Xl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[XD(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 sb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?rb(()=>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")?qT(()=>[Xl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!QD(t),description:!!KD(t)})})},syncZIndex({scope:e}){jt(()=>{const t=Xl(e);if(!t)return;const n=eo(t);[WD(e),GD(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 t8=e=>{const t=L.useId(),{getRootNode:n}=Wl(),{dir:r}=zp(),s=j({id:t,getRootNode:n,dir:r},e),a=Ll(e8,s);return ZD(a,wp)},Ob=e=>{const[t,l]=bT(e),d=l,{children:n}=d,r=xn(d,["children"]),[s]=VD(t),a=t8(r),u=Ap($t({present:a.open},t));return x.jsx(qD,{value:a,children:x.jsx($D,{value:s,children:x.jsx(ET,{value:u,children:n})})})},Ib=L.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getTitleProps(),e);return x.jsx(dn.h2,ue(j({},r),{ref:t}))});Ib.displayName="DialogTitle";const n8=({children:e})=>{const[t,n]=L.useState(!1),r=L.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=L.useMemo(()=>({isOpen:t}),[t]);return x.jsx(lp.Provider,{value:r,children:x.jsx(zy.Provider,{value:s,children:e})})},Pb=()=>L.useContext(zy),Rb=()=>{const e=L.useContext(lp);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},r8=`${k}-overflow-menu-button-trigger`,i8=({componentType:e,children:t})=>{const{isOpen:n}=Pb(),{closeMenu:r}=Rb(),{globalClassName:s}=ct(),a=L.useRef(null);return L.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${r8}`)||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?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},s8=({componentType:e,className:t})=>{const{toggleMenu:n}=Rb(),{isOpen:r}=Pb(),{globalClassName:s}=ct();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:x.jsx(hb,{})})};class o8{constructor(){Xe(this,"initialState",qg);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 l8(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 o8,a8=e=>{window.addEventListener(kd,e)},u8=e=>{window.removeEventListener(kd,e)},l8=(e,t)=>{const n=new CustomEvent(kd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Lb=e=>{const t=yi.isOpen,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isOpen=n},c8=e=>{const t=yi.isInline,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isInline=n},d8=({elementId:e,entryType:t,params:n,isInline:r})=>{yi.promptsStateProxy.elementId=e,t&&(yi.promptsStateProxy.entryType=t),typeof r=="boolean"&&c8(r),n&&yi.updatePromptsParamsProxy(n),yi.isOpen||Lb(!0)},f8=()=>{const e=L.useContext(Xg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},p8=()=>{const e=L.useContext(Wg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Ql=()=>{const e=L.useContext(Yg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},h8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{previousComponentType:r}=ai(),s=Gs(),a=()=>{Iu(r||"dialog"),s()};return t?x.jsx(ar,{className:F(n,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(mb,{})}):x.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(mb,{}),"Show ",r||"dialog"]})},m8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{isModalFullscreen:r}=ai(),s=Gs(),a=()=>{Id(!r),s()},u=r?dN:fN,l="Toggle Fullscreen";return t?x.jsx(ar,{ariaLabel:l,title:l,className:F(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),l]})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{dialogPosition:r}=ai(),s=Gs(),a=r==="bottom-left",u=()=>{Pd(a?"bottom-right":"bottom-left"),s()},l=a?TD:yD,d=a?"Move right":"Move left";return t?x.jsx(ar,{className:F(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(l,{})}):x.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(l,{}),d]})},Db=({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,h=d==="standalone",m=e==="modal",_=m?h8:Bb,y=m?m8:g8,b=L.useMemo(()=>s?iN(s):{},[s]);return x.jsx(n8,{children:x.jsxs("div",{className:F(a,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:F(a,`${k}-${e}-header`,{standalone:h,embedded:!h}),style:b,children:[(s==null?void 0:s.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:F(a,`${k}-${e}-logo`,{standalone:h,embedded:!h}),src:s.logoUrl}),x.jsx(Ib,{className:F(a,`${k}-${e}-title`,{standalone:h,embedded:!h}),children:s==null?void 0:s.headerText}),x.jsxs("div",{className:F(a,`${k}-${e}-controls`),children:[x.jsx(_,{componentType:e,isIcon:!0}),x.jsx(s8,{componentType:e}),x.jsx(jD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(i8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(_8,{componentType:e}),x.jsx(qy,{componentType:e,onClearChat:t}),f&&x.jsx(Yy,{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}`}},E8=({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}},Mb=e=>typeof e=="number"&&Number.isFinite(e),y8=({priceBreakdown:e,currencyCode:t=Kl})=>{if(!e)return null;const n=t||Kl,r=[e.sales,e.original],s=r.map(h=>h==null?void 0:h.min).filter(Mb),a=r.map(h=>h==null?void 0:h.max).filter(Mb);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}},sh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=E8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return x.jsxs("div",{className:F(s,a,`${k}-price`),style:f,children:[x.jsx("span",{className:F(s,`${k}-price__amount`),children:u}),d&&l&&x.jsx("span",{className:F(s,`${k}-price__compare`),children:l})]})},T8={sparkle:Vp,plus:bD,"paper-plane":_D},Fb=({icon:e,className:t})=>{const n=T8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},b8=({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",h=b=>()=>{a(b)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},_=b=>x.jsxs(x.Fragment,{children:[l&&x.jsx(Fb,{icon:l,className:`${k}-suggestion-button-icon`}),x.jsx("span",{children:b})]});return x.jsx("div",{className:F(t,`${k}-suggestion-container ${f}`,e),children:n.map(b=>s?x.jsx(tl,{disabled:r,className:F(t,`${k}-suggestion-button standalone`,m),onClick:h(b),children:_(b)},b):x.jsx("button",{disabled:r,className:F(t,`${k}-suggestion-button embedded`,m),onClick:h(b),children:_(b)},b))})},_8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ct();if(!r)return null;const s=()=>{jr(!1),Ou(!0)};return t?x.jsx(ar,{className:F(n,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:x.jsx(u1,{})}):x.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(u1,{}),"Minimize"]})},Bb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),r=Gs(),s=()=>{Iu("modal"),r()};return t?x.jsx(ar,{className:F(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:x.jsx(gb,{})}):x.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(gb,{}),"Show modal"]})},x8=["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"],w8=3e3,S8=400,v8=({globalClassName:e,isWidgetStandalone:t,messages:n=x8})=>{const[r,s]=L.useState(0),[a,u]=L.useState(!0);return L.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},S8)},w8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),x.jsxs("div",{className:F(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[x.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[x.jsx("div",{className:`${k}-connecting-pulse`}),x.jsx("div",{className:`${k}-connecting-ring`})]}),x.jsx("span",{className:F(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},A8=({shouldShow:e,loadingText:t})=>e?x.jsx("span",{className:`${k}-processing-text`,children:t}):null,C8=({shouldShow:e})=>e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:`${k}-processing-shimmer-bar`}),x.jsx("div",{className:`${k}-processing-shimmer-bar`}),x.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,oh=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>x.jsxs("div",{className:F(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[x.jsx(A8,{shouldShow:!!n,loadingText:n}),x.jsx(C8,{shouldShow:!n})]});function Ub(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 N8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function k8(e,t,n){const s=fl((n||{}).ignore||[]),a=O8(t);let u=-1;for(;++u<a.length;)wE(e,"text",l);function l(f,h){let m=-1,_;for(;++m<h.length;){const y=h[m],b=_?_.children:void 0;if(s(y,b?b.indexOf(y):void 0,_))return;_=y}if(_)return d(f,h)}function d(f,h){const m=h[h.length-1],_=a[u][0],y=a[u][1];let b=0;const A=m.children.indexOf(f);let w=!1,N=[];_.lastIndex=0;let I=_.exec(f.value);for(;I;){const U=I.index,G={index:I.index,input:I.input,stack:[...h,f]};let M=y(...I,G);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?_.lastIndex=U+1:(b!==U&&N.push({type:"text",value:f.value.slice(b,U)}),Array.isArray(M)?N.push(...M):M&&N.push(M),b=U+I[0].length,w=!0),!_.global)break;I=_.exec(f.value)}return w?(b<f.value.length&&N.push({type:"text",value:f.value.slice(b)}),m.children.splice(A,1,...N)):N=[f],A+N.length}}function O8(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([I8(s[0]),P8(s[1])])}return t}function I8(e){return typeof e=="string"?new RegExp(N8(e),"g"):e}function P8(e){return typeof e=="function"?e:function(){return e}}const ah="phrasing",uh=["autolink","link","image","label"];function R8(){return{transforms:[H8],enter:{literalAutolink:D8,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:U8,literalAutolinkEmail:B8,literalAutolinkHttp:M8,literalAutolinkWww:F8}}}function L8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ah,notInConstruct:uh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ah,notInConstruct:uh},{character:":",before:"[ps]",after:"\\/",inConstruct:ah,notInConstruct:uh}]}}function D8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lh(e){this.config.enter.autolinkProtocol.call(this,e)}function M8(e){this.config.exit.autolinkProtocol.call(this,e)}function F8(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 B8(e){this.config.exit.autolinkEmail.call(this,e)}function U8(e){this.exit(e)}function H8(e){k8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$8]],{ignore:["link","linkReference"]})}function j8(e,t,n,r,s){let a="";if(!Hb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!z8(n)))return!1;const u=V8(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 $8(e,t,n,r){return!Hb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z8(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 V8(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=Ub(e,"(");let a=Ub(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 Hb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||sl(n))&&(!t||n!==47)}jb.peek=Z8;function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function W8(){this.buffer()}function G8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function X8(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 K8(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 J8(e){this.exit(e)}function Z8(){return"["}function jb(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 eM(){return{enter:{gfmFootnoteCallString:q8,gfmFootnoteCall:Y8,gfmFootnoteDefinitionLabelString:W8,gfmFootnoteDefinition:G8},exit:{gfmFootnoteCallString:X8,gfmFootnoteCall:Q8,gfmFootnoteDefinitionLabelString:K8,gfmFootnoteDefinition:J8}}}function tM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:jb},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"),h=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),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?$b:nM))),f(),d}}function nM(e,t,n){return t===0?e:$b(e,t,n)}function $b(e,t,n){return(n?"":" ")+e}const rM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];zb.peek=uM;function iM(){return{canContainEols:["delete"],enter:{strikethrough:oM},exit:{strikethrough:aM}}}function sM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rM}],handlers:{delete:zb}}}function oM(e){this.enter({type:"delete",children:[]},e)}function aM(e){this.exit(e)}function zb(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 uM(){return"~"}function lM(e){return e.length}function cM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||lM,a=[],u=[],l=[],d=[];let f=0,h=-1;for(;++h<e.length;){const v=[],A=[];let w=-1;for(e[h].length>f&&(f=e[h].length);++w<e[h].length;){const N=dM(e[h][w]);if(n.alignDelimiters!==!1){const I=s(N);A[w]=I,(d[w]===void 0||I>d[w])&&(d[w]=I)}v.push(N)}u[h]=v,l[h]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Vb(r[m]);else{const v=Vb(r);for(;++m<f;)a[m]=v}m=-1;const _=[],y=[];for(;++m<f;){const v=a[m];let A="",w="";v===99?(A=":",w=":"):v===108?A=":":v===114&&(w=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-w.length);const I=A+"-".repeat(N)+w;n.alignDelimiters!==!1&&(N=A.length+N+w.length,N>d[m]&&(d[m]=N),y[m]=N),_[m]=I}u.splice(1,0,_),l.splice(1,0,y),h=-1;const b=[];for(;++h<u.length;){const v=u[h],A=l[h];m=-1;const w=[];for(;++m<f;){const N=v[m]||"";let I="",U="";if(n.alignDelimiters!==!1){const G=d[m]-(A[m]||0),M=a[m];M===114?I=" ".repeat(G):M===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&&N==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(I),w.push(N),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 dM(e){return e==null?"":String(e)}function Vb(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 fM(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()),pM);return s(),u}function pM(e,t,n){return">"+(n?"":" ")+e}function hM(e,t){return qb(e,t.inConstruct,!0)&&!qb(e,t.notInConstruct,!1)}function qb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Yb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
40
|
+
`&&hM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function mM(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 gM(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 EM(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 yM(e,t,n,r){const s=EM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(gM(e,n)){const m=n.enter("codeIndented"),_=n.indentLines(a,TM);return m(),_}const l=n.createTracker(r),d=s.repeat(Math.max(mM(a,s)+1,3)),f=n.enter("codeFenced");let h=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);h+=l.move(n.safe(e.lang,j({before:h,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,j({before:h,after:`
|
|
42
42
|
`,encode:["`"]},l.current()))),m()}return h+=l.move(`
|
|
43
43
|
`),a&&(h+=l.move(a+`
|
|
44
|
-
`)),h+=l.move(d),f(),h}function
|
|
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
|
|
44
|
+
`)),h+=l.move(d),f(),h}function TM(e,t,n){return(n?"":" ")+e}function ch(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 bM(e,t,n,r){const s=ch(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 _M(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}}Wb.peek=xM;function Wb(e,t,n,r){const s=_M(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),h=Jl(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Ba(f)+d.slice(1));const m=d.charCodeAt(d.length-1),_=Jl(r.after.charCodeAt(0),m,s);_.inside&&(d=d.slice(0,-1)+Ba(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:_.outside,before:h.outside},l+d+y}function xM(e,t,n){return n.options.emphasis||"*"}function wM(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 SM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(wM(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),_=n.containerPhrasing(e,ue(j({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
|
-
`}));return m(),h(),
|
|
48
|
-
`+(s===1?"=":"-").repeat(
|
|
47
|
+
`}));return m(),h(),_+`
|
|
48
|
+
`+(s===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
|
|
49
49
|
`))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,j({before:"# ",after:`
|
|
50
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=Ba(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Gb.peek=
|
|
51
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
52
|
-
`))}function d(y,b,v,A){const w=v.enter("tableCell"),N=v.enter("phrasing"),I=v.containerPhrasing(y,ue(j({},A),{before:a,after:a}));return N(),w(),I}function f(y,b){return uM(y,{align:b,alignDelimiters:r,padding:n,stringLength:s})}function h(y,b,v){const A=y.children;let w=-1;const N=[],I=b.enter("table");for(;++w<A.length;)N[w]=m(A[w],b,v);return I(),N}function m(y,b,v){const A=y.children;let w=-1;const N=[],I=b.enter("tableRow");for(;++w<A.length;)N[w]=d(A[w],y,b,v);return I(),N}function x(y,b,v){let A=rx.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function XM(){return{exit:{taskListCheckValueChecked:sx,taskListCheckValueUnchecked:sx,paragraph:KM}}}function QM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JM}}}function sx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function KM(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 JM(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=rx.listItem(e,t,n,j(j({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+u}}function ZM(){return[I8(),J8(),nM(),$M(),XM()]}function e9(e){return{extensions:[P8(),Z8(e),rM(),GM(e),QM()]}}const t9={tokenize:a9,partial:!0},ox={tokenize:u9,partial:!0},ax={tokenize:l9,partial:!0},ux={tokenize:c9,partial:!0},n9={tokenize:d9,partial:!0},lx={name:"wwwAutolink",tokenize:s9,previous:dx},cx={name:"protocolAutolink",tokenize:o9,previous:fx},Gr={name:"emailAutolink",tokenize:i9,previous:px},Rr={};function r9(){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,cx],Rr[104]=[Gr,cx],Rr[87]=[Gr,lx],Rr[119]=[Gr,lx];function i9(e,t,n){const r=this;let s,a;return u;function u(m){return!ph(m)||!px.call(r,r.previous)||hh(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ph(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(n9,h,f)(m):m===45||m===95||ln(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function s9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!dx.call(r,r.previous)||hh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(t9,e.attempt(ox,e.attempt(ax,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function o9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&fx.call(r,r.previous)&&!hh(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(ox,e.attempt(ax,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function a9(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 u9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ux,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 l9(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(ux,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 c9(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 d9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ln(a)?n(a):t(a)}}function dx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function fx(e){return!En(e)}function px(e){return!(e===47||ph(e))}function ph(e){return e===43||e===45||e===46||e===95||ln(e)}function hh(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 f9={tokenize:b9,partial:!0};function p9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E9,continuation:{tokenize:y9},exit:T9}},text:{91:{name:"gfmFootnoteCall",tokenize:g9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:h9,resolveTo:m9}}}}function h9(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 m9(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 g9(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?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function E9(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",h):n(b)}function h(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:h}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,h):h(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 y9(e,t,n){return e.check(ca,t,e.attempt(f9,t,n))}function T9(e){e.exit("gfmFootnoteDefinition")}function b9(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 x9(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 h={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",h,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",h,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,h=this.events;let m=0;return x;function x(b){return f===126&&h[h.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 _9{constructor(){this.map=[]}add(t,n,r){w9(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 w9(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 S9(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 v9(){return{flow:{null:{name:"table",tokenize:A9,resolveAll:C9}}}}function A9(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 pe=r.events[oe][1].type;if(pe==="lineEnding"||pe==="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),h(z)}function h(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,h,"whitespace")(z):(a+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,h):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||gt(z)?(e.exit("data"),h(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"),N(z)):G(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"),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 C9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,h,m;const x=new _9;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,h),h=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,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},x.add(n,0,[["enter",h,t]])),s=b.type==="tableDelimiterRow"?2:h?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,h),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=S9(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({},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]),h=ho(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},h)};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({},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 N9={name:"tasklistCheck",tokenize:O9};function k9(){return{text:{91:N9}}}function O9(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:I9},t,n)(d):n(d)}}function I9(e,t,n){return it(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function P9(e){return z1([r9(),p9(),x9(e),v9(),k9()])}const R9={};function L9(e){const t=this,n=e||R9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(P9(n)),a.push(ZM()),u.push(e9(n))}const D9=()=>_.jsx("span",{className:`${k}-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(LE,{remarkPlugins:[L9],rehypePlugins:[Dy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${k}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${k}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${k}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${k}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${k}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${k}-li`),children:s}),a:({href:s,children:a})=>_.jsx($y,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${k}-table-container`),children:_.jsx("table",{className:F(e,`${k}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${k}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${k}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${k}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${k}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?_.jsx(D9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")}),go=()=>D.useContext(Qg),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 M9(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),!M9(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 h=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(h)?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 F9 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 B9(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 U9=({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,`${k}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${k}-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,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(B9,{"aria-hidden":"true"})})})},H9=({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,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${k}-msg-product-card__title`),children:e})},j9=({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(),h=Eo(),m=l?u.ProductTile:void 0;if(m){const z={name:"ProductTile",payload:s!=null?s:{},api:h};return _.jsx(yo,{tagName:m,props:z,label:"ProductTile"})}const{id:x,name:y,imageUrl:b,description:v,productPageUrl:A,price:w,priceBreakdown:N,discountPrice:I,listPrice:U,currencyCode:G}=e,L=I!=null?I:w,V=g8({priceBreakdown:N,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,`${k}-msg-product-card`),children:[_.jsx(U9,{imageUrl:b||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:le,name:y,showInWidgetDetails:ie}),_.jsxs("div",{className:F(t,`${k}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${k}-msg-product-card__content-header`),children:[_.jsx(H9,{name:y||x,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:le,showInWidgetDetails:ie}),a&&v&&_.jsx("div",{className:F(t,`${k}-msg-product-card__description`),title:v,children:_.jsx(mo,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${k}-msg-product-card__price-row`),children:V?_.jsx("span",{className:F(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):_.jsx(sh,{globalClassName:t,retailPrice:U,discountPrice:L,currencyCode:G})})]})]})},$9=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}},z9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ct(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=d?l.ProductCarousel:void 0;if(h){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(yo,{tagName:h,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${k}-product-carousel-title`),children:e}),_.jsx(BD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${k}-product-carousel-item`),children:[_.jsx(j9,{product:$9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},mh=44,V9=400,q9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?mh:Math.min(Math.max(Math.round(t),mh),V9)},Y9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},W9="parentOrigin",G9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(W9,t),n.toString()}catch(n){return e}},X9=(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}},mx=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=D.useRef(null),[s,a]=D.useState(!1),[u,l]=D.useState(mh),d=typeof window!="undefined"?window.location.origin:"",f=G9(e,d),h=Y9(e);return D.useEffect(()=>{const m=x=>{var b,v,A;if(h&&x.origin!==h||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(q9((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)},[h,n]),_.jsx("div",{className:F(t,`${k}-cart-express`,{[`${k}-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,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},ec=({code:e,globalClassName:t,inactive:n})=>_.jsxs("span",{className:F(t,`${k}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[_.jsx(d1,{"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?-Math.abs(n):n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${k}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${k}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${k}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${k}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):f})]})};function gh(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Eh(e){return(e!=null?e:[]).map(gh).filter(t=>t!==null)}function gx(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function Q9(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=gh(a),l=gx(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=gh(a);if(u===null)continue;const l=(s=gx(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function Ex(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>Eh(s.coupons)).map(s=>s.toLowerCase()));return Q9(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const K9=({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=h=>{if(n)return;const m=h.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const h=parseInt(a,10);!n&&!isNaN(h)&&h>0&&h!==e?s(h):u(e.toString())},f=h=>{h.key==="Enter"&&(h.preventDefault(),d())};return _.jsx("div",{className:F(r,`${k}-cart-qty-input-wrapper`),children:t?_.jsx(iN,{className:F(r,`${k}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(r,`${k}-cart-qty-input`),value:a,disabled:n,onChange:l,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},J9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,h;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=Eh(e.coupons);return _.jsxs("li",{className:F(s,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${k}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((h=e.promotions)!=null?h:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&_.jsx("div",{className:F(s,`${k}-cart-chips`),children:d.map(m=>_.jsx(ec,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${k}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${k}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${k}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${k}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${k}-cart-qty-heading`),children:"Quantity"}),_.jsx(K9,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${k}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},Z9=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=an(),[l,d]=D.useState(!1),[f,h]=D.useState(""),[m,x]=D.useState(null),y=a||u,{items:b=[],currencyCode:v="USD",subtotal:A,total:w,taxes:N,shippingCost:I,shippingDiscount:U,shippingPromotions:G=[],promotionsDiscount:L,promotions:V=[],couponsDiscount:ie,bodyMessage:le,footerMessage:z,checkoutButtonUrl:oe,expressPaymentUrl:te}=e,fe=Ex(b,e.couponsApplied,e.coupons),pe=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(C=>{C.outcome==="success"?setTimeout(()=>x(null),300):x(null)}))},ce=()=>{const W=f.trim();!W||y||(s(`Apply coupon code ${W}`),h(""))};return _.jsxs("div",{className:F(n,`${k}-cart`),children:[_.jsxs("div",{className:F(n,`${k}-cart-box`),children:[le&&_.jsxs("button",{type:"button",className:F(n,`${k}-cart-summary`),"aria-expanded":l,onClick:()=>d(W=>!W),children:[_.jsx("span",{className:F(n,`${k}-cart-summary-text`),children:_.jsx(mo,{text:le,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),_.jsx("span",{className:F(n,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:l?_.jsx(l1,{}):_.jsx(c1,{})})]}),l&&_.jsxs("div",{className:F(n,`${k}-cart-expanded`),children:[_.jsxs("div",{className:F(n,`${k}-cart-items-section`),children:[_.jsx("ul",{className:F(n,`${k}-cart-items`),children:b.map(W=>_.jsx(J9,{item:W,currencyCode:v,loading:m===W.itemId,disabled:y||m===W.itemId,globalClassName:n,onRemove:pe,onQuantityChange:we},W.itemId))}),fe.length>0&&_.jsx("div",{className:F(n,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:fe.map(W=>_.jsx(ec,{code:W.code,inactive:!W.applied,globalClassName:n},W.code))})]}),_.jsxs("div",{className:F(n,`${k}-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:N,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,`${k}-cart-coupon`),children:[_.jsxs("div",{className:F(n,`${k}-cart-coupon-field`),children:[_.jsx("span",{className:F(n,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(d1,{})}),_.jsx("input",{type:"text",className:F(n,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:W=>h(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),ce())}})]}),_.jsx("button",{type:"button",className:F(n,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:ce,children:_.jsx(aN,{"aria-hidden":"true"})})]}),te&&_.jsx(mx,{expressPaymentUrl:te,globalClassName:n,onOrderComplete:de}),oe&&_.jsxs("a",{className:F(n,`${k}-cart-checkout-button`),href:oe,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(sN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(n,`${k}-cart-footer`),children:z||"Shipping and taxes calculated at checkout."})]})},eF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Eh(e.coupons);return _.jsxs("li",{className:F(n,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${k}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&_.jsx("div",{className:F(n,`${k}-cart-chips`),children:s.map(l=>_.jsx(ec,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${k}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${k}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${k}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${k}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},tF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},nF=({order:e,globalClassName:t})=>{const[n,r]=D.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:h,shippingCost:m,shippingDiscount:x,shippingPromotions:y=[],promotionsDiscount:b,promotions:v=[],couponsDiscount:A,bodyMessage:w,footerMessage:N}=e,I=Ex(u,e.couponsApplied);return _.jsxs("div",{className:F(t,`${k}-cart`),children:[_.jsxs("div",{className:F(t,`${k}-cart-banner`),children:[_.jsx("span",{className:F(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(uN,{})}),_.jsx("p",{className:F(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${k}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",tF(a)]})]}),_.jsxs("div",{className:F(t,`${k}-cart-box`),children:[w&&_.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(U=>!U),children:[_.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:_.jsx(mo,{text:w,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(l1,{}):_.jsx(c1,{})})]}),n&&_.jsxs("div",{className:F(t,`${k}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${k}-cart-items`),children:u.map(U=>_.jsx(eF,{item:U,currencyCode:l,globalClassName:t},U.itemId))}),I.length>0&&_.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:I.map(U=>_.jsx(ec,{code:U.code,globalClassName:t},U.code))}),_.jsxs("div",{className:F(t,`${k}-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:h,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(On,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${k}-cart-footer`),children:N||"Shipping and taxes calculated at checkout."})]})},rF=({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,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},iF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Jp,{className:F(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(Xp,{className:F(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(Gp,{index:a,className:F(n,`${k}-pdp-gallery__item`),children:_.jsx(rF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(qp,{className:F(n,`${k}-pdp-gallery__control`),children:[_.jsx(Kp,{className:F(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(fb,{size:"16px"})}),_.jsx(Qp,{className:F(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(pb,{size:"16px"})})]}),r&&_.jsx(Wp,{className:F(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Yp,{index:a,className:F(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ua="color",yh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,sF=e=>e.replace(/(^|\/)large\//,"$1medium/"),yx=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ua&&n.vals.includes(t)),Tx=(e,t)=>{const n=sF(t),r=yh(e,n);return n===t?{src:r}:{src:r,fallbackSrc:yh(e,t)}},oF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>yx(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=>Tx(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[Tx(e.baseUrl,e.imageUrl)]:[]},aF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&yx(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?yh(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,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),uF=(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]}))},lF=(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,h])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===h})});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})},bx=(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,h])=>{var m;return((m=d.vars)==null?void 0:m[f])===h}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},cF=(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},dF=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},fF=300,pF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var ht,Ot,Ut,yn,Tn,Lt,Be;const{addToCart:s,sendMessage:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=e.data,m=(ht=h.vattr)!=null?ht:[],[x,y]=D.useState(()=>dF(h)),b=uF(h.vmat,x),v=(Ut=(Ot=h.quantity)==null?void 0:Ot.minQuantity)!=null?Ut:1,A=(Tn=(yn=h.quantity)==null?void 0:yn.maxQuantity)!=null?Tn:Number.POSITIVE_INFINITY,w=(Be=(Lt=h.quantity)==null?void 0:Lt.increment)!=null?Be:1,[N,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(()=>oF(h,V),[h,V]),le=D.useMemo(()=>cF(h,x),[h,x]),z=m.find(Ne=>Ne.id===Ua),oe=m.filter(Ne=>Ne.id!==Ua),te=bx(h,x),[fe,pe]=D.useState(N),de=D.useRef(te),we=de.current===te?fe:N;D.useEffect(()=>{if(de.current!==te){de.current=te,pe(N);return}const Ne=window.setTimeout(()=>pe(N),fF);return()=>window.clearTimeout(Ne)},[N,te]);const ce=N===fe,W=D.useMemo(()=>b&&(de.current!==te||ce)?X9(h.expressPaymentUrl,te,we):null,[h.expressPaymentUrl,te,we,b,ce]),re=D.useCallback(Ne=>{a(Ne?`I completed express payment. Show my order confirmation for order ${Ne}.`:"I completed express payment. Show my order confirmation.")},[a]),C=d?l.ProductDetailCard:void 0;if(C){const Ne={name:"ProductDetailCard",payload:e,api:f};return _.jsx(yo,{tagName:C,props:Ne,label:"ProductDetailCard"})}const M=(Ne,We)=>()=>{y(et=>{const se=!tc(h.vmat,Ne,We,et);return Ne===Ua||se?lF(h.vmat,m,Ne,We,et):ue(j({},et),{[Ne]:We})})},J=()=>{if(u)return;const Ne=bx(h,x);if(!Ne)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:h.name,sku:Ne,quantity:N,variants:We})},P=!b||N-w<v,Ae=!b||N+w>A,ke=Ne=>{var et;const We=x[Ne.id];return(et=Ne.opts.find(se=>se.val===We))==null?void 0:et.name},ge=()=>I(Ne=>Math.max(v,Ne-w)),Le=()=>I(Ne=>Math.min(A,Ne+w)),je=Ne=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:Ne.lbl||Ne.id}),ke(Ne)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:ke(Ne)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__chips`),children:Ne.opts.map(We=>{const et=tc(h.vmat,Ne.id,We.val,x),se=x[Ne.id]===We.val;return _.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:M(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]},Ne.id),Ke=Ne=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:Ne.lbl||"Color"}),ke(Ne)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:ke(Ne)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__swatches`),children:Ne.opts.map(We=>{const et=tc(h.vmat,Ne.id,We.val,x),se=x[Ne.id]===We.val,Se=aF(h,We.val);return Se?_.jsxs("label",{className:F(`${k}-msg-pdp__swatch`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-label":We.name||We.val,"aria-description":et?void 0:"unavailable",onChange:M(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${k}-msg-pdp__swatch-image`),src:Se,alt:We.name||We.val,loading:"lazy"})]},We.val):_.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:M(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]});return _.jsx("div",{className:F(t,`${k}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${k}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${k}-msg-pdp__gallery`),children:_.jsx(iF,{images:ie,altText:h.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__content`),children:[h.slugUrl?_.jsx("a",{href:h.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${h.name}`,children:h.name}):_.jsx("p",{className:F(t,`${k}-msg-pdp__title`),children:h.name}),_.jsx(sh,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:le==null?void 0:le.orig,discountPrice:(le==null?void 0:le.cur)||(le==null?void 0:le.prom),currencyCode:h.ccy,fontSize:"14px"}),h.dscr&&_.jsx("div",{className:F(t,`${k}-msg-pdp__description`),children:_.jsx(mo,{globalClassName:t,text:h.dscr})}),z&&Ke(z),oe.map(je),r&&_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:N})]}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__stepper`),children:[_.jsx(ar,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(XC,{}),disabled:P,onClick:ge}),_.jsx("span",{className:F(t,`${k}-msg-pdp__quantity`),children:N}),_.jsx(ar,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(QC,{}),disabled:Ae,onClick:Le})]})]}),r&&_.jsxs("div",{className:F(t,`${k}-msg-pdp__actions`),children:[W&&_.jsx(mx,{expressPaymentUrl:W,globalClassName:t,onOrderComplete:re},W),_.jsx(tl,{className:`${k}-msg-pdp__add-to-cart`,disabled:!b||u||U,onClick:J,children:U?"Adding...":"Add to cart"})]})]})]})})},hF=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},mF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=d?l.ProductComparison:void 0;if(h){const b={name:"ProductComparison",payload:{products:e,table:t},api:f};return _.jsx(yo,{tagName:h,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,`${k}-product-comparison`),children:_.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:m,minWidth:x},children:[_.jsxs("div",{className:`${k}-product-comparison__header`,children:[_.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(b=>{var A,w,N,I;const v=hF(b);return _.jsxs("div",{className:F(n,`${k}-product-comparison__product-col`),children:[v&&_.jsx("img",{className:F(n,`${k}-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,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${b.name}`,children:b.name}):_.jsx("span",{className:F(n,`${k}-product-comparison__name`),children:b.name}),_.jsx(sh,{globalClassName:n,retailPrice:(A=b.pr)==null?void 0:A.orig,discountPrice:(I=(w=b.pr)==null?void 0:w.prom)!=null?I:(N=b.pr)==null?void 0:N.cur,currencyCode:b.ccy,fontSize:"0.875rem"})]},b.id)})]}),_.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(b=>_.jsxs("div",{className:`${k}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${k}-product-comparison__row-label`),children:b.row_name}),e.map((v,A)=>_.jsx("div",{className:F(n,`${k}-product-comparison__row-value`),children:b.values[A]},`${b.row_name}-${v.id}`))]},b.row_name))}),s&&_.jsxs("div",{className:`${k}-product-comparison__footer`,children:[_.jsx("div",{className:`${k}-product-comparison__footer-spacer`}),e.map(b=>_.jsx("div",{className:F(n,`${k}-product-comparison__footer-cell`),children:_.jsxs(tl,{className:`${k}-product-comparison__add-to-cart`,disabled:u,onClick:y(b),children:[_.jsx(rN,{size:"14px"}),"Add to cart"]})},`cart-${b.id}`))]})]})})},xx=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:l}=an(),{isCartMgmtSupported:d,logger:f}=ct(),{overrides:h,isInitialized:m}=go(),x=Eo(),y=D.useMemo(()=>e.response.map(b=>{var A,w;if(b.type!=="markdown")return b;const v=Sg((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,N,I,U,G,L,V,ie,le,z,oe,te,fe,pe,de,we,ce,W,re,C,M,J,P,Ae;switch(b.type){case"markdown":{const ke=(w=(A=b.data)==null?void 0:A.content)!=null?w:"";return b.index===qi&&vg(ke)?null:_.jsx(mo,{text:ke,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${b.type}-${(N=b.index)!=null?N:v}`)}case"product_carousel":return _.jsx(z9,{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(pF,{product:b.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(ie=b.index)!=null?ie:v}`);case"product_comparison":return _.jsx(mF,{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 ke=(we=(de=(pe=b.data)==null?void 0:pe.cart)==null?void 0:de.cartSummary)==null?void 0:we.cartDetails;return ke?_.jsx(Z9,{cart:ke,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 ke=(re=(W=b.data)==null?void 0:W.order)==null?void 0:re.orderDetails;return ke?_.jsx(nF,{order:ke,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${b.type}-${(C=b.index)!=null?C:v}`):null}case"tool_results":{const ke=b.data,ge=b.output_name,Le=m&&ge&&Object.prototype.hasOwnProperty.call(h,ge)?h[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(h),payload:ke}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:ke})),null;const Ke={name:ge,payload:ke,api:x};return _.jsx(F9,{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(y8,{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 _x 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,`${k}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const gF=({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=Sg(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,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${k}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${k}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${k}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(oN,{})}),_.jsx("p",{className:F(t,`${k}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${k}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${k}-message-group-child`,children:a?_.jsx(_x,{globalClassName:t,children:_.jsx(xx,{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,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${k}-reset-message`),children:e.content})})}},EF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${k}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${k}-retry-button`),onClick:t,children:[_.jsx(dN,{"aria-hidden":"true"})," Retry"]})]}),yF="You are offline or we couldn't reach the assistant. Check connection and try again.",Th=({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:h,error:m,sendError:x,retryLastMessage:y,retryConnection:b}=an(),v=D.useRef(null),A=a.length>0,w=u.some(IA),N=a[a.length-1],I=N?OA(N.content,"suggestions"):!1,U=A&&(d||l)&&!w&&!I,G=h==="reconnecting"&&!U,L=h==="error";let V=null;L?V={message:m!=null?m:yF,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(w8,{globalClassName:t,isWidgetStandalone:e}),a.map(te=>_.jsx(gF,{message:te,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},te.id)),V&&_.jsx(EF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),w&&_.jsxs("div",{className:F(t,`${k}-message-group`,e?"standalone":"embedded"),children:[_.jsx(_x,{globalClassName:t,children:_.jsx(xx,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&_.jsx(oh,{globalClassName:t,isWidgetStandalone:e})]}),U&&_.jsx(oh,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),G&&_.jsx(oh,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},TF=()=>_.jsxs("svg",{className:`${k}-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"})]}),bF=()=>_.jsx("svg",{className:`${k}-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"})}),xF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),bh=({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=xF(s,t),f=u?a.ProgressSteps:void 0;if(f){const h={name:"ProgressSteps",payload:{steps:d},api:l};return _.jsx(yo,{tagName:f,props:h,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${k}-progress-steps-panel`),children:_.jsx("div",{className:`${k}-progress-steps`,children:_.jsx("ul",{className:`${k}-progress-steps-list`,children:d.map((h,m)=>{const x=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${k}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${k}-progress-step-arc`}),_.jsx("span",{className:`${k}-progress-step-text`,children:h}),_.jsx("span",{className:F(`${k}-progress-step-icon`,x?"done":"active"),children:x?_.jsx(TF,{}):_.jsx(bF,{})})]},`${m}-${h}`)})})})})},wx=()=>{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,`${k}-container`,`${k}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${k}-message-container`,`container-${n}`,"embedded"),children:_.jsx(Th,{isWidgetStandalone:!1})}),_.jsx(bh,{steps:l,globalClassName:e}),_.jsx(up,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:h=>a(h)}),_.jsx("div",{className:F(`${k}-embedded-chat-menu`),children:_.jsxs(bD,{componentType:"chat",children:[_.jsx(Bb,{componentType:"chat"}),_.jsx(qy,{componentType:"chat",onClearChat:u}),r&&_.jsx(Yy,{componentType:"chat",onDownloadTranscript:d})]})})]})},Sx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=D.useState((d=e.container)==null?void 0:d.current),a=D.useSyncExternalStore(wF,()=>!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:_F(u);return _.jsx(_.Fragment,{children:D.Children.map(t,f=>Bs.createPortal(f,l))})},_F=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return is(n)?n:Ar(t).body},wF=()=>()=>{},vx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ai(),{loading:d,isAgentTyping:f,sendMessage:h,resetConversation:m,progressSteps:x,downloadTranscript:y}=an(),{isOpen:b}=s||{},v=!!s.isOpen,A=r==="standalone",w=f||d,N=()=>{jr(!1)};return v?_.jsx(Ob,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(Sx,{children:_.jsx(th,{className:F(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:j(j({},t),l&&{width:l}),children:_.jsxs(Zp,{className:F(e,`${k}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(Db,{componentType:"dialog",onClearChat:m,onClose:N,onDownloadTranscript:y}),_.jsx(eh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(Th,{isWidgetStandalone:A,isOpen:b})}),_.jsx(bh,{steps:x,globalClassName:e}),_.jsx(up,{componentType:"dialog",isLoading:w,onSubmit:I=>h(I)})]})})})}):null},Ax=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,isModalFullscreen:a}=ai(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:h,downloadTranscript:m}=an(),{isOpen:x}=s||{},y=!!s.isOpen,b=r==="standalone",v=l||u,A=({open:N})=>{jr(N)},w=()=>{jr(!1)};return y?_.jsx(Ob,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(Sx,{children:_.jsxs("div",{className:F(e,`${k}-modal-container`),style:t,children:[_.jsx(vb,{className:F(e,`${k}-modal-backdrop`)}),_.jsx(th,{className:F(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:_.jsxs(Zp,{className:F(e,`${k}-modal-content`,{standalone:b,embedded:!b}),children:[_.jsx(Db,{componentType:"modal",onClearChat:f,onClose:w,onDownloadTranscript:m}),_.jsx(eh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:_.jsx(Th,{isWidgetStandalone:b,isOpen:x})}),_.jsx(bh,{steps:h,globalClassName:e}),_.jsx(up,{componentType:"modal",isLoading:v,onSubmit:N=>d(N)})]})})]})})}):null},SF=()=>{const e=ai(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(eN,{}):t==="dialog"?_.jsx(vx,{}):t==="modal"?_.jsx(Ax,{}):_.jsx(wx,{})},vF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=d8();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 s8(a),()=>{o8(a)}},[e,t,n,r,s])},Cx=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function AF({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?Cx(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})=>Cx(a.current,d,f))}},[e]),D.useEffect(()=>{t&&(r.current=[])},[t]),u}const Nx={copilot:"Ask Copilot",messaging:"Ask a question"},CF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ct(),{placeholder:s,isResponseLoading:a}=Ql(),u=s||Nx[r],[l,d]=D.useState(""),f=t||a,h=m=>{const x=l.trim();x&&(m.preventDefault(),e(x),d(""))};return _.jsxs("form",{className:F(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:h,children:[_.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:_.jsx(Vp,{className:F(n,`${k}-prompts-input-icon`)})}),_.jsx("input",{id:`${k}-prompts-input`,className:F(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(ar,{className:F(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(hf,{}),disabled:f})]})},NF=()=>{const{globalClassName:e,mode:t}=ct(),{placeholder:n}=Ql(),r=n||Nx[t];return _.jsxs("div",{className:F(e,`${k}-prompts-header`),children:[_.jsx(Vp,{className:F(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${k}-prompts-header-text`),children:r})]})},kx=({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,`${k}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Fb,{icon:a,className:`${k}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},kF="Ask me something else",OF=({label:e,disabled:t=!1})=>_.jsx(kx,{label:e||kF,disabled:t,onClick:()=>jr(!0)}),IF=({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 h=f.trim();h&&e(h)};return _.jsxs("div",{className:F(n,`${k}-prompts-button-group`),children:[l.map(f=>_.jsx(kx,{label:f,disabled:t,onClick:d(f)},f)),!u&&_.jsx(OF,{label:a,disabled:t})]})},PF=()=>{const{globalClassName:e,themeVariables:t}=ct(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Ql(),{isConnected:u,sendMessage:l,connectionStatus:d}=an(),{productId:f}=c8(),h=s!=="buttons",m=s!=="input",[x,y]=D.useState(null),b=d==="error",v=d==="connecting",A=AF({isReady:u,hasError:b,transmit:l});D.useEffect(()=>{if(!r||x)return;const N=document.getElementById(r);N&&y(N)},[r,x]);const w=D.useCallback(N=>{jr(!0);const I=(a||[]).includes(N.trim());if(f&&I){A(`${N} (Viewing product details for: ${f})`,{displayContent:N});return}A(N)},[A,a,f]);return!n||!x?null:Bs.createPortal(_.jsxs("div",{className:F(e,`${k}-prompts-extension-container`),style:t,children:[h&&_.jsx(CF,{onSubmit:w,disabled:b}),!h&&_.jsx(NF,{}),m&&_.jsx(IF,{onPromptClick:w,disabled:b}),!b&&v&&_.jsx("p",{className:F(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&_.jsx("p",{className:F(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),x)},RF=()=>(vF(),_.jsx(PF,{})),Ox=e=>_.jsxs(Kg,ue(j({},e),{children:[_.jsx(SF,{}),_.jsx(RF,{})]}));var nc={},Ix;function LF(){if(Ix)return nc;Ix=1;var e=n1();return nc.createRoot=e.createRoot,nc.hydrateRoot=e.hydrateRoot,nc}var DF=LF();const Px=(e,t,n,r)=>{DF.createRoot(e).render(_.jsx(Ox,ue(j({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},MF=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=(h,m)=>{for(const x of h)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),Px(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},FF=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"),MF(j({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Px(l,s,n,r)};class BF 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 UF={components:{setEntryType:L0,toggleWidgetOpen:jr,toggleWidgetMinimized:Ou,toggleModalFullscreen:Id,setWidgetType:Iu,setWidgetDialogPosition:Pd,loadPromptsComponent:l8,togglePromptsExtensionOpen:Lb}};Me.AgentForceWidget=Ox,Me.AgentforceWidgetProvider=Kg,Me.CIMULATE_WIDGET_READY_EVENT=R0,Me.MessagingDialog=vx,Me.MessagingEmbed=wx,Me.MessagingModal=Ax,Me.MessagingProvider=Rg,Me.OverrideElement=BF,Me.eventHandlers=UF,Me.injectMessagingWidget=FF,Me.useMessaging=an,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));
|
|
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}Gb.peek=vM;function Gb(e){return e.value||""}function vM(){return"<"}Xb.peek=AM;function Xb(e,t,n,r){const s=ch(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 AM(){return"!"}Qb.peek=CM;function Qb(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 h=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=h,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function CM(){return"!"}Kb.peek=NM;function Kb(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 NM(){return"`"}function Jb(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))}Zb.peek=kM;function Zb(e,t,n,r){const s=ch(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Jb(e,n)){const h=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=h,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 kM(e,t,n){return Jb(e,n)?"<":"["}e_.peek=OM;function e_(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 h=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=h,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function OM(){return"["}function dh(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 IM(e){const t=dh(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 PM(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 t_(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 RM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?PM(n):dh(n);const l=e.ordered?u==="."?")":".":IM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&h&&(!h.children||!h.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),t_(n)===u&&h){let m=-1;for(;++m<e.children.length;){const _=e.children[m];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.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 LM(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 DM(e,t,n,r){const s=LM(n);let a=n.bulletCurrent||dh(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()),h);return d(),f;function h(m,_,y){return _?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function MM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const FM=fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function BM(e,t,n,r){return(e.children.some(function(u){return FM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function UM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}n_.peek=HM;function n_(e,t,n,r){const s=UM(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),h=Jl(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Ba(f)+d.slice(1));const m=d.charCodeAt(d.length-1),_=Jl(r.after.charCodeAt(0),m,s);_.inside&&(d=d.slice(0,-1)+Ba(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:_.outside,before:h.outside},l+d+y}function HM(e,t,n){return n.options.strong||"*"}function jM(e,t,n,r){return n.safe(e.value,r)}function $M(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 zM(e,t,n){const r=(t_(n)+(n.options.ruleSpaces?" ":"")).repeat($M(n));return n.options.ruleSpaces?r.slice(0,-1):r}const r_={blockquote:fM,break:Yb,code:yM,definition:bM,emphasis:Wb,hardBreak:Yb,heading:SM,html:Gb,image:Xb,imageReference:Qb,inlineCode:Kb,link:Zb,linkReference:e_,list:RM,listItem:DM,paragraph:MM,root:BM,strong:n_,text:jM,thematicBreak:zM};function VM(){return{enter:{table:qM,tableData:i_,tableHeader:i_,tableRow:WM},exit:{codeText:GM,table:YM,tableData:fh,tableHeader:fh,tableRow:fh}}}function qM(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 YM(e){this.exit(e),this.data.inTable=void 0}function WM(e){this.enter({type:"tableRow",children:[]},e)}function fh(e){this.exit(e)}function i_(e){this.enter({type:"tableCell",children:[]},e)}function GM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function XM(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:_,table:u,tableCell:d,tableRow:l}};function u(y,b,v,A){return f(h(y,v,A),y.align)}function l(y,b,v,A){const w=m(y,v,A),N=f([w]);return N.slice(0,N.indexOf(`
|
|
52
|
+
`))}function d(y,b,v,A){const w=v.enter("tableCell"),N=v.enter("phrasing"),I=v.containerPhrasing(y,ue(j({},A),{before:a,after:a}));return N(),w(),I}function f(y,b){return cM(y,{align:b,alignDelimiters:r,padding:n,stringLength:s})}function h(y,b,v){const A=y.children;let w=-1;const N=[],I=b.enter("table");for(;++w<A.length;)N[w]=m(A[w],b,v);return I(),N}function m(y,b,v){const A=y.children;let w=-1;const N=[],I=b.enter("tableRow");for(;++w<A.length;)N[w]=d(A[w],y,b,v);return I(),N}function _(y,b,v){let A=r_.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function KM(){return{exit:{taskListCheckValueChecked:s_,taskListCheckValueUnchecked:s_,paragraph:ZM}}}function JM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:e9}}}function s_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ZM(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 e9(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=r_.listItem(e,t,n,j(j({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+u}}function t9(){return[R8(),eM(),iM(),VM(),KM()]}function n9(e){return{extensions:[L8(),tM(e),sM(),QM(e),JM()]}}const r9={tokenize:l9,partial:!0},o_={tokenize:c9,partial:!0},a_={tokenize:d9,partial:!0},u_={tokenize:f9,partial:!0},i9={tokenize:p9,partial:!0},l_={name:"wwwAutolink",tokenize:a9,previous:d_},c_={name:"protocolAutolink",tokenize:u9,previous:f_},Gr={name:"emailAutolink",tokenize:o9,previous:p_},Rr={};function s9(){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,c_],Rr[104]=[Gr,c_],Rr[87]=[Gr,l_],Rr[119]=[Gr,l_];function o9(e,t,n){const r=this;let s,a;return u;function u(m){return!ph(m)||!p_.call(r,r.previous)||hh(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ph(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(i9,h,f)(m):m===45||m===95||ln(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function a9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!d_.call(r,r.previous)||hh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(r9,e.attempt(o_,e.attempt(a_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function u9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&f_.call(r,r.previous)&&!hh(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 _=s.toLowerCase();if(_==="http"||_==="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(o_,e.attempt(a_,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function l9(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 c9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(u_,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 d9(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(u_,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 f9(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 p9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ln(a)?n(a):t(a)}}function d_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function f_(e){return!En(e)}function p_(e){return!(e===47||ph(e))}function ph(e){return e===43||e===45||e===46||e===95||ln(e)}function hh(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 h9={tokenize:x9,partial:!0};function m9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:T9,continuation:{tokenize:b9},exit:_9}},text:{91:{name:"gfmFootnoteCall",tokenize:y9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:g9,resolveTo:E9}}}}function g9(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 E9(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 y9(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 _=e.exit("gfmFootnoteCallString");return s.includes(ur(r.sliceSerialize(_)))?(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?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function T9(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",h):n(b)}function h(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"),_}return gt(b)||(l=!0),u++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,h):h(b)}function _(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 b9(e,t,n){return e.check(ca,t,e.attempt(h9,t,n))}function _9(e){e.exit("gfmFootnoteDefinition")}function x9(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 w9(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 h={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)},_=[["enter",h,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Un(_,_.length,0,ol(y,u.slice(f+1,d),l)),Un(_,_.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",h,l]]),Un(u,f-1,d-f+3,_),d=f+_.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,h=this.events;let m=0;return _;function _(b){return f===126&&h[h.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 S9{constructor(){this.map=[]}add(t,n,r){v9(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 v9(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 A9(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 C9(){return{flow:{null:{name:"table",tokenize:N9,resolveAll:k9}}}}function N9(e,t,n){const r=this;let s=0,a=0,u;return l;function l($){let oe=r.events.length-1;for(;oe>-1;){const pe=r.events[oe][1].type;if(pe==="lineEnding"||pe==="linePrefix")oe--;else break}const te=oe>-1?r.events[oe][1].type:null,fe=te==="tableHead"||te==="tableRow"?M:d;return fe===M&&r.parser.lazy[r.now().line]?n($):fe($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),h($)}function h($){return $===null?n($):He($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):nt($)?it(e,h,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,h):(e.enter("data"),m($)))}function m($){return $===null||$===124||gt($)?(e.exit("data"),h($)):(e.consume($),$===92?_:m)}function _($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,nt($)?it(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):b($))}function b($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):G($)}function v($){return nt($)?it(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),w):$===45?(a+=1,w($)):$===null||He($)?U($):G($)}function w($){return $===45?(e.enter("tableDelimiterFiller"),N($)):G($)}function N($){return $===45?(e.consume($),N):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I($))}function I($){return nt($)?it(e,U,"whitespace")($):U($)}function U($){return $===124?b($):$===null||He($)?!u||s!==a?G($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):G($)}function G($){return n($)}function M($){return e.enter("tableRow"),V($)}function V($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),V):$===null||He($)?(e.exit("tableRow"),t($)):nt($)?it(e,V,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||gt($)?(e.exit("data"),V($)):(e.consume($),$===92?de:ie)}function de($){return $===92||$===124?(e.consume($),ie):ie($)}}function k9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,h,m;const _=new S9;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(l=!1,d!==0&&(h_(_,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},_.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,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},_.add(n,0,[["enter",h,t]])),s=b.type==="tableDelimiterRow"?2:h?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(_,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(_,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(_,t,a,s,n,m)):u[1]!==0&&(m=Zl(_,t,u,s,n,m)),s=0):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&h_(_,t,d,f,h),_.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=A9(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({},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]),h=ho(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const _=t.events[n[2]],y=t.events[n[3]];if(_[1].end=Object.assign({},y[1].end),_[1].type="chunkText",_[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({},ho(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function h_(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 O9={name:"tasklistCheck",tokenize:P9};function I9(){return{text:{91:O9}}}function P9(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:R9},t,n)(d):n(d)}}function R9(e,t,n){return it(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function L9(e){return z1([s9(),m9(),w9(e),C9(),I9()])}const D9={};function M9(e){const t=this,n=e||D9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(L9(n)),a.push(t9()),u.push(n9(n))}const F9=()=>x.jsx("span",{className:`${k}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),mo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(LE,{remarkPlugins:[M9],rehypePlugins:[Dy],components:{h1:({children:s})=>x.jsx("h1",{className:F(e,`${k}-header h1`),children:s}),h2:({children:s})=>x.jsx("h2",{className:F(e,`${k}-header h2`),children:s}),h3:({children:s})=>x.jsx("h3",{className:F(e,`${k}-header h3`),children:s}),ul:({children:s})=>x.jsx("ul",{className:F(e,`${k}-ul`),children:s}),ol:({children:s})=>x.jsx("ol",{className:F(e,`${k}-ol`),children:s}),li:({children:s})=>x.jsx("li",{className:F(e,`${k}-li`),children:s}),a:({href:s,children:a})=>x.jsx($y,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>x.jsx("div",{className:F(e,`${k}-table-container`),children:x.jsx("table",{className:F(e,`${k}-table`),children:s})}),thead:({children:s})=>x.jsx("thead",{className:F(e,`${k}-thead`),children:s}),tbody:({children:s})=>x.jsx("tbody",{className:F(e,`${k}-tbody`),children:s}),tr:({children:s})=>x.jsx("tr",{className:F(e,`${k}-tr`),children:s}),th:({children:s})=>x.jsx("th",{className:F(e,`${k}-th`),children:s}),td:({children:s})=>x.jsx("td",{className:F(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?x.jsx(F9,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")}),go=()=>L.useContext(Qg),Eo=()=>{const{sendMessage:e,loading:t,isConnected:n}=an(),{mode:r,status:s}=ai();return L.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function B9(e){return e.includes("-")&&e===e.toLowerCase()}function yo({tagName:e,props:t,label:n}){const r=L.useRef(null),s=L.useRef(null),a=L.useRef(e),u=L.useRef(null);return L.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!B9(e)){u.current!==e&&(u.current=e,_t(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const h=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(h)?f:null}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),L.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),x.jsx("div",{ref:r,"data-override":n||"custom"})}class U9 extends L.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function H9(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 j9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=an();return x.jsx("div",{className:F(t,`${k}-msg-product-card__image-wrapper`),children:e?n?x.jsx("button",{type:"button",className:F(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:x.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?x.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:x.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):x.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):x.jsx("div",{className:F(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:x.jsx(H9,{"aria-hidden":"true"})})})},$9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=an();return n?x.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?x.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):x.jsx("p",{className:F(t,`${k}-msg-product-card__title`),children:e})},z9=({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(),h=Eo(),m=l?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:h};return x.jsx(yo,{tagName:m,props:$,label:"ProductTile"})}const{id:_,name:y,imageUrl:b,description:v,productPageUrl:A,price:w,priceBreakdown:N,discountPrice:I,listPrice:U,currencyCode:G}=e,M=I!=null?I:w,V=y8({priceBreakdown:N,currencyCode:G}),ie=()=>{if(f)return;const $=y||"this product",oe=_?` [SKU: ${_}]`:"";d(`Show me details for ${$}${oe}`)},de=r?`View details for ${y}`:`Go to product page for ${y}`;return x.jsxs("div",{className:F(t,`${k}-msg-product-card`),children:[x.jsx(j9,{imageUrl:b||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,name:y,showInWidgetDetails:ie}),x.jsxs("div",{className:F(t,`${k}-msg-product-card__content`),children:[x.jsxs("div",{className:F(t,`${k}-msg-product-card__content-header`),children:[x.jsx($9,{name:y||_,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,showInWidgetDetails:ie}),a&&v&&x.jsx("div",{className:F(t,`${k}-msg-product-card__description`),title:v,children:x.jsx(mo,{globalClassName:t,text:v})})]}),x.jsx("div",{className:F(t,`${k}-msg-product-card__price-row`),children:V?x.jsx("span",{className:F(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):x.jsx(sh,{globalClassName:t,retailPrice:U,discountPrice:M,currencyCode:G})})]})]})},V9=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}},q9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ct(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=d?l.ProductCarousel:void 0;if(h){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return x.jsx(yo,{tagName:h,props:m,label:"ProductCarousel"})}return x.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&x.jsx("p",{className:F(n,`${k}-product-carousel-title`),children:e}),x.jsx(HD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>x.jsxs("div",{className:F(n,`${k}-product-carousel-item`),children:[x.jsx(z9,{product:V9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&x.jsx("p",{className:F(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},mh=44,Y9=400,W9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?mh:Math.min(Math.max(Math.round(t),mh),Y9)},G9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},X9="parentOrigin",Q9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(X9,t),n.toString()}catch(n){return e}},K9=(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}},m_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=L.useRef(null),[s,a]=L.useState(!1),[u,l]=L.useState(mh),d=typeof window!="undefined"?window.location.origin:"",f=Q9(e,d),h=G9(e);return L.useEffect(()=>{const m=_=>{var b,v,A;if(h&&_.origin!==h||r.current&&_.source!==r.current.contentWindow)return;const y=_.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(W9((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)},[h,n]),x.jsx("div",{className:F(t,`${k}-cart-express`,{[`${k}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:x.jsx("iframe",{ref:r,className:F(t,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},ec=({code:e,globalClassName:t,inactive:n})=>x.jsxs("span",{className:F(t,`${k}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[x.jsx(d1,{"aria-hidden":"true"}),x.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?-Math.abs(n):n,r);else if(l)f=l;else return null;return x.jsxs("div",{className:F(s,`${k}-cart-total-row`,{emphasized:a}),children:[x.jsxs("span",{className:F(s,`${k}-cart-total-label`),children:[e,t&&x.jsx("span",{className:F(s,`${k}-cart-total-badge`),children:t})]}),x.jsx("span",{className:F(s,`${k}-cart-total-value`),children:d?x.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):f})]})};function gh(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Eh(e){return(e!=null?e:[]).map(gh).filter(t=>t!==null)}function g_(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function J9(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=gh(a),l=g_(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=gh(a);if(u===null)continue;const l=(s=g_(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function E_(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>Eh(s.coupons)).map(s=>s.toLowerCase()));return J9(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const Z9=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=L.useState(e.toString());L.useEffect(()=>{u(e.toString())},[e]);const l=h=>{if(n)return;const m=h.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const h=parseInt(a,10);!n&&!isNaN(h)&&h>0&&h!==e?s(h):u(e.toString())},f=h=>{h.key==="Enter"&&(h.preventDefault(),d())};return x.jsx("div",{className:F(r,`${k}-cart-qty-input-wrapper`),children:t?x.jsx(oN,{className:F(r,`${k}-cart-qty-spinner`),"aria-hidden":"true"}):x.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(r,`${k}-cart-qty-input`),value:a,disabled:n,onChange:l,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},eF=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,h;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=Eh(e.coupons);return x.jsxs("li",{className:F(s,`${k}-cart-item`),children:[e.imageUrl&&x.jsx("div",{className:F(s,`${k}-cart-item-image`),children:x.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),x.jsxs("div",{className:F(s,`${k}-cart-item-details`),children:[x.jsx("p",{className:F(s,`${k}-cart-item-name`),children:e.name}),x.jsxs("div",{className:F(s,`${k}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>x.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((h=e.promotions)!=null?h:[]).map(m=>x.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&x.jsx("div",{className:F(s,`${k}-cart-chips`),children:d.map(m=>x.jsx(ec,{code:m,globalClassName:s},m))}),x.jsx("span",{className:F(s,`${k}-cart-item-price`),children:n?x.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):x.jsxs(x.Fragment,{children:[l&&x.jsx("span",{className:F(s,`${k}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),x.jsx("span",{className:F(s,`${k}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]})}),x.jsxs("div",{className:F(s,`${k}-cart-item-footer`),children:[x.jsx("span",{className:F(s,`${k}-cart-qty-heading`),children:"Quantity"}),x.jsx(Z9,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),x.jsx("button",{type:"button",className:F(s,`${k}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},tF=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=an(),[l,d]=L.useState(!1),[f,h]=L.useState(""),[m,_]=L.useState(null),y=a||u,{items:b=[],currencyCode:v="USD",subtotal:A,total:w,taxes:N,shippingCost:I,shippingDiscount:U,shippingPromotions:G=[],promotionsDiscount:M,promotions:V=[],couponsDiscount:ie,bodyMessage:de,footerMessage:$,checkoutButtonUrl:oe,expressPaymentUrl:te}=e,fe=E_(b,e.couponsApplied,e.coupons),pe=W=>{y||s(`Remove ${W.name} from my cart`)},ce=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||(_(W.itemId),s(`Update ${W.name} quantity to ${re}`,{silent:!0,reconcileMessageId:t}).then(C=>{C.outcome==="success"?setTimeout(()=>_(null),300):_(null)}))},le=()=>{const W=f.trim();!W||y||(s(`Apply coupon code ${W}`),h(""))};return x.jsxs("div",{className:F(n,`${k}-cart`),children:[x.jsxs("div",{className:F(n,`${k}-cart-box`),children:[de&&x.jsxs("button",{type:"button",className:F(n,`${k}-cart-summary`),"aria-expanded":l,onClick:()=>d(W=>!W),children:[x.jsx("span",{className:F(n,`${k}-cart-summary-text`),children:x.jsx(mo,{text:de,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),x.jsx("span",{className:F(n,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:l?x.jsx(l1,{}):x.jsx(c1,{})})]}),l&&x.jsxs("div",{className:F(n,`${k}-cart-expanded`),children:[x.jsxs("div",{className:F(n,`${k}-cart-items-section`),children:[x.jsx("ul",{className:F(n,`${k}-cart-items`),children:b.map(W=>x.jsx(eF,{item:W,currencyCode:v,loading:m===W.itemId,disabled:y||m===W.itemId,globalClassName:n,onRemove:pe,onQuantityChange:we},W.itemId))}),fe.length>0&&x.jsx("div",{className:F(n,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:fe.map(W=>x.jsx(ec,{code:W.code,inactive:!W.applied,globalClassName:n},W.code))})]}),x.jsxs("div",{className:F(n,`${k}-cart-totals`),children:[x.jsx(On,{label:"Subtotal",value:A,currencyCode:v,globalClassName:n,loading:!!m}),x.jsx(On,{label:"Coupon",value:ie,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),x.jsx(On,{label:"Promotions",badge:V[0],value:M,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),x.jsx(On,{label:"Shipping",value:I,currencyCode:v,globalClassName:n,fallback:"TBD",loading:!!m}),x.jsx(On,{label:"Shipping Discount",badge:G[0],value:U,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),x.jsx(On,{label:"Tax",value:N,currencyCode:v,globalClassName:n,fallback:"TBD",loading:!!m}),x.jsx(On,{label:"Total",value:w,currencyCode:v,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),x.jsxs("div",{className:F(n,`${k}-cart-coupon`),children:[x.jsxs("div",{className:F(n,`${k}-cart-coupon-field`),children:[x.jsx("span",{className:F(n,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:x.jsx(d1,{})}),x.jsx("input",{type:"text",className:F(n,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:W=>h(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),le())}})]}),x.jsx("button",{type:"button",className:F(n,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:le,children:x.jsx(lN,{"aria-hidden":"true"})})]}),te&&x.jsx(m_,{expressPaymentUrl:te,globalClassName:n,onOrderComplete:ce}),oe&&x.jsxs("a",{className:F(n,`${k}-cart-checkout-button`),href:oe,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[x.jsx(aN,{"aria-hidden":"true"}),x.jsx("span",{children:"Checkout"})]}),x.jsx("p",{className:F(n,`${k}-cart-footer`),children:$||"Shipping and taxes calculated at checkout."})]})},nF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Eh(e.coupons);return x.jsxs("li",{className:F(n,`${k}-cart-item`),children:[e.imageUrl&&x.jsx("div",{className:F(n,`${k}-cart-item-image`),children:x.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),x.jsxs("div",{className:F(n,`${k}-cart-item-details`),children:[x.jsx("p",{className:F(n,`${k}-cart-item-name`),children:e.name}),x.jsxs("div",{className:F(n,`${k}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>x.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>x.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&x.jsx("div",{className:F(n,`${k}-cart-chips`),children:s.map(l=>x.jsx(ec,{code:l,globalClassName:n},l))}),x.jsxs("span",{className:F(n,`${k}-cart-item-price`),children:[r&&x.jsx("span",{className:F(n,`${k}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),x.jsx("span",{className:F(n,`${k}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]}),x.jsx("div",{className:F(n,`${k}-cart-item-footer`),children:x.jsxs("span",{className:F(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},rF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},iF=({order:e,globalClassName:t})=>{const[n,r]=L.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:h,shippingCost:m,shippingDiscount:_,shippingPromotions:y=[],promotionsDiscount:b,promotions:v=[],couponsDiscount:A,bodyMessage:w,footerMessage:N}=e,I=E_(u,e.couponsApplied);return x.jsxs("div",{className:F(t,`${k}-cart`),children:[x.jsxs("div",{className:F(t,`${k}-cart-banner`),children:[x.jsx("span",{className:F(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:x.jsx(cN,{})}),x.jsx("p",{className:F(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),x.jsxs("div",{className:F(t,`${k}-order-confirmation-meta`),children:[x.jsxs("span",{children:["Order No: ",s]}),x.jsxs("span",{children:["Ordered On: ",rF(a)]})]}),x.jsxs("div",{className:F(t,`${k}-cart-box`),children:[w&&x.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(U=>!U),children:[x.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:x.jsx(mo,{text:w,globalClassName:t,showIsLoading:!1})}),x.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?x.jsx(l1,{}):x.jsx(c1,{})})]}),n&&x.jsxs("div",{className:F(t,`${k}-cart-expanded`),children:[x.jsx("ul",{className:F(t,`${k}-cart-items`),children:u.map(U=>x.jsx(nF,{item:U,currencyCode:l,globalClassName:t},U.itemId))}),I.length>0&&x.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:I.map(U=>x.jsx(ec,{code:U.code,globalClassName:t},U.code))}),x.jsxs("div",{className:F(t,`${k}-cart-totals`),children:[x.jsx(On,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),x.jsx(On,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),x.jsx(On,{label:"Promotions",badge:v[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),x.jsx(On,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),x.jsx(On,{label:"Shipping Discount",badge:y[0],value:_,currencyCode:l,globalClassName:t,isDiscount:!0}),x.jsx(On,{label:"Tax",value:h,currencyCode:l,globalClassName:t,fallback:"TBD"}),x.jsx(On,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),x.jsx("p",{className:F(t,`${k}-cart-footer`),children:N||"Shipping and taxes calculated at checkout."})]})},sF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=L.useState(e.src),[a,u]=L.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return x.jsx("img",{className:F(n,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},oF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return x.jsxs(Jp,{className:F(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[x.jsx(Xp,{className:F(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>x.jsx(Gp,{index:a,className:F(n,`${k}-pdp-gallery__item`),children:x.jsx(sF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&x.jsxs(qp,{className:F(n,`${k}-pdp-gallery__control`),children:[x.jsx(Kp,{className:F(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:x.jsx(fb,{size:"16px"})}),x.jsx(Qp,{className:F(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:x.jsx(pb,{size:"16px"})})]}),r&&x.jsx(Wp,{className:F(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>x.jsx(Yp,{index:a,className:F(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ua="color",yh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,aF=e=>e.replace(/(^|\/)large\//,"$1medium/"),y_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ua&&n.vals.includes(t)),T_=(e,t)=>{const n=aF(t),r=yh(e,n);return n===t?{src:r}:{src:r,fallbackSrc:yh(e,t)}},uF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>y_(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=>T_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[T_(e.baseUrl,e.imageUrl)]:[]},lF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&y_(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?yh(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,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),cF=(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]}))},dF=(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,h])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===h})});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})},b_=(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,h])=>{var m;return((m=d.vars)==null?void 0:m[f])===h}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},fF=(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},pF=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},hF=300,mF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var ht,Ot,Ut,yn,Tn,Lt,Be;const{addToCart:s,sendMessage:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=e.data,m=(ht=h.vattr)!=null?ht:[],[_,y]=L.useState(()=>pF(h)),b=cF(h.vmat,_),v=(Ut=(Ot=h.quantity)==null?void 0:Ot.minQuantity)!=null?Ut:1,A=(Tn=(yn=h.quantity)==null?void 0:yn.maxQuantity)!=null?Tn:Number.POSITIVE_INFINITY,w=(Be=(Lt=h.quantity)==null?void 0:Lt.increment)!=null?Be:1,[N,I]=L.useState(v),[U,G]=L.useState(!1),M=L.useRef(!1);L.useEffect(()=>{U&&(u?M.current=!0:M.current&&(M.current=!1,G(!1)))},[U,u]);const V=_[Ua],ie=L.useMemo(()=>uF(h,V),[h,V]),de=L.useMemo(()=>fF(h,_),[h,_]),$=m.find(Ne=>Ne.id===Ua),oe=m.filter(Ne=>Ne.id!==Ua),te=b_(h,_),[fe,pe]=L.useState(N),ce=L.useRef(te),we=ce.current===te?fe:N;L.useEffect(()=>{if(ce.current!==te){ce.current=te,pe(N);return}const Ne=window.setTimeout(()=>pe(N),hF);return()=>window.clearTimeout(Ne)},[N,te]);const le=N===fe,W=L.useMemo(()=>b&&(ce.current!==te||le)?K9(h.expressPaymentUrl,te,we):null,[h.expressPaymentUrl,te,we,b,le]),re=L.useCallback(Ne=>{a(Ne?`I completed express payment. Show my order confirmation for order ${Ne}.`:"I completed express payment. Show my order confirmation.")},[a]),C=d?l.ProductDetailCard:void 0;if(C){const Ne={name:"ProductDetailCard",payload:e,api:f};return x.jsx(yo,{tagName:C,props:Ne,label:"ProductDetailCard"})}const D=(Ne,We)=>()=>{y(et=>{const se=!tc(h.vmat,Ne,We,et);return Ne===Ua||se?dF(h.vmat,m,Ne,We,et):ue(j({},et),{[Ne]:We})})},J=()=>{if(u)return;const Ne=b_(h,_);if(!Ne)return;const We=m.map(et=>{const se=et.opts.find(Se=>Se.val===_[et.id]);return se?{label:et.lbl||et.id,value:se.name||se.val}:null}).filter(et=>et!==null);G(!0),s({productName:h.name,sku:Ne,quantity:N,variants:We})},P=!b||N-w<v,Ae=!b||N+w>A,ke=Ne=>{var et;const We=_[Ne.id];return(et=Ne.opts.find(se=>se.val===We))==null?void 0:et.name},ge=()=>I(Ne=>Math.max(v,Ne-w)),Le=()=>I(Ne=>Math.min(A,Ne+w)),je=Ne=>x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:Ne.lbl||Ne.id}),ke(Ne)&&x.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:ke(Ne)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__chips`),children:Ne.opts.map(We=>{const et=tc(h.vmat,Ne.id,We.val,_),se=_[Ne.id]===We.val;return x.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[x.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:D(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),x.jsx("span",{children:We.name||We.val})]},We.val)})})]},Ne.id),Ke=Ne=>x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:Ne.lbl||"Color"}),ke(Ne)&&x.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:ke(Ne)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:F(t,`${k}-msg-pdp__swatches`),children:Ne.opts.map(We=>{const et=tc(h.vmat,Ne.id,We.val,_),se=_[Ne.id]===We.val,Se=lF(h,We.val);return Se?x.jsxs("label",{className:F(`${k}-msg-pdp__swatch`,{selected:se,unavailable:!et}),children:[x.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-label":We.name||We.val,"aria-description":et?void 0:"unavailable",onChange:D(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),x.jsx("img",{className:F(t,`${k}-msg-pdp__swatch-image`),src:Se,alt:We.name||We.val,loading:"lazy"})]},We.val):x.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[x.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:D(Ne.id,We.val),className:`${k}-msg-pdp__radio-input`}),x.jsx("span",{children:We.name||We.val})]},We.val)})})]});return x.jsx("div",{className:F(t,`${k}-msg-pdp`),children:x.jsxs("div",{className:F(t,`${k}-msg-pdp__card`),children:[x.jsx("div",{className:F(t,`${k}-msg-pdp__gallery`),children:x.jsx(oF,{images:ie,altText:h.name,globalClassName:t})}),x.jsxs("div",{className:F(t,`${k}-msg-pdp__content`),children:[h.slugUrl?x.jsx("a",{href:h.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${h.name}`,children:h.name}):x.jsx("p",{className:F(t,`${k}-msg-pdp__title`),children:h.name}),x.jsx(sh,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:de==null?void 0:de.orig,discountPrice:(de==null?void 0:de.cur)||(de==null?void 0:de.prom),currencyCode:h.ccy,fontSize:"14px"}),h.dscr&&x.jsx("div",{className:F(t,`${k}-msg-pdp__description`),children:x.jsx(mo,{globalClassName:t,text:h.dscr})}),$&&Ke($),oe.map(je),r&&x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[x.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[x.jsx("span",{className:F(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),x.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:N})]}),x.jsxs("div",{className:F(t,`${k}-msg-pdp__stepper`),children:[x.jsx(ar,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:x.jsx(KC,{}),disabled:P,onClick:ge}),x.jsx("span",{className:F(t,`${k}-msg-pdp__quantity`),children:N}),x.jsx(ar,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:x.jsx(JC,{}),disabled:Ae,onClick:Le})]})]}),r&&x.jsxs("div",{className:F(t,`${k}-msg-pdp__actions`),children:[W&&x.jsx(m_,{expressPaymentUrl:W,globalClassName:t,onOrderComplete:re},W),x.jsx(tl,{className:`${k}-msg-pdp__add-to-cart`,disabled:!b||u||U,onClick:J,children:U?"Adding...":"Add to cart"})]})]})]})})},gF=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},EF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),h=d?l.ProductComparison:void 0;if(h){const b={name:"ProductComparison",payload:{products:e,table:t},api:f};return x.jsx(yo,{tagName:h,props:b,label:"ProductComparison"})}if(!e.length)return null;const m=`auto repeat(${e.length}, 1fr)`,_=`${90+e.length*140}px`,y=b=>()=>{u||a({productName:b.name,sku:b.id})};return x.jsx("div",{className:F(n,`${k}-product-comparison`),children:x.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:m,minWidth:_},children:[x.jsxs("div",{className:`${k}-product-comparison__header`,children:[x.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(b=>{var A,w,N,I;const v=gF(b);return x.jsxs("div",{className:F(n,`${k}-product-comparison__product-col`),children:[v&&x.jsx("img",{className:F(n,`${k}-product-comparison__image`),src:v,alt:b.name||"Product image",loading:"eager"}),b.slugUrl?x.jsx("a",{href:b.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${b.name}`,children:b.name}):x.jsx("span",{className:F(n,`${k}-product-comparison__name`),children:b.name}),x.jsx(sh,{globalClassName:n,retailPrice:(A=b.pr)==null?void 0:A.orig,discountPrice:(I=(w=b.pr)==null?void 0:w.prom)!=null?I:(N=b.pr)==null?void 0:N.cur,currencyCode:b.ccy,fontSize:"0.875rem"})]},b.id)})]}),x.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(b=>x.jsxs("div",{className:`${k}-product-comparison__row`,children:[x.jsx("div",{className:F(n,`${k}-product-comparison__row-label`),children:b.row_name}),e.map((v,A)=>x.jsx("div",{className:F(n,`${k}-product-comparison__row-value`),children:b.values[A]},`${b.row_name}-${v.id}`))]},b.row_name))}),s&&x.jsxs("div",{className:`${k}-product-comparison__footer`,children:[x.jsx("div",{className:`${k}-product-comparison__footer-spacer`}),e.map(b=>x.jsx("div",{className:F(n,`${k}-product-comparison__footer-cell`),children:x.jsxs(tl,{className:`${k}-product-comparison__add-to-cart`,disabled:u,onClick:y(b),children:[x.jsx(sN,{size:"14px"}),"Add to cart"]})},`cart-${b.id}`))]})]})})},__=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:l}=an(),{isCartMgmtSupported:d,logger:f}=ct(),{overrides:h,isInitialized:m}=go(),_=Eo(),y=L.useMemo(()=>e.response.map(b=>{var A,w;if(b.type!=="markdown")return b;const v=Sg((w=(A=b.data)==null?void 0:A.content)!=null?w:"");return v&&v.type!=="markdown"?v:b}),[e.response]);return x.jsx(x.Fragment,{children:y.map((b,v)=>{var A,w,N,I,U,G,M,V,ie,de,$,oe,te,fe,pe,ce,we,le,W,re,C,D,J,P,Ae;switch(b.type){case"markdown":{const ke=(w=(A=b.data)==null?void 0:A.content)!=null?w:"";return b.index===qi&&vg(ke)?null:x.jsx(mo,{text:ke,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${b.type}-${(N=b.index)!=null?N:v}`)}case"product_carousel":return x.jsx(q9,{title:(U=(I=b.data)==null?void 0:I.title)!=null?U:"",products:(M=(G=b.data)==null?void 0:G.products)!=null?M:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(V=b.index)!=null?V:v}`);case"product_tile":return x.jsx(mF,{product:b.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(ie=b.index)!=null?ie:v}`);case"product_comparison":return x.jsx(EF,{products:($=(de=b.data)==null?void 0:de.products)!=null?$:[],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 ke=(we=(ce=(pe=b.data)==null?void 0:pe.cart)==null?void 0:ce.cartSummary)==null?void 0:we.cartDetails;return ke?x.jsx(tF,{cart:ke,messageId:t,productsToHighlight:b.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${b.type}-${(le=b.index)!=null?le:v}`):null}case"order_confirmation":{const ke=(re=(W=b.data)==null?void 0:W.order)==null?void 0:re.orderDetails;return ke?x.jsx(iF,{order:ke,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${b.type}-${(C=b.index)!=null?C:v}`):null}case"tool_results":{const ke=b.data,ge=b.output_name,Le=m&&ge&&Object.prototype.hasOwnProperty.call(h,ge)?h[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(h),payload:ke}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:ke})),null;const Ke={name:ge,payload:ke,api:_};return x.jsx(U9,{overrideName:ge,children:x.jsx(yo,{tagName:je,props:Ke,label:`toolResult:${ge}`})},`${b.type}-${ge}-${(D=b.index)!=null?D:v}`)}case"suggestions":return x.jsx("div",{style:{marginTop:"0.5rem"},children:x.jsx(b8,{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 x_ extends L.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?x.jsx("p",{className:F(this.props.globalClassName,`${k}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const yF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ct(),a=L.useMemo(()=>{if(typeof e.content!="string")return null;const l=$u(e.content);if(l)return l;const d=Sg(e.content);return d?{response:[d]}:null},[e.content]),u=L.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 x.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:x.jsx("div",{className:F(t,`${k}-user-message`,r?"standalone":"embedded"),children:x.jsxs("div",{className:F(t,`${k}-user-message-row`,r?"standalone":"embedded"),children:[x.jsx("span",{className:F(t,`${k}-message-icon user-message-icon`,r?"standalone":"embedded"),children:x.jsx(uN,{})}),x.jsx("p",{className:F(t,`${k}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return x.jsx("div",{className:F(t,`${k}-message-group`,r?"standalone":"embedded"),children:x.jsx("div",{className:`${k}-message-group-child`,children:a?x.jsx(x_,{globalClassName:t,children:x.jsx(__,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):x.jsx(mo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return x.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:x.jsx("p",{className:F(t,`${k}-reset-message`),children:e.content})})}},TF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>x.jsxs("div",{className:F(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[x.jsx("span",{className:F(n,`${k}-send-error-text`),children:e}),x.jsxs("button",{type:"button",className:F(n,`${k}-retry-button`),onClick:t,children:[x.jsx(pN,{"aria-hidden":"true"})," Retry"]})]}),bF="You are offline or we couldn't reach the assistant. Check connection and try again.",Th=({isWidgetStandalone:e})=>{var $,oe;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ct(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:h,error:m,sendError:_,retryLastMessage:y,retryConnection:b}=an(),v=L.useRef(null),A=a.length>0,w=u.some(IA),N=a[a.length-1],I=N?OA(N.content,"suggestions"):!1,U=A&&(d||l)&&!w&&!I,G=h==="reconnecting"&&!U,M=h==="error";let V=null;M?V={message:m!=null?m:bF,kind:"connection",onRetry:b}:_&&(V={message:_.message,kind:"send",onRetry:y}),L.useEffect(()=>{var te;(te=v.current)==null||te.scrollIntoView({behavior:"smooth"})},[]),L.useEffect(()=>{var te;s&&((te=v.current)==null||te.scrollIntoView({behavior:"smooth"}))},[a,u,_,m,s]);const ie=($=V==null?void 0:V.message)!=null?$:null,de=(oe=V==null?void 0:V.kind)!=null?oe:null;return L.useEffect(()=>{ie&&(r==null||r.error("Error message shown to user",{message:ie,kind:de}))},[ie,de,r]),x.jsxs(x.Fragment,{children:[d&&!A&&x.jsx(v8,{globalClassName:t,isWidgetStandalone:e}),a.map(te=>x.jsx(yF,{message:te,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},te.id)),V&&x.jsx(TF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),w&&x.jsxs("div",{className:F(t,`${k}-message-group`,e?"standalone":"embedded"),children:[x.jsx(x_,{globalClassName:t,children:x.jsx(__,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&x.jsx(oh,{globalClassName:t,isWidgetStandalone:e})]}),U&&x.jsx(oh,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),G&&x.jsx(oh,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),x.jsx("div",{ref:v})]})},_F=()=>x.jsxs("svg",{className:`${k}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),xF=()=>x.jsx("svg",{className:`${k}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),wF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),bh=({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=wF(s,t),f=u?a.ProgressSteps:void 0;if(f){const h={name:"ProgressSteps",payload:{steps:d},api:l};return x.jsx(yo,{tagName:f,props:h,label:"ProgressSteps"})}return x.jsx("div",{className:F(n,`${k}-progress-steps-panel`),children:x.jsx("div",{className:`${k}-progress-steps`,children:x.jsx("ul",{className:`${k}-progress-steps-list`,children:d.map((h,m)=>{const _=m<d.length-1,y=m===d.length-1;return x.jsxs("li",{className:F(`${k}-progress-step`,y&&"active"),children:[y&&x.jsx("span",{className:`${k}-progress-step-arc`}),x.jsx("span",{className:`${k}-progress-step-text`,children:h}),x.jsx("span",{className:F(`${k}-progress-step-icon`,_?"done":"active"),children:_?x.jsx(_F,{}):x.jsx(xF,{})})]},`${m}-${h}`)})})})})},w_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ct(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=an(),f=s;return x.jsxs("div",{className:F(e,`${k}-container`,`${k}-embedded-chat`),style:t,children:[x.jsx("div",{className:F(e,`${k}-message-container`,`container-${n}`,"embedded"),children:x.jsx(Th,{isWidgetStandalone:!1})}),x.jsx(bh,{steps:l,globalClassName:e}),x.jsx(up,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:h=>a(h)}),x.jsx("div",{className:F(`${k}-embedded-chat-menu`),children:x.jsxs(xD,{componentType:"chat",children:[x.jsx(Bb,{componentType:"chat"}),x.jsx(qy,{componentType:"chat",onClearChat:u}),r&&x.jsx(Yy,{componentType:"chat",onDownloadTranscript:d})]})})]})},S_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=L.useState((d=e.container)==null?void 0:d.current),a=L.useSyncExternalStore(vF,()=>!1,()=>!0),{getRootNode:u}=Wl();if(L.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const l=r!=null?r:SF(u);return x.jsx(x.Fragment,{children:L.Children.map(t,f=>Bs.createPortal(f,l))})},SF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return is(n)?n:Ar(t).body},vF=()=>()=>{},v_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ai(),{loading:d,isAgentTyping:f,sendMessage:h,resetConversation:m,progressSteps:_,downloadTranscript:y}=an(),{isOpen:b}=s||{},v=!!s.isOpen,A=r==="standalone",w=f||d,N=()=>{jr(!1)};return v?x.jsx(Ob,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:x.jsx(S_,{children:x.jsx(th,{className:F(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:j(j({},t),l&&{width:l}),children:x.jsxs(Zp,{className:F(e,`${k}-dialog-content`,{standalone:A,embedded:!A}),children:[x.jsx(Db,{componentType:"dialog",onClearChat:m,onClose:N,onDownloadTranscript:y}),x.jsx(eh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:x.jsx(Th,{isWidgetStandalone:A,isOpen:b})}),x.jsx(bh,{steps:_,globalClassName:e}),x.jsx(up,{componentType:"dialog",isLoading:w,onSubmit:I=>h(I)})]})})})}):null},A_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,isModalFullscreen:a}=ai(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:h,downloadTranscript:m}=an(),{isOpen:_}=s||{},y=!!s.isOpen,b=r==="standalone",v=l||u,A=({open:N})=>{jr(N)},w=()=>{jr(!1)};return y?x.jsx(Ob,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:x.jsx(S_,{children:x.jsxs("div",{className:F(e,`${k}-modal-container`),style:t,children:[x.jsx(vb,{className:F(e,`${k}-modal-backdrop`)}),x.jsx(th,{className:F(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:x.jsxs(Zp,{className:F(e,`${k}-modal-content`,{standalone:b,embedded:!b}),children:[x.jsx(Db,{componentType:"modal",onClearChat:f,onClose:w,onDownloadTranscript:m}),x.jsx(eh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:x.jsx(Th,{isWidgetStandalone:b,isOpen:_})}),x.jsx(bh,{steps:h,globalClassName:e}),x.jsx(up,{componentType:"modal",isLoading:v,onSubmit:N=>d(N)})]})})]})})}):null},AF=()=>{const e=ai(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(nN,{}):t==="dialog"?x.jsx(v_,{}):t==="modal"?x.jsx(A_,{}):x.jsx(w_,{})},CF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=p8();L.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 a8(a),()=>{u8(a)}},[e,t,n,r,s])},C_=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function NF({isReady:e,hasError:t,transmit:n}){const r=L.useRef([]),s=L.useRef(e);s.current=e;const a=L.useRef(n);a.current=n;const u=L.useCallback((l,d)=>{s.current?C_(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return L.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>C_(a.current,d,f))}},[e]),L.useEffect(()=>{t&&(r.current=[])},[t]),u}const N_={copilot:"Ask Copilot",messaging:"Ask a question"},kF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ct(),{placeholder:s,isResponseLoading:a}=Ql(),u=s||N_[r],[l,d]=L.useState(""),f=t||a,h=m=>{const _=l.trim();_&&(m.preventDefault(),e(_),d(""))};return x.jsxs("form",{className:F(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:h,children:[x.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:x.jsx(Vp,{className:F(n,`${k}-prompts-input-icon`)})}),x.jsx("input",{id:`${k}-prompts-input`,className:F(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),x.jsx(ar,{className:F(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(hf,{}),disabled:f})]})},OF=()=>{const{globalClassName:e,mode:t}=ct(),{placeholder:n}=Ql(),r=n||N_[t];return x.jsxs("div",{className:F(e,`${k}-prompts-header`),children:[x.jsx(Vp,{className:F(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:F(e,`${k}-prompts-header-text`),children:r})]})},k_=({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 x.jsxs("button",{className:F(r,`${k}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(Fb,{icon:a,className:`${k}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},IF="Ask me something else",PF=({label:e,disabled:t=!1})=>x.jsx(k_,{label:e||IF,disabled:t,onClick:()=>jr(!0)}),RF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ct(),{messages:r}=an(),{staticQuestions:s,askElseButtonLabel:a,disableAskElseButton:u}=Ql(),l=L.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 _=m[m.length-1];return(y=_==null?void 0:_.data.display_text)!=null?y:s},[r,s]);if(l.length===0)return null;const d=f=>()=>{const h=f.trim();h&&e(h)};return x.jsxs("div",{className:F(n,`${k}-prompts-button-group`),children:[l.map(f=>x.jsx(k_,{label:f,disabled:t,onClick:d(f)},f)),!u&&x.jsx(PF,{label:a,disabled:t})]})},LF=()=>{const{globalClassName:e,themeVariables:t}=ct(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Ql(),{isConnected:u,sendMessage:l,connectionStatus:d}=an(),{productId:f}=f8(),h=s!=="buttons",m=s!=="input",[_,y]=L.useState(null),b=d==="error",v=d==="connecting",A=NF({isReady:u,hasError:b,transmit:l});L.useEffect(()=>{if(!r||_)return;const N=document.getElementById(r);N&&y(N)},[r,_]);const w=L.useCallback(N=>{jr(!0);const I=(a||[]).includes(N.trim());if(f&&I){A(`${N} (Viewing product details for: ${f})`,{displayContent:N});return}A(N)},[A,a,f]);return!n||!_?null:Bs.createPortal(x.jsxs("div",{className:F(e,`${k}-prompts-extension-container`),style:t,children:[h&&x.jsx(kF,{onSubmit:w,disabled:b}),!h&&x.jsx(OF,{}),m&&x.jsx(RF,{onPromptClick:w,disabled:b}),!b&&v&&x.jsx("p",{className:F(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&x.jsx("p",{className:F(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),_)},DF=()=>(CF(),x.jsx(LF,{})),O_=e=>x.jsxs(Kg,ue(j({},e),{children:[x.jsx(AF,{}),x.jsx(DF,{})]}));var nc={},I_;function MF(){if(I_)return nc;I_=1;var e=n1();return nc.createRoot=e.createRoot,nc.hydrateRoot=e.hydrateRoot,nc}var FF=MF();const P_=(e,t,n,r)=>{FF.createRoot(e).render(x.jsx(O_,ue(j({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},BF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=xn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(h,m)=>{for(const _ of h)if(_.type==="childList"&&_.addedNodes.length)for(const y of _.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(_t(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),P_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),_t(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},UF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=xn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){_t(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){_t(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){_t(!0,"warn","Container element not found for id:",t),_t(!0,"warn","Beginning observation for element"),BF(j({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}P_(l,s,n,r)};class HF 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 jF={components:{setEntryType:L0,toggleWidgetOpen:jr,toggleWidgetMinimized:Ou,toggleModalFullscreen:Id,setWidgetType:Iu,setWidgetDialogPosition:Pd,loadPromptsComponent:d8,togglePromptsExtensionOpen:Lb}};Me.AgentForceWidget=O_,Me.AgentforceWidgetProvider=Kg,Me.CIMULATE_WIDGET_READY_EVENT=R0,Me.MessagingDialog=v_,Me.MessagingEmbed=w_,Me.MessagingModal=A_,Me.MessagingProvider=Rg,Me.OverrideElement=HF,Me.eventHandlers=jF,Me.injectMessagingWidget=UF,Me.useMessaging=an,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));
|