@cimulate/copilot-widget 1.53.2 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- (function(qe,Ue){typeof exports=="object"&&typeof module!="undefined"?module.exports=Ue():typeof define=="function"&&define.amd?define(Ue):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=Ue())})(this,(function(){"use strict";var wU=Object.defineProperty,_U=Object.defineProperties;var xU=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var Q2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable;var Ks=(qe,Ue)=>(Ue=Symbol[qe])?Ue:Symbol.for("Symbol."+qe),SU=qe=>{throw TypeError(qe)},Hu=Math.pow,h0=(qe,Ue,Qe)=>Ue in qe?wU(qe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[Ue]=Qe,B=(qe,Ue)=>{for(var Qe in Ue||(Ue={}))Q2.call(Ue,Qe)&&h0(qe,Qe,Ue[Qe]);if(Sd)for(var Qe of Sd(Ue))J2.call(Ue,Qe)&&h0(qe,Qe,Ue[Qe]);return qe},pe=(qe,Ue)=>_U(qe,xU(Ue));var hn=(qe,Ue)=>{var Qe={};for(var st in qe)Q2.call(qe,st)&&Ue.indexOf(st)<0&&(Qe[st]=qe[st]);if(qe!=null&&Sd)for(var st of Sd(qe))Ue.indexOf(st)<0&&J2.call(qe,st)&&(Qe[st]=qe[st]);return Qe};var Te=(qe,Ue,Qe)=>h0(qe,typeof Ue!="symbol"?Ue+"":Ue,Qe);var et=(qe,Ue,Qe)=>new Promise((st,Ft)=>{var Le=gt=>{try{pn(Qe.next(gt))}catch(mn){Ft(mn)}},an=gt=>{try{pn(Qe.throw(gt))}catch(mn){Ft(mn)}},pn=gt=>gt.done?st(gt.value):Promise.resolve(gt.value).then(Le,an);pn((Qe=Qe.apply(qe,Ue)).next())}),Kr=function(qe,Ue){this[0]=qe,this[1]=Ue},vd=(qe,Ue,Qe)=>{var st=(pn,gt,mn,Cr)=>{try{var Uo=Qe[pn](gt),Xi=(gt=Uo.value)instanceof Kr,Qs=Uo.done;Promise.resolve(Xi?gt[0]:gt).then(_=>Xi?st(pn==="return"?pn:"next",gt[1]?{done:_.done,value:_.value}:_,mn,Cr):mn({value:_,done:Qs})).catch(_=>st("throw",_,mn,Cr))}catch(_){Cr(_)}},Ft=(pn,gt,mn,Cr)=>an[pn]=Uo=>(gt=new Promise((Xi,Qs,_)=>(_=()=>st(pn,Uo,Xi,Qs),Le?Le.then(_):_())),Cr=()=>Le===mn&&(Le=0),Le=mn=gt.then(Cr,Cr),gt),Le,an={};return Qe=Qe.apply(qe,Ue),an[Ks("asyncIterator")]=()=>an,Ft("next"),Ft("throw"),Ft("return"),an},p0=qe=>{var Ue=qe[Ks("asyncIterator")],Qe=!1,st,Ft={};return Ue==null?(Ue=qe[Ks("iterator")](),st=Le=>Ft[Le]=an=>Ue[Le](an)):(Ue=Ue.call(qe),st=Le=>Ft[Le]=an=>{if(Qe){if(Qe=!1,Le==="throw")throw an;return an}return Qe=!0,{done:!1,value:new Kr(new Promise(pn=>{var gt=Ue[Le](an);gt instanceof Object||SU("Object expected"),pn(gt)}),1)}}),Ft[Ks("iterator")]=()=>Ft,st("next"),"throw"in Ue?st("throw"):Ft.throw=Le=>{throw Le},"return"in Ue&&st("return"),Ft},Z2=(qe,Ue,Qe)=>(Ue=qe[Ks("asyncIterator")])?Ue.call(qe):(qe=qe[Ks("iterator")](),Ue={},Qe=(st,Ft)=>(Ft=qe[st])&&(Ue[st]=Le=>new Promise((an,pn,gt)=>(Le=Ft.call(qe,Le),gt=Le.done,Promise.resolve(Le.value).then(mn=>an({value:mn,done:gt}),pn)))),Qe("next"),Qe("return"),Ue);var qe=document.createElement("style");qe.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:50%;padding:.25rem;border:none;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-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button{animation:cim-widget-fab-pulse 2s infinite ease-in-out;transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-layout-commerce{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-composer-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px}.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}}.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:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-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-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-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-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.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-user-search{display:flex;flex-direction:column}.cim-widget-user-search.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%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.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-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}.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-embedded-chat.cim-widget-layout-commerce>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-layout-commerce .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.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{--cim-widget-dialog-animation-duration: .25s;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}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.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)}.cim-widget-dialog.cim-widget-layout-commerce{border:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;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[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{height:3.875rem;min-height:3.875rem;padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{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)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.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.cim-widget-layout-commerce .cim-widget-modal-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-layout-commerce{--cim-widget-shopping-canvas: #fcfcfc;--cim-widget-shopping-chip: #f7f7f7;--cim-widget-shopping-muted: #5c5c5c;--cim-widget-shopping-outline: #a3a3a3;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-container{gap:1rem;padding:1.25rem;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-message-group-child{width:100%}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-markdown,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text,.cim-widget-layout-commerce .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:1rem;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:#fff}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-cart-box,.cim-widget-layout-commerce .cim-widget-cart-summary,.cim-widget-layout-commerce .cim-widget-cart-expanded,.cim-widget-layout-commerce .cim-widget-cart-coupon,.cim-widget-layout-commerce .cim-widget-cart-coupon-field,.cim-widget-layout-commerce .cim-widget-cart-coupon-input{background-color:#fff}.cim-widget-layout-commerce .cim-widget-cart-expanded{border-top:none}.cim-widget-layout-commerce .cim-widget-cart-totals{border-top:1px solid #dedede;padding-top:16px;gap:12px}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-layout-commerce .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:8px;background-color:#f1f1f1;color:#181818}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-layout-commerce .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-msg-pdp__card,.cim-widget-layout-commerce .cim-widget-msg-pdp__gallery,.cim-widget-layout-commerce .cim-widget-msg-pdp__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-pdp__card{border-color:#dedede;border-radius:.75rem;box-shadow:0 1px 3px #00000012}.cim-widget-layout-commerce .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__title,.cim-widget-layout-commerce .cim-widget-msg-pdp__title-link{color:#181818;font-size:.875rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__description{color:#3e3e3c;font-size:.75rem;opacity:1}.cim-widget-layout-commerce .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip{border-radius:20px;background-color:#f1f1f1;border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip:hover{background-color:#ededed;border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #db665e);border-color:var(--cim-widget-primary-color, #db665e);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-secondary-color, #c9554d);border-color:var(--cim-widget-secondary-color, #c9554d);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-primary-color, #181818);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-pdp-gallery__prev-trigger,.cim-widget-layout-commerce .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:.375rem;background-color:#f1f1f1;color:#5c5c5c;box-shadow:none}.cim-widget-layout-commerce .cim-widget-msg-product-card,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-wrapper,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-placeholder,.cim-widget-layout-commerce .cim-widget-msg-product-card__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-product-card__title,.cim-widget-layout-commerce .cim-widget-msg-product-card__title-link,.cim-widget-layout-commerce .cim-widget-msg-product-card__price,.cim-widget-layout-commerce .cim-widget-product-tile-name,.cim-widget-layout-commerce .cim-widget-product-tile-price{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-layout-commerce .cim-widget-carousel__control{padding:0}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid #dedede;border-radius:50%;background-color:#fff;color:#3e3e3c;box-shadow:0 2px 5px #00000026}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:hover,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:hover{background-color:#fff;border-color:#c9c9c9;box-shadow:0 3px 7px #0000002e}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid #181818;outline-offset:2px}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-markdown>:first-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-layout-commerce .cim-widget-markdown>:last-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-ask-cim-suggestions-container,.cim-widget-layout-commerce .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-shopping-chip);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:hover,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-layout-commerce .cim-widget-user-message.embedded,.cim-widget-layout-commerce .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-user-message-text{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:400}.cim-widget-layout-commerce .cim-widget-message.embedded{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-layout-commerce .cim-widget-search-bar{gap:.5rem}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-layout-commerce .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .25rem .5rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:1.5rem;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-connection-status-icon{display:none}.cim-widget-layout-commerce input.cim-widget-search-input{min-height:2.75rem;padding:0 .625rem;border:0;border-radius:999px;background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-layout-commerce input.cim-widget-search-input::placeholder{color:var(--cim-widget-shopping-muted);opacity:1}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:999px}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-layout-commerce .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:2.75rem;border:0;border-radius:50%;background-color:#111;color:#fff}.cim-widget-layout-commerce .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-layout-commerce .cim-widget-search-button-icon:hover{background-color:#333;border-color:transparent}.cim-widget-layout-commerce .cim-widget-search-button-icon:focus-visible{outline:2px solid #000000;outline-offset:3px}.cim-widget-layout-commerce .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-shopping-muted)}@media(max-width:576px){.cim-widget-layout-commerce .cim-widget-message-container{padding:1rem}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{padding-right:1rem;padding-left:1rem}}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
- /*$vite$:1*/`,document.head.appendChild(qe);function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},st={},Ft={exports:{}},Le={};var an;function pn(){if(an)return Le;an=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(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(){}},w=Object.assign,v={};function N(M,Q,O){this.props=M,this.context=Q,this.refs=v,this.updater=O||y}N.prototype.isReactComponent={},N.prototype.setState=function(M,Q){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,Q,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=N.prototype;function A(M,Q,O){this.props=M,this.context=Q,this.refs=v,this.updater=O||y}var C=A.prototype=new S;C.constructor=A,w(C,N.prototype),C.isPureReactComponent=!0;var U=Array.isArray,q=Object.prototype.hasOwnProperty,R={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function ne(M,Q,O){var _e,Be={},ve=null,xe=null;if(Q!=null)for(_e in Q.ref!==void 0&&(xe=Q.ref),Q.key!==void 0&&(ve=""+Q.key),Q)q.call(Q,_e)&&!Y.hasOwnProperty(_e)&&(Be[_e]=Q[_e]);var Pe=arguments.length-2;if(Pe===1)Be.children=O;else if(1<Pe){for(var Ye=Array(Pe),lt=0;lt<Pe;lt++)Ye[lt]=arguments[lt+2];Be.children=Ye}if(M&&M.defaultProps)for(_e in Pe=M.defaultProps,Pe)Be[_e]===void 0&&(Be[_e]=Pe[_e]);return{$$typeof:e,type:M,key:ve,ref:xe,props:Be,_owner:R.current}}function me(M,Q){return{$$typeof:e,type:M.type,key:Q,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ie(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return Q[O]})}var fe=/\/+/g;function ke(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):Q.toString(36)}function re(M,Q,O,_e,Be){var ve=typeof M;(ve==="undefined"||ve==="boolean")&&(M=null);var xe=!1;if(M===null)xe=!0;else switch(ve){case"string":case"number":xe=!0;break;case"object":switch(M.$$typeof){case e:case t:xe=!0}}if(xe)return xe=M,Be=Be(xe),M=_e===""?"."+ke(xe,0):_e,U(Be)?(O="",M!=null&&(O=M.replace(fe,"$&/")+"/"),re(Be,Q,O,"",function(lt){return lt})):Be!=null&&($(Be)&&(Be=me(Be,O+(!Be.key||xe&&xe.key===Be.key?"":(""+Be.key).replace(fe,"$&/")+"/")+M)),Q.push(Be)),1;if(xe=0,_e=_e===""?".":_e+":",U(M))for(var Pe=0;Pe<M.length;Pe++){ve=M[Pe];var Ye=_e+ke(ve,Pe);xe+=re(ve,Q,O,Ye,Be)}else if(Ye=T(M),typeof Ye=="function")for(M=Ye.call(M),Pe=0;!(ve=M.next()).done;)ve=ve.value,Ye=_e+ke(ve,Pe++),xe+=re(ve,Q,O,Ye,Be);else if(ve==="object")throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return xe}function ae(M,Q,O){if(M==null)return M;var _e=[],Be=0;return re(M,_e,"","",function(ve){return Q.call(O,ve,Be++)}),_e}function Se(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var se={current:null},J={transition:null},oe={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:J,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:ae,forEach:function(M,Q,O){ae(M,function(){Q.apply(this,arguments)},O)},count:function(M){var Q=0;return ae(M,function(){Q++}),Q},toArray:function(M){return ae(M,function(Q){return Q})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Le.Component=N,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=A,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Le.act=k,Le.cloneElement=function(M,Q,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=w({},M.props),Be=M.key,ve=M.ref,xe=M._owner;if(Q!=null){if(Q.ref!==void 0&&(ve=Q.ref,xe=R.current),Q.key!==void 0&&(Be=""+Q.key),M.type&&M.type.defaultProps)var Pe=M.type.defaultProps;for(Ye in Q)q.call(Q,Ye)&&!Y.hasOwnProperty(Ye)&&(_e[Ye]=Q[Ye]===void 0&&Pe!==void 0?Pe[Ye]:Q[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=O;else if(1<Ye){Pe=Array(Ye);for(var lt=0;lt<Ye;lt++)Pe[lt]=arguments[lt+2];_e.children=Pe}return{$$typeof:e,type:M.type,key:Be,ref:ve,props:_e,_owner:xe}},Le.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},Le.createElement=ne,Le.createFactory=function(M){var Q=ne.bind(null,M);return Q.type=M,Q},Le.createRef=function(){return{current:null}},Le.forwardRef=function(M){return{$$typeof:l,render:M}},Le.isValidElement=$,Le.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Se}},Le.memo=function(M,Q){return{$$typeof:f,type:M,compare:Q===void 0?null:Q}},Le.startTransition=function(M){var Q=J.transition;J.transition={};try{M()}finally{J.transition=Q}},Le.unstable_act=k,Le.useCallback=function(M,Q){return se.current.useCallback(M,Q)},Le.useContext=function(M){return se.current.useContext(M)},Le.useDebugValue=function(){},Le.useDeferredValue=function(M){return se.current.useDeferredValue(M)},Le.useEffect=function(M,Q){return se.current.useEffect(M,Q)},Le.useId=function(){return se.current.useId()},Le.useImperativeHandle=function(M,Q,O){return se.current.useImperativeHandle(M,Q,O)},Le.useInsertionEffect=function(M,Q){return se.current.useInsertionEffect(M,Q)},Le.useLayoutEffect=function(M,Q){return se.current.useLayoutEffect(M,Q)},Le.useMemo=function(M,Q){return se.current.useMemo(M,Q)},Le.useReducer=function(M,Q,O){return se.current.useReducer(M,Q,O)},Le.useRef=function(M){return se.current.useRef(M)},Le.useState=function(M){return se.current.useState(M)},Le.useSyncExternalStore=function(M,Q,O){return se.current.useSyncExternalStore(M,Q,O)},Le.useTransition=function(){return se.current.useTransition()},Le.version="18.3.1",Le}var gt;function mn(){return gt||(gt=1,Ft.exports=pn()),Ft.exports}var Cr;function Uo(){if(Cr)return st;Cr=1;var e=mn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:o.current}}return st.Fragment=n,st.jsx=u,st.jsxs=u,st}var Xi;function Qs(){return Xi||(Xi=1,Qe.exports=Uo()),Qe.exports}var _=Qs();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const zu=Object.create(null);Object.keys(kr).forEach(e=>{zu[kr[e]]=e});const Ad={type:"error",data:"parser error"},m0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",g0=typeof ArrayBuffer=="function",E0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cd=({type:e,data:t},n,r)=>m0&&t instanceof Blob?n?r(t):y0(t,r):g0&&(t instanceof ArrayBuffer||E0(t))?n?r(t):y0(new Blob([t]),r):r(kr[e]+(t||"")),y0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function b0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let kd;function rS(e,t){if(m0&&e.data instanceof Blob)return e.data.arrayBuffer().then(b0).then(t);if(g0&&(e.data instanceof ArrayBuffer||E0(e.data)))return t(b0(e.data));Cd(e,!1,n=>{kd||(kd=new TextEncoder),t(kd.encode(n))})}const T0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Js=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<T0.length;e++)Js[T0.charCodeAt(e)]=e;const iS=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Js[e.charCodeAt(r)],u=Js[e.charCodeAt(r+1)],l=Js[e.charCodeAt(r+2)],d=Js[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|l>>2,p[o++]=(l&3)<<6|d&63;return f},oS=typeof ArrayBuffer=="function",Nd=(e,t)=>{if(typeof e!="string")return{type:"message",data:w0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:sS(e.substring(1),t)}:zu[n]?e.length>1?{type:zu[n],data:e.substring(1)}:{type:zu[n]}:Ad},sS=(e,t)=>{if(oS){const n=iS(e);return w0(n,t)}else return{base64:!0,data:e}},w0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,_0="",aS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Cd(a,!1,l=>{r[u]=l,++o===n&&t(r.join(_0))})})},uS=(e,t)=>{const n=e.split(_0),r=[];for(let o=0;o<n.length;o++){const a=Nd(n[o],t);if(r.push(a),a.type==="error")break}return r};function lS(){return new TransformStream({transform(e,t){rS(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Pd;function ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function cS(e,t){Pd||(Pd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(ju(n)<1)break;const d=$u(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ju(n)<2)break;const d=$u(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ju(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Ad);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ju(n)<o)break;const d=$u(n,o);l.enqueue(Nd(a?d:Pd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Ad);break}}}})}const x0=4;function Bt(e){if(e)return dS(e)}function dS(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.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),er=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),fS="arraybuffer";function vU(){}function S0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const hS=er.setTimeout,pS=er.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=hS.bind(er),e.clearTimeoutFn=pS.bind(er)):(e.setTimeoutFn=er.setTimeout.bind(er),e.clearTimeoutFn=er.clearTimeout.bind(er))}const mS=1.33;function gS(e){return typeof e=="string"?ES(e):Math.ceil((e.byteLength||e.size)*mS)}function ES(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function v0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function yS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function bS(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class TS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Od extends Bt{constructor(t){super(),this.writable=!1,qu(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 TS(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=Nd(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=yS(t);return n.length?"?"+n:""}}class wS extends Od{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)};uS(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,aS(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]=v0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let A0=!1;try{A0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _S=A0;function xS(){}class SS extends wS{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nr extends Bt{constructor(t,n,r){super(),this.createRequest=t,qu(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=S0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Nr.requestsCount++,Nr.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=xS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.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(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",C0);else if(typeof addEventListener=="function"){const e="onpagehide"in er?"pagehide":"unload";addEventListener(e,C0,!1)}}function C0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const vS=(function(){const e=k0({xdomain:!1});return e&&e.responseType!==null})();class AS extends SS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=vS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(k0,this.uri(),t)}}function k0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_S))return new XMLHttpRequest}catch(n){}if(!t)try{return new er[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const N0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CS extends Od{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=N0?{}:S0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&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]=v0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Id=er.WebSocket||er.MozWebSocket;class kS extends CS{createSocket(t,n,r){return N0?new Id(t,n,r):n?new Id(t,n):new Id(t)}doWrite(t,n){this.ws.send(n)}}class NS extends Od{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=cS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=lS();o.readable.pipeTo(t.writable),this._writer=o.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],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const PS={websocket:kS,webtransport:NS,polling:AS},OS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=OS.exec(e||""),a={},u=14;for(;u--;)a[IS[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=RS(a,a.path),a.queryKey=LS(a,a.query),a}function RS(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 LS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ld=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Ld&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class yi extends Bt{constructor(t,n){if(super(),this.binaryType=fS,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=Rd(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=Rd(n.host).host);qu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bS(this.opts.query)),Ld&&(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"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=x0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=gS(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ld&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=x0;class DS extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 MS=class extends DS{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>PS[a]).filter(a=>!!a)),super(r?o:t,o)}};function FS(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=Rd(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 BS=typeof ArrayBuffer=="function",US=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,P0=Object.prototype.toString,HS=typeof Blob=="function"||typeof Blob!="undefined"&&P0.call(Blob)==="[object BlobConstructor]",zS=typeof File=="function"||typeof File!="undefined"&&P0.call(File)==="[object FileConstructor]";function Dd(e){return BS&&(e instanceof ArrayBuffer||US(e))||HS&&e instanceof Blob||zS&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Dd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function jS(e){const t=[],n=e.data,r=e;return r.data=Gu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Gu(e,t,n){if(!e)return e;if(Dd(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 o=0;o<e.length;o++)r[o]=Gu(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Gu(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Gu(e[o],t));return r}return e}function $S(e,t){return e.data=Md(e.data,t),delete e.attachments,e}function Md(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]=Md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Md(e[n],t));return e}const VS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class qS{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=jS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Fd extends Bt{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new YS(n)):super.emitReserved("decoded",n)}else if(Dd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.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(!WS(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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Fd.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 nt.CONNECT:return O0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||O0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&VS.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class YS{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=$S(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const WS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function O0(e){return Object.prototype.toString.call(e)==="[object Object]"}const GS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fd,Encoder:qS,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const XS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class I0 extends Bt{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=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(XS.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:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let 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"))},o),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,l)=>u?o(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((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nt.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 Ho(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}Ho.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},Ho.prototype.reset=function(){this.attempts=0},Ho.prototype.setMin=function(e){this.ms=e},Ho.prototype.setMax=function(e){this.max=e},Ho.prototype.setJitter=function(e){this.jitter=e};class Bd extends Bt{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,qu(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 Ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||GS;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new MS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=hr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(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 I0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Zs={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=FS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Zs[o]&&a in Zs[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Bd(r,t):(Zs[o]||(Zs[o]=new Bd(r,t)),d=Zs[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:Bd,Socket:I0,io:Xu,connect:Xu});var KS=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===QS})(t)})(e)},QS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?zo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function JS(e,t,n){return e.concat(t).map((function(r){return ea(r,n)}))}function R0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function L0(e,t){try{return t in e}catch(n){return!1}}function ZS(e,t,n){var r={};return n.isMergeableObject(e)&&R0(e).forEach((function(o){r[o]=ea(e[o],n)})),R0(t).forEach((function(o){(function(a,u){return L0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(L0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return zo;var l=u.customMerge(a);return typeof l=="function"?l:zo})(o,n)(e[o],t[o],n):r[o]=ea(t[o],n))})),r}function zo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||JS,n.isMergeableObject=n.isMergeableObject||KS,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ZS(e,t,n):ea(t,n)}zo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return zo(n,r,t)}),{})};var ev=zo;let tv=class{constructor(t){Object.assign(this,t)}};function kn(e){if(e)return(function(t){for(var n in kn.prototype)t[n]=kn.prototype[n];return t})(e)}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},kn.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){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},kn.prototype.emitReserved=kn.prototype.emit,kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const nv=typeof ArrayBuffer=="function",D0=Object.prototype.toString,rv=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",iv=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Ud(e){return nv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||rv&&e instanceof Blob||iv&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Ud(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function ov(e){const t=[],n=e.data,r=e;return r.data=Hd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Hd(e,t){if(!e)return e;if(Ud(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Hd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Hd(e[r],t));return n}return e}function sv(e,t){return e.data=zd(e.data,t),delete e.attachments,e}function zd(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")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=zd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zd(e[n],t));return e}const av=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(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"})(Ct||(Ct={}));class uv{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.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=ov(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class jd extends kn{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===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new lv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Ud(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.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(!cv(l)||l<0)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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!jd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return M0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||M0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&av.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lv{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=sv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const F0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],B0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([l,d])=>{const f=[...a,t(l)];return[e(l),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((l=>l[1])):Object.fromEntries(u)},U0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),dv=B0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),F0),H0=B0(U0,U0,F0),fv={Encoder:class extends uv{encode(e){var t,n;return super.encode(pe(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],dv(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends jd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?H0(r):r)):n instanceof Object?H0(n):n)):t))}}},hv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class pv{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:l={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${o}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[hv,l,{parser:fv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Xu(d,ev.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Hu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return vd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new Kr(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new Kr(p==null?void 0:p())}})})((({emit:u,cancel:l})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&l(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,l)=>this.socket.emit(t,n,(d=>{d.name==="error"?l(new tv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const z0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),j0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var F=mn();const Ki=Ue(F);var $0=Symbol.for("immer-nothing"),V0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function tr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function $o(e){return!!e&&!!e[at]}function Qr(e){var t;return e?q0(e)||Array.isArray(e)||!!e[V0]||!!((t=e.constructor)!=null&&t[V0])||na(e)||Ju(e):!1}var mv=Object.prototype.constructor.toString();function q0(e){if(!e||typeof e!="object")return!1;const t=jo(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)===mv}function ta(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Ju(e)?3:0}function $d(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Y0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function gv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Qt(e){return e.copy_||e.base_}function Vd(e,t){if(na(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[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(jo(e),r)}else{const r=jo(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function qd(e,t=!1){return el(e)||$o(e)||!Qr(e)||(Qu(e)>1&&Object.defineProperties(e,{set:{value:Zu},add:{value:Zu},clear:{value:Zu},delete:{value:Zu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>qd(n,!0))),e}function Zu(){tr(2)}function el(e){return Object.isFrozen(e)}var Yd={};function Qi(e){const t=Yd[e];return t||tr(0,e),t}function Ev(e,t){Yd[e]||(Yd[e]=t)}var ra;function tl(){return ra}function yv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wd(e){Gd(e),e.drafts_.forEach(bv),e.drafts_=null}function Gd(e){e===ra&&(ra=e.parent_)}function G0(e){return ra=yv(ra,e)}function bv(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function X0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Wd(t),tr(4)),Qr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Wd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return ta(t,(o,a)=>K0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return rl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),ta(a,(l,d)=>K0(e,r,o,l,d,n,u)),rl(e,o,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function K0(e,t,n,r,o,a,u){if($o(o)){const l=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=nl(e,o,l);if(Y0(n,r,d),$o(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Qr(o)&&!el(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&rl(e,o)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function Tv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Xd;n&&(o=[r],a=ia);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var Xd={get(e,t){if(t===at)return e;const n=Qt(e);if(!$d(n,t))return wv(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Kd(e.base_,t)?(Qd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Qt(e)},ownKeys(e){return Reflect.ownKeys(Qt(e))},set(e,t,n){const r=Q0(Qt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Kd(Qt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(gv(n,o)&&(n!==void 0||$d(e.base_,t)))return!0;Qd(e),Jr(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 Kd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Qt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){tr(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){tr(12)}},ia={};ta(Xd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Xd.set.call(this,e[0],t,n,e[0])};function Kd(e,t){const n=e[at];return(n?Qt(n):e)[t]}function wv(e,t,n){var o;const r=Q0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Q0(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Qd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _v=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&tr(6),r!==void 0&&typeof r!="function"&&tr(7);let o;if(Qr(t)){const a=G0(this),u=oa(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?Wd(a):Gd(a)}return W0(a,r),X0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===$0&&(o=void 0),this.autoFreeze_&&qd(o,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else tr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,o;return[this.produce(t,n,(u,l)=>{r=u,o=l}),r,o]},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){Qr(e)||tr(8),$o(e)&&(e=xv(e));const t=G0(this),n=oa(e,void 0);return n[at].isManual_=!0,Gd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&tr(9);const{scope_:r}=n;return W0(r,t),X0(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return $o(e)?r(e,t):this.produce(e,o=>r(o,t))}};function oa(e,t){const n=na(e)?Qi("MapSet").proxyMap_(e,t):Ju(e)?Qi("MapSet").proxySet_(e,t):Tv(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function xv(e){return $o(e)||tr(10,e),J0(e)}function J0(e){if(!Qr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return ta(n,(r,o)=>{Y0(n,r,J0(o))}),t&&(t.finalized_=!1),n}function Sv(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Qt(this[at]).size}has(d){return Qt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Qt(p).has(d)||Qt(p).get(d)!==f)&&(n(p),Jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Qt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Qt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Qt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Qt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(l,d){return new e(l,d)}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Qt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Qt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function o(l,d){return new r(l,d)}function a(l){l.copy_||(l.copy_=new Set,l.base_.forEach(d=>{if(Qr(d)){const f=oa(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&tr(3,JSON.stringify(Qt(l)))}Ev("MapSet",{proxyMap_:t,proxySet_:o})}var vv=new _v,Av=vv.produce;function Z0(e,t,n){var r=F.useMemo(function(){return Av(e)},[e]);return F.useReducer(r,t,n)}const eg={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},Et={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Ji={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},tg=["ask_cim","search","browse","pdp"],Cv=e=>tg.includes(e),ng={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(ng));const kv=new Map(Object.entries(ng).map(([e,t])=>[t,e])),Nv=e=>{var t;return(t=kv.get(e))!=null?t:null},Vo="cimulate",Jd=`${Vo}:pdp-update`,Zd=`${Vo}:browse-update`,ef=`${Vo}:search-update`,tf=`${Vo}:ui-state-update`,nf=`${Vo}:prompts-state-update`,rf=`${Vo}:session-state`,Pr=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},eg),Pv={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},eg),Ov={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},H="cim-widget",$n=`--${H}`,Zi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},Iv=(e={},t)=>{const n=t==="commerce",r=n?"#db665e":Zi.primaryColor,o=n?"#c9554d":Zi.secondaryColor,a=n?"0.75rem":Zi.borderRadius;return{[`${$n}-primary-color`]:e.primaryColor||r,[`${$n}-secondary-color`]:e.secondaryColor||o,[`${$n}-font-color`]:e.fontColor||Zi.fontColor,[`${$n}-font-family`]:e.fontFamily||Zi.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Zi.backgroundColor,[`${$n}-border-color`]:e.borderColor||Zi.borderColor,[`${$n}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||a)}},ei={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},rg=F.createContext(null),ig=F.createContext(null),yt={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"},og={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};function sg(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rv}=Object.prototype,{getPrototypeOf:bi}=Object,{iterator:sa,toStringTag:ag}=Symbol,aa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ug=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),lg=(e,t,n)=>e===Object.prototype||!n&&t===null,Lv=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(ug(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},ua=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=bi(n);if(lg(n,o,n===e))return!1;if(aa(n,t))return!0;n=o}return!1},Dv=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,Mv=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=bi(e);if(t===null&&Lv(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let a=e;for(;a!=null&&o.indexOf(a)===-1;){o.push(a);const u=a===e?t:bi(a);if(lg(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)ug(d)||aa(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},of=(e=>t=>{const n=Rv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nr=e=>(e=e.toLowerCase(),t=>of(t)===e),il=e=>t=>typeof t===e,{isArray:eo}=Array,to=il("undefined");function qo(e){return e!==null&&!to(e)&&e.constructor!==null&&!to(e.constructor)&&In(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const cg=nr("ArrayBuffer");function Fv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&cg(e.buffer),t}const Bv=il("string"),In=il("function"),dg=il("number"),Yo=e=>e!==null&&typeof e=="object",Uv=e=>e===!0||e===!1,ol=e=>{if(!Yo(e))return!1;const t=bi(e);return(t===null||t===Object.prototype||bi(t)===null)&&!ua(e,ag)&&!ua(e,sa)},Hv=e=>{if(!Yo(e)||qo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},zv=nr("Date"),jv=nr("File"),$v=e=>!!(e&&typeof e.uri!="undefined"),Vv=e=>e&&typeof e.getParts!="undefined",qv=nr("Blob"),Yv=nr("FileList"),Wv=nr("Set"),Gv=e=>Yo(e)&&In(e.pipe);function Xv(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const fg=Xv(),hg=typeof fg.FormData!="undefined"?fg.FormData:void 0,Kv=e=>{if(!e)return!1;if(hg&&e instanceof hg)return!0;const t=bi(e);if(!t||t===Object.prototype||!In(e.append))return!1;const n=of(e);return n==="formdata"||n==="object"&&In(e.toString)&&e.toString()==="[object FormData]"},Qv=nr("URLSearchParams"),[Jv,Zv,eA,tA]=["ReadableStream","Request","Response","Headers"].map(nr),nA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),eo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(qo(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 pg(e,t){if(qo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const no=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,mg=e=>!to(e)&&e!==no;function sf(...e){const{caseless:t,skipUndefined:n}=mg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&pg(r,u)||u,d=aa(r,l)?r[l]:void 0;ol(d)&&ol(a)?r[l]=sf(d,a):ol(a)?r[l]=sf({},a):eo(a)?r[l]=a.slice():(!n||!to(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||qo(l)||(la(l,o),typeof l!="object"||eo(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];pA.call(l,p)&&o(l[p],p)}}return r}const rA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(o,a)=>{n&&In(o)?Object.defineProperty(e,a,{__proto__:null,value:sg(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),iA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oA=(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)},sA=(e,t,n,r)=>{let o,a,u;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&bi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aA=(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},uA=e=>{if(!e)return null;if(eo(e))return e;let t=e.length;if(!dg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},lA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&bi(Uint8Array)),cA=(e,t)=>{const r=(e&&e[sa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},dA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},fA=nr("HTMLFormElement"),hA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:pA}=Object.prototype,mA=nr("RegExp"),gg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},gA=e=>{gg(e,(t,n)=>{if(In(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(In(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+"'")})}})},EA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return eo(e)?r(e):r(String(e).split(t)),n},yA=()=>{},bA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function TA(e){return!!(e&&In(e.append)&&e[ag]==="FormData"&&e[sa])}const wA=e=>{const t=new WeakSet,n=r=>{if(Yo(r)){if(t.has(r))return;if(qo(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(Wv(r)){o=[];for(const a of r){const u=n(a);!to(u)&&o.push(u)}}else o=eo(r)?[]:{},la(r,(a,u)=>{const l=n(a);!to(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},_A=nr("AsyncFunction"),xA=e=>e&&(Yo(e)||In(e))&&In(e.then)&&In(e.catch),Eg=((e,t)=>e?setImmediate:t?((n,r)=>(no.addEventListener("message",({source:o,data:a})=>{o===no&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),no.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",In(no.postMessage)),SA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(no):typeof process!="undefined"&&process.nextTick||Eg,yg=e=>e!=null&&In(e[sa]),j={isArray:eo,isArrayBuffer:cg,isBuffer:qo,isFormData:Kv,isArrayBufferView:Fv,isString:Bv,isNumber:dg,isBoolean:Uv,isObject:Yo,isPlainObject:ol,isEmptyObject:Hv,isReadableStream:Jv,isRequest:Zv,isResponse:eA,isHeaders:tA,isUndefined:to,isDate:zv,isFile:jv,isReactNativeBlob:$v,isReactNative:Vv,isBlob:qv,isRegExp:mA,isFunction:In,isStream:Gv,isURLSearchParams:Qv,isTypedArray:lA,isFileList:Yv,forEach:la,merge:sf,extend:rA,trim:nA,stripBOM:iA,inherits:oA,toFlatObject:sA,kindOf:of,kindOfTest:nr,endsWith:aA,toArray:uA,forEachEntry:cA,matchAll:dA,isHTMLForm:fA,hasOwnProperty:aa,hasOwnProp:aa,hasOwnInPrototypeChain:ua,getSafeProp:Dv,toSafeFlatObject:Mv,reduceDescriptors:gg,freezeMethods:gA,toObjectSet:EA,toCamelCase:hA,noop:yA,toFiniteNumber:bA,findKey:pg,global:no,isContextDefined:mg,isSpecCompliantForm:TA,toJSONObject:wA,isAsyncFn:_A,isThenable:xA,setImmediate:Eg,asap:SA,isIterable:yg,isSafeIterable:e=>e!=null&&ua(e,sa)&&yg(e)},vA=j.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"]),AA=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=j.hasOwnProp(t,n);!n||l&&j.hasOwnProp(vA,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function CA(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 kA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),NA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function af(e,t){return j.isArray(e)?e.map(n=>af(n,t)):CA(String(e).replace(t,""))}const PA=e=>af(e,kA),OA=e=>af(e,NA);function bg(e){const t=Object.create(null);return j.forEach(e.toJSON(),(n,r)=>{t[r]=OA(n)}),t}const Tg=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function sl(e){return e===!1||e==null?e:j.isArray(e)?e.map(sl):PA(String(e))}function IA(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 RA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function uf(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)}function LA(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(o===34||o===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function DA(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=uf(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=uf(d.slice(0,f));if(!RA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=uf(d.slice(f+1));t[m]=LA(T)}for(let l=0;l<n.length;l++){const d=n.charCodeAt(l);o?a?a=!1:d===92?a=!0:d===34&&(o=!1):d===34?o=!0:(d===44||d===59)&&(u(l),r=l+1)}return u(n.length),t}const MA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lf(e,t,n,r,o){if(j.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!j.isString(t)){if(j.isString(r))return t.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(t)}}function FA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function BA(e,t){const n=j.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,d,f){const p=ca(d);if(!p)return;const m=j.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=sl(l))}const u=(l,d)=>j.forEach(l,(f,p)=>a(f,p,d));if(j.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(j.isString(t)&&(t=t.trim())&&!MA(t))u(AA(t),n);else if(j.isObject(t)&&j.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!j.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],j.hasOwnProp(l,f)?(d=l[f],l[f]=j.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ca(t),t){const r=j.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return IA(o);if(j.isFunction(n))return n.call(this,o,r);if(j.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ca(t),t){const r=j.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ca(u),u){const l=j.findKey(r,u);l&&(!n||lf(r,r[l],l,n))&&(delete r[l],o=!0)}}return j.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||lf(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return j.forEach(this,(o,a)=>{const u=j.findKey(r,a);if(u){n[u]=sl(o),delete n[a];return}const l=t?FA(a):String(a).trim();l!==a&&delete n[a],n[l]=sl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return j.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&j.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(`
4
- `)}getSetCookie(){const t=this.get("set-cookie");return j.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return DA(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Tg]=this[Tg]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=ca(u);r[l]||(BA(o,u),r[l]=!0)}return j.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(gn);const al="[REDACTED ****]";function UA(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function HA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||j.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(j.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);j.isUndefined(f)||(u[d]=f)});else{if(!j.isPlainObject(a)&&UA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?al:o(d);j.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function wg(e){try{return String(e)}catch(t){return""}}function zA(e){return e.errors.map(n=>{try{return n&&n.message?wg(n.message):wg(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let be=class eS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&j.isArray(t.errors)&&t.errors.length&&(l=zA(t));const d=new eS(l,n||t.code,r,o,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?HA(t,n):j.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}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jA=null,_g=100;function cf(e){return j.isPlainObject(e)||j.isArray(e)}function xg(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function df(e,t,n){return e?e.concat(t).map(function(o,a){return o=xg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function $A(e){return j.isArray(e)&&!e.some(cf)}const VA=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function ul(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(A,C)=>{const U=j.getSafeProp(n,A);return j.isUndefined(U)?C:U},o=r("metaTokens",!0),a=r("visitor")||v,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",_g),p=d&&j.isSpecCompliantForm(t),m=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function T(A){if(A===null)return"";if(j.isDate(A))return A.toISOString();if(j.isBoolean(A))return A.toString();if(!p&&j.isBlob(A))throw new be("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(A)||j.isTypedArray(A)){if(p&&typeof d=="function")return new d([A]);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return A}function y(A){if(A>f)throw new be("Object is too deeply nested ("+A+" levels). Max depth: "+f,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(A,C){if(f===1/0)return JSON.stringify(A);const U=[];return JSON.stringify(A,function(R,Y){if(!j.isObject(Y))return Y;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push(Y),y(C+U.length-1),Y})}function v(A,C,U){let q=A;if(j.isReactNative(t)&&j.isReactNativeBlob(A))return t.append(df(U,C,u),T(A)),!1;if(A&&!U&&typeof A=="object"){if(j.endsWith(C,"{}"))C=o?C:C.slice(0,-2),A=w(A,1);else if(j.isArray(A)&&$A(A)||(j.isFileList(A)||j.endsWith(C,"[]"))&&(q=j.toArray(A)))return C=xg(C),q.forEach(function(Y,ne){!(j.isUndefined(Y)||Y===null)&&t.append(l===!0?df([C],ne,u):l===null?C:C+"[]",T(Y))}),!1}return cf(A)?!0:(t.append(df(U,C,u),T(A)),!1)}const N=Object.assign(VA,{defaultVisitor:v,convertValue:T,isVisitable:cf});function S(A,C,U=0){if(!j.isUndefined(A)){if(y(U),m.indexOf(A)!==-1)throw new Error("Circular reference detected in "+C.join("."));m.push(A),j.forEach(A,function(R,Y){(!(j.isUndefined(R)||R===null)&&a.call(t,R,j.isString(Y)?Y.trim():Y,C,N))===!0&&S(R,C?C.concat(Y):[Y],U+1)}),m.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Sg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ff(e,t){this._pairs=[],e&&ul(e,this,t)}const vg=ff.prototype;vg.append=function(t,n){this._pairs.push([t,n])},vg.toString=function(t){const n=t?r=>t.call(this,r,Sg):Sg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function qA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ag(e,t,n){if(!t)return e;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,o=j.getSafeProp(r,"encode")||qA,a=j.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=j.isURLSearchParams(t)?t.toString():new ff(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const da=Symbol("internals");function Cg(e){return e?e.length:0}function kg(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function fa(e,t){const n=e.handlers,r=Cg(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class Ng{constructor(){this.handlers=[],this[da]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const o={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[da];this.handlers==null&&(this.handlers=[]),fa(this,a);const u=a.nextId++;return this.handlers.push(o),a.handlerEntries.set(u,{handler:o,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[da];fa(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(kg(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],fa(this,this[da]))}forEach(t){const n=this[da];fa(this,n),n.iterationDepth++;try{j.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(fa(this,n),kg(this.handlers),n.handlersLength=Cg(this.handlers))}}}const hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},YA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ff,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},pf=typeof window!="undefined"&&typeof document!="undefined",mf=typeof navigator=="object"&&navigator||void 0,WA=pf&&(!mf||["ReactNative","NativeScript","NS"].indexOf(mf.product)<0),GA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",XA=pf&&window.location.href||"http://localhost",Jt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pf,hasStandardBrowserEnv:WA,hasStandardBrowserWebWorkerEnv:GA,navigator:mf,origin:XA},Symbol.toStringTag,{value:"Module"}))),YA);function KA(e,t){return ul(e,new Jt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Jt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Pg=_g;function Og(e){if(e>Pg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+Pg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function QA(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Og(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function JA(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Ig(e){function t(n,r,o,a){Og(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&j.isArray(o)?o.length:u,d?(j.hasOwnProp(o,u)?o[u]=j.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!j.hasOwnProp(o,u)||!j.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&j.isArray(o[u])&&(o[u]=JA(o[u])),!l)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(QA(r),o,n,0)}),n}return null}const Rg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Wo=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function ZA(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=j.isObject(t);if(a&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Ig(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Wo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return KA(t,d).toString();if((l=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Wo(this,"env"),p=f&&f.FormData;return ul(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),ZA(t)):t}],transformResponse:[function(t){const n=Wo(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,o=Wo(this,"responseType"),a=o==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Wo(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,Wo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(Rg,e=>{ha.headers[e]={}});function gf(e,t){const n=this||ha,r=t||n,o=gn.from(r.headers);let a=r.data;return j.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Lg(e){return!!(e&&e.__CANCEL__)}let pa=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}const eC=/[\t\n\r]/g;function Mg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(eC,"")}function Ef(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function tC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function nC(e,t){let n=0,r=1e3/t,o,a;const u=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},r-T)))},()=>o&&u(o),(...p)=>u(p)]}const ll=(e,t,n=3)=>{let r=0;const o=tC(50,250);return nC(a=>{if(!a||!j.isNumber(a.loaded))return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=Math.max(0,l!=null?Math.min(u,l):u),f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Fg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bg=(e,t=j.asap)=>(...n)=>t(()=>e(...n)),rC=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,iC=Jt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&l.push(`path=${r}`),j.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),j.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+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function oC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const aC=/^https?:(?!\/\/)/i;function uC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${al}`)}function lC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${al}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${al}`);return n===-1?o:`${o}#${uC(t.slice(n+1))}`}function Ug(e,t){if(typeof e=="string"){const n=Mg(e);if(aC.test(n))throw new be(`Invalid URL ${JSON.stringify(lC(n))}: missing "//" after protocol`,be.ERR_INVALID_URL,t)}}function Hg(e,t,n,r){Ug(t,r);let o=!oC(t);return e&&(o||n===!1)?(Ug(e,r),sC(e,t)):t}const zg=e=>e instanceof gn?B({},e):e,cC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ro(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return j.isPlainObject(p)&&j.isPlainObject(m)?j.merge.call({caseless:y},p,m):j.isPlainObject(m)?j.merge({},m):j.isArray(m)?m.slice():m}function o(p,m,T,y){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!j.isUndefined(m))return r(void 0,m)}function u(p,m){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(m))if(j.isPlainObject(m)){if(j.hasOwnProp(m,p))return m[p]}else return;const T=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(T)&&j.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(j.hasOwnProp(t,T))return r(p,m);if(j.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutErrorMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>o(zg(p),zg(m),T,!0)};return j.forEach(cC(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=j.hasOwnProp(f,m)?f[m]:o,y=j.hasOwnProp(e,m)?e[m]:void 0,w=j.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);j.isUndefined(v)&&T!==d||(n[m]=v)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const dC=["content-type","content-length"];function fC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{dC.includes(r.toLowerCase())&&e.set(r,o)})}const hC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function jg(e){const t=ro({},e),n=T=>j.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=gn.from(l),t.url=Ag(Hg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=j.getSafeProp(d,"username")||"",y=j.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?hC(y):"")))}catch(w){throw be.from(w,be.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)){const T=j.getSafeProp(r,"getHeaders");Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?l.setContentType(void 0):j.isFunction(T)&&fC(l,T.call(r),n("formDataHeaderPolicy"))}if(Jt.hasStandardBrowserEnv&&(j.isFunction(o)&&(o=o(t)),o===!0||o==null&&rC(t.url))){const y=a&&u&&iC.read(u);y&&l.set(a,y)}return t}const pC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=jg(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function N(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function A(U){if(!S)return;if(S.status===0&&(Ef(Mg(o.url))||Ef(Jt.origin))!=="file"&&!(S.responseURL&&S.responseURL.startsWith("file:"))){r(new be("Request aborted",be.ECONNABORTED,e,S)),N(),S=null;return}try{U?v&&v(U):w&&w()}catch(ne){setTimeout(()=>{throw ne})}if(!S)return;const q=gn.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:q,config:e,request:S};Dg(function(me){n(me),N()},function(me){r(me),N()},Y),S=null}"onloadend"in S?S.onloadend=A:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.startsWith("file:"))||setTimeout(A)},S.onabort=function(){S&&(r(new be("Request aborted",be.ECONNABORTED,e,S)),N(),S=null)},S.onerror=function(q){const R=q&&q.message?q.message:"Network Error",Y=new be(R,be.ERR_NETWORK,e,S);Y.event=q||null,r(Y),N(),S=null},S.ontimeout=function(){let q=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||hf;o.timeoutErrorMessage&&(q=o.timeoutErrorMessage),r(new be(q,R.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,S)),N(),S=null},a===void 0&&u.setContentType(null),"setRequestHeader"in S&&j.forEach(bg(u),function(q,R){S.setRequestHeader(R,q)}),j.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),l&&l!=="json"&&(S.responseType=o.responseType),f&&([T,w,v]=ll(f,!0),S.addEventListener("progress",T)),d&&S.upload&&([m,y]=ll(d),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=U=>{S&&(r(!U||U.type?new pa(null,e,S):U),S.abort(),N(),S=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const C=Ef(o.url);if(C&&!Jt.protocols.includes(C)){r(new be("Unsupported protocol "+C+":",be.ERR_BAD_REQUEST,e)),N();return}S.send(a||null)})},mC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>{if(!r){if(d.aborted){o.call(d);return}d.addEventListener("abort",o,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>j.asap(u),l},gC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},EC=function(e,t){return vd(this,null,function*(){try{for(var n=Z2(yC(e)),r,o,a;r=!(o=yield new Kr(n.next())).done;r=!1){const u=o.value;yield*p0(gC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Kr(o.call(n)))}finally{if(a)throw a[0]}}})},yC=function(e){return vd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*p0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},$g=(e,t,n,r)=>{const o=EC(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:m}=yield o.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),o.return()}},{highWaterMark:2})},Vg=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,qg=(e,t,n)=>t+2<n&&Vg(e.charCodeAt(t+1))&&Vg(e.charCodeAt(t+2)),Yg=e=>e<=57?e-48:(e&223)-55,bC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,TC=e=>e===9||e===10||e===12||e===13||e===32,wC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},_C=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},xC=e=>{const t=e.length;let n=0,r=0,o=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&qg(e,a,t)&&(u=Yg(e.charCodeAt(a+1))*16+Yg(e.charCodeAt(a+2)),a+=2),!TC(u)){if(u===61){r++;continue}if(!bC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?_C(e):wC(n)},SC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let u=0;for(let l=0,d=o.length;l<d;l++){const f=o.charCodeAt(l);if(f===37&&qg(o,l,d))u+=1,l+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&l+1<d){const p=o.charCodeAt(l+1);p>=56320&&p<=57343?(u+=4,l++):u+=3}else u+=3}return u};function vC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return SC(t===-1?e:e.slice(0,t),xC)}const yf="1.20.0",Wg=64*1024,AC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:cl}=j,CC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Gg=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Xg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},kC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},NC=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?cl(o):typeof fetch=="function",d=cl(a),f=cl(u);if(!l)return!1;const p=l&&cl(n),m=l&&(typeof r=="function"?(S=>A=>S.encode(A))(new r):S=>et(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&Xg(()=>{let S=!1;const A=new a(Jt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),C=A.headers.has("Content-Type");return A.body!=null&&A.body.cancel(),S&&!C}),y=f&&p&&Xg(()=>j.isReadableStream(new u("").body)),w={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!w[S]&&(w[S]=(A,C)=>{let U=A&&A[S];if(U)return U.call(A);throw new be(`Response type '${S}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const v=S=>et(null,null,function*(){if(S==null)return 0;if(j.isBlob(S))return S.size;if(j.isSpecCompliantForm(S))return(yield new a(Jt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(j.isArrayBufferView(S)||j.isArrayBuffer(S))return S.byteLength;if(j.isURLSearchParams(S)&&(S=S+""),j.isString(S))return(yield m(S)).byteLength}),N=(S,A)=>et(null,null,function*(){const C=j.toFiniteNumber(S.getContentLength());return C==null?v(A):C});return S=>et(null,null,function*(){let{url:A,method:C,data:U,signal:q,cancelToken:R,timeout:Y,onDownloadProgress:ne,onUploadProgress:me,responseType:$,headers:ie,withCredentials:fe="same-origin",fetchOptions:ke,maxContentLength:re,maxBodyLength:ae,maxRedirects:Se}=jg(S);const se=j.isNumber(re)&&re>-1,J=j.isNumber(ae)&&ae>-1,oe=xe=>j.hasOwnProp(S,xe)?S[xe]:void 0;let k=o||fetch;$=$?($+"").toLowerCase():"text";let M=mC([q,R&&R.toAbortSignal()],Y),Q=null;const O=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let _e,Be=null;const ve=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,S,Q);try{let xe;const Pe=oe("auth");if(Pe){const $e=j.getSafeProp(Pe,"username")||"",bt=j.getSafeProp(Pe,"password")||"";xe={username:$e,password:bt}}if(kC(A)){const $e=new URL(A,Jt.origin);if(!xe&&($e.username||$e.password)){const bt=Gg($e.username),jt=Gg($e.password);xe={username:bt,password:jt}}($e.username||$e.password)&&($e.username="",$e.password="",A=$e.href)}if(xe&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(CC((xe.username||"")+":"+(xe.password||""))))),se&&typeof A=="string"&&A.startsWith("data:")&&vC(A)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,S,Q);if(J&&C!=="get"&&C!=="head"){const $e=yield v(U);if(typeof $e=="number"&&isFinite($e)&&(_e=$e,$e>ae))throw ve()}const Ye=J&&(j.isReadableStream(U)||j.isStream(U)),lt=($e,bt,jt)=>$g($e,Wg,we=>{if(J&&we>ae)throw Be=ve();bt&&bt(we)},jt);if(T&&C!=="get"&&C!=="head"&&(me||Ye)){if(_e=_e==null?yield N(ie,U):_e,_e!==0||Ye){let $e=new a(A,{method:"POST",body:U,duplex:"half"}),bt;if(j.isFormData(U)&&(bt=$e.headers.get("content-type"))&&ie.setContentType(bt),$e.body){const[jt,we]=me&&Fg(_e,ll(Bg(me)))||[];U=lt($e.body,jt,we)}}}else if(Ye&&!d&&p&&C!=="get"&&C!=="head")U=lt(U);else if(Ye&&d&&!T&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,S,Q);j.isString(fe)||(fe=fe?"include":"omit");const un=d&&"credentials"in a.prototype;if(j.isFormData(U)){const $e=ie.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+yf,!1);const Ot=ke==null?ke:Object.assign(Object.create(null),ke);Ot&&(delete Ot.body,delete Ot.headers,delete Ot.method,delete Ot.signal,delete Ot.duplex,delete Ot.credentials);const zt=Object.assign(Object.create(null),Ot,{signal:M,method:C.toUpperCase(),headers:bg(ie.normalize()),body:U,duplex:"half",credentials:un?fe:void 0});d&&(j.forEach(AC,($e,bt)=>{zt[bt]===void 0&&(zt[bt]=$e)}),zt.signal===void 0&&(zt.signal=null),zt.body===void 0&&(zt.body=null)),Se===0&&(zt.redirect="manual",Ot&&(Ot.redirect="manual")),Q=d&&new a(A,zt);let kt=yield d?k(Q,Ot):k(A,zt);const Gn=gn.from(kt.headers);if(se){const $e=j.toFiniteNumber(Gn.getContentLength());if($e!=null&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,S,Q)}const xn=y&&($==="stream"||$==="response");if(y&&kt.body&&(ne||se||xn&&O)){const $e={};["status","statusText","headers"].forEach(Xe=>{$e[Xe]=kt[Xe]});const bt=j.toFiniteNumber(Gn.getContentLength()),[jt,we]=ne&&Fg(bt,ll(Bg(ne),!0))||[];let De=0;const Fe=Xe=>{if(se&&(De=Xe,De>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,S,Q);jt&&jt(Xe)};kt=new u($g(kt.body,Wg,Fe,()=>{we&&we(),O&&O()}),$e)}$=$||"text";let Wt=yield w[j.findKey(w,$)||"text"](kt,S);if(se&&!y&&!xn){let $e;if(Wt!=null&&(typeof Wt.byteLength=="number"?$e=Wt.byteLength:typeof Wt.size=="number"?$e=Wt.size:typeof Wt=="string"&&($e=typeof r=="function"?new r().encode(Wt).byteLength:Wt.length)),typeof $e=="number"&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,S,Q)}return!xn&&O&&O(),yield new Promise(($e,bt)=>{Dg($e,bt,{data:Wt,headers:gn.from(kt.headers),status:kt.status,statusText:kt.statusText,config:S,request:Q})})}catch(xe){if(O&&O(),M&&M.aborted&&M.reason instanceof be){const Pe=M.reason;throw Pe.config=S,Q&&(Pe.request=Q),xe!==Pe&&Object.defineProperty(Pe,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),Pe}if(Be)throw Q&&!Be.request&&(Be.request=Q),Be;if(xe instanceof be)throw Q&&!xe.request&&(xe.request=Q),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const Pe=new be("Network Error",be.ERR_NETWORK,S,Q,xe&&xe.response);throw Object.defineProperty(Pe,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),Pe}throw be.from(xe,xe&&xe.code,S,Q,xe&&xe.response)}})},PC=new Map,Kg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,l=u,d,f,p=PC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:NC(t)),p=f;return f};Kg();const bf={http:jA,xhr:pC,fetch:{get:Kg}};j.forEach(bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Qg=e=>`- ${e}`,OC=e=>j.isFunction(e)||e===null||e===!1;function IC(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!OC(r)&&(o=bf[(l=String(r)).toLowerCase()],o===void 0))throw new be(`Unknown adapter '${l}'`);if(o&&(j.isFunction(o)||(o=o.get(t))))break;a[l||"#"+u]=o}if(!o){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 :
5
- `+u.map(Qg).join(`
6
- `):" "+Qg(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+l,be.ERR_NOT_SUPPORT)}return o}const Jg={getAdapter:IC,adapters:bf};function Tf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function wf(e){const t=j.toSafeFlatObject(e);return Tf(t),t.headers=gn.from(j.getSafeProp(t,"headers")),t.data=gf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jg.getAdapter(t.adapter||ha.adapter,t)(t).then(function(o){Tf(t),t.response=o;try{o.data=gf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=gn.from(o.headers),o},function(o){if(!Lg(o)&&(Tf(t),o&&o.response)){t.response=o.response;try{o.response.data=gf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=gn.from(o.response.headers)}return Promise.reject(o)})}const dl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zg={};dl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+yf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new be(o(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Zg[u]&&(Zg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},dl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function RC(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const fl={assertOptions:RC,validators:dl},En=fl.validators;let io=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ng,response:new Ng}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack;let u="";if(typeof a=="string"){const l=a.indexOf(`
1
+ (function(qe,Ue){typeof exports=="object"&&typeof module!="undefined"?module.exports=Ue():typeof define=="function"&&define.amd?define(Ue):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=Ue())})(this,(function(){"use strict";var xU=Object.defineProperty,SU=Object.defineProperties;var vU=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var Q2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable;var Ks=(qe,Ue)=>(Ue=Symbol[qe])?Ue:Symbol.for("Symbol."+qe),AU=qe=>{throw TypeError(qe)},Hu=Math.pow,p0=(qe,Ue,Qe)=>Ue in qe?xU(qe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[Ue]=Qe,B=(qe,Ue)=>{for(var Qe in Ue||(Ue={}))Q2.call(Ue,Qe)&&p0(qe,Qe,Ue[Qe]);if(Sd)for(var Qe of Sd(Ue))J2.call(Ue,Qe)&&p0(qe,Qe,Ue[Qe]);return qe},me=(qe,Ue)=>SU(qe,vU(Ue));var hn=(qe,Ue)=>{var Qe={};for(var st in qe)Q2.call(qe,st)&&Ue.indexOf(st)<0&&(Qe[st]=qe[st]);if(qe!=null&&Sd)for(var st of Sd(qe))Ue.indexOf(st)<0&&J2.call(qe,st)&&(Qe[st]=qe[st]);return Qe};var Te=(qe,Ue,Qe)=>p0(qe,typeof Ue!="symbol"?Ue+"":Ue,Qe);var et=(qe,Ue,Qe)=>new Promise((st,Ft)=>{var Le=gt=>{try{pn(Qe.next(gt))}catch(mn){Ft(mn)}},an=gt=>{try{pn(Qe.throw(gt))}catch(mn){Ft(mn)}},pn=gt=>gt.done?st(gt.value):Promise.resolve(gt.value).then(Le,an);pn((Qe=Qe.apply(qe,Ue)).next())}),Kr=function(qe,Ue){this[0]=qe,this[1]=Ue},vd=(qe,Ue,Qe)=>{var st=(pn,gt,mn,Cr)=>{try{var Uo=Qe[pn](gt),Xi=(gt=Uo.value)instanceof Kr,Qs=Uo.done;Promise.resolve(Xi?gt[0]:gt).then(_=>Xi?st(pn==="return"?pn:"next",gt[1]?{done:_.done,value:_.value}:_,mn,Cr):mn({value:_,done:Qs})).catch(_=>st("throw",_,mn,Cr))}catch(_){Cr(_)}},Ft=(pn,gt,mn,Cr)=>an[pn]=Uo=>(gt=new Promise((Xi,Qs,_)=>(_=()=>st(pn,Uo,Xi,Qs),Le?Le.then(_):_())),Cr=()=>Le===mn&&(Le=0),Le=mn=gt.then(Cr,Cr),gt),Le,an={};return Qe=Qe.apply(qe,Ue),an[Ks("asyncIterator")]=()=>an,Ft("next"),Ft("throw"),Ft("return"),an},m0=qe=>{var Ue=qe[Ks("asyncIterator")],Qe=!1,st,Ft={};return Ue==null?(Ue=qe[Ks("iterator")](),st=Le=>Ft[Le]=an=>Ue[Le](an)):(Ue=Ue.call(qe),st=Le=>Ft[Le]=an=>{if(Qe){if(Qe=!1,Le==="throw")throw an;return an}return Qe=!0,{done:!1,value:new Kr(new Promise(pn=>{var gt=Ue[Le](an);gt instanceof Object||AU("Object expected"),pn(gt)}),1)}}),Ft[Ks("iterator")]=()=>Ft,st("next"),"throw"in Ue?st("throw"):Ft.throw=Le=>{throw Le},"return"in Ue&&st("return"),Ft},Z2=(qe,Ue,Qe)=>(Ue=qe[Ks("asyncIterator")])?Ue.call(qe):(qe=qe[Ks("iterator")](),Ue={},Qe=(st,Ft)=>(Ft=qe[st])&&(Ue[st]=Le=>new Promise((an,pn,gt)=>(Le=Ft.call(qe,Le),gt=Le.done,Promise.resolve(Le.value).then(mn=>an({value:mn,done:gt}),pn)))),Qe("next"),Qe("return"),Ue);var qe=document.createElement("style");qe.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:50%;padding:.25rem;border:none;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-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button{animation:cim-widget-fab-pulse 2s infinite ease-in-out;transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-layout-commerce{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-composer-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px}.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}}.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:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-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-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-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-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.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-user-search{display:flex;flex-direction:column}.cim-widget-user-search.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%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.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-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}.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-embedded-chat.cim-widget-layout-commerce>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-layout-commerce .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.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{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;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}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);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)}.cim-widget-dialog.cim-widget-layout-commerce{border:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;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[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{height:3.875rem;min-height:3.875rem;padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{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)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.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-header{border-top-left-radius:0;border-top-right-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);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);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.cim-widget-layout-commerce .cim-widget-modal-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.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}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-layout-commerce{--cim-widget-shopping-canvas: #fcfcfc;--cim-widget-shopping-chip: #f7f7f7;--cim-widget-shopping-muted: #5c5c5c;--cim-widget-shopping-outline: #a3a3a3;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-container{gap:1rem;padding:1.25rem;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-message-group-child{width:100%}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-markdown,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text,.cim-widget-layout-commerce .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:1rem;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:#fff}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-cart-box,.cim-widget-layout-commerce .cim-widget-cart-summary,.cim-widget-layout-commerce .cim-widget-cart-expanded,.cim-widget-layout-commerce .cim-widget-cart-coupon,.cim-widget-layout-commerce .cim-widget-cart-coupon-field,.cim-widget-layout-commerce .cim-widget-cart-coupon-input{background-color:#fff}.cim-widget-layout-commerce .cim-widget-cart-expanded{border-top:none}.cim-widget-layout-commerce .cim-widget-cart-totals{border-top:1px solid #dedede;padding-top:16px;gap:12px}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-layout-commerce .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:8px;background-color:#f1f1f1;color:#181818}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-layout-commerce .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-msg-pdp__card,.cim-widget-layout-commerce .cim-widget-msg-pdp__gallery,.cim-widget-layout-commerce .cim-widget-msg-pdp__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-pdp__card{border-color:#dedede;border-radius:.75rem;box-shadow:0 1px 3px #00000012}.cim-widget-layout-commerce .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__title,.cim-widget-layout-commerce .cim-widget-msg-pdp__title-link{color:#181818;font-size:.875rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__description{color:#3e3e3c;font-size:.75rem;opacity:1}.cim-widget-layout-commerce .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip{border-radius:20px;background-color:#f1f1f1;border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip:hover{background-color:#ededed;border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #db665e);border-color:var(--cim-widget-primary-color, #db665e);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-secondary-color, #c9554d);border-color:var(--cim-widget-secondary-color, #c9554d);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-primary-color, #181818);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-pdp-gallery__prev-trigger,.cim-widget-layout-commerce .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:.375rem;background-color:#f1f1f1;color:#5c5c5c;box-shadow:none}.cim-widget-layout-commerce .cim-widget-msg-product-card,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-wrapper,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-placeholder,.cim-widget-layout-commerce .cim-widget-msg-product-card__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-product-card__title,.cim-widget-layout-commerce .cim-widget-msg-product-card__title-link,.cim-widget-layout-commerce .cim-widget-msg-product-card__price,.cim-widget-layout-commerce .cim-widget-product-tile-name,.cim-widget-layout-commerce .cim-widget-product-tile-price{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-layout-commerce .cim-widget-carousel__control{padding:0}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid #dedede;border-radius:50%;background-color:#fff;color:#3e3e3c;box-shadow:0 2px 5px #00000026}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:hover,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:hover{background-color:#fff;border-color:#c9c9c9;box-shadow:0 3px 7px #0000002e}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid #181818;outline-offset:2px}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-markdown>:first-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-layout-commerce .cim-widget-markdown>:last-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-ask-cim-suggestions-container,.cim-widget-layout-commerce .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-shopping-chip);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:hover,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-layout-commerce .cim-widget-user-message.embedded,.cim-widget-layout-commerce .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-user-message-text{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:400}.cim-widget-layout-commerce .cim-widget-message.embedded{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-layout-commerce .cim-widget-search-bar{gap:.5rem}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-layout-commerce .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .25rem .5rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:1.5rem;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-connection-status-icon{display:none}.cim-widget-layout-commerce input.cim-widget-search-input{min-height:2.75rem;padding:0 .625rem;border:0;border-radius:999px;background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-layout-commerce input.cim-widget-search-input::placeholder{color:var(--cim-widget-shopping-muted);opacity:1}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:999px}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-layout-commerce .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:2.75rem;border:0;border-radius:50%;background-color:#111;color:#fff}.cim-widget-layout-commerce .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-layout-commerce .cim-widget-search-button-icon:hover{background-color:#333;border-color:transparent}.cim-widget-layout-commerce .cim-widget-search-button-icon:focus-visible{outline:2px solid #000000;outline-offset:3px}.cim-widget-layout-commerce .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-shopping-muted)}@media(max-width:576px){.cim-widget-layout-commerce .cim-widget-message-container{padding:1rem}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{padding-right:1rem;padding-left:1rem}}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
+ /*$vite$:1*/`,document.head.appendChild(qe);function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},st={},Ft={exports:{}},Le={};var an;function pn(){if(an)return Le;an=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(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(){}},w=Object.assign,v={};function N(M,Q,O){this.props=M,this.context=Q,this.refs=v,this.updater=O||y}N.prototype.isReactComponent={},N.prototype.setState=function(M,Q){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,Q,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=N.prototype;function A(M,Q,O){this.props=M,this.context=Q,this.refs=v,this.updater=O||y}var C=A.prototype=new S;C.constructor=A,w(C,N.prototype),C.isPureReactComponent=!0;var U=Array.isArray,V=Object.prototype.hasOwnProperty,R={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function re(M,Q,O){var _e,Be={},ve=null,xe=null;if(Q!=null)for(_e in Q.ref!==void 0&&(xe=Q.ref),Q.key!==void 0&&(ve=""+Q.key),Q)V.call(Q,_e)&&!q.hasOwnProperty(_e)&&(Be[_e]=Q[_e]);var Pe=arguments.length-2;if(Pe===1)Be.children=O;else if(1<Pe){for(var Ye=Array(Pe),lt=0;lt<Pe;lt++)Ye[lt]=arguments[lt+2];Be.children=Ye}if(M&&M.defaultProps)for(_e in Pe=M.defaultProps,Pe)Be[_e]===void 0&&(Be[_e]=Pe[_e]);return{$$typeof:e,type:M,key:ve,ref:xe,props:Be,_owner:R.current}}function de(M,Q){return{$$typeof:e,type:M.type,key:Q,ref:M.ref,props:M.props,_owner:M._owner}}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ie(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return Q[O]})}var he=/\/+/g;function ke(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):Q.toString(36)}function ne(M,Q,O,_e,Be){var ve=typeof M;(ve==="undefined"||ve==="boolean")&&(M=null);var xe=!1;if(M===null)xe=!0;else switch(ve){case"string":case"number":xe=!0;break;case"object":switch(M.$$typeof){case e:case t:xe=!0}}if(xe)return xe=M,Be=Be(xe),M=_e===""?"."+ke(xe,0):_e,U(Be)?(O="",M!=null&&(O=M.replace(he,"$&/")+"/"),ne(Be,Q,O,"",function(lt){return lt})):Be!=null&&(Y(Be)&&(Be=de(Be,O+(!Be.key||xe&&xe.key===Be.key?"":(""+Be.key).replace(he,"$&/")+"/")+M)),Q.push(Be)),1;if(xe=0,_e=_e===""?".":_e+":",U(M))for(var Pe=0;Pe<M.length;Pe++){ve=M[Pe];var Ye=_e+ke(ve,Pe);xe+=ne(ve,Q,O,Ye,Be)}else if(Ye=T(M),typeof Ye=="function")for(M=Ye.call(M),Pe=0;!(ve=M.next()).done;)ve=ve.value,Ye=_e+ke(ve,Pe++),xe+=ne(ve,Q,O,Ye,Be);else if(ve==="object")throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return xe}function ae(M,Q,O){if(M==null)return M;var _e=[],Be=0;return ne(M,_e,"","",function(ve){return Q.call(O,ve,Be++)}),_e}function Se(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var se={current:null},J={transition:null},oe={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:J,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:ae,forEach:function(M,Q,O){ae(M,function(){Q.apply(this,arguments)},O)},count:function(M){var Q=0;return ae(M,function(){Q++}),Q},toArray:function(M){return ae(M,function(Q){return Q})||[]},only:function(M){if(!Y(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Le.Component=N,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=A,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Le.act=k,Le.cloneElement=function(M,Q,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=w({},M.props),Be=M.key,ve=M.ref,xe=M._owner;if(Q!=null){if(Q.ref!==void 0&&(ve=Q.ref,xe=R.current),Q.key!==void 0&&(Be=""+Q.key),M.type&&M.type.defaultProps)var Pe=M.type.defaultProps;for(Ye in Q)V.call(Q,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=Q[Ye]===void 0&&Pe!==void 0?Pe[Ye]:Q[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=O;else if(1<Ye){Pe=Array(Ye);for(var lt=0;lt<Ye;lt++)Pe[lt]=arguments[lt+2];_e.children=Pe}return{$$typeof:e,type:M.type,key:Be,ref:ve,props:_e,_owner:xe}},Le.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},Le.createElement=re,Le.createFactory=function(M){var Q=re.bind(null,M);return Q.type=M,Q},Le.createRef=function(){return{current:null}},Le.forwardRef=function(M){return{$$typeof:l,render:M}},Le.isValidElement=Y,Le.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Se}},Le.memo=function(M,Q){return{$$typeof:f,type:M,compare:Q===void 0?null:Q}},Le.startTransition=function(M){var Q=J.transition;J.transition={};try{M()}finally{J.transition=Q}},Le.unstable_act=k,Le.useCallback=function(M,Q){return se.current.useCallback(M,Q)},Le.useContext=function(M){return se.current.useContext(M)},Le.useDebugValue=function(){},Le.useDeferredValue=function(M){return se.current.useDeferredValue(M)},Le.useEffect=function(M,Q){return se.current.useEffect(M,Q)},Le.useId=function(){return se.current.useId()},Le.useImperativeHandle=function(M,Q,O){return se.current.useImperativeHandle(M,Q,O)},Le.useInsertionEffect=function(M,Q){return se.current.useInsertionEffect(M,Q)},Le.useLayoutEffect=function(M,Q){return se.current.useLayoutEffect(M,Q)},Le.useMemo=function(M,Q){return se.current.useMemo(M,Q)},Le.useReducer=function(M,Q,O){return se.current.useReducer(M,Q,O)},Le.useRef=function(M){return se.current.useRef(M)},Le.useState=function(M){return se.current.useState(M)},Le.useSyncExternalStore=function(M,Q,O){return se.current.useSyncExternalStore(M,Q,O)},Le.useTransition=function(){return se.current.useTransition()},Le.version="18.3.1",Le}var gt;function mn(){return gt||(gt=1,Ft.exports=pn()),Ft.exports}var Cr;function Uo(){if(Cr)return st;Cr=1;var e=mn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:o.current}}return st.Fragment=n,st.jsx=u,st.jsxs=u,st}var Xi;function Qs(){return Xi||(Xi=1,Qe.exports=Uo()),Qe.exports}var _=Qs();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const zu=Object.create(null);Object.keys(kr).forEach(e=>{zu[kr[e]]=e});const Ad={type:"error",data:"parser error"},g0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",E0=typeof ArrayBuffer=="function",y0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cd=({type:e,data:t},n,r)=>g0&&t instanceof Blob?n?r(t):b0(t,r):E0&&(t instanceof ArrayBuffer||y0(t))?n?r(t):b0(new Blob([t]),r):r(kr[e]+(t||"")),b0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function T0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let kd;function rS(e,t){if(g0&&e.data instanceof Blob)return e.data.arrayBuffer().then(T0).then(t);if(E0&&(e.data instanceof ArrayBuffer||y0(e.data)))return t(T0(e.data));Cd(e,!1,n=>{kd||(kd=new TextEncoder),t(kd.encode(n))})}const w0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Js=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<w0.length;e++)Js[w0.charCodeAt(e)]=e;const iS=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Js[e.charCodeAt(r)],u=Js[e.charCodeAt(r+1)],l=Js[e.charCodeAt(r+2)],d=Js[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|l>>2,p[o++]=(l&3)<<6|d&63;return f},oS=typeof ArrayBuffer=="function",Nd=(e,t)=>{if(typeof e!="string")return{type:"message",data:_0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:sS(e.substring(1),t)}:zu[n]?e.length>1?{type:zu[n],data:e.substring(1)}:{type:zu[n]}:Ad},sS=(e,t)=>{if(oS){const n=iS(e);return _0(n,t)}else return{base64:!0,data:e}},_0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,x0="",aS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Cd(a,!1,l=>{r[u]=l,++o===n&&t(r.join(x0))})})},uS=(e,t)=>{const n=e.split(x0),r=[];for(let o=0;o<n.length;o++){const a=Nd(n[o],t);if(r.push(a),a.type==="error")break}return r};function lS(){return new TransformStream({transform(e,t){rS(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Pd;function ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function cS(e,t){Pd||(Pd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(ju(n)<1)break;const d=$u(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ju(n)<2)break;const d=$u(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ju(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Ad);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ju(n)<o)break;const d=$u(n,o);l.enqueue(Nd(a?d:Pd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Ad);break}}}})}const S0=4;function Bt(e){if(e)return dS(e)}function dS(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.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),er=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),fS="arraybuffer";function CU(){}function v0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const hS=er.setTimeout,pS=er.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=hS.bind(er),e.clearTimeoutFn=pS.bind(er)):(e.setTimeoutFn=er.setTimeout.bind(er),e.clearTimeoutFn=er.clearTimeout.bind(er))}const mS=1.33;function gS(e){return typeof e=="string"?ES(e):Math.ceil((e.byteLength||e.size)*mS)}function ES(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function A0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function yS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function bS(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class TS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Od extends Bt{constructor(t){super(),this.writable=!1,qu(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 TS(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=Nd(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=yS(t);return n.length?"?"+n:""}}class wS extends Od{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)};uS(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,aS(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]=A0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let C0=!1;try{C0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _S=C0;function xS(){}class SS extends wS{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nr extends Bt{constructor(t,n,r){super(),this.createRequest=t,qu(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=v0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Nr.requestsCount++,Nr.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=xS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.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(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",k0);else if(typeof addEventListener=="function"){const e="onpagehide"in er?"pagehide":"unload";addEventListener(e,k0,!1)}}function k0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const vS=(function(){const e=N0({xdomain:!1});return e&&e.responseType!==null})();class AS extends SS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=vS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(N0,this.uri(),t)}}function N0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_S))return new XMLHttpRequest}catch(n){}if(!t)try{return new er[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const P0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CS extends Od{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=P0?{}:v0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&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]=A0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Id=er.WebSocket||er.MozWebSocket;class kS extends CS{createSocket(t,n,r){return P0?new Id(t,n,r):n?new Id(t,n):new Id(t)}doWrite(t,n){this.ws.send(n)}}class NS extends Od{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=cS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=lS();o.readable.pipeTo(t.writable),this._writer=o.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],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const PS={websocket:kS,webtransport:NS,polling:AS},OS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=OS.exec(e||""),a={},u=14;for(;u--;)a[IS[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=RS(a,a.path),a.queryKey=LS(a,a.query),a}function RS(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 LS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ld=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Ld&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class yi extends Bt{constructor(t,n){if(super(),this.binaryType=fS,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=Rd(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=Rd(n.host).host);qu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bS(this.opts.query)),Ld&&(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"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=S0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=gS(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ld&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=S0;class DS extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 MS=class extends DS{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>PS[a]).filter(a=>!!a)),super(r?o:t,o)}};function FS(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=Rd(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 BS=typeof ArrayBuffer=="function",US=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,O0=Object.prototype.toString,HS=typeof Blob=="function"||typeof Blob!="undefined"&&O0.call(Blob)==="[object BlobConstructor]",zS=typeof File=="function"||typeof File!="undefined"&&O0.call(File)==="[object FileConstructor]";function Dd(e){return BS&&(e instanceof ArrayBuffer||US(e))||HS&&e instanceof Blob||zS&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Dd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function jS(e){const t=[],n=e.data,r=e;return r.data=Gu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Gu(e,t,n){if(!e)return e;if(Dd(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 o=0;o<e.length;o++)r[o]=Gu(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Gu(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Gu(e[o],t));return r}return e}function $S(e,t){return e.data=Md(e.data,t),delete e.attachments,e}function Md(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]=Md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Md(e[n],t));return e}const VS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class qS{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=jS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Fd extends Bt{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new YS(n)):super.emitReserved("decoded",n)}else if(Dd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.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(!WS(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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Fd.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 nt.CONNECT:return I0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||I0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&VS.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class YS{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=$S(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const WS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function I0(e){return Object.prototype.toString.call(e)==="[object Object]"}const GS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fd,Encoder:qS,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const XS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class R0 extends Bt{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=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(XS.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:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let 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"))},o),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,l)=>u?o(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((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nt.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 Ho(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}Ho.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},Ho.prototype.reset=function(){this.attempts=0},Ho.prototype.setMin=function(e){this.ms=e},Ho.prototype.setMax=function(e){this.max=e},Ho.prototype.setJitter=function(e){this.jitter=e};class Bd extends Bt{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,qu(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 Ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||GS;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new MS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=hr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(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 R0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Zs={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=FS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Zs[o]&&a in Zs[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Bd(r,t):(Zs[o]||(Zs[o]=new Bd(r,t)),d=Zs[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:Bd,Socket:R0,io:Xu,connect:Xu});var KS=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===QS})(t)})(e)},QS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?zo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function JS(e,t,n){return e.concat(t).map((function(r){return ea(r,n)}))}function L0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function D0(e,t){try{return t in e}catch(n){return!1}}function ZS(e,t,n){var r={};return n.isMergeableObject(e)&&L0(e).forEach((function(o){r[o]=ea(e[o],n)})),L0(t).forEach((function(o){(function(a,u){return D0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(D0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return zo;var l=u.customMerge(a);return typeof l=="function"?l:zo})(o,n)(e[o],t[o],n):r[o]=ea(t[o],n))})),r}function zo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||JS,n.isMergeableObject=n.isMergeableObject||KS,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ZS(e,t,n):ea(t,n)}zo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return zo(n,r,t)}),{})};var ev=zo;let tv=class{constructor(t){Object.assign(this,t)}};function kn(e){if(e)return(function(t){for(var n in kn.prototype)t[n]=kn.prototype[n];return t})(e)}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},kn.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){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},kn.prototype.emitReserved=kn.prototype.emit,kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const nv=typeof ArrayBuffer=="function",M0=Object.prototype.toString,rv=typeof Blob=="function"||typeof Blob!="undefined"&&M0.call(Blob)==="[object BlobConstructor]",iv=typeof File=="function"||typeof File!="undefined"&&M0.call(File)==="[object FileConstructor]";function Ud(e){return nv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||rv&&e instanceof Blob||iv&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Ud(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function ov(e){const t=[],n=e.data,r=e;return r.data=Hd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Hd(e,t){if(!e)return e;if(Ud(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Hd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Hd(e[r],t));return n}return e}function sv(e,t){return e.data=zd(e.data,t),delete e.attachments,e}function zd(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")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=zd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zd(e[n],t));return e}const av=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(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"})(Ct||(Ct={}));class uv{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.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=ov(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class jd extends kn{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===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new lv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Ud(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.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(!cv(l)||l<0)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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!jd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return F0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||F0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&av.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lv{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=sv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function F0(e){return Object.prototype.toString.call(e)==="[object Object]"}const B0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],U0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([l,d])=>{const f=[...a,t(l)];return[e(l),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((l=>l[1])):Object.fromEntries(u)},H0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),dv=U0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),B0),z0=U0(H0,H0,B0),fv={Encoder:class extends uv{encode(e){var t,n;return super.encode(me(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],dv(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends jd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?z0(r):r)):n instanceof Object?z0(n):n)):t))}}},hv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class pv{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:l={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${o}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[hv,l,{parser:fv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Xu(d,ev.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Hu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return vd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new Kr(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new Kr(p==null?void 0:p())}})})((({emit:u,cancel:l})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&l(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,l)=>this.socket.emit(t,n,(d=>{d.name==="error"?l(new tv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const j0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),$0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var F=mn();const Ki=Ue(F);var V0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function tr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function $o(e){return!!e&&!!e[at]}function Qr(e){var t;return e?Y0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||na(e)||Ju(e):!1}var mv=Object.prototype.constructor.toString();function Y0(e){if(!e||typeof e!="object")return!1;const t=jo(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)===mv}function ta(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Ju(e)?3:0}function $d(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function W0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function gv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Qt(e){return e.copy_||e.base_}function Vd(e,t){if(na(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Y0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[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(jo(e),r)}else{const r=jo(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function qd(e,t=!1){return el(e)||$o(e)||!Qr(e)||(Qu(e)>1&&Object.defineProperties(e,{set:{value:Zu},add:{value:Zu},clear:{value:Zu},delete:{value:Zu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>qd(n,!0))),e}function Zu(){tr(2)}function el(e){return Object.isFrozen(e)}var Yd={};function Qi(e){const t=Yd[e];return t||tr(0,e),t}function Ev(e,t){Yd[e]||(Yd[e]=t)}var ra;function tl(){return ra}function yv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function G0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wd(e){Gd(e),e.drafts_.forEach(bv),e.drafts_=null}function Gd(e){e===ra&&(ra=e.parent_)}function X0(e){return ra=yv(ra,e)}function bv(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Wd(t),tr(4)),Qr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Wd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==V0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return ta(t,(o,a)=>Q0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return rl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),ta(a,(l,d)=>Q0(e,r,o,l,d,n,u)),rl(e,o,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,a,u){if($o(o)){const l=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=nl(e,o,l);if(W0(n,r,d),$o(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Qr(o)&&!el(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&rl(e,o)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function Tv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Xd;n&&(o=[r],a=ia);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var Xd={get(e,t){if(t===at)return e;const n=Qt(e);if(!$d(n,t))return wv(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Kd(e.base_,t)?(Qd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Qt(e)},ownKeys(e){return Reflect.ownKeys(Qt(e))},set(e,t,n){const r=J0(Qt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Kd(Qt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(gv(n,o)&&(n!==void 0||$d(e.base_,t)))return!0;Qd(e),Jr(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 Kd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Qt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){tr(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){tr(12)}},ia={};ta(Xd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Xd.set.call(this,e[0],t,n,e[0])};function Kd(e,t){const n=e[at];return(n?Qt(n):e)[t]}function wv(e,t,n){var o;const r=J0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function J0(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Qd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _v=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&tr(6),r!==void 0&&typeof r!="function"&&tr(7);let o;if(Qr(t)){const a=X0(this),u=oa(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?Wd(a):Gd(a)}return G0(a,r),K0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===V0&&(o=void 0),this.autoFreeze_&&qd(o,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else tr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,o;return[this.produce(t,n,(u,l)=>{r=u,o=l}),r,o]},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){Qr(e)||tr(8),$o(e)&&(e=xv(e));const t=X0(this),n=oa(e,void 0);return n[at].isManual_=!0,Gd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&tr(9);const{scope_:r}=n;return G0(r,t),K0(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return $o(e)?r(e,t):this.produce(e,o=>r(o,t))}};function oa(e,t){const n=na(e)?Qi("MapSet").proxyMap_(e,t):Ju(e)?Qi("MapSet").proxySet_(e,t):Tv(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function xv(e){return $o(e)||tr(10,e),Z0(e)}function Z0(e){if(!Qr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return ta(n,(r,o)=>{W0(n,r,Z0(o))}),t&&(t.finalized_=!1),n}function Sv(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Qt(this[at]).size}has(d){return Qt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Qt(p).has(d)||Qt(p).get(d)!==f)&&(n(p),Jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Qt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Qt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Qt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Qt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(l,d){return new e(l,d)}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Qt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Qt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function o(l,d){return new r(l,d)}function a(l){l.copy_||(l.copy_=new Set,l.base_.forEach(d=>{if(Qr(d)){const f=oa(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&tr(3,JSON.stringify(Qt(l)))}Ev("MapSet",{proxyMap_:t,proxySet_:o})}var vv=new _v,Av=vv.produce;function eg(e,t,n){var r=F.useMemo(function(){return Av(e)},[e]);return F.useReducer(r,t,n)}const tg={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},Et={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Ji={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},ng=["ask_cim","search","browse","pdp"],Cv=e=>ng.includes(e),rg={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(rg));const kv=new Map(Object.entries(rg).map(([e,t])=>[t,e])),Nv=e=>{var t;return(t=kv.get(e))!=null?t:null},Vo="cimulate",Jd=`${Vo}:pdp-update`,Zd=`${Vo}:browse-update`,ef=`${Vo}:search-update`,tf=`${Vo}:ui-state-update`,nf=`${Vo}:prompts-state-update`,rf=`${Vo}:session-state`,Pr=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},tg),Pv={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},tg),Ov={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},H="cim-widget",$n=`--${H}`,Zi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},Iv=(e={},t)=>{const n=t==="commerce",r=n?"#db665e":Zi.primaryColor,o=n?"#c9554d":Zi.secondaryColor,a=n?"0.75rem":Zi.borderRadius;return{[`${$n}-primary-color`]:e.primaryColor||r,[`${$n}-secondary-color`]:e.secondaryColor||o,[`${$n}-font-color`]:e.fontColor||Zi.fontColor,[`${$n}-font-family`]:e.fontFamily||Zi.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Zi.backgroundColor,[`${$n}-border-color`]:e.borderColor||Zi.borderColor,[`${$n}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||a)}},ei={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ig=F.createContext(null),og=F.createContext(null),yt={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"},sg={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};function ag(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rv}=Object.prototype,{getPrototypeOf:bi}=Object,{iterator:sa,toStringTag:ug}=Symbol,aa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lg=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),cg=(e,t,n)=>e===Object.prototype||!n&&t===null,Lv=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(lg(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},ua=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=bi(n);if(cg(n,o,n===e))return!1;if(aa(n,t))return!0;n=o}return!1},Dv=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,Mv=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=bi(e);if(t===null&&Lv(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let a=e;for(;a!=null&&o.indexOf(a)===-1;){o.push(a);const u=a===e?t:bi(a);if(cg(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)lg(d)||aa(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},of=(e=>t=>{const n=Rv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nr=e=>(e=e.toLowerCase(),t=>of(t)===e),il=e=>t=>typeof t===e,{isArray:eo}=Array,to=il("undefined");function qo(e){return e!==null&&!to(e)&&e.constructor!==null&&!to(e.constructor)&&In(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dg=nr("ArrayBuffer");function Fv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dg(e.buffer),t}const Bv=il("string"),In=il("function"),fg=il("number"),Yo=e=>e!==null&&typeof e=="object",Uv=e=>e===!0||e===!1,ol=e=>{if(!Yo(e))return!1;const t=bi(e);return(t===null||t===Object.prototype||bi(t)===null)&&!ua(e,ug)&&!ua(e,sa)},Hv=e=>{if(!Yo(e)||qo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},zv=nr("Date"),jv=nr("File"),$v=e=>!!(e&&typeof e.uri!="undefined"),Vv=e=>e&&typeof e.getParts!="undefined",qv=nr("Blob"),Yv=nr("FileList"),Wv=nr("Set"),Gv=e=>Yo(e)&&In(e.pipe);function Xv(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const hg=Xv(),pg=typeof hg.FormData!="undefined"?hg.FormData:void 0,Kv=e=>{if(!e)return!1;if(pg&&e instanceof pg)return!0;const t=bi(e);if(!t||t===Object.prototype||!In(e.append))return!1;const n=of(e);return n==="formdata"||n==="object"&&In(e.toString)&&e.toString()==="[object FormData]"},Qv=nr("URLSearchParams"),[Jv,Zv,eA,tA]=["ReadableStream","Request","Response","Headers"].map(nr),nA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),eo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(qo(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 mg(e,t){if(qo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const no=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,gg=e=>!to(e)&&e!==no;function sf(...e){const{caseless:t,skipUndefined:n}=gg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&mg(r,u)||u,d=aa(r,l)?r[l]:void 0;ol(d)&&ol(a)?r[l]=sf(d,a):ol(a)?r[l]=sf({},a):eo(a)?r[l]=a.slice():(!n||!to(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||qo(l)||(la(l,o),typeof l!="object"||eo(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];pA.call(l,p)&&o(l[p],p)}}return r}const rA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(o,a)=>{n&&In(o)?Object.defineProperty(e,a,{__proto__:null,value:ag(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),iA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oA=(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)},sA=(e,t,n,r)=>{let o,a,u;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&bi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aA=(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},uA=e=>{if(!e)return null;if(eo(e))return e;let t=e.length;if(!fg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},lA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&bi(Uint8Array)),cA=(e,t)=>{const r=(e&&e[sa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},dA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},fA=nr("HTMLFormElement"),hA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:pA}=Object.prototype,mA=nr("RegExp"),Eg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},gA=e=>{Eg(e,(t,n)=>{if(In(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(In(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+"'")})}})},EA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return eo(e)?r(e):r(String(e).split(t)),n},yA=()=>{},bA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function TA(e){return!!(e&&In(e.append)&&e[ug]==="FormData"&&e[sa])}const wA=e=>{const t=new WeakSet,n=r=>{if(Yo(r)){if(t.has(r))return;if(qo(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(Wv(r)){o=[];for(const a of r){const u=n(a);!to(u)&&o.push(u)}}else o=eo(r)?[]:{},la(r,(a,u)=>{const l=n(a);!to(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},_A=nr("AsyncFunction"),xA=e=>e&&(Yo(e)||In(e))&&In(e.then)&&In(e.catch),yg=((e,t)=>e?setImmediate:t?((n,r)=>(no.addEventListener("message",({source:o,data:a})=>{o===no&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),no.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",In(no.postMessage)),SA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(no):typeof process!="undefined"&&process.nextTick||yg,bg=e=>e!=null&&In(e[sa]),j={isArray:eo,isArrayBuffer:dg,isBuffer:qo,isFormData:Kv,isArrayBufferView:Fv,isString:Bv,isNumber:fg,isBoolean:Uv,isObject:Yo,isPlainObject:ol,isEmptyObject:Hv,isReadableStream:Jv,isRequest:Zv,isResponse:eA,isHeaders:tA,isUndefined:to,isDate:zv,isFile:jv,isReactNativeBlob:$v,isReactNative:Vv,isBlob:qv,isRegExp:mA,isFunction:In,isStream:Gv,isURLSearchParams:Qv,isTypedArray:lA,isFileList:Yv,forEach:la,merge:sf,extend:rA,trim:nA,stripBOM:iA,inherits:oA,toFlatObject:sA,kindOf:of,kindOfTest:nr,endsWith:aA,toArray:uA,forEachEntry:cA,matchAll:dA,isHTMLForm:fA,hasOwnProperty:aa,hasOwnProp:aa,hasOwnInPrototypeChain:ua,getSafeProp:Dv,toSafeFlatObject:Mv,reduceDescriptors:Eg,freezeMethods:gA,toObjectSet:EA,toCamelCase:hA,noop:yA,toFiniteNumber:bA,findKey:mg,global:no,isContextDefined:gg,isSpecCompliantForm:TA,toJSONObject:wA,isAsyncFn:_A,isThenable:xA,setImmediate:yg,asap:SA,isIterable:bg,isSafeIterable:e=>e!=null&&ua(e,sa)&&bg(e)},vA=j.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"]),AA=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=j.hasOwnProp(t,n);!n||l&&j.hasOwnProp(vA,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function CA(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 kA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),NA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function af(e,t){return j.isArray(e)?e.map(n=>af(n,t)):CA(String(e).replace(t,""))}const PA=e=>af(e,kA),OA=e=>af(e,NA);function Tg(e){const t=Object.create(null);return j.forEach(e.toJSON(),(n,r)=>{t[r]=OA(n)}),t}const wg=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function sl(e){return e===!1||e==null?e:j.isArray(e)?e.map(sl):PA(String(e))}function IA(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 RA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function uf(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)}function LA(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(o===34||o===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function DA(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=uf(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=uf(d.slice(0,f));if(!RA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=uf(d.slice(f+1));t[m]=LA(T)}for(let l=0;l<n.length;l++){const d=n.charCodeAt(l);o?a?a=!1:d===92?a=!0:d===34&&(o=!1):d===34?o=!0:(d===44||d===59)&&(u(l),r=l+1)}return u(n.length),t}const MA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lf(e,t,n,r,o){if(j.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!j.isString(t)){if(j.isString(r))return t.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(t)}}function FA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function BA(e,t){const n=j.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,d,f){const p=ca(d);if(!p)return;const m=j.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=sl(l))}const u=(l,d)=>j.forEach(l,(f,p)=>a(f,p,d));if(j.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(j.isString(t)&&(t=t.trim())&&!MA(t))u(AA(t),n);else if(j.isObject(t)&&j.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!j.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],j.hasOwnProp(l,f)?(d=l[f],l[f]=j.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ca(t),t){const r=j.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return IA(o);if(j.isFunction(n))return n.call(this,o,r);if(j.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ca(t),t){const r=j.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ca(u),u){const l=j.findKey(r,u);l&&(!n||lf(r,r[l],l,n))&&(delete r[l],o=!0)}}return j.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||lf(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return j.forEach(this,(o,a)=>{const u=j.findKey(r,a);if(u){n[u]=sl(o),delete n[a];return}const l=t?FA(a):String(a).trim();l!==a&&delete n[a],n[l]=sl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return j.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&j.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(`
4
+ `)}getSetCookie(){const t=this.get("set-cookie");return j.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return DA(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wg]=this[wg]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=ca(u);r[l]||(BA(o,u),r[l]=!0)}return j.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(gn);const al="[REDACTED ****]";function UA(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function HA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||j.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(j.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);j.isUndefined(f)||(u[d]=f)});else{if(!j.isPlainObject(a)&&UA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?al:o(d);j.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function _g(e){try{return String(e)}catch(t){return""}}function zA(e){return e.errors.map(n=>{try{return n&&n.message?_g(n.message):_g(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let be=class eS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&j.isArray(t.errors)&&t.errors.length&&(l=zA(t));const d=new eS(l,n||t.code,r,o,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?HA(t,n):j.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}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jA=null,xg=100;function cf(e){return j.isPlainObject(e)||j.isArray(e)}function Sg(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function df(e,t,n){return e?e.concat(t).map(function(o,a){return o=Sg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function $A(e){return j.isArray(e)&&!e.some(cf)}const VA=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function ul(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(A,C)=>{const U=j.getSafeProp(n,A);return j.isUndefined(U)?C:U},o=r("metaTokens",!0),a=r("visitor")||v,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",xg),p=d&&j.isSpecCompliantForm(t),m=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function T(A){if(A===null)return"";if(j.isDate(A))return A.toISOString();if(j.isBoolean(A))return A.toString();if(!p&&j.isBlob(A))throw new be("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(A)||j.isTypedArray(A)){if(p&&typeof d=="function")return new d([A]);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return A}function y(A){if(A>f)throw new be("Object is too deeply nested ("+A+" levels). Max depth: "+f,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(A,C){if(f===1/0)return JSON.stringify(A);const U=[];return JSON.stringify(A,function(R,q){if(!j.isObject(q))return q;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push(q),y(C+U.length-1),q})}function v(A,C,U){let V=A;if(j.isReactNative(t)&&j.isReactNativeBlob(A))return t.append(df(U,C,u),T(A)),!1;if(A&&!U&&typeof A=="object"){if(j.endsWith(C,"{}"))C=o?C:C.slice(0,-2),A=w(A,1);else if(j.isArray(A)&&$A(A)||(j.isFileList(A)||j.endsWith(C,"[]"))&&(V=j.toArray(A)))return C=Sg(C),V.forEach(function(q,re){!(j.isUndefined(q)||q===null)&&t.append(l===!0?df([C],re,u):l===null?C:C+"[]",T(q))}),!1}return cf(A)?!0:(t.append(df(U,C,u),T(A)),!1)}const N=Object.assign(VA,{defaultVisitor:v,convertValue:T,isVisitable:cf});function S(A,C,U=0){if(!j.isUndefined(A)){if(y(U),m.indexOf(A)!==-1)throw new Error("Circular reference detected in "+C.join("."));m.push(A),j.forEach(A,function(R,q){(!(j.isUndefined(R)||R===null)&&a.call(t,R,j.isString(q)?q.trim():q,C,N))===!0&&S(R,C?C.concat(q):[q],U+1)}),m.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return S(e),t}function vg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ff(e,t){this._pairs=[],e&&ul(e,this,t)}const Ag=ff.prototype;Ag.append=function(t,n){this._pairs.push([t,n])},Ag.toString=function(t){const n=t?r=>t.call(this,r,vg):vg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function qA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Cg(e,t,n){if(!t)return e;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,o=j.getSafeProp(r,"encode")||qA,a=j.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=j.isURLSearchParams(t)?t.toString():new ff(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const da=Symbol("internals");function kg(e){return e?e.length:0}function Ng(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function fa(e,t){const n=e.handlers,r=kg(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class Pg{constructor(){this.handlers=[],this[da]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const o={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[da];this.handlers==null&&(this.handlers=[]),fa(this,a);const u=a.nextId++;return this.handlers.push(o),a.handlerEntries.set(u,{handler:o,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[da];fa(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(Ng(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],fa(this,this[da]))}forEach(t){const n=this[da];fa(this,n),n.iterationDepth++;try{j.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(fa(this,n),Ng(this.handlers),n.handlersLength=kg(this.handlers))}}}const hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},YA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ff,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},pf=typeof window!="undefined"&&typeof document!="undefined",mf=typeof navigator=="object"&&navigator||void 0,WA=pf&&(!mf||["ReactNative","NativeScript","NS"].indexOf(mf.product)<0),GA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",XA=pf&&window.location.href||"http://localhost",Jt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pf,hasStandardBrowserEnv:WA,hasStandardBrowserWebWorkerEnv:GA,navigator:mf,origin:XA},Symbol.toStringTag,{value:"Module"}))),YA);function KA(e,t){return ul(e,new Jt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Jt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Og=xg;function Ig(e){if(e>Og)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+Og,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function QA(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Ig(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function JA(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Rg(e){function t(n,r,o,a){Ig(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&j.isArray(o)?o.length:u,d?(j.hasOwnProp(o,u)?o[u]=j.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!j.hasOwnProp(o,u)||!j.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&j.isArray(o[u])&&(o[u]=JA(o[u])),!l)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(QA(r),o,n,0)}),n}return null}const Lg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Wo=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function ZA(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=j.isObject(t);if(a&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Rg(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Wo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return KA(t,d).toString();if((l=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Wo(this,"env"),p=f&&f.FormData;return ul(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),ZA(t)):t}],transformResponse:[function(t){const n=Wo(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,o=Wo(this,"responseType"),a=o==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Wo(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,Wo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(Lg,e=>{ha.headers[e]={}});function gf(e,t){const n=this||ha,r=t||n,o=gn.from(r.headers);let a=r.data;return j.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Dg(e){return!!(e&&e.__CANCEL__)}let pa=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Mg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}const eC=/[\t\n\r]/g;function Fg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(eC,"")}function Ef(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function tC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function nC(e,t){let n=0,r=1e3/t,o,a;const u=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},r-T)))},()=>o&&u(o),(...p)=>u(p)]}const ll=(e,t,n=3)=>{let r=0;const o=tC(50,250);return nC(a=>{if(!a||!j.isNumber(a.loaded))return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=Math.max(0,l!=null?Math.min(u,l):u),f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Bg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ug=(e,t=j.asap)=>(...n)=>t(()=>e(...n)),rC=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,iC=Jt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&l.push(`path=${r}`),j.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),j.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+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function oC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const aC=/^https?:(?!\/\/)/i;function uC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${al}`)}function lC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${al}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${al}`);return n===-1?o:`${o}#${uC(t.slice(n+1))}`}function Hg(e,t){if(typeof e=="string"){const n=Fg(e);if(aC.test(n))throw new be(`Invalid URL ${JSON.stringify(lC(n))}: missing "//" after protocol`,be.ERR_INVALID_URL,t)}}function zg(e,t,n,r){Hg(t,r);let o=!oC(t);return e&&(o||n===!1)?(Hg(e,r),sC(e,t)):t}const jg=e=>e instanceof gn?B({},e):e,cC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ro(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return j.isPlainObject(p)&&j.isPlainObject(m)?j.merge.call({caseless:y},p,m):j.isPlainObject(m)?j.merge({},m):j.isArray(m)?m.slice():m}function o(p,m,T,y){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!j.isUndefined(m))return r(void 0,m)}function u(p,m){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(m))if(j.isPlainObject(m)){if(j.hasOwnProp(m,p))return m[p]}else return;const T=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(T)&&j.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(j.hasOwnProp(t,T))return r(p,m);if(j.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutErrorMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>o(jg(p),jg(m),T,!0)};return j.forEach(cC(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=j.hasOwnProp(f,m)?f[m]:o,y=j.hasOwnProp(e,m)?e[m]:void 0,w=j.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);j.isUndefined(v)&&T!==d||(n[m]=v)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const dC=["content-type","content-length"];function fC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{dC.includes(r.toLowerCase())&&e.set(r,o)})}const hC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function $g(e){const t=ro({},e),n=T=>j.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=gn.from(l),t.url=Cg(zg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=j.getSafeProp(d,"username")||"",y=j.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?hC(y):"")))}catch(w){throw be.from(w,be.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)){const T=j.getSafeProp(r,"getHeaders");Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?l.setContentType(void 0):j.isFunction(T)&&fC(l,T.call(r),n("formDataHeaderPolicy"))}if(Jt.hasStandardBrowserEnv&&(j.isFunction(o)&&(o=o(t)),o===!0||o==null&&rC(t.url))){const y=a&&u&&iC.read(u);y&&l.set(a,y)}return t}const pC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=$g(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function N(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function A(U){if(!S)return;if(S.status===0&&(Ef(Fg(o.url))||Ef(Jt.origin))!=="file"&&!(S.responseURL&&S.responseURL.startsWith("file:"))){r(new be("Request aborted",be.ECONNABORTED,e,S)),N(),S=null;return}try{U?v&&v(U):w&&w()}catch(re){setTimeout(()=>{throw re})}if(!S)return;const V=gn.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),q={data:!l||l==="text"||l==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:V,config:e,request:S};Mg(function(de){n(de),N()},function(de){r(de),N()},q),S=null}"onloadend"in S?S.onloadend=A:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.startsWith("file:"))||setTimeout(A)},S.onabort=function(){S&&(r(new be("Request aborted",be.ECONNABORTED,e,S)),N(),S=null)},S.onerror=function(V){const R=V&&V.message?V.message:"Network Error",q=new be(R,be.ERR_NETWORK,e,S);q.event=V||null,r(q),N(),S=null},S.ontimeout=function(){let V=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||hf;o.timeoutErrorMessage&&(V=o.timeoutErrorMessage),r(new be(V,R.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,S)),N(),S=null},a===void 0&&u.setContentType(null),"setRequestHeader"in S&&j.forEach(Tg(u),function(V,R){S.setRequestHeader(R,V)}),j.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),l&&l!=="json"&&(S.responseType=o.responseType),f&&([T,w,v]=ll(f,!0),S.addEventListener("progress",T)),d&&S.upload&&([m,y]=ll(d),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=U=>{S&&(r(!U||U.type?new pa(null,e,S):U),S.abort(),N(),S=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const C=Ef(o.url);if(C&&!Jt.protocols.includes(C)){r(new be("Unsupported protocol "+C+":",be.ERR_BAD_REQUEST,e)),N();return}S.send(a||null)})},mC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>{if(!r){if(d.aborted){o.call(d);return}d.addEventListener("abort",o,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>j.asap(u),l},gC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},EC=function(e,t){return vd(this,null,function*(){try{for(var n=Z2(yC(e)),r,o,a;r=!(o=yield new Kr(n.next())).done;r=!1){const u=o.value;yield*m0(gC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Kr(o.call(n)))}finally{if(a)throw a[0]}}})},yC=function(e){return vd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*m0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},Vg=(e,t,n,r)=>{const o=EC(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:m}=yield o.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),o.return()}},{highWaterMark:2})},qg=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Yg=(e,t,n)=>t+2<n&&qg(e.charCodeAt(t+1))&&qg(e.charCodeAt(t+2)),Wg=e=>e<=57?e-48:(e&223)-55,bC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,TC=e=>e===9||e===10||e===12||e===13||e===32,wC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},_C=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},xC=e=>{const t=e.length;let n=0,r=0,o=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&Yg(e,a,t)&&(u=Wg(e.charCodeAt(a+1))*16+Wg(e.charCodeAt(a+2)),a+=2),!TC(u)){if(u===61){r++;continue}if(!bC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?_C(e):wC(n)},SC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let u=0;for(let l=0,d=o.length;l<d;l++){const f=o.charCodeAt(l);if(f===37&&Yg(o,l,d))u+=1,l+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&l+1<d){const p=o.charCodeAt(l+1);p>=56320&&p<=57343?(u+=4,l++):u+=3}else u+=3}return u};function vC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return SC(t===-1?e:e.slice(0,t),xC)}const yf="1.20.0",Gg=64*1024,AC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:cl}=j,CC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Xg=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},kC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},NC=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?cl(o):typeof fetch=="function",d=cl(a),f=cl(u);if(!l)return!1;const p=l&&cl(n),m=l&&(typeof r=="function"?(S=>A=>S.encode(A))(new r):S=>et(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&Kg(()=>{let S=!1;const A=new a(Jt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),C=A.headers.has("Content-Type");return A.body!=null&&A.body.cancel(),S&&!C}),y=f&&p&&Kg(()=>j.isReadableStream(new u("").body)),w={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!w[S]&&(w[S]=(A,C)=>{let U=A&&A[S];if(U)return U.call(A);throw new be(`Response type '${S}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const v=S=>et(null,null,function*(){if(S==null)return 0;if(j.isBlob(S))return S.size;if(j.isSpecCompliantForm(S))return(yield new a(Jt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(j.isArrayBufferView(S)||j.isArrayBuffer(S))return S.byteLength;if(j.isURLSearchParams(S)&&(S=S+""),j.isString(S))return(yield m(S)).byteLength}),N=(S,A)=>et(null,null,function*(){const C=j.toFiniteNumber(S.getContentLength());return C==null?v(A):C});return S=>et(null,null,function*(){let{url:A,method:C,data:U,signal:V,cancelToken:R,timeout:q,onDownloadProgress:re,onUploadProgress:de,responseType:Y,headers:ie,withCredentials:he="same-origin",fetchOptions:ke,maxContentLength:ne,maxBodyLength:ae,maxRedirects:Se}=$g(S);const se=j.isNumber(ne)&&ne>-1,J=j.isNumber(ae)&&ae>-1,oe=xe=>j.hasOwnProp(S,xe)?S[xe]:void 0;let k=o||fetch;Y=Y?(Y+"").toLowerCase():"text";let M=mC([V,R&&R.toAbortSignal()],q),Q=null;const O=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let _e,Be=null;const ve=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,S,Q);try{let xe;const Pe=oe("auth");if(Pe){const $e=j.getSafeProp(Pe,"username")||"",bt=j.getSafeProp(Pe,"password")||"";xe={username:$e,password:bt}}if(kC(A)){const $e=new URL(A,Jt.origin);if(!xe&&($e.username||$e.password)){const bt=Xg($e.username),jt=Xg($e.password);xe={username:bt,password:jt}}($e.username||$e.password)&&($e.username="",$e.password="",A=$e.href)}if(xe&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(CC((xe.username||"")+":"+(xe.password||""))))),se&&typeof A=="string"&&A.startsWith("data:")&&vC(A)>ne)throw new be("maxContentLength size of "+ne+" exceeded",be.ERR_BAD_RESPONSE,S,Q);if(J&&C!=="get"&&C!=="head"){const $e=yield v(U);if(typeof $e=="number"&&isFinite($e)&&(_e=$e,$e>ae))throw ve()}const Ye=J&&(j.isReadableStream(U)||j.isStream(U)),lt=($e,bt,jt)=>Vg($e,Gg,we=>{if(J&&we>ae)throw Be=ve();bt&&bt(we)},jt);if(T&&C!=="get"&&C!=="head"&&(de||Ye)){if(_e=_e==null?yield N(ie,U):_e,_e!==0||Ye){let $e=new a(A,{method:"POST",body:U,duplex:"half"}),bt;if(j.isFormData(U)&&(bt=$e.headers.get("content-type"))&&ie.setContentType(bt),$e.body){const[jt,we]=de&&Bg(_e,ll(Ug(de)))||[];U=lt($e.body,jt,we)}}}else if(Ye&&!d&&p&&C!=="get"&&C!=="head")U=lt(U);else if(Ye&&d&&!T&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,S,Q);j.isString(he)||(he=he?"include":"omit");const un=d&&"credentials"in a.prototype;if(j.isFormData(U)){const $e=ie.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+yf,!1);const Ot=ke==null?ke:Object.assign(Object.create(null),ke);Ot&&(delete Ot.body,delete Ot.headers,delete Ot.method,delete Ot.signal,delete Ot.duplex,delete Ot.credentials);const zt=Object.assign(Object.create(null),Ot,{signal:M,method:C.toUpperCase(),headers:Tg(ie.normalize()),body:U,duplex:"half",credentials:un?he:void 0});d&&(j.forEach(AC,($e,bt)=>{zt[bt]===void 0&&(zt[bt]=$e)}),zt.signal===void 0&&(zt.signal=null),zt.body===void 0&&(zt.body=null)),Se===0&&(zt.redirect="manual",Ot&&(Ot.redirect="manual")),Q=d&&new a(A,zt);let kt=yield d?k(Q,Ot):k(A,zt);const Gn=gn.from(kt.headers);if(se){const $e=j.toFiniteNumber(Gn.getContentLength());if($e!=null&&$e>ne)throw new be("maxContentLength size of "+ne+" exceeded",be.ERR_BAD_RESPONSE,S,Q)}const xn=y&&(Y==="stream"||Y==="response");if(y&&kt.body&&(re||se||xn&&O)){const $e={};["status","statusText","headers"].forEach(Xe=>{$e[Xe]=kt[Xe]});const bt=j.toFiniteNumber(Gn.getContentLength()),[jt,we]=re&&Bg(bt,ll(Ug(re),!0))||[];let De=0;const Fe=Xe=>{if(se&&(De=Xe,De>ne))throw new be("maxContentLength size of "+ne+" exceeded",be.ERR_BAD_RESPONSE,S,Q);jt&&jt(Xe)};kt=new u(Vg(kt.body,Gg,Fe,()=>{we&&we(),O&&O()}),$e)}Y=Y||"text";let Wt=yield w[j.findKey(w,Y)||"text"](kt,S);if(se&&!y&&!xn){let $e;if(Wt!=null&&(typeof Wt.byteLength=="number"?$e=Wt.byteLength:typeof Wt.size=="number"?$e=Wt.size:typeof Wt=="string"&&($e=typeof r=="function"?new r().encode(Wt).byteLength:Wt.length)),typeof $e=="number"&&$e>ne)throw new be("maxContentLength size of "+ne+" exceeded",be.ERR_BAD_RESPONSE,S,Q)}return!xn&&O&&O(),yield new Promise(($e,bt)=>{Mg($e,bt,{data:Wt,headers:gn.from(kt.headers),status:kt.status,statusText:kt.statusText,config:S,request:Q})})}catch(xe){if(O&&O(),M&&M.aborted&&M.reason instanceof be){const Pe=M.reason;throw Pe.config=S,Q&&(Pe.request=Q),xe!==Pe&&Object.defineProperty(Pe,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),Pe}if(Be)throw Q&&!Be.request&&(Be.request=Q),Be;if(xe instanceof be)throw Q&&!xe.request&&(xe.request=Q),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const Pe=new be("Network Error",be.ERR_NETWORK,S,Q,xe&&xe.response);throw Object.defineProperty(Pe,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),Pe}throw be.from(xe,xe&&xe.code,S,Q,xe&&xe.response)}})},PC=new Map,Qg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,l=u,d,f,p=PC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:NC(t)),p=f;return f};Qg();const bf={http:jA,xhr:pC,fetch:{get:Qg}};j.forEach(bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Jg=e=>`- ${e}`,OC=e=>j.isFunction(e)||e===null||e===!1;function IC(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!OC(r)&&(o=bf[(l=String(r)).toLowerCase()],o===void 0))throw new be(`Unknown adapter '${l}'`);if(o&&(j.isFunction(o)||(o=o.get(t))))break;a[l||"#"+u]=o}if(!o){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 :
5
+ `+u.map(Jg).join(`
6
+ `):" "+Jg(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+l,be.ERR_NOT_SUPPORT)}return o}const Zg={getAdapter:IC,adapters:bf};function Tf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function wf(e){const t=j.toSafeFlatObject(e);return Tf(t),t.headers=gn.from(j.getSafeProp(t,"headers")),t.data=gf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Zg.getAdapter(t.adapter||ha.adapter,t)(t).then(function(o){Tf(t),t.response=o;try{o.data=gf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=gn.from(o.headers),o},function(o){if(!Dg(o)&&(Tf(t),o&&o.response)){t.response=o.response;try{o.response.data=gf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=gn.from(o.response.headers)}return Promise.reject(o)})}const dl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const e1={};dl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+yf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new be(o(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!e1[u]&&(e1[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},dl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function RC(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const fl={assertOptions:RC,validators:dl},En=fl.validators;let io=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Pg,response:new Pg}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack;let u="";if(typeof a=="string"){const l=a.indexOf(`
7
7
  `);u=l===-1?"":a.slice(l+1)}if(!r.stack)r.stack=u;else if(u){const l=u.indexOf(`
8
8
  `),d=l===-1?-1:u.indexOf(`
9
9
  `,l+1),f=d===-1?"":u.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
10
- `+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ro(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&fl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:fl.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(j.getSafeProp(n,"method")||j.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&j.merge(a.common,a[n.method]);a&&j.forEach(Rg.concat("common"),w=>{delete a[w]}),n.headers=gn.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 N=n.transitional||hf;N&&N.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const w=[wf.bind(this),void 0];for(w.unshift(...l),w.push(...f),T=w.length,p=Promise.resolve(n);m<T;)p=p.then(w[m++],w[m++]);return p}T=l.length;let y=n;for(;m<T;){const w=l[m++],v=l[m++];try{y=w?w(y):y}catch(N){if(!v){p=Promise.reject(N);break}try{const S=v.call(this,N);j.isThenable(S)&&(p=Promise.resolve(S).then(()=>wf.call(this,y)))}catch(S){p=Promise.reject(S)}break}}if(!p)try{p=wf.call(this,y)}catch(w){p=Promise.reject(w)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ro(this.defaults,t);const n=Hg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ag(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){io.prototype[t]=function(n,r){return this.request(ro(r||{},{method:t,url:n,data:r&&j.hasOwnProp(r,"data")?r.data:void 0}))}}),j.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(ro(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}io.prototype[t]=n(),t!=="query"&&(io.prototype[t+"Form"]=n(!0))});let LC=class tS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new pa(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 tS(function(o){t=o}),cancel:t}}};function DC(e){return function(n){return e.apply(null,n)}}function MC(e){return j.isObject(e)&&e.isAxiosError===!0}const hl={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hl).forEach(([e,t])=>{hl[t]===void 0&&(hl[t]=e)});function e1(e){const t=new io(e),n=sg(io.prototype.request,t);return j.extend(n,io.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return e1(ro(e,o))},n}const Rt=e1(ha);Rt.Axios=io,Rt.CanceledError=pa,Rt.CancelToken=LC,Rt.isCancel=Lg,Rt.VERSION=yf,Rt.toFormData=ul,Rt.AxiosError=be,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=DC,Rt.isAxiosError=MC,Rt.mergeConfig=ro,Rt.AxiosHeaders=gn,Rt.formToJSON=e=>Ig(j.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Jg.getAdapter,Rt.HttpStatusCode=hl,Rt.default=Rt;const{Axios:IU,AxiosError:RU,CanceledError:LU,isCancel:DU,CancelToken:MU,VERSION:FU,all:BU,Cancel:UU,isAxiosError:HU,spread:zU,toFormData:jU,AxiosHeaders:$U,HttpStatusCode:VU,formToJSON:qU,getAdapter:YU,mergeConfig:WU,create:GU}=Rt;class FC{constructor(t,n,r,o=!1,a,u){Te(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Te(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Te(this,"CIMULATE_SEARCH_API_PATH","api/v1");Te(this,"baseApiUrl");Te(this,"headers",{});Te(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Rt.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}}));Te(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class BC{constructor(t,n,r,o=!1,a,u){Te(this,"apiService");Te(this,"config",null);Te(this,"getConfig",()=>et(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}}));Te(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Te(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Te(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Te(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Te(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Te(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Te(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Te(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Te(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Te(this,"getProductField",t=>this.config?this.config[t]:"");Te(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new FC(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Go=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class UC{constructor(t=!1){Te(this,"isDevelopment");Te(this,"_log",(t,n,...r)=>{Go(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 HC={copilot:"Your Search Assistant",messaging:"Commerce Client"},t1=F.createContext(null),zC=({mode:e,layoutPreset:t="standard",logoUrl:n,headerText:r,headerConfig:o,globalClassName:a="",entryMessage:u,openLinksInNewTab:l=!1,onNavigate:d,disclaimerText:f,disclaimerMarkdown:p,clientContext:m,baseCatalogParams:T,searchPlaceholder:y,searchButtonLabel:w,searchConfig:v,suggestionButtonConfig:N,progressStepsLimit:S=3,messageAlignment:A="start",autoScroll:C=!0,showProductDescription:U=!1,componentConfig:q,conversationHistory:R,resetConversationMessage:Y="",apiKey:ne,apiToken:me,baseUrl:$,customerId:ie,tenantId:fe,theme:ke,isDevelopment:re,__features:ae,routingAttributes:Se,enableDownloadTranscript:se=!0,enablePageContext:J=!1,enableEscalationToAgent:oe=!1,enableImageUpload:k=!1,showProductCaptions:M=!1,connectingMessages:Q,staticQuestions:O,staticQuestionsStrategy:_e="append",children:Be})=>{const ve=e==="messaging",xe=F.useMemo(()=>{const kt=Se==null?void 0:Se.isCartMgmtSupported;return kt===!0||kt==="true"},[Se]),Pe=F.useMemo(()=>ve?{config:null}:new BC($,ne,me,re,ie,fe),[ve,$,ne,me,re,ie,fe]),Ye=F.useMemo(()=>new UC(re),[re]);F.useEffect(()=>{ve||!Pe||Pe.config||Pe.getConfig()},[Pe,ve]);const lt=F.useMemo(()=>Iv(ke,t),[ke,t]),un=F.useMemo(()=>{const kt=(v==null?void 0:v.placeholder)||y,Gn=(v==null?void 0:v.buttonLabel)||w;let xn="icon";return v!=null&&v.buttonType?xn=v.buttonType:w&&(xn="text"),pe(B({},v||{}),{placeholder:kt,buttonLabel:Gn,buttonType:xn})},[v,y,w]),Ot=F.useMemo(()=>pe(B({},o||{}),{logoUrl:n||(o==null?void 0:o.logoUrl),headerText:(o==null?void 0:o.headerText)||r||HC[e!=null?e:"copilot"]}),[o,n,r,e]),zt=F.useMemo(()=>({configModule:Pe,mode:e!=null?e:"copilot",layoutPreset:t,headerConfig:Ot,entryMessage:u,staticQuestions:O||[],staticQuestionsStrategy:_e,globalClassName:a,openLinksInNewTab:l,onNavigate:d,disclaimerText:f,disclaimerMarkdown:p,clientContext:m,baseCatalogParams:T,themeVariables:lt,logger:Ye,searchConfig:un,suggestionButtonConfig:N,progressStepsLimit:S,messageAlignment:A,autoScroll:C,showProductDescription:!!U,enableMinimize:!!(q!=null&&q.enableMinimize),launcherAriaLabel:q==null?void 0:q.launcherAriaLabel,enableDownloadTranscript:se,enablePageContext:J,enableEscalationToAgent:oe,enableImageUpload:k,showProductCaptions:!!M,connectingMessages:Q,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(R==null?void 0:R.sinceHours)=="number"?R.sinceHours:ve?24:1,limit:R==null?void 0:R.limit},features:ae,isCartMgmtSupported:xe}),[Pe,e,t,Ot,u,O,_e,a,m,T,f,p,l,d,un,N,A,C,U,q,se,J,oe,k,S,M,Q,Y,Ye,lt,R,ae,xe,ve]);return _.jsx(t1.Provider,{value:zt,children:Be})},tt=()=>{const e=F.useContext(t1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class jC{constructor(){Te(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}});Te(this,"connectedProxy");Te(this,"modeProxy");Te(this,"entryTypeProxy");Te(this,"statusProxy");Te(this,"dialogProxy");Te(this,"modalProxy",{isFullscreen:!1});Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return WC(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 Je=new jC,oo=()=>Je.connected,ma=()=>Je.isOpen,_f="cimulate.widget.minimizedOnNav";function $C(){try{const e=sessionStorage.getItem(_f)==="1";return sessionStorage.removeItem(_f),e}catch(e){return!1}}function VC(){try{sessionStorage.removeItem(_f)}catch(e){return}}const qC=e=>{window.addEventListener(tf,e)},YC=e=>{window.removeEventListener(tf,e)},WC=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},GC=e=>{Je.connectedProxy.connected=e},ga=e=>{if(!Cv(e)){const t=tg.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ti=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,VC())},Ea=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},xf=e=>{Je.modalProxy.isFullscreen=e},pl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Sf=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(", ")}.`);Je.dialogProxy.position=e},XC=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},KC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),o=F.useCallback(C=>{n({type:Et.SET_COPILOT,payload:C})},[n]),a=F.useCallback(C=>{GC(C),n({type:Et.SET_CONNECTED,payload:C})},[n]),u=F.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=F.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=F.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:Et.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=F.useCallback(C=>{n({type:Et.ADD_LOADING_MESSAGE,payload:C})},[n]),p=F.useCallback(C=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=F.useCallback(C=>{d(C),f(C.id)},[d,f]),T=F.useCallback(C=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=F.useCallback(C=>{n({type:Et.ADD_CONVERSATION_ID,payload:C})},[n]),w=F.useCallback(C=>{n({type:Et.SET_CONVERSATION_IDS,payload:C})},[n]),v=F.useCallback(C=>{n({type:Et.SET_IMAGE_FILE,payload:C})},[n]),N=F.useCallback(C=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:C})},[n]),S=F.useCallback(C=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),A=F.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:v,setAskCimPrompts:N,setConversationHistoryLoaded:S}),[o,a,u,l,d,f,p,m,T,y,w,v,N,S]);return _.jsx(ig.Provider,{value:A,children:t})};Sv();const QC=(e,t)=>{const{type:n,payload:r}=t;if(n===Et.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const l=u.findIndex(d=>d.id===o.id);if(l!==-1){u[l]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Et.RESET_STATE:e.messages=Ji.messages,e.groupedMessages=Ji.groupedMessages,e.loadingMessages=Ji.loadingMessages,e.imageFile=Ji.imageFile,e.askCimPrompts=Ji.askCimPrompts,e.conversationHistoryLoaded=Ji.conversationHistoryLoaded;break;case Et.RESET_COPILOT:e.copilot=null;break;case Et.SET_COPILOT:e.copilot=r;break;case Et.SET_CONNECTED:e.connected=r;break;case Et.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Et.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Et.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Et.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Et.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Et.SET_IMAGE_FILE:e.imageFile=r;break;case Et.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case Et.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},JC=({onCopilotEvent:e,children:t})=>{const[n,r]=Z0(QC,Ji);return _.jsx(rg.Provider,{value:n,children:_.jsx(KC,{onCopilotEvent:e,dispatch:r,children:t})})};function ZC(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ek(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function tk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var vf=typeof window!="undefined",ya=function(e){F.useEffect(e,[])},nk=function(e){var t=F.useRef(e);t.current=e,ya(function(){return function(){return t.current()}})},rk=function(e){var t=F.useRef(0),n=F.useState(e),r=n[0],o=n[1],a=F.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return nk(function(){cancelAnimationFrame(t.current)}),[r,a]},ik=function(e,t){return e===t};function ok(e,t){t===void 0&&(t=ik);var n=F.useRef(),r=F.useRef(e),o=ZC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var sk=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,l=rk({width:vf?window.innerWidth:r,height:vf?window.innerHeight:a}),d=l[0],f=l[1];return F.useEffect(function(){if(vf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return ek(window,"resize",p),function(){tk(window,"resize",p)}}},[]),d};class ak{constructor(){Te(this,"items",[]);Te(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Te(this,"remove",()=>this.items.shift());Te(this,"first",()=>this.items.length>0?this.items[0]:null);Te(this,"clear",()=>{this.items.length=0});Te(this,"processQueue",t=>{new Array(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new ak,n1=e=>{window.addEventListener(ef,e)},r1=e=>{window.removeEventListener(ef,e)},uk=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},i1=e=>{window.addEventListener(Zd,e)},o1=e=>{window.removeEventListener(Zd,e)},lk=(e,t,n)=>{const r=new CustomEvent(Zd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},s1=e=>{window.addEventListener(Jd,e)},a1=e=>{window.removeEventListener(Jd,e)},Af=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},ck=e=>{window.addEventListener(rf,e)},dk=e=>{window.removeEventListener(rf,e)},ba=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class fk{constructor(){Te(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"categoryIdProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const o=Pv[n];return lk(o,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new fk,u1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},l1=(e,t,n)=>{var u,l;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((l=r[e])!=null&&l.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},c1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},d1=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const l=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=l.rangeFilters},f1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},h1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},hk=e=>{if(!oo()||!ma()){oo()&&yn.clear(),yn.add({context:"browse",payload:pe(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},p1=e=>{u1(e,ut)},pk=(e,t)=>{l1(e,t,ut)},m1=e=>{c1(e,ut)},mk=({field:e,value:t})=>{d1({field:e,value:t},ut)},gk=e=>{f1(e,ut)},g1=e=>{h1(e,ut)},E1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=oo(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&p1(e.facetFilters||{}),"rangeFilters"in e&&m1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&g1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Ek=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:E1,updateBrowseCategoryId:hk,updateCatalogSegment:gk,updateFacetFilter:pk,updateFacetFilters:p1,updatePricebooks:g1,updateRangeFilter:mk,updateRangeFilters:m1},Symbol.toStringTag,{value:"Module"}));class yk{constructor(){Te(this,"initialParams",{productId:"",productName:"",pdpLink:""});Te(this,"proxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>(Af(n,r),Reflect.set(t,n,r)));Te(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});Te(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});Te(this,"dispatchContextUpdate",()=>{Af("pdp-context",this.state)});Te(this,"createProxy",t=>new Proxy(B({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return B({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const pr=new yk,y1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=oo(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}pr.updateProxy(e),Af("pdp-context",e)},bk=e=>{pr.proxy.productId=e,oo()||yn.add({context:"pdp",payload:B({},pr.state)})},Tk=e=>{pr.proxy.pdpLink=e};class wk{constructor(){Te(this,"initialState",og);Te(this,"promptsStateProxy");Te(this,"promptsParamsProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Ta(n,r),Reflect.set(t,n,r)});Te(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Te(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Te(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 Ut=new wk,_k=e=>{window.addEventListener(nf,e)},xk=e=>{window.removeEventListener(nf,e)},Ta=(e,t)=>{const n=new CustomEvent(nf,{detail:{property:e,value:t}});window.dispatchEvent(n)},b1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},T1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Sk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="ask_cim"},vk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="search"},Ak=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="browse"},Ck=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="pdp"},kk=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&T1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||b1(!0)},Nk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{ba("endConversation",!0,ei.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{ba("getConversationMessages",{payload:e,callback:t},ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ba("getSessionInformation",{callback:e},ei.GET_SESSION_INFORMATION)},loadConversation:e=>{ba("loadConversation",e,ei.LOAD_CONVERSATION)},resetConversation:()=>{ba("resetConversation",!0,ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Pk{constructor(){Te(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"queryProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const o=Ov[n];return uk(o,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const wt=new Pk,Ok=e=>{const t=ma(),n=oo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:pe(B({},wt.state),{query:e})});return}wt.queryProxy.query=e},w1=e=>{u1(e,wt)},Ik=(e,t)=>{l1(e,t,wt)},_1=e=>{c1(e,wt)},Rk=({field:e,value:t})=>{d1({field:e,value:t},wt)},Lk=e=>{f1(e,wt)},x1=e=>{h1(e,wt)},S1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=oo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&w1(e.facetFilters||{}),"rangeFilters"in e&&_1(e.rangeFilters||[]),"catalogSegment"in e&&(wt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&x1(e.pricebooks||[]),wt.queryProxy.query=e.query},Dk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:S1,updateCatalogSegment:Lk,updateFacetFilter:Ik,updateFacetFilters:w1,updatePricebooks:x1,updateRangeFilter:Rk,updateRangeFilters:_1,updateSearchQuery:Ok},Symbol.toStringTag,{value:"Module"})),Mk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},v1=F.createContext(Mk),Fk=({children:e})=>{const[t,n]=F.useState(ut.categoryId),[r,o]=F.useState(ut.categoryIdProxy.categoryName||""),[a,u]=F.useState(ut.facetFilters||{}),[l,d]=F.useState(ut.rangeFilters||[]),[f,p]=F.useState(ut.catalogSegment||null),[m,T]=F.useState(ut.pricebooks||null);F.useEffect(()=>{const w=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&n(v.value),(v==null?void 0:v.property)==="categoryName"&&o(v.value),(v==null?void 0:v.property)==="facetFilters"&&u(v.value),(v==null?void 0:v.property)==="rangeFilters"&&d(v.value),(v==null?void 0:v.property)==="catalogSegment"&&p(v.value),(v==null?void 0:v.property)==="pricebooks"&&T(v.value)};return i1(w),()=>{o1(w)}},[]);const y=F.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return _.jsx(v1.Provider,{value:y,children:e})},Bk=()=>{const e=F.useContext(v1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Uk={searchQuery:wt.query,facetFilters:wt.facetFilters,rangeFilters:wt.rangeFilters,catalogSegment:wt.catalogSegment,pricebooks:wt.pricebooks},A1=F.createContext(Uk),Hk=({children:e})=>{const[t,n]=F.useState(wt.query),[r,o]=F.useState(wt.facetFilters),[a,u]=F.useState(wt.rangeFilters),[l,d]=F.useState(wt.catalogSegment),[f,p]=F.useState(wt.pricebooks);F.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return n1(T),()=>{r1(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return _.jsx(A1.Provider,{value:m,children:e})},zk=()=>{const e=F.useContext(A1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},jk={productId:pr.productId,pdpLink:pr.pdpLink},C1=F.createContext(jk),$k=({children:e})=>{const[t,n]=F.useState(pr.productId),[r,o]=F.useState(pr.pdpLink);F.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),o(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&o(l.value)};return s1(u),()=>{a1(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(C1.Provider,{value:a,children:e})},Vk=()=>{const e=F.useContext(C1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},k1=F.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),qk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=F.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=F.useState(Je.modeProxy.mode),[d,f]=F.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=F.useState(Je.dialogProxy.position),[T,y]=F.useState(Je.dialogProxy.isFullHeight),[w,v]=F.useState(Je.dialogProxy.width),[N,S]=F.useState(Je.modalProxy.isFullscreen),A=F.useRef(!1),C=ok(d.type);F.useEffect(()=>{const q=R=>{const{property:Y,value:ne}=R.detail||{};if(!(!Y||ne===void 0)){if(Y==="mode"){l(ne);return}if(Y==="entryType"){a(ne);return}if(Y==="isMinimized"){f(me=>pe(B({},me),{isMinimized:ne}));return}if(Y==="isOpen"){f(me=>pe(B({},me),{isOpen:ne}));return}if(Y==="type"){f(me=>pe(B({},me),{type:ne}));return}if(Y==="position"){m(ne);return}if(Y==="isFullHeight"){y(ne);return}if(Y==="width"){v(ne);return}if(Y==="isFullscreen"){S(ne);return}}};return qC(q),()=>{YC(q)}},[]),ya(()=>{e&&ga(e)}),ya(()=>{if(A.current)return;A.current=!0;const q=n||(t==null?void 0:t.type);q&&pl(q);const R=$C();t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&Ea(!!t.isMinimized),R&&Ea(!0)}),ya(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:q}=t.options;q&&Sf(q),"dialogFullHeight"in t.options&&XC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&xf(!!t.options.isModalFullscreen)});const U=F.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:N}),[u,o,d,C,p,T,w,N]);return _.jsx(k1.Provider,{value:U,children:r})},rr=()=>{const e=F.useContext(k1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},N1=F.createContext(null),P1=F.createContext(null),Cf=()=>{const e=F.useContext(P1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=F.useContext(N1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Xo=()=>{const e=F.useContext(ig);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=F.useContext(rg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Yk=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ni(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Xo(),{activeConversationId:u}=Vn(),l=F.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=F.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return F.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(v=>{var S;const N=T.find(A=>A.id===v.eventSourceId);(S=N==null?void 0:N.name)!=null&&S.endsWith("_suggestions")||(v.bypassHandlers=!0,y.unshift(v))}),y.forEach(v=>{o(v)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},O1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Wk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),bt=zk(),{searchQuery:y}=bt,w=hn(bt,["searchQuery"]),jt=Bk(),{categoryId:v}=jt,N=hn(jt,["categoryId"]),{productId:S,pdpLink:A}=Vk(),{setCopilot:C,setConnected:U,resetCopilot:q,resetCopilotState:R,addCopilotEvent:Y,removeLoadingMessage:ne,handleCopilotRequestAck:me,setActiveConversationId:$,setConversationIds:ie,setAskCimPrompts:fe}=Xo(),{connected:ke,copilot:re,messages:ae,groupedMessages:Se,loadingMessages:se,askCimPrompts:J}=Vn(),{status:oe,entryType:k}=rr(),{isInline:M}=ni(),{getConversationMessages:Q,getSessionInformation:O}=Yk({copilot:re}),_e=F.useMemo(()=>se.size>0,[se]),Be=F.useCallback(we=>se.has(we),[se]),ve=F.useCallback(({query:we,facetFilters:De,rangeFilters:Fe,catalogSegment:Xe,pricebooks:mt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),De&&Object.keys(De).length>0&&(Ce.searchParams.facetFilters=De),Fe&&Fe.length>0&&(Ce.searchParams.rangeFilters=Fe),Xe&&(Ce.searchParams.catalogSegment=Xe),mt&&(Ce.searchParams.pricebooks=mt),m&&(Ce.clientContext=m),ga("search"),re.search(Ce,Ve=>{const Re=B({},Ve);me(Re)})},[p,me,re,m]),xe=F.useCallback(({categoryId:we,categoryName:De,facetFilters:Fe,rangeFilters:Xe,catalogSegment:mt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ve=Fe&&Object.keys(Fe).length>0;if(we===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:we||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ve&&(Re.browseParams.facetFilters=Fe),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),mt&&(Re.browseParams.catalogSegment=mt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||De)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),De&&(Re.clientContext.cimLabel=De)),ga("browse"),re.browse(Re,ct=>{var $r;const Gt=B({},ct),$t=(($r=Gt.request)==null?void 0:$r.clientContext)||{},ln=($t==null?void 0:$t.cimLabel)||De;ln&&Gt.request&&(Gt.request.label=ln),me(Gt)})},[p,me,re,m]),Pe=F.useCallback(({productId:we,productName:De,pdpLink:Fe,userPrompt:Xe,imageFile:mt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Z={productId:we};Xe&&(Z.userPrompt=Xe),Fe&&(Z.pdpLink=Fe),mt&&(Z.attachments={image:mt}),(m||De)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),De&&(Z.clientContext.cimLabel=De)),T&&(Z.baseCatalogParams=T),ga("pdp"),re.productView(Z,ge=>{var ct;const Ce=B({},ge),Ve=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ve==null?void 0:Ve.cimLabel)||De;Re&&Ce.request&&(Ce.request.label=Re),me(Ce)})},[p,re,me,m,T]),Ye=F.useCallback(({userPrompt:we,imageFile:De})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Fe={userPrompt:we};De&&(Fe.attachments={image:De}),m&&(Fe.clientContext=m),T&&(Fe.baseCatalogParams=T),re.askCim(Fe,Xe=>{const mt=B({},Xe);me(mt)})},[p,re,me,m,T]),lt=F.useCallback(we=>{Y(we),l==null||l(we)},[Y,l]),un=F.useCallback(we=>{Y(we),d==null||d(we)},[Y,d]),Ot=F.useCallback(we=>{u==null||u(we),U(!0)},[u,U]);F.useEffect(()=>{!re||!ke||!oe.isOpen||yn.size>0&&yn.processQueue(we=>{if(we.context==="search"){const De=B({},we.payload);S1(De)}if(we.context==="browse"){const De=B({},we.payload);E1(De)}if(we.context==="pdp"){const De=B({},we.payload);y1(De)}})},[oe.isOpen,re,ke]);const zt=F.useCallback(we=>{const De=Fe=>{const Xe=pe(B({},Fe),{id:Fe.inquiryLinkId||Fe.id});Y(Xe)};we.on("connect_ack",Ot),we.on("partial_inquiry",De),we.on("display_products",Y),we.on("progress",Y),we.on("refined_search",lt),we.on("refined_browse",un),we.on("done",Fe=>{ne(Fe.eventSourceId)}),we.on("error",Fe=>{Y(Fe),ne(Fe.eventSourceId)}),we.onDisconnect(Fe=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Fe),!Xe.includes(Fe)){U(!1);return}p==null||p.log("De-registering event listeners");const mt=new Date().toISOString();Y({name:"error",message:"Connection was lost. Please try again.",createdAt:mt,id:`error-${mt}`,sessionId:"session"}),we.off()})},[p,U,ne,lt,un,Y,Ot]);F.useEffect(()=>{if(!re)return;const we=De=>{if(!M){if(!De.message&&De.eventSourceId&&De.eventSourceId===J.requestId){fe({requestId:De.eventSourceId,message:De});return}Y(De)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,ae,J.requestId,M,Y,fe]),F.useEffect(()=>{if(!re)return;const we=De=>{if(M)return;const Fe=pe(B({},De),{id:De.inquiryLinkId||De.id});Y(Fe)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,M,Y]),ya(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const De={baseUrl:we};e?De.apiKey=e:t&&(De.apiToken=t),r&&(De.customerId=r),o&&(De.tenantId=o);const Fe=new pv(De);return C(Fe),zt(Fe),Fe.connect(),Fe.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:mt,conversationIds:Z}=Xe.data||{};mt&&$(mt),Z!=null&&Z.length&&ie(Z)}),()=>{Fe.disconnect(),Fe.off(),q()}});const kt=F.useCallback(we=>{if(!re)return;const De={eventId:we,reason:"User cancelled the request"};re.cancelRequest(De,Fe=>{Y(Fe),ne(we)})},[Y,ne,re]),Gn=F.useCallback(()=>{re&&re.conversationReset({},we=>{R(),Y(we),re.requestSessionInformation(De=>{p==null||p.log("Session Information: ",De);const{activeConversationId:Fe,conversationIds:Xe}=De.data||{};Fe&&$(Fe),Xe!=null&&Xe.length&&ie(Xe)})})},[re,p,Y,R,$,ie]),xn=F.useCallback((we,De)=>{if(!we)return;const Fe={userPrompt:we};switch(De&&(Fe.imageFile=De),k){case"ask_cim":Ye(Fe);return;case"search":y?ve(B(B({query:y},w),Fe)):Ye(Fe);return;case"browse":xe(B(B({categoryId:v},N),Fe));return;case"pdp":S?Pe(B({productId:S,pdpLink:A||""},Fe)):Ye(Fe);return}},[k,y,w,ve,Ye,v,N,xe,Pe,S,A]),Wt=F.useCallback((we,De)=>{var ge,Ce,Ve;const Xe=we.params.userPrompt||"";if(!Xe)return;const mt=ae.find(Re=>Re.id===De);if(!mt)return;const Z=mt.name.replace("_suggestions","");if(Z==="ask_cim"){Ye({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=mt.request)==null?void 0:ge.searchParams)||{},Gt=Re.query===y;ve(pe(B({query:Re.query||y},Gt?w:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=mt.request,ct=Re.browseParams||{},$t=ct.categoryId===v,ln=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";xe(pe(B({categoryId:ct.categoryId||v||""},$t?N:{}),{categoryName:ln,userPrompt:Xe}));return}if(Z==="product_view"){const Re=mt.request||{},ct=Re.productId,Gt=ct===S,$t=((Ve=Re.clientContext)==null?void 0:Ve.cimLabel)||"";let ln="";Gt?ln=A||"":ln=Re.pdpLink||"",Pe({productId:ct||S,pdpLink:ln,productName:$t,userPrompt:Xe})}},[ae,y,w,ve,Ye,v,N,xe,Pe,S,A]),$e=F.useMemo(()=>({copilot:re,messages:ae,groupedMessages:Se,isLoading:_e,isResponseLoading:Be,handleAskCim:Ye,handleSearch:ve,handleBrowse:xe,handlePdp:Pe,handleUserInput:xn,handleSuggestion:Wt,handleCancel:kt,resetConversation:Gn,getSessionInformation:O,getConversationMessages:Q}),[re,ae,Se,_e,Be,Ye,ve,xe,Pe,xn,Wt,kt,Gn,O,Q]);return _.jsx(O1.Provider,{value:$e,children:f})},I1=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=Xo();return{getCopilotSuggestions:F.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=l=>{t(l),a(l)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Or=()=>{const e=F.useContext(O1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Gk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:o}=rr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=Xo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Or(),{getCopilotSuggestions:w}=I1();F.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&w({},o,A=>{l({requestId:A.id,message:null})})},[e,t,n.requestId,o,r,w,l]);const v=F.useCallback(({query:A})=>{if(!e||!A)return;const{facetFilters:C}=wt.facetFiltersProxy,{rangeFilters:U}=wt.rangeFiltersProxy,{catalogSegment:q}=wt.catalogSegmentProxy,{pricebooks:R}=wt.pricebooksProxy,Y={query:A};Y.facetFilters=C||{},Y.rangeFilters=U||[],Y.catalogSegment=q||"",Y.pricebooks=R||[],d(B({},Y))},[e,d]),N=F.useCallback(({categoryId:A})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:q}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:Y}=ut.pricebooksProxy,ne={categoryId:A};ne.categoryName=C||"",ne.facetFilters=U||{},ne.rangeFilters=q||[],ne.catalogSegment=R||"",ne.pricebooks=Y||[],f(B({},ne))},[e,f]),S=F.useCallback(({productId:A})=>{if(!e||!A)return;const C={productId:A,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(C)},[e,p]);return F.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="query"&&v({query:C.value})};return n1(A),()=>{r1(A)}},[v]),F.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const U=C.value;S({productId:U.productId});return}(C==null?void 0:C.property)==="productId"&&S({productId:C.value})};return s1(A),()=>{a1(A)}},[S]),F.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&N({categoryId:C.value})};return i1(A),()=>{o1(A)}},[N]),F.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.event)==ei.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==ei.GET_SESSION_INFORMATION){const U=C.value.callback;T(U)}if((C==null?void 0:C.event)==ei.GET_CONVERSATION_MESSAGES){const{payload:U,callback:q}=C.value;if(!U.conversationId||typeof q!="function")return;y(U,q)}if((C==null?void 0:C.event)==ei.LOAD_CONVERSATION){const U=C.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach(Y=>{u(Y)})})}};return ck(A),()=>{dk(A)}},[m,T,y,a,u]),null},Xk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>_.jsxs(Wk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[_.jsx(Gk,{}),f]}),Kk=({children:e,dispatch:t})=>{const n=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=F.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,l,d,f,p,m,T]);return _.jsx(P1.Provider,{value:y,children:e})},Qk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case yt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case yt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case yt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case yt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case yt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case yt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case yt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Jk=({promptsConfig:e,children:t})=>{const[n,r]=Z0(Qk,pe(B(B({},og),e||{}),{staticQuestions:z0((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(N1.Provider,{value:n,children:_.jsx(Kk,{dispatch:r,children:t})})},R1=({mode:e,layoutPreset:t,apiKey:n,apiToken:r,baseUrl:o,customerId:a,tenantId:u,logoUrl:l,headerText:d,headerConfig:f,theme:p,openLinksInNewTab:m,onNavigate:T,globalClassName:y,isDevelopment:w=!1,componentType:v,componentConfig:N,entryType:S,initialEntry:A,entryMessage:C,disclaimerText:U,disclaimerMarkdown:q,clientContext:R,baseCatalogParams:Y,searchPlaceholder:ne,searchButtonLabel:me,searchConfig:$,suggestionButtonConfig:ie,messageAlignment:fe,autoScroll:ke,promptsConfig:re,resetConversationMessage:ae,conversationHistory:Se,onConnect:se,onCopilotEvent:J,onRefinedSearch:oe,onRefinedBrowse:k,__features:M,children:Q})=>{const O=A==null?void 0:A.params;return _.jsx(zC,{mode:e,layoutPreset:t,baseUrl:o,apiKey:n,apiToken:r,customerId:a,tenantId:u,logoUrl:l,headerText:d,headerConfig:f,entryMessage:C,staticQuestions:z0(O==null?void 0:O.staticQuestions),staticQuestionsStrategy:O==null?void 0:O.staticQuestionsStrategy,theme:p,globalClassName:y,openLinksInNewTab:m,onNavigate:T,searchPlaceholder:ne,searchButtonLabel:me,searchConfig:$,suggestionButtonConfig:ie,messageAlignment:fe,autoScroll:ke,componentConfig:N,clientContext:R,baseCatalogParams:Y,disclaimerMarkdown:q,disclaimerText:U,resetConversationMessage:ae,conversationHistory:Se,isDevelopment:w,__features:M,children:_.jsx(qk,{entryType:S!=null?S:A==null?void 0:A.type,componentConfig:N,componentType:v,children:_.jsx(JC,{onCopilotEvent:J,children:_.jsx($k,{children:_.jsx(Fk,{children:_.jsx(Hk,{children:_.jsx(Jk,{promptsConfig:re,children:_.jsx(Xk,{apiKey:n,apiToken:r,baseUrl:o,customerId:a,tenantId:u,isDevelopment:w,entryType:S,onConnect:se,onRefinedSearch:oe,onRefinedBrowse:k,onCopilotEvent:J,children:Q})})})})})})})})};var kf={exports:{}},Rn={},Nf={exports:{}},Pf={};var L1;function Zk(){return L1||(L1=1,(function(e){function t(J,oe){var k=J.length;J.push(oe);e:for(;0<k;){var M=k-1>>>1,Q=J[M];if(0<o(Q,oe))J[M]=oe,J[k]=Q,k=M;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var oe=J[0],k=J.pop();if(k!==oe){J[0]=k;e:for(var M=0,Q=J.length,O=Q>>>1;M<O;){var _e=2*(M+1)-1,Be=J[_e],ve=_e+1,xe=J[ve];if(0>o(Be,k))ve<Q&&0>o(xe,Be)?(J[M]=xe,J[ve]=k,M=ve):(J[M]=Be,J[_e]=k,M=_e);else if(ve<Q&&0>o(xe,k))J[M]=xe,J[ve]=k,M=ve;else break e}}return oe}function o(J,oe){var k=J.sortIndex-oe.sortIndex;return k!==0?k:J.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,w=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(J){for(var oe=n(f);oe!==null;){if(oe.callback===null)r(f);else if(oe.startTime<=J)r(f),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(f)}}function U(J){if(v=!1,C(J),!w)if(n(d)!==null)w=!0,Se(q);else{var oe=n(f);oe!==null&&se(U,oe.startTime-J)}}function q(J,oe){w=!1,v&&(v=!1,S(ne),ne=-1),y=!0;var k=T;try{for(C(oe),m=n(d);m!==null&&(!(m.expirationTime>oe)||J&&!ie());){var M=m.callback;if(typeof M=="function"){m.callback=null,T=m.priorityLevel;var Q=M(m.expirationTime<=oe);oe=e.unstable_now(),typeof Q=="function"?m.callback=Q:m===n(d)&&r(d),C(oe)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var _e=n(f);_e!==null&&se(U,_e.startTime-oe),O=!1}return O}finally{m=null,T=k,y=!1}}var R=!1,Y=null,ne=-1,me=5,$=-1;function ie(){return!(e.unstable_now()-$<me)}function fe(){if(Y!==null){var J=e.unstable_now();$=J;var oe=!0;try{oe=Y(!0,J)}finally{oe?ke():(R=!1,Y=null)}}else R=!1}var ke;if(typeof A=="function")ke=function(){A(fe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=fe,ke=function(){ae.postMessage(null)}}else ke=function(){N(fe,0)};function Se(J){Y=J,R||(R=!0,ke())}function se(J,oe){ne=N(function(){J(e.unstable_now())},oe)}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(J){J.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Se(q))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var oe=3;break;default:oe=T}var k=T;T=oe;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,oe){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return oe()}finally{T=k}},e.unstable_scheduleCallback=function(J,oe,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,J){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=k+Q,J={id:p++,callback:oe,priorityLevel:J,startTime:k,expirationTime:Q,sortIndex:-1},k>M?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(S(ne),ne=-1):v=!0,se(U,k-M))):(J.sortIndex=Q,t(d,J),w||y||(w=!0,Se(q))),J},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(J){var oe=T;return function(){var k=T;T=oe;try{return J.apply(this,arguments)}finally{T=k}}}})(Pf)),Pf}var D1;function eN(){return D1||(D1=1,Nf.exports=Zk()),Nf.exports}var M1;function tN(){if(M1)return Rn;M1=1;var e=mn(),t=eN();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,c,h){if(s===null||typeof s=="undefined"||y(i,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,c,h,E,b,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=x}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];N[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[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){N[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,s,c,h){var E=N.hasOwnProperty(s)?N[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,E,h)&&(c=null),h||E===null?T(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(s=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(s):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,s,c):i.setAttribute(s,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),R=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),ie=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function oe(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function Q(i){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
10
+ `+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ro(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&fl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:fl.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(j.getSafeProp(n,"method")||j.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&j.merge(a.common,a[n.method]);a&&j.forEach(Lg.concat("common"),w=>{delete a[w]}),n.headers=gn.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 N=n.transitional||hf;N&&N.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const w=[wf.bind(this),void 0];for(w.unshift(...l),w.push(...f),T=w.length,p=Promise.resolve(n);m<T;)p=p.then(w[m++],w[m++]);return p}T=l.length;let y=n;for(;m<T;){const w=l[m++],v=l[m++];try{y=w?w(y):y}catch(N){if(!v){p=Promise.reject(N);break}try{const S=v.call(this,N);j.isThenable(S)&&(p=Promise.resolve(S).then(()=>wf.call(this,y)))}catch(S){p=Promise.reject(S)}break}}if(!p)try{p=wf.call(this,y)}catch(w){p=Promise.reject(w)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ro(this.defaults,t);const n=zg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Cg(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){io.prototype[t]=function(n,r){return this.request(ro(r||{},{method:t,url:n,data:r&&j.hasOwnProp(r,"data")?r.data:void 0}))}}),j.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(ro(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}io.prototype[t]=n(),t!=="query"&&(io.prototype[t+"Form"]=n(!0))});let LC=class tS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new pa(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 tS(function(o){t=o}),cancel:t}}};function DC(e){return function(n){return e.apply(null,n)}}function MC(e){return j.isObject(e)&&e.isAxiosError===!0}const hl={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hl).forEach(([e,t])=>{hl[t]===void 0&&(hl[t]=e)});function t1(e){const t=new io(e),n=ag(io.prototype.request,t);return j.extend(n,io.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return t1(ro(e,o))},n}const Rt=t1(ha);Rt.Axios=io,Rt.CanceledError=pa,Rt.CancelToken=LC,Rt.isCancel=Dg,Rt.VERSION=yf,Rt.toFormData=ul,Rt.AxiosError=be,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=DC,Rt.isAxiosError=MC,Rt.mergeConfig=ro,Rt.AxiosHeaders=gn,Rt.formToJSON=e=>Rg(j.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Zg.getAdapter,Rt.HttpStatusCode=hl,Rt.default=Rt;const{Axios:LU,AxiosError:DU,CanceledError:MU,isCancel:FU,CancelToken:BU,VERSION:UU,all:HU,Cancel:zU,isAxiosError:jU,spread:$U,toFormData:VU,AxiosHeaders:qU,HttpStatusCode:YU,formToJSON:WU,getAdapter:GU,mergeConfig:XU,create:KU}=Rt;class FC{constructor(t,n,r,o=!1,a,u){Te(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Te(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Te(this,"CIMULATE_SEARCH_API_PATH","api/v1");Te(this,"baseApiUrl");Te(this,"headers",{});Te(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Rt.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}}));Te(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class BC{constructor(t,n,r,o=!1,a,u){Te(this,"apiService");Te(this,"config",null);Te(this,"getConfig",()=>et(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}}));Te(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Te(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Te(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Te(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Te(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Te(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Te(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Te(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Te(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Te(this,"getProductField",t=>this.config?this.config[t]:"");Te(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new FC(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Go=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class UC{constructor(t=!1){Te(this,"isDevelopment");Te(this,"_log",(t,n,...r)=>{Go(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 HC={copilot:"Your Search Assistant",messaging:"Commerce Client"},n1=F.createContext(null),zC=({mode:e,layoutPreset:t="standard",logoUrl:n,headerText:r,headerConfig:o,globalClassName:a="",entryMessage:u,openLinksInNewTab:l=!1,onNavigate:d,disclaimerText:f,disclaimerMarkdown:p,clientContext:m,baseCatalogParams:T,searchPlaceholder:y,searchButtonLabel:w,searchConfig:v,suggestionButtonConfig:N,progressStepsLimit:S=3,messageAlignment:A="start",autoScroll:C=!0,showProductDescription:U=!1,componentConfig:V,conversationHistory:R,resetConversationMessage:q="",apiKey:re,apiToken:de,baseUrl:Y,customerId:ie,tenantId:he,theme:ke,isDevelopment:ne,__features:ae,routingAttributes:Se,enableDownloadTranscript:se=!0,enablePageContext:J=!1,enableEscalationToAgent:oe=!1,enableImageUpload:k=!1,showProductCaptions:M=!1,connectingMessages:Q,staticQuestions:O,staticQuestionsStrategy:_e="append",children:Be})=>{const ve=e==="messaging",xe=F.useMemo(()=>{const kt=Se==null?void 0:Se.isCartMgmtSupported;return kt===!0||kt==="true"},[Se]),Pe=F.useMemo(()=>ve?{config:null}:new BC(Y,re,de,ne,ie,he),[ve,Y,re,de,ne,ie,he]),Ye=F.useMemo(()=>new UC(ne),[ne]);F.useEffect(()=>{ve||!Pe||Pe.config||Pe.getConfig()},[Pe,ve]);const lt=F.useMemo(()=>Iv(ke,t),[ke,t]),un=F.useMemo(()=>{const kt=(v==null?void 0:v.placeholder)||y,Gn=(v==null?void 0:v.buttonLabel)||w;let xn="icon";return v!=null&&v.buttonType?xn=v.buttonType:w&&(xn="text"),me(B({},v||{}),{placeholder:kt,buttonLabel:Gn,buttonType:xn})},[v,y,w]),Ot=F.useMemo(()=>me(B({},o||{}),{logoUrl:n||(o==null?void 0:o.logoUrl),headerText:(o==null?void 0:o.headerText)||r||HC[e!=null?e:"copilot"]}),[o,n,r,e]),zt=F.useMemo(()=>({configModule:Pe,mode:e!=null?e:"copilot",layoutPreset:t,headerConfig:Ot,entryMessage:u,staticQuestions:O||[],staticQuestionsStrategy:_e,globalClassName:a,openLinksInNewTab:l,onNavigate:d,disclaimerText:f,disclaimerMarkdown:p,clientContext:m,baseCatalogParams:T,themeVariables:lt,logger:Ye,searchConfig:un,suggestionButtonConfig:N,progressStepsLimit:S,messageAlignment:A,autoScroll:C,showProductDescription:!!U,enableMinimize:!!(V!=null&&V.enableMinimize),launcherAriaLabel:V==null?void 0:V.launcherAriaLabel,enableDownloadTranscript:se,enablePageContext:J,enableEscalationToAgent:oe,enableImageUpload:k,showProductCaptions:!!M,connectingMessages:Q,resetConversationMessage:q,conversationHistory:{sinceHours:typeof(R==null?void 0:R.sinceHours)=="number"?R.sinceHours:ve?24:1,limit:R==null?void 0:R.limit},features:ae,isCartMgmtSupported:xe}),[Pe,e,t,Ot,u,O,_e,a,m,T,f,p,l,d,un,N,A,C,U,V,se,J,oe,k,S,M,Q,q,Ye,lt,R,ae,xe,ve]);return _.jsx(n1.Provider,{value:zt,children:Be})},tt=()=>{const e=F.useContext(n1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class jC{constructor(){Te(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}});Te(this,"connectedProxy");Te(this,"modeProxy");Te(this,"entryTypeProxy");Te(this,"statusProxy");Te(this,"dialogProxy");Te(this,"modalProxy",{isFullscreen:!1});Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return WC(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 Je=new jC,oo=()=>Je.connected,ma=()=>Je.isOpen,_f="cimulate.widget.minimizedOnNav";function $C(){try{const e=sessionStorage.getItem(_f)==="1";return sessionStorage.removeItem(_f),e}catch(e){return!1}}function VC(){try{sessionStorage.removeItem(_f)}catch(e){return}}const qC=e=>{window.addEventListener(tf,e)},YC=e=>{window.removeEventListener(tf,e)},WC=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},GC=e=>{Je.connectedProxy.connected=e},ga=e=>{if(!Cv(e)){const t=ng.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ti=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,VC())},Ea=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},xf=e=>{Je.modalProxy.isFullscreen=e},pl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Sf=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(", ")}.`);Je.dialogProxy.position=e},XC=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},KC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),o=F.useCallback(C=>{n({type:Et.SET_COPILOT,payload:C})},[n]),a=F.useCallback(C=>{GC(C),n({type:Et.SET_CONNECTED,payload:C})},[n]),u=F.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=F.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=F.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:Et.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=F.useCallback(C=>{n({type:Et.ADD_LOADING_MESSAGE,payload:C})},[n]),p=F.useCallback(C=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=F.useCallback(C=>{d(C),f(C.id)},[d,f]),T=F.useCallback(C=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=F.useCallback(C=>{n({type:Et.ADD_CONVERSATION_ID,payload:C})},[n]),w=F.useCallback(C=>{n({type:Et.SET_CONVERSATION_IDS,payload:C})},[n]),v=F.useCallback(C=>{n({type:Et.SET_IMAGE_FILE,payload:C})},[n]),N=F.useCallback(C=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:C})},[n]),S=F.useCallback(C=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),A=F.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:v,setAskCimPrompts:N,setConversationHistoryLoaded:S}),[o,a,u,l,d,f,p,m,T,y,w,v,N,S]);return _.jsx(og.Provider,{value:A,children:t})};Sv();const QC=(e,t)=>{const{type:n,payload:r}=t;if(n===Et.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const l=u.findIndex(d=>d.id===o.id);if(l!==-1){u[l]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Et.RESET_STATE:e.messages=Ji.messages,e.groupedMessages=Ji.groupedMessages,e.loadingMessages=Ji.loadingMessages,e.imageFile=Ji.imageFile,e.askCimPrompts=Ji.askCimPrompts,e.conversationHistoryLoaded=Ji.conversationHistoryLoaded;break;case Et.RESET_COPILOT:e.copilot=null;break;case Et.SET_COPILOT:e.copilot=r;break;case Et.SET_CONNECTED:e.connected=r;break;case Et.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Et.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Et.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Et.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Et.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Et.SET_IMAGE_FILE:e.imageFile=r;break;case Et.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case Et.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},JC=({onCopilotEvent:e,children:t})=>{const[n,r]=eg(QC,Ji);return _.jsx(ig.Provider,{value:n,children:_.jsx(KC,{onCopilotEvent:e,dispatch:r,children:t})})};function ZC(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ek(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function tk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var vf=typeof window!="undefined",ya=function(e){F.useEffect(e,[])},nk=function(e){var t=F.useRef(e);t.current=e,ya(function(){return function(){return t.current()}})},rk=function(e){var t=F.useRef(0),n=F.useState(e),r=n[0],o=n[1],a=F.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return nk(function(){cancelAnimationFrame(t.current)}),[r,a]},ik=function(e,t){return e===t};function ok(e,t){t===void 0&&(t=ik);var n=F.useRef(),r=F.useRef(e),o=ZC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var sk=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,l=rk({width:vf?window.innerWidth:r,height:vf?window.innerHeight:a}),d=l[0],f=l[1];return F.useEffect(function(){if(vf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return ek(window,"resize",p),function(){tk(window,"resize",p)}}},[]),d};class ak{constructor(){Te(this,"items",[]);Te(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Te(this,"remove",()=>this.items.shift());Te(this,"first",()=>this.items.length>0?this.items[0]:null);Te(this,"clear",()=>{this.items.length=0});Te(this,"processQueue",t=>{new Array(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new ak,r1=e=>{window.addEventListener(ef,e)},i1=e=>{window.removeEventListener(ef,e)},uk=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},o1=e=>{window.addEventListener(Zd,e)},s1=e=>{window.removeEventListener(Zd,e)},lk=(e,t,n)=>{const r=new CustomEvent(Zd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},a1=e=>{window.addEventListener(Jd,e)},u1=e=>{window.removeEventListener(Jd,e)},Af=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},ck=e=>{window.addEventListener(rf,e)},dk=e=>{window.removeEventListener(rf,e)},ba=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class fk{constructor(){Te(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"categoryIdProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const o=Pv[n];return lk(o,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new fk,l1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},c1=(e,t,n)=>{var u,l;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((l=r[e])!=null&&l.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},d1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},f1=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const l=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=l.rangeFilters},h1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},p1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},hk=e=>{if(!oo()||!ma()){oo()&&yn.clear(),yn.add({context:"browse",payload:me(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},m1=e=>{l1(e,ut)},pk=(e,t)=>{c1(e,t,ut)},g1=e=>{d1(e,ut)},mk=({field:e,value:t})=>{f1({field:e,value:t},ut)},gk=e=>{h1(e,ut)},E1=e=>{p1(e,ut)},y1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=oo(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&m1(e.facetFilters||{}),"rangeFilters"in e&&g1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&E1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Ek=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:y1,updateBrowseCategoryId:hk,updateCatalogSegment:gk,updateFacetFilter:pk,updateFacetFilters:m1,updatePricebooks:E1,updateRangeFilter:mk,updateRangeFilters:g1},Symbol.toStringTag,{value:"Module"}));class yk{constructor(){Te(this,"initialParams",{productId:"",productName:"",pdpLink:""});Te(this,"proxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>(Af(n,r),Reflect.set(t,n,r)));Te(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});Te(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});Te(this,"dispatchContextUpdate",()=>{Af("pdp-context",this.state)});Te(this,"createProxy",t=>new Proxy(B({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return B({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const pr=new yk,b1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=oo(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}pr.updateProxy(e),Af("pdp-context",e)},bk=e=>{pr.proxy.productId=e,oo()||yn.add({context:"pdp",payload:B({},pr.state)})},Tk=e=>{pr.proxy.pdpLink=e};class wk{constructor(){Te(this,"initialState",sg);Te(this,"promptsStateProxy");Te(this,"promptsParamsProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Ta(n,r),Reflect.set(t,n,r)});Te(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Te(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Te(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 Ut=new wk,_k=e=>{window.addEventListener(nf,e)},xk=e=>{window.removeEventListener(nf,e)},Ta=(e,t)=>{const n=new CustomEvent(nf,{detail:{property:e,value:t}});window.dispatchEvent(n)},T1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},w1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Sk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="ask_cim"},vk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="search"},Ak=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="browse"},Ck=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="pdp"},kk=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&w1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||T1(!0)},Nk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{ba("endConversation",!0,ei.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{ba("getConversationMessages",{payload:e,callback:t},ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ba("getSessionInformation",{callback:e},ei.GET_SESSION_INFORMATION)},loadConversation:e=>{ba("loadConversation",e,ei.LOAD_CONVERSATION)},resetConversation:()=>{ba("resetConversation",!0,ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Pk{constructor(){Te(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"queryProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const o=Ov[n];return uk(o,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const wt=new Pk,Ok=e=>{const t=ma(),n=oo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:me(B({},wt.state),{query:e})});return}wt.queryProxy.query=e},_1=e=>{l1(e,wt)},Ik=(e,t)=>{c1(e,t,wt)},x1=e=>{d1(e,wt)},Rk=({field:e,value:t})=>{f1({field:e,value:t},wt)},Lk=e=>{h1(e,wt)},S1=e=>{p1(e,wt)},v1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=oo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&_1(e.facetFilters||{}),"rangeFilters"in e&&x1(e.rangeFilters||[]),"catalogSegment"in e&&(wt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&S1(e.pricebooks||[]),wt.queryProxy.query=e.query},Dk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:v1,updateCatalogSegment:Lk,updateFacetFilter:Ik,updateFacetFilters:_1,updatePricebooks:S1,updateRangeFilter:Rk,updateRangeFilters:x1,updateSearchQuery:Ok},Symbol.toStringTag,{value:"Module"})),Mk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},A1=F.createContext(Mk),Fk=({children:e})=>{const[t,n]=F.useState(ut.categoryId),[r,o]=F.useState(ut.categoryIdProxy.categoryName||""),[a,u]=F.useState(ut.facetFilters||{}),[l,d]=F.useState(ut.rangeFilters||[]),[f,p]=F.useState(ut.catalogSegment||null),[m,T]=F.useState(ut.pricebooks||null);F.useEffect(()=>{const w=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&n(v.value),(v==null?void 0:v.property)==="categoryName"&&o(v.value),(v==null?void 0:v.property)==="facetFilters"&&u(v.value),(v==null?void 0:v.property)==="rangeFilters"&&d(v.value),(v==null?void 0:v.property)==="catalogSegment"&&p(v.value),(v==null?void 0:v.property)==="pricebooks"&&T(v.value)};return o1(w),()=>{s1(w)}},[]);const y=F.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return _.jsx(A1.Provider,{value:y,children:e})},Bk=()=>{const e=F.useContext(A1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Uk={searchQuery:wt.query,facetFilters:wt.facetFilters,rangeFilters:wt.rangeFilters,catalogSegment:wt.catalogSegment,pricebooks:wt.pricebooks},C1=F.createContext(Uk),Hk=({children:e})=>{const[t,n]=F.useState(wt.query),[r,o]=F.useState(wt.facetFilters),[a,u]=F.useState(wt.rangeFilters),[l,d]=F.useState(wt.catalogSegment),[f,p]=F.useState(wt.pricebooks);F.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return r1(T),()=>{i1(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return _.jsx(C1.Provider,{value:m,children:e})},zk=()=>{const e=F.useContext(C1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},jk={productId:pr.productId,pdpLink:pr.pdpLink},k1=F.createContext(jk),$k=({children:e})=>{const[t,n]=F.useState(pr.productId),[r,o]=F.useState(pr.pdpLink);F.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),o(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&o(l.value)};return a1(u),()=>{u1(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(k1.Provider,{value:a,children:e})},Vk=()=>{const e=F.useContext(k1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},N1=F.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),qk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=F.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=F.useState(Je.modeProxy.mode),[d,f]=F.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=F.useState(Je.dialogProxy.position),[T,y]=F.useState(Je.dialogProxy.isFullHeight),[w,v]=F.useState(Je.dialogProxy.width),[N,S]=F.useState(Je.modalProxy.isFullscreen),A=F.useRef(!1),C=ok(d.type);F.useEffect(()=>{const V=R=>{const{property:q,value:re}=R.detail||{};if(!(!q||re===void 0)){if(q==="mode"){l(re);return}if(q==="entryType"){a(re);return}if(q==="isMinimized"){f(de=>me(B({},de),{isMinimized:re}));return}if(q==="isOpen"){f(de=>me(B({},de),{isOpen:re}));return}if(q==="type"){f(de=>me(B({},de),{type:re}));return}if(q==="position"){m(re);return}if(q==="isFullHeight"){y(re);return}if(q==="width"){v(re);return}if(q==="isFullscreen"){S(re);return}}};return qC(V),()=>{YC(V)}},[]),ya(()=>{e&&ga(e)}),ya(()=>{if(A.current)return;A.current=!0;const V=n||(t==null?void 0:t.type);V&&pl(V);const R=$C();t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&Ea(!!t.isMinimized),R&&Ea(!0)}),ya(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:V}=t.options;V&&Sf(V),"dialogFullHeight"in t.options&&XC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&xf(!!t.options.isModalFullscreen)});const U=F.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:N}),[u,o,d,C,p,T,w,N]);return _.jsx(N1.Provider,{value:U,children:r})},rr=()=>{const e=F.useContext(N1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},P1=F.createContext(null),O1=F.createContext(null),Cf=()=>{const e=F.useContext(O1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=F.useContext(P1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Xo=()=>{const e=F.useContext(og);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=F.useContext(ig);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Yk=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ni(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Xo(),{activeConversationId:u}=Vn(),l=F.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=F.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return F.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(v=>{var S;const N=T.find(A=>A.id===v.eventSourceId);(S=N==null?void 0:N.name)!=null&&S.endsWith("_suggestions")||(v.bypassHandlers=!0,y.unshift(v))}),y.forEach(v=>{o(v)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},I1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Wk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),bt=zk(),{searchQuery:y}=bt,w=hn(bt,["searchQuery"]),jt=Bk(),{categoryId:v}=jt,N=hn(jt,["categoryId"]),{productId:S,pdpLink:A}=Vk(),{setCopilot:C,setConnected:U,resetCopilot:V,resetCopilotState:R,addCopilotEvent:q,removeLoadingMessage:re,handleCopilotRequestAck:de,setActiveConversationId:Y,setConversationIds:ie,setAskCimPrompts:he}=Xo(),{connected:ke,copilot:ne,messages:ae,groupedMessages:Se,loadingMessages:se,askCimPrompts:J}=Vn(),{status:oe,entryType:k}=rr(),{isInline:M}=ni(),{getConversationMessages:Q,getSessionInformation:O}=Yk({copilot:ne}),_e=F.useMemo(()=>se.size>0,[se]),Be=F.useCallback(we=>se.has(we),[se]),ve=F.useCallback(({query:we,facetFilters:De,rangeFilters:Fe,catalogSegment:Xe,pricebooks:mt,userPrompt:Z,imageFile:ge})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),De&&Object.keys(De).length>0&&(Ce.searchParams.facetFilters=De),Fe&&Fe.length>0&&(Ce.searchParams.rangeFilters=Fe),Xe&&(Ce.searchParams.catalogSegment=Xe),mt&&(Ce.searchParams.pricebooks=mt),m&&(Ce.clientContext=m),ga("search"),ne.search(Ce,Ve=>{const Re=B({},Ve);de(Re)})},[p,de,ne,m]),xe=F.useCallback(({categoryId:we,categoryName:De,facetFilters:Fe,rangeFilters:Xe,catalogSegment:mt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}const Ve=Fe&&Object.keys(Fe).length>0;if(we===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:we||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ve&&(Re.browseParams.facetFilters=Fe),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),mt&&(Re.browseParams.catalogSegment=mt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||De)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),De&&(Re.clientContext.cimLabel=De)),ga("browse"),ne.browse(Re,ct=>{var $r;const Gt=B({},ct),$t=(($r=Gt.request)==null?void 0:$r.clientContext)||{},ln=($t==null?void 0:$t.cimLabel)||De;ln&&Gt.request&&(Gt.request.label=ln),de(Gt)})},[p,de,ne,m]),Pe=F.useCallback(({productId:we,productName:De,pdpLink:Fe,userPrompt:Xe,imageFile:mt})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Z={productId:we};Xe&&(Z.userPrompt=Xe),Fe&&(Z.pdpLink=Fe),mt&&(Z.attachments={image:mt}),(m||De)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),De&&(Z.clientContext.cimLabel=De)),T&&(Z.baseCatalogParams=T),ga("pdp"),ne.productView(Z,ge=>{var ct;const Ce=B({},ge),Ve=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ve==null?void 0:Ve.cimLabel)||De;Re&&Ce.request&&(Ce.request.label=Re),de(Ce)})},[p,ne,de,m,T]),Ye=F.useCallback(({userPrompt:we,imageFile:De})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Fe={userPrompt:we};De&&(Fe.attachments={image:De}),m&&(Fe.clientContext=m),T&&(Fe.baseCatalogParams=T),ne.askCim(Fe,Xe=>{const mt=B({},Xe);de(mt)})},[p,ne,de,m,T]),lt=F.useCallback(we=>{q(we),l==null||l(we)},[q,l]),un=F.useCallback(we=>{q(we),d==null||d(we)},[q,d]),Ot=F.useCallback(we=>{u==null||u(we),U(!0)},[u,U]);F.useEffect(()=>{!ne||!ke||!oe.isOpen||yn.size>0&&yn.processQueue(we=>{if(we.context==="search"){const De=B({},we.payload);v1(De)}if(we.context==="browse"){const De=B({},we.payload);y1(De)}if(we.context==="pdp"){const De=B({},we.payload);b1(De)}})},[oe.isOpen,ne,ke]);const zt=F.useCallback(we=>{const De=Fe=>{const Xe=me(B({},Fe),{id:Fe.inquiryLinkId||Fe.id});q(Xe)};we.on("connect_ack",Ot),we.on("partial_inquiry",De),we.on("display_products",q),we.on("progress",q),we.on("refined_search",lt),we.on("refined_browse",un),we.on("done",Fe=>{re(Fe.eventSourceId)}),we.on("error",Fe=>{q(Fe),re(Fe.eventSourceId)}),we.onDisconnect(Fe=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Fe),!Xe.includes(Fe)){U(!1);return}p==null||p.log("De-registering event listeners");const mt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:mt,id:`error-${mt}`,sessionId:"session"}),we.off()})},[p,U,re,lt,un,q,Ot]);F.useEffect(()=>{if(!ne)return;const we=De=>{if(!M){if(!De.message&&De.eventSourceId&&De.eventSourceId===J.requestId){he({requestId:De.eventSourceId,message:De});return}q(De)}};return ne.on("follow_up",we),()=>{ne.off("follow_up",we)}},[ne,ae,J.requestId,M,q,he]),F.useEffect(()=>{if(!ne)return;const we=De=>{if(M)return;const Fe=me(B({},De),{id:De.inquiryLinkId||De.id});q(Fe)};return ne.on("inquiry",we),()=>{ne.off("inquiry",we)}},[ne,M,q]),ya(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const De={baseUrl:we};e?De.apiKey=e:t&&(De.apiToken=t),r&&(De.customerId=r),o&&(De.tenantId=o);const Fe=new pv(De);return C(Fe),zt(Fe),Fe.connect(),Fe.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:mt,conversationIds:Z}=Xe.data||{};mt&&Y(mt),Z!=null&&Z.length&&ie(Z)}),()=>{Fe.disconnect(),Fe.off(),V()}});const kt=F.useCallback(we=>{if(!ne)return;const De={eventId:we,reason:"User cancelled the request"};ne.cancelRequest(De,Fe=>{q(Fe),re(we)})},[q,re,ne]),Gn=F.useCallback(()=>{ne&&ne.conversationReset({},we=>{R(),q(we),ne.requestSessionInformation(De=>{p==null||p.log("Session Information: ",De);const{activeConversationId:Fe,conversationIds:Xe}=De.data||{};Fe&&Y(Fe),Xe!=null&&Xe.length&&ie(Xe)})})},[ne,p,q,R,Y,ie]),xn=F.useCallback((we,De)=>{if(!we)return;const Fe={userPrompt:we};switch(De&&(Fe.imageFile=De),k){case"ask_cim":Ye(Fe);return;case"search":y?ve(B(B({query:y},w),Fe)):Ye(Fe);return;case"browse":xe(B(B({categoryId:v},N),Fe));return;case"pdp":S?Pe(B({productId:S,pdpLink:A||""},Fe)):Ye(Fe);return}},[k,y,w,ve,Ye,v,N,xe,Pe,S,A]),Wt=F.useCallback((we,De)=>{var ge,Ce,Ve;const Xe=we.params.userPrompt||"";if(!Xe)return;const mt=ae.find(Re=>Re.id===De);if(!mt)return;const Z=mt.name.replace("_suggestions","");if(Z==="ask_cim"){Ye({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=mt.request)==null?void 0:ge.searchParams)||{},Gt=Re.query===y;ve(me(B({query:Re.query||y},Gt?w:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=mt.request,ct=Re.browseParams||{},$t=ct.categoryId===v,ln=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";xe(me(B({categoryId:ct.categoryId||v||""},$t?N:{}),{categoryName:ln,userPrompt:Xe}));return}if(Z==="product_view"){const Re=mt.request||{},ct=Re.productId,Gt=ct===S,$t=((Ve=Re.clientContext)==null?void 0:Ve.cimLabel)||"";let ln="";Gt?ln=A||"":ln=Re.pdpLink||"",Pe({productId:ct||S,pdpLink:ln,productName:$t,userPrompt:Xe})}},[ae,y,w,ve,Ye,v,N,xe,Pe,S,A]),$e=F.useMemo(()=>({copilot:ne,messages:ae,groupedMessages:Se,isLoading:_e,isResponseLoading:Be,handleAskCim:Ye,handleSearch:ve,handleBrowse:xe,handlePdp:Pe,handleUserInput:xn,handleSuggestion:Wt,handleCancel:kt,resetConversation:Gn,getSessionInformation:O,getConversationMessages:Q}),[ne,ae,Se,_e,Be,Ye,ve,xe,Pe,xn,Wt,kt,Gn,O,Q]);return _.jsx(I1.Provider,{value:$e,children:f})},R1=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=Xo();return{getCopilotSuggestions:F.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=l=>{t(l),a(l)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Or=()=>{const e=F.useContext(I1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Gk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:o}=rr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=Xo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Or(),{getCopilotSuggestions:w}=R1();F.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&w({},o,A=>{l({requestId:A.id,message:null})})},[e,t,n.requestId,o,r,w,l]);const v=F.useCallback(({query:A})=>{if(!e||!A)return;const{facetFilters:C}=wt.facetFiltersProxy,{rangeFilters:U}=wt.rangeFiltersProxy,{catalogSegment:V}=wt.catalogSegmentProxy,{pricebooks:R}=wt.pricebooksProxy,q={query:A};q.facetFilters=C||{},q.rangeFilters=U||[],q.catalogSegment=V||"",q.pricebooks=R||[],d(B({},q))},[e,d]),N=F.useCallback(({categoryId:A})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:V}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,re={categoryId:A};re.categoryName=C||"",re.facetFilters=U||{},re.rangeFilters=V||[],re.catalogSegment=R||"",re.pricebooks=q||[],f(B({},re))},[e,f]),S=F.useCallback(({productId:A})=>{if(!e||!A)return;const C={productId:A,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(C)},[e,p]);return F.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="query"&&v({query:C.value})};return r1(A),()=>{i1(A)}},[v]),F.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const U=C.value;S({productId:U.productId});return}(C==null?void 0:C.property)==="productId"&&S({productId:C.value})};return a1(A),()=>{u1(A)}},[S]),F.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&N({categoryId:C.value})};return o1(A),()=>{s1(A)}},[N]),F.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.event)==ei.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==ei.GET_SESSION_INFORMATION){const U=C.value.callback;T(U)}if((C==null?void 0:C.event)==ei.GET_CONVERSATION_MESSAGES){const{payload:U,callback:V}=C.value;if(!U.conversationId||typeof V!="function")return;y(U,V)}if((C==null?void 0:C.event)==ei.LOAD_CONVERSATION){const U=C.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach(q=>{u(q)})})}};return ck(A),()=>{dk(A)}},[m,T,y,a,u]),null},Xk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>_.jsxs(Wk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[_.jsx(Gk,{}),f]}),Kk=({children:e,dispatch:t})=>{const n=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=F.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=F.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,l,d,f,p,m,T]);return _.jsx(O1.Provider,{value:y,children:e})},Qk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case yt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case yt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case yt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case yt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case yt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case yt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case yt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Jk=({promptsConfig:e,children:t})=>{const[n,r]=eg(Qk,me(B(B({},sg),e||{}),{staticQuestions:j0((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(P1.Provider,{value:n,children:_.jsx(Kk,{dispatch:r,children:t})})},L1=({mode:e,layoutPreset:t,apiKey:n,apiToken:r,baseUrl:o,customerId:a,tenantId:u,logoUrl:l,headerText:d,headerConfig:f,theme:p,openLinksInNewTab:m,onNavigate:T,globalClassName:y,isDevelopment:w=!1,componentType:v,componentConfig:N,entryType:S,initialEntry:A,entryMessage:C,disclaimerText:U,disclaimerMarkdown:V,clientContext:R,baseCatalogParams:q,searchPlaceholder:re,searchButtonLabel:de,searchConfig:Y,suggestionButtonConfig:ie,messageAlignment:he,autoScroll:ke,promptsConfig:ne,resetConversationMessage:ae,conversationHistory:Se,onConnect:se,onCopilotEvent:J,onRefinedSearch:oe,onRefinedBrowse:k,__features:M,children:Q})=>{const O=A==null?void 0:A.params;return _.jsx(zC,{mode:e,layoutPreset:t,baseUrl:o,apiKey:n,apiToken:r,customerId:a,tenantId:u,logoUrl:l,headerText:d,headerConfig:f,entryMessage:C,staticQuestions:j0(O==null?void 0:O.staticQuestions),staticQuestionsStrategy:O==null?void 0:O.staticQuestionsStrategy,theme:p,globalClassName:y,openLinksInNewTab:m,onNavigate:T,searchPlaceholder:re,searchButtonLabel:de,searchConfig:Y,suggestionButtonConfig:ie,messageAlignment:he,autoScroll:ke,componentConfig:N,clientContext:R,baseCatalogParams:q,disclaimerMarkdown:V,disclaimerText:U,resetConversationMessage:ae,conversationHistory:Se,isDevelopment:w,__features:M,children:_.jsx(qk,{entryType:S!=null?S:A==null?void 0:A.type,componentConfig:N,componentType:v,children:_.jsx(JC,{onCopilotEvent:J,children:_.jsx($k,{children:_.jsx(Fk,{children:_.jsx(Hk,{children:_.jsx(Jk,{promptsConfig:ne,children:_.jsx(Xk,{apiKey:n,apiToken:r,baseUrl:o,customerId:a,tenantId:u,isDevelopment:w,entryType:S,onConnect:se,onRefinedSearch:oe,onRefinedBrowse:k,onCopilotEvent:J,children:Q})})})})})})})})};var kf={exports:{}},Rn={},Nf={exports:{}},Pf={};var D1;function Zk(){return D1||(D1=1,(function(e){function t(J,oe){var k=J.length;J.push(oe);e:for(;0<k;){var M=k-1>>>1,Q=J[M];if(0<o(Q,oe))J[M]=oe,J[k]=Q,k=M;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var oe=J[0],k=J.pop();if(k!==oe){J[0]=k;e:for(var M=0,Q=J.length,O=Q>>>1;M<O;){var _e=2*(M+1)-1,Be=J[_e],ve=_e+1,xe=J[ve];if(0>o(Be,k))ve<Q&&0>o(xe,Be)?(J[M]=xe,J[ve]=k,M=ve):(J[M]=Be,J[_e]=k,M=_e);else if(ve<Q&&0>o(xe,k))J[M]=xe,J[ve]=k,M=ve;else break e}}return oe}function o(J,oe){var k=J.sortIndex-oe.sortIndex;return k!==0?k:J.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,w=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(J){for(var oe=n(f);oe!==null;){if(oe.callback===null)r(f);else if(oe.startTime<=J)r(f),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(f)}}function U(J){if(v=!1,C(J),!w)if(n(d)!==null)w=!0,Se(V);else{var oe=n(f);oe!==null&&se(U,oe.startTime-J)}}function V(J,oe){w=!1,v&&(v=!1,S(re),re=-1),y=!0;var k=T;try{for(C(oe),m=n(d);m!==null&&(!(m.expirationTime>oe)||J&&!ie());){var M=m.callback;if(typeof M=="function"){m.callback=null,T=m.priorityLevel;var Q=M(m.expirationTime<=oe);oe=e.unstable_now(),typeof Q=="function"?m.callback=Q:m===n(d)&&r(d),C(oe)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var _e=n(f);_e!==null&&se(U,_e.startTime-oe),O=!1}return O}finally{m=null,T=k,y=!1}}var R=!1,q=null,re=-1,de=5,Y=-1;function ie(){return!(e.unstable_now()-Y<de)}function he(){if(q!==null){var J=e.unstable_now();Y=J;var oe=!0;try{oe=q(!0,J)}finally{oe?ke():(R=!1,q=null)}}else R=!1}var ke;if(typeof A=="function")ke=function(){A(he)};else if(typeof MessageChannel!="undefined"){var ne=new MessageChannel,ae=ne.port2;ne.port1.onmessage=he,ke=function(){ae.postMessage(null)}}else ke=function(){N(he,0)};function Se(J){q=J,R||(R=!0,ke())}function se(J,oe){re=N(function(){J(e.unstable_now())},oe)}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(J){J.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Se(V))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var oe=3;break;default:oe=T}var k=T;T=oe;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,oe){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return oe()}finally{T=k}},e.unstable_scheduleCallback=function(J,oe,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,J){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=k+Q,J={id:p++,callback:oe,priorityLevel:J,startTime:k,expirationTime:Q,sortIndex:-1},k>M?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(S(re),re=-1):v=!0,se(U,k-M))):(J.sortIndex=Q,t(d,J),w||y||(w=!0,Se(V))),J},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(J){var oe=T;return function(){var k=T;T=oe;try{return J.apply(this,arguments)}finally{T=k}}}})(Pf)),Pf}var M1;function eN(){return M1||(M1=1,Nf.exports=Zk()),Nf.exports}var F1;function tN(){if(F1)return Rn;F1=1;var e=mn(),t=eN();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,c,h){if(s===null||typeof s=="undefined"||y(i,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,c,h,E,b,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=x}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];N[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[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){N[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(S,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,s,c,h){var E=N.hasOwnProperty(s)?N[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,E,h)&&(c=null),h||E===null?T(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(s=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(s):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,s,c):i.setAttribute(s,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),R=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),ie=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function oe(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function Q(i){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
11
11
  `+M+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(ee){var h=ee}Reflect.construct(i,[],s)}else{try{s.call()}catch(ee){h=ee}i.call(s.prototype)}else{try{throw Error()}catch(ee){h=ee}i()}}catch(ee){if(ee&&h&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
12
12
  `),b=h.stack.split(`
13
13
  `),x=E.length-1,L=b.length-1;1<=x&&0<=L&&E[x]!==b[L];)L--;for(;1<=x&&0<=L;x--,L--)if(E[x]!==b[L]){if(x!==1||L!==1)do if(x--,L--,0>L||E[x]!==b[L]){var z=`
14
- `+E[x].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=x&&0<=L);break}}}finally{O=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Q(i):""}function Be(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ve(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 Y:return"Fragment";case R:return"Portal";case me:return"Profiler";case ne:return"StrictMode";case ke:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case fe:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return s=i.displayName||null,s!==null?s:ve(i.type)||"Memo";case Se:s=i._payload,i=i._init;try{return ve(i(s))}catch(c){}}return null}function xe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(s);case 8:return s===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Pe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function lt(i){var s=Ye(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function un(i){i._valueTracker||(i._valueTracker=lt(i))}function Ot(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function zt(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function kt(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Gn(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Pe(s.value!=null?s.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xn(i,s){s=s.checked,s!=null&&C(i,"checked",s,!1)}function Wt(i,s){xn(i,s);var c=Pe(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?bt(i,s.type,c):s.hasOwnProperty("defaultValue")&&bt(i,s.type,Pe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function $e(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||zt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var jt=Array.isArray;function we(i,s,c,h){if(i=i.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=s.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Pe(c),s=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function De(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Fe(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(jt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Pe(c)}}function Xe(i,s){var c=Pe(s.value),h=Pe(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function mt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Z(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 ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Z(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,c,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={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},Gt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Gt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function $t(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function ln(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=$t(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var $r=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cn(i,s){if(s){if($r[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Vr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xn=null;function kp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Np=null,As=null,Cs=null;function p_(i){if(i=vu(i)){if(typeof Np!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Uc(s),Np(i.stateNode,i.type,s))}}function m_(i){As?Cs?Cs.push(i):Cs=[i]:As=i}function g_(){if(As){var i=As,s=Cs;if(Cs=As=null,p_(i),s)for(i=0;i<s.length;i++)p_(s[i])}}function E_(i,s){return i(s)}function y_(){}var Pp=!1;function b_(i,s,c){if(Pp)return i(s,c);Pp=!0;try{return E_(i,s,c)}finally{Pp=!1,(As!==null||Cs!==null)&&(y_(),g_())}}function iu(i,s){var c=i.stateNode;if(c===null)return null;var h=Uc(c);if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Op=!1;if(l)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Op=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch(i){Op=!1}function C7(i,s,c,h,E,b,x,L,z){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(c,ee)}catch(ce){this.onError(ce)}}var su=!1,Ec=null,yc=!1,Ip=null,k7={onError:function(i){su=!0,Ec=i}};function N7(i,s,c,h,E,b,x,L,z){su=!1,Ec=null,C7.apply(k7,arguments)}function P7(i,s,c,h,E,b,x,L,z){if(N7.apply(this,arguments),su){if(su){var ee=Ec;su=!1,Ec=null}else throw Error(n(198));yc||(yc=!0,Ip=ee)}}function Ao(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function T_(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function w_(i){if(Ao(i)!==i)throw Error(n(188))}function O7(i){var s=i.alternate;if(!s){if(s=Ao(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,h=s;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return w_(E),i;if(b===h)return w_(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var x=!1,L=E.child;L;){if(L===c){x=!0,c=E,h=b;break}if(L===h){x=!0,h=E,c=b;break}L=L.sibling}if(!x){for(L=b.child;L;){if(L===c){x=!0,c=b,h=E;break}if(L===h){x=!0,h=b,c=E;break}L=L.sibling}if(!x)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function __(i){return i=O7(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 s=x_(i);if(s!==null)return s;i=i.sibling}return null}var S_=t.unstable_scheduleCallback,v_=t.unstable_cancelCallback,I7=t.unstable_shouldYield,R7=t.unstable_requestPaint,Dt=t.unstable_now,L7=t.unstable_getCurrentPriorityLevel,Rp=t.unstable_ImmediatePriority,A_=t.unstable_UserBlockingPriority,bc=t.unstable_NormalPriority,D7=t.unstable_LowPriority,C_=t.unstable_IdlePriority,Tc=null,qr=null;function M7(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Tc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Tr=Math.clz32?Math.clz32:U7,F7=Math.log,B7=Math.LN2;function U7(i){return i>>>=0,i===0?32:31-(F7(i)/B7|0)|0}var wc=64,_c=4194304;function au(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 xc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=c&268435455;if(x!==0){var L=x&~E;L!==0?h=au(L):(b&=x,b!==0&&(h=au(b)))}else x=c&~E,x!==0?h=au(x):b!==0&&(h=au(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)c=31-Tr(s),E=1<<c,h|=i[c],s&=~E;return h}function H7(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function z7(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Tr(b),L=1<<x,z=E[x];z===-1?((L&c)===0||(L&h)!==0)&&(E[x]=H7(L,s)):z<=s&&(i.expiredLanes|=L),b&=~L}}function Lp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function k_(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Dp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function uu(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Tr(s),i[s]=c}function j7(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-Tr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function Mp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Tr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function N_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var P_,Fp,O_,I_,R_,Bp=!1,Sc=[],Pi=null,Oi=null,Ii=null,lu=new Map,cu=new Map,Ri=[],$7="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 L_(i,s){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(s.pointerId)}}function du(i,s,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=vu(s),s!==null&&Fp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function V7(i,s,c,h,E){switch(s){case"focusin":return Pi=du(Pi,i,s,c,h,E),!0;case"dragenter":return Oi=du(Oi,i,s,c,h,E),!0;case"mouseover":return Ii=du(Ii,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return lu.set(b,du(lu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,cu.set(b,du(cu.get(b)||null,i,s,c,h,E)),!0}return!1}function D_(i){var s=Co(i.target);if(s!==null){var c=Ao(s);if(c!==null){if(s=c.tag,s===13){if(s=T_(c),s!==null){i.blockedOn=s,R_(i.priority,function(){O_(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function vc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Hp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Xn=h,c.target.dispatchEvent(h),Xn=null}else return s=vu(c),s!==null&&Fp(s),i.blockedOn=c,!1;s.shift()}return!0}function M_(i,s,c){vc(i)&&c.delete(s)}function q7(){Bp=!1,Pi!==null&&vc(Pi)&&(Pi=null),Oi!==null&&vc(Oi)&&(Oi=null),Ii!==null&&vc(Ii)&&(Ii=null),lu.forEach(M_),cu.forEach(M_)}function fu(i,s){i.blockedOn===s&&(i.blockedOn=null,Bp||(Bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,q7)))}function hu(i){function s(E){return fu(E,i)}if(0<Sc.length){fu(Sc[0],i);for(var c=1;c<Sc.length;c++){var h=Sc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&fu(Pi,i),Oi!==null&&fu(Oi,i),Ii!==null&&fu(Ii,i),lu.forEach(s),cu.forEach(s),c=0;c<Ri.length;c++)h=Ri[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ri.length&&(c=Ri[0],c.blockedOn===null);)D_(c),c.blockedOn===null&&Ri.shift()}var ks=U.ReactCurrentBatchConfig,Ac=!0;function Y7(i,s,c,h){var E=dt,b=ks.transition;ks.transition=null;try{dt=1,Up(i,s,c,h)}finally{dt=E,ks.transition=b}}function W7(i,s,c,h){var E=dt,b=ks.transition;ks.transition=null;try{dt=4,Up(i,s,c,h)}finally{dt=E,ks.transition=b}}function Up(i,s,c,h){if(Ac){var E=Hp(i,s,c,h);if(E===null)rm(i,s,h,Cc,c),L_(i,h);else if(V7(E,i,s,c,h))h.stopPropagation();else if(L_(i,h),s&4&&-1<$7.indexOf(i)){for(;E!==null;){var b=vu(E);if(b!==null&&P_(b),b=Hp(i,s,c,h),b===null&&rm(i,s,h,Cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else rm(i,s,h,null,c)}}var Cc=null;function Hp(i,s,c,h){if(Cc=null,i=kp(h),i=Co(i),i!==null)if(s=Ao(i),s===null)i=null;else if(c=s.tag,c===13){if(i=T_(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Cc=i,null}function F_(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(L7()){case Rp:return 1;case A_:return 4;case bc:case D7:return 16;case C_:return 536870912;default:return 16}default:return 16}}var Li=null,zp=null,kc=null;function B_(){if(kc)return kc;var i,s=zp,c=s.length,h,E="value"in Li?Li.value:Li.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var x=c-i;for(h=1;h<=x&&s[c-h]===E[b-h];h++);return kc=E.slice(i,1<h?1-h:void 0)}function Nc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Pc(){return!0}function U_(){return!1}function Kn(i){function s(c,h,E,b,x){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Pc:U_,this.isPropagationStopped=U_,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Pc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Pc)},persist:function(){},isPersistent:Pc}),s}var Ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jp=Kn(Ns),pu=k({},Ns,{view:0,detail:0}),G7=Kn(pu),$p,Vp,mu,Oc=k({},pu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yp,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!==mu&&(mu&&i.type==="mousemove"?($p=i.screenX-mu.screenX,Vp=i.screenY-mu.screenY):Vp=$p=0,mu=i),$p)},movementY:function(i){return"movementY"in i?i.movementY:Vp}}),H_=Kn(Oc),X7=k({},Oc,{dataTransfer:0}),K7=Kn(X7),Q7=k({},pu,{relatedTarget:0}),qp=Kn(Q7),J7=k({},Ns,{animationName:0,elapsedTime:0,pseudoElement:0}),Z7=Kn(J7),eB=k({},Ns,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),tB=Kn(eB),nB=k({},Ns,{data:0}),z_=Kn(nB),rB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iB={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"},oB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=oB[i])?!!s[i]:!1}function Yp(){return sB}var aB=k({},pu,{key:function(i){if(i.key){var s=rB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Nc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?iB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yp,charCode:function(i){return i.type==="keypress"?Nc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Nc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),uB=Kn(aB),lB=k({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=Kn(lB),cB=k({},pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yp}),dB=Kn(cB),fB=k({},Ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),hB=Kn(fB),pB=k({},Oc,{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}),mB=Kn(pB),gB=[9,13,27,32],Wp=l&&"CompositionEvent"in window,gu=null;l&&"documentMode"in document&&(gu=document.documentMode);var EB=l&&"TextEvent"in window&&!gu,$_=l&&(!Wp||gu&&8<gu&&11>=gu),V_=" ",q_=!1;function Y_(i,s){switch(i){case"keyup":return gB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ps=!1;function yB(i,s){switch(i){case"compositionend":return W_(s);case"keypress":return s.which!==32?null:(q_=!0,V_);case"textInput":return i=s.data,i===V_&&q_?null:i;default:return null}}function bB(i,s){if(Ps)return i==="compositionend"||!Wp&&Y_(i,s)?(i=B_(),kc=zp=Li=null,Ps=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $_&&s.locale!=="ko"?null:s.data;default:return null}}var TB={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 G_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!TB[i.type]:s==="textarea"}function X_(i,s,c,h){m_(h),s=Mc(s,"onChange"),0<s.length&&(c=new jp("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Eu=null,yu=null;function wB(i){hx(i,0)}function Ic(i){var s=Ds(i);if(Ot(s))return i}function _B(i,s){if(i==="change")return s}var K_=!1;if(l){var Gp;if(l){var Xp="oninput"in document;if(!Xp){var Q_=document.createElement("div");Q_.setAttribute("oninput","return;"),Xp=typeof Q_.oninput=="function"}Gp=Xp}else Gp=!1;K_=Gp&&(!document.documentMode||9<document.documentMode)}function J_(){Eu&&(Eu.detachEvent("onpropertychange",Z_),yu=Eu=null)}function Z_(i){if(i.propertyName==="value"&&Ic(yu)){var s=[];X_(s,yu,i,kp(i)),b_(wB,s)}}function xB(i,s,c){i==="focusin"?(J_(),Eu=s,yu=c,Eu.attachEvent("onpropertychange",Z_)):i==="focusout"&&J_()}function SB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ic(yu)}function vB(i,s){if(i==="click")return Ic(s)}function AB(i,s){if(i==="input"||i==="change")return Ic(s)}function CB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var wr=typeof Object.is=="function"?Object.is:CB;function bu(i,s){if(wr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(s,E)||!wr(i[E],s[E]))return!1}return!0}function ex(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tx(i,s){var c=ex(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=ex(c)}}function nx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rx(){for(var i=window,s=zt();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=zt(i.document)}return s}function Kp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function kB(i){var s=rx(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&nx(c.ownerDocument.documentElement,c)){if(h!==null&&Kp(c)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=tx(c,b);var x=tx(c,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var NB=l&&"documentMode"in document&&11>=document.documentMode,Os=null,Qp=null,Tu=null,Jp=!1;function ix(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Jp||Os==null||Os!==zt(h)||(h=Os,"selectionStart"in h&&Kp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Tu&&bu(Tu,h)||(Tu=h,h=Mc(Qp,"onSelect"),0<h.length&&(s=new jp("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Os)))}function Rc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Is={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},Zp={},ox={};l&&(ox=document.createElement("div").style,"AnimationEvent"in window||(delete Is.animationend.animation,delete Is.animationiteration.animation,delete Is.animationstart.animation),"TransitionEvent"in window||delete Is.transitionend.transition);function Lc(i){if(Zp[i])return Zp[i];if(!Is[i])return i;var s=Is[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in ox)return Zp[i]=s[c];return i}var sx=Lc("animationend"),ax=Lc("animationiteration"),ux=Lc("animationstart"),lx=Lc("transitionend"),cx=new Map,dx="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 Di(i,s){cx.set(i,s),a(s,[i])}for(var em=0;em<dx.length;em++){var tm=dx[em],PB=tm.toLowerCase(),OB=tm[0].toUpperCase()+tm.slice(1);Di(PB,"on"+OB)}Di(sx,"onAnimationEnd"),Di(ax,"onAnimationIteration"),Di(ux,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(lx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wu="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(" "),IB=new Set("cancel close invalid load scroll toggle".split(" ").concat(wu));function fx(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,P7(h,s,void 0,i),i.currentTarget=null}function hx(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var x=h.length-1;0<=x;x--){var L=h[x],z=L.instance,ee=L.currentTarget;if(L=L.listener,z!==b&&E.isPropagationStopped())break e;fx(E,L,ee),b=z}else for(x=0;x<h.length;x++){if(L=h[x],z=L.instance,ee=L.currentTarget,L=L.listener,z!==b&&E.isPropagationStopped())break e;fx(E,L,ee),b=z}}}if(yc)throw i=Ip,yc=!1,Ip=null,i}function _t(i,s){var c=s[lm];c===void 0&&(c=s[lm]=new Set);var h=i+"__bubble";c.has(h)||(px(s,i,2,!1),c.add(h))}function nm(i,s,c){var h=0;s&&(h|=4),px(c,i,h,s)}var Dc="_reactListening"+Math.random().toString(36).slice(2);function _u(i){if(!i[Dc]){i[Dc]=!0,r.forEach(function(c){c!=="selectionchange"&&(IB.has(c)||nm(c,!1,i),nm(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Dc]||(s[Dc]=!0,nm("selectionchange",!1,s))}}function px(i,s,c,h){switch(F_(s)){case 1:var E=Y7;break;case 4:E=W7;break;default:E=Up}c=E.bind(null,s,c,i),E=void 0,!Op||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,c,{capture:!0,passive:E}):i.addEventListener(s,c,!0):E!==void 0?i.addEventListener(s,c,{passive:E}):i.addEventListener(s,c,!1)}function rm(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var z=x.tag;if((z===3||z===4)&&(z=x.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;x=x.return}for(;L!==null;){if(x=Co(L),x===null)return;if(z=x.tag,z===5||z===6){h=b=x;continue e}L=L.parentNode}}h=h.return}b_(function(){var ee=b,ce=kp(c),he=[];e:{var ue=cx.get(i);if(ue!==void 0){var Ae=jp,Oe=i;switch(i){case"keypress":if(Nc(c)===0)break e;case"keydown":case"keyup":Ae=uB;break;case"focusin":Oe="focus",Ae=qp;break;case"focusout":Oe="blur",Ae=qp;break;case"beforeblur":case"afterblur":Ae=qp;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":Ae=H_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=K7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=dB;break;case sx:case ax:case ux:Ae=Z7;break;case lx:Ae=hB;break;case"scroll":Ae=G7;break;case"wheel":Ae=mB;break;case"copy":case"cut":case"paste":Ae=tB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=j_}var Ie=(s&4)!==0,Mt=!Ie&&i==="scroll",G=Ie?ue!==null?ue+"Capture":null:ue;Ie=[];for(var V=ee,K;V!==null;){K=V;var ye=K.stateNode;if(K.tag===5&&ye!==null&&(K=ye,G!==null&&(ye=iu(V,G),ye!=null&&Ie.push(xu(V,ye,K)))),Mt)break;V=V.return}0<Ie.length&&(ue=new Ae(ue,Oe,null,c,ce),he.push({event:ue,listeners:Ie}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&c!==Xn&&(Oe=c.relatedTarget||c.fromElement)&&(Co(Oe)||Oe[ci]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(Oe=c.relatedTarget||c.toElement,Ae=ee,Oe=Oe?Co(Oe):null,Oe!==null&&(Mt=Ao(Oe),Oe!==Mt||Oe.tag!==5&&Oe.tag!==6)&&(Oe=null)):(Ae=null,Oe=ee),Ae!==Oe)){if(Ie=H_,ye="onMouseLeave",G="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=j_,ye="onPointerLeave",G="onPointerEnter",V="pointer"),Mt=Ae==null?ue:Ds(Ae),K=Oe==null?ue:Ds(Oe),ue=new Ie(ye,V+"leave",Ae,c,ce),ue.target=Mt,ue.relatedTarget=K,ye=null,Co(ce)===ee&&(Ie=new Ie(G,V+"enter",Oe,c,ce),Ie.target=K,Ie.relatedTarget=Mt,ye=Ie),Mt=ye,Ae&&Oe)t:{for(Ie=Ae,G=Oe,V=0,K=Ie;K;K=Rs(K))V++;for(K=0,ye=G;ye;ye=Rs(ye))K++;for(;0<V-K;)Ie=Rs(Ie),V--;for(;0<K-V;)G=Rs(G),K--;for(;V--;){if(Ie===G||G!==null&&Ie===G.alternate)break t;Ie=Rs(Ie),G=Rs(G)}Ie=null}else Ie=null;Ae!==null&&mx(he,ue,Ae,Ie,!1),Oe!==null&&Mt!==null&&mx(he,Mt,Oe,Ie,!0)}}e:{if(ue=ee?Ds(ee):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var Me=_B;else if(G_(ue))if(K_)Me=AB;else{Me=SB;var ze=xB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Me=vB);if(Me&&(Me=Me(i,ee))){X_(he,Me,c,ce);break e}ze&&ze(i,ue,ee),i==="focusout"&&(ze=ue._wrapperState)&&ze.controlled&&ue.type==="number"&&bt(ue,"number",ue.value)}switch(ze=ee?Ds(ee):window,i){case"focusin":(G_(ze)||ze.contentEditable==="true")&&(Os=ze,Qp=ee,Tu=null);break;case"focusout":Tu=Qp=Os=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,ix(he,c,ce);break;case"selectionchange":if(NB)break;case"keydown":case"keyup":ix(he,c,ce)}var je;if(Wp)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ps?Y_(i,c)&&(We="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&($_&&c.locale!=="ko"&&(Ps||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ps&&(je=B_()):(Li=ce,zp="value"in Li?Li.value:Li.textContent,Ps=!0)),ze=Mc(ee,We),0<ze.length&&(We=new z_(We,i,null,c,ce),he.push({event:We,listeners:ze}),je?We.data=je:(je=W_(c),je!==null&&(We.data=je)))),(je=EB?yB(i,c):bB(i,c))&&(ee=Mc(ee,"onBeforeInput"),0<ee.length&&(ce=new z_("onBeforeInput","beforeinput",null,c,ce),he.push({event:ce,listeners:ee}),ce.data=je))}hx(he,s)})}function xu(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Mc(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=iu(i,c),b!=null&&h.unshift(xu(i,b,E)),b=iu(i,s),b!=null&&h.push(xu(i,b,E))),i=i.return}return h}function Rs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function mx(i,s,c,h,E){for(var b=s._reactName,x=[];c!==null&&c!==h;){var L=c,z=L.alternate,ee=L.stateNode;if(z!==null&&z===h)break;L.tag===5&&ee!==null&&(L=ee,E?(z=iu(c,b),z!=null&&x.unshift(xu(c,z,L))):E||(z=iu(c,b),z!=null&&x.push(xu(c,z,L)))),c=c.return}x.length!==0&&i.push({event:s,listeners:x})}var RB=/\r\n?/g,LB=/\u0000|\uFFFD/g;function gx(i){return(typeof i=="string"?i:""+i).replace(RB,`
15
- `).replace(LB,"")}function Fc(i,s,c){if(s=gx(s),gx(i)!==s&&c)throw Error(n(425))}function Bc(){}var im=null,om=null;function sm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var am=typeof setTimeout=="function"?setTimeout:void 0,DB=typeof clearTimeout=="function"?clearTimeout:void 0,Ex=typeof Promise=="function"?Promise:void 0,MB=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex!="undefined"?function(i){return Ex.resolve(null).then(i).catch(FB)}:am;function FB(i){setTimeout(function(){throw i})}function um(i,s){var c=s,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),hu(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);hu(s)}function Mi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function yx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var Ls=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Ls,Su="__reactProps$"+Ls,ci="__reactContainer$"+Ls,lm="__reactEvents$"+Ls,BB="__reactListeners$"+Ls,UB="__reactHandles$"+Ls;function Co(i){var s=i[Yr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ci]||c[Yr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=yx(i);i!==null;){if(c=i[Yr])return c;i=yx(i)}return s}i=c,c=i.parentNode}return null}function vu(i){return i=i[Yr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ds(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Uc(i){return i[Su]||null}var cm=[],Ms=-1;function Fi(i){return{current:i}}function xt(i){0>Ms||(i.current=cm[Ms],cm[Ms]=null,Ms--)}function Tt(i,s){Ms++,cm[Ms]=i.current,i.current=s}var Bi={},Sn=Fi(Bi),Bn=Fi(!1),ko=Bi;function Fs(i,s){var c=i.type.contextTypes;if(!c)return Bi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Hc(){xt(Bn),xt(Sn)}function bx(i,s,c){if(Sn.current!==Bi)throw Error(n(168));Tt(Sn,s),Tt(Bn,c)}function Tx(i,s,c){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,xe(i)||"Unknown",E));return k({},c,h)}function zc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bi,ko=Sn.current,Tt(Sn,i),Tt(Bn,Bn.current),!0}function wx(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Tx(i,s,ko),h.__reactInternalMemoizedMergedChildContext=i,xt(Bn),xt(Sn),Tt(Sn,i)):xt(Bn),Tt(Bn,c)}var di=null,jc=!1,dm=!1;function _x(i){di===null?di=[i]:di.push(i)}function HB(i){jc=!0,_x(i)}function Ui(){if(!dm&&di!==null){dm=!0;var i=0,s=dt;try{var c=di;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}di=null,jc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),S_(Rp,Ui),E}finally{dt=s,dm=!1}}return null}var Bs=[],Us=0,$c=null,Vc=0,ar=[],ur=0,No=null,fi=1,hi="";function Po(i,s){Bs[Us++]=Vc,Bs[Us++]=$c,$c=i,Vc=s}function xx(i,s,c){ar[ur++]=fi,ar[ur++]=hi,ar[ur++]=No,No=i;var h=fi;i=hi;var E=32-Tr(h)-1;h&=~(1<<E),c+=1;var b=32-Tr(s)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Tr(s)+E|c<<E|h,hi=b+i}else fi=1<<b|c<<E|h,hi=i}function fm(i){i.return!==null&&(Po(i,1),xx(i,1,0))}function hm(i){for(;i===$c;)$c=Bs[--Us],Bs[Us]=null,Vc=Bs[--Us],Bs[Us]=null;for(;i===No;)No=ar[--ur],ar[ur]=null,hi=ar[--ur],ar[ur]=null,fi=ar[--ur],ar[ur]=null}var Qn=null,Jn=null,At=!1,_r=null;function Sx(i,s){var c=fr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function vx(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Qn=i,Jn=Mi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Qn=i,Jn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=No!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=fr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Qn=i,Jn=null,!0):!1;default:return!1}}function pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function mm(i){if(At){var s=Jn;if(s){var c=s;if(!vx(i,s)){if(pm(i))throw Error(n(418));s=Mi(c.nextSibling);var h=Qn;s&&vx(i,s)?Sx(h,c):(i.flags=i.flags&-4097|2,At=!1,Qn=i)}}else{if(pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Qn=i}}}function Ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Qn=i}function qc(i){if(i!==Qn)return!1;if(!At)return Ax(i),At=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!sm(i.type,i.memoizedProps)),s&&(s=Jn)){if(pm(i))throw Cx(),Error(n(418));for(;s;)Sx(i,s),s=Mi(s.nextSibling)}if(Ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){Jn=Mi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}Jn=null}}else Jn=Qn?Mi(i.stateNode.nextSibling):null;return!0}function Cx(){for(var i=Jn;i;)i=Mi(i.nextSibling)}function Hs(){Jn=Qn=null,At=!1}function gm(i){_r===null?_r=[i]:_r.push(i)}var zB=U.ReactCurrentBatchConfig;function Au(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(x){var L=E.refs;x===null?delete L[b]:L[b]=x},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Yc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function kx(i){var s=i._init;return s(i._payload)}function Nx(i){function s(G,V){if(i){var K=G.deletions;K===null?(G.deletions=[V],G.flags|=16):K.push(V)}}function c(G,V){if(!i)return null;for(;V!==null;)s(G,V),V=V.sibling;return null}function h(G,V){for(G=new Map;V!==null;)V.key!==null?G.set(V.key,V):G.set(V.index,V),V=V.sibling;return G}function E(G,V){return G=Wi(G,V),G.index=0,G.sibling=null,G}function b(G,V,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<V?(G.flags|=2,V):K):(G.flags|=2,V)):(G.flags|=1048576,V)}function x(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,V,K,ye){return V===null||V.tag!==6?(V=a0(K,G.mode,ye),V.return=G,V):(V=E(V,K),V.return=G,V)}function z(G,V,K,ye){var Me=K.type;return Me===Y?ce(G,V,K.props.children,ye,K.key):V!==null&&(V.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Se&&kx(Me)===V.type)?(ye=E(V,K.props),ye.ref=Au(G,V,K),ye.return=G,ye):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=Au(G,V,K),ye.return=G,ye)}function ee(G,V,K,ye){return V===null||V.tag!==4||V.stateNode.containerInfo!==K.containerInfo||V.stateNode.implementation!==K.implementation?(V=u0(K,G.mode,ye),V.return=G,V):(V=E(V,K.children||[]),V.return=G,V)}function ce(G,V,K,ye,Me){return V===null||V.tag!==7?(V=Bo(K,G.mode,ye,Me),V.return=G,V):(V=E(V,K),V.return=G,V)}function he(G,V,K){if(typeof V=="string"&&V!==""||typeof V=="number")return V=a0(""+V,G.mode,K),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case q:return K=gd(V.type,V.key,V.props,null,G.mode,K),K.ref=Au(G,null,V),K.return=G,K;case R:return V=u0(V,G.mode,K),V.return=G,V;case Se:var ye=V._init;return he(G,ye(V._payload),K)}if(jt(V)||oe(V))return V=Bo(V,G.mode,K,null),V.return=G,V;Yc(G,V)}return null}function ue(G,V,K,ye){var Me=V!==null?V.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Me!==null?null:L(G,V,""+K,ye);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case q:return K.key===Me?z(G,V,K,ye):null;case R:return K.key===Me?ee(G,V,K,ye):null;case Se:return Me=K._init,ue(G,V,Me(K._payload),ye)}if(jt(K)||oe(K))return Me!==null?null:ce(G,V,K,ye,null);Yc(G,K)}return null}function Ae(G,V,K,ye,Me){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(K)||null,L(V,G,""+ye,Me);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case q:return G=G.get(ye.key===null?K:ye.key)||null,z(V,G,ye,Me);case R:return G=G.get(ye.key===null?K:ye.key)||null,ee(V,G,ye,Me);case Se:var ze=ye._init;return Ae(G,V,K,ze(ye._payload),Me)}if(jt(ye)||oe(ye))return G=G.get(K)||null,ce(V,G,ye,Me,null);Yc(V,ye)}return null}function Oe(G,V,K,ye){for(var Me=null,ze=null,je=V,We=V=0,sn=null;je!==null&&We<K.length;We++){je.index>We?(sn=je,je=null):sn=je.sibling;var ot=ue(G,je,K[We],ye);if(ot===null){je===null&&(je=sn);break}i&&je&&ot.alternate===null&&s(G,je),V=b(ot,V,We),ze===null?Me=ot:ze.sibling=ot,ze=ot,je=sn}if(We===K.length)return c(G,je),At&&Po(G,We),Me;if(je===null){for(;We<K.length;We++)je=he(G,K[We],ye),je!==null&&(V=b(je,V,We),ze===null?Me=je:ze.sibling=je,ze=je);return At&&Po(G,We),Me}for(je=h(G,je);We<K.length;We++)sn=Ae(je,G,We,K[We],ye),sn!==null&&(i&&sn.alternate!==null&&je.delete(sn.key===null?We:sn.key),V=b(sn,V,We),ze===null?Me=sn:ze.sibling=sn,ze=sn);return i&&je.forEach(function(Gi){return s(G,Gi)}),At&&Po(G,We),Me}function Ie(G,V,K,ye){var Me=oe(K);if(typeof Me!="function")throw Error(n(150));if(K=Me.call(K),K==null)throw Error(n(151));for(var ze=Me=null,je=V,We=V=0,sn=null,ot=K.next();je!==null&&!ot.done;We++,ot=K.next()){je.index>We?(sn=je,je=null):sn=je.sibling;var Gi=ue(G,je,ot.value,ye);if(Gi===null){je===null&&(je=sn);break}i&&je&&Gi.alternate===null&&s(G,je),V=b(Gi,V,We),ze===null?Me=Gi:ze.sibling=Gi,ze=Gi,je=sn}if(ot.done)return c(G,je),At&&Po(G,We),Me;if(je===null){for(;!ot.done;We++,ot=K.next())ot=he(G,ot.value,ye),ot!==null&&(V=b(ot,V,We),ze===null?Me=ot:ze.sibling=ot,ze=ot);return At&&Po(G,We),Me}for(je=h(G,je);!ot.done;We++,ot=K.next())ot=Ae(je,G,We,ot.value,ye),ot!==null&&(i&&ot.alternate!==null&&je.delete(ot.key===null?We:ot.key),V=b(ot,V,We),ze===null?Me=ot:ze.sibling=ot,ze=ot);return i&&je.forEach(function(TU){return s(G,TU)}),At&&Po(G,We),Me}function Mt(G,V,K,ye){if(typeof K=="object"&&K!==null&&K.type===Y&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case q:e:{for(var Me=K.key,ze=V;ze!==null;){if(ze.key===Me){if(Me=K.type,Me===Y){if(ze.tag===7){c(G,ze.sibling),V=E(ze,K.props.children),V.return=G,G=V;break e}}else if(ze.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Se&&kx(Me)===ze.type){c(G,ze.sibling),V=E(ze,K.props),V.ref=Au(G,ze,K),V.return=G,G=V;break e}c(G,ze);break}else s(G,ze);ze=ze.sibling}K.type===Y?(V=Bo(K.props.children,G.mode,ye,K.key),V.return=G,G=V):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=Au(G,V,K),ye.return=G,G=ye)}return x(G);case R:e:{for(ze=K.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===K.containerInfo&&V.stateNode.implementation===K.implementation){c(G,V.sibling),V=E(V,K.children||[]),V.return=G,G=V;break e}else{c(G,V);break}else s(G,V);V=V.sibling}V=u0(K,G.mode,ye),V.return=G,G=V}return x(G);case Se:return ze=K._init,Mt(G,V,ze(K._payload),ye)}if(jt(K))return Oe(G,V,K,ye);if(oe(K))return Ie(G,V,K,ye);Yc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,V!==null&&V.tag===6?(c(G,V.sibling),V=E(V,K),V.return=G,G=V):(c(G,V),V=a0(K,G.mode,ye),V.return=G,G=V),x(G)):c(G,V)}return Mt}var zs=Nx(!0),Px=Nx(!1),Wc=Fi(null),Gc=null,js=null,Em=null;function ym(){Em=js=Gc=null}function bm(i){var s=Wc.current;xt(Wc),i._currentValue=s}function Tm(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function $s(i,s){Gc=i,Em=js=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Hn=!0),i.firstContext=null)}function lr(i){var s=i._currentValue;if(Em!==i)if(i={context:i,memoizedValue:s,next:null},js===null){if(Gc===null)throw Error(n(308));js=i,Gc.dependencies={lanes:0,firstContext:i}}else js=js.next=i;return s}var Oo=null;function wm(i){Oo===null?Oo=[i]:Oo.push(i)}function Ox(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,wm(s)):(c.next=E.next,E.next=c),s.interleaved=c,pi(i,h)}function pi(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Hi=!1;function _m(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ix(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function mi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function zi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,pi(i,c)}return E=h.interleaved,E===null?(s.next=s,wm(h)):(s.next=E.next,E.next=s),h.interleaved=s,pi(i,c)}function Xc(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Mp(i,c)}}function Rx(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var x={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=x:b=b.next=x,c=c.next}while(c!==null);b===null?E=b=s:b=b.next=s}else E=b=s;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Kc(i,s,c,h){var E=i.updateQueue;Hi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var z=L,ee=z.next;z.next=null,x===null?b=ee:x.next=ee,x=z;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==x&&(L===null?ce.firstBaseUpdate=ee:L.next=ee,ce.lastBaseUpdate=z))}if(b!==null){var he=E.baseState;x=0,ce=ee=z=null,L=b;do{var ue=L.lane,Ae=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Oe=i,Ie=L;switch(ue=s,Ae=c,Ie.tag){case 1:if(Oe=Ie.payload,typeof Oe=="function"){he=Oe.call(Ae,he,ue);break e}he=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ie.payload,ue=typeof Oe=="function"?Oe.call(Ae,he,ue):Oe,ue==null)break e;he=k({},he,ue);break e;case 2:Hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else Ae={eventTime:Ae,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(ee=ce=Ae,z=he):ce=ce.next=Ae,x|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(z=he),E.baseState=z,E.firstBaseUpdate=ee,E.lastBaseUpdate=ce,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Lo|=x,i.lanes=x,i.memoizedState=he}}function Lx(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Cu={},Wr=Fi(Cu),ku=Fi(Cu),Nu=Fi(Cu);function Io(i){if(i===Cu)throw Error(n(174));return i}function xm(i,s){switch(Tt(Nu,s),Tt(ku,i),Tt(Wr,Cu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}xt(Wr),Tt(Wr,s)}function Vs(){xt(Wr),xt(ku),xt(Nu)}function Dx(i){Io(Nu.current);var s=Io(Wr.current),c=ge(s,i.type);s!==c&&(Tt(ku,i),Tt(Wr,c))}function Sm(i){ku.current===i&&(xt(Wr),xt(ku))}var Nt=Fi(0);function Qc(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var vm=[];function Am(){for(var i=0;i<vm.length;i++)vm[i]._workInProgressVersionPrimary=null;vm.length=0}var Jc=U.ReactCurrentDispatcher,Cm=U.ReactCurrentBatchConfig,Ro=0,Pt=null,Xt=null,rn=null,Zc=!1,Pu=!1,Ou=0,jB=0;function vn(){throw Error(n(321))}function km(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!wr(i[c],s[c]))return!1;return!0}function Nm(i,s,c,h,E,b){if(Ro=b,Pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Jc.current=i===null||i.memoizedState===null?YB:WB,i=c(h,E),Pu){b=0;do{if(Pu=!1,Ou=0,25<=b)throw Error(n(301));b+=1,rn=Xt=null,s.updateQueue=null,Jc.current=GB,i=c(h,E)}while(Pu)}if(Jc.current=nd,s=Xt!==null&&Xt.next!==null,Ro=0,rn=Xt=Pt=null,Zc=!1,s)throw Error(n(300));return i}function Pm(){var i=Ou!==0;return Ou=0,i}function Gr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Pt.memoizedState=rn=i:rn=rn.next=i,rn}function cr(){if(Xt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var s=rn===null?Pt.memoizedState:rn.next;if(s!==null)rn=s,Xt=i;else{if(i===null)throw Error(n(310));Xt=i,i={memoizedState:Xt.memoizedState,baseState:Xt.baseState,baseQueue:Xt.baseQueue,queue:Xt.queue,next:null},rn===null?Pt.memoizedState=rn=i:rn=rn.next=i}return rn}function Iu(i,s){return typeof s=="function"?s(i):s}function Om(i){var s=cr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Xt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=x=null,z=null,ee=b;do{var ce=ee.lane;if((Ro&ce)===ce)z!==null&&(z=z.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var he={lane:ce,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};z===null?(L=z=he,x=h):z=z.next=he,Pt.lanes|=ce,Lo|=ce}ee=ee.next}while(ee!==null&&ee!==b);z===null?x=h:z.next=L,wr(h,s.memoizedState)||(Hn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Pt.lanes|=b,Lo|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Im(i){var s=cr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=s.memoizedState;if(E!==null){c.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);wr(b,s.memoizedState)||(Hn=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Mx(){}function Fx(i,s){var c=Pt,h=cr(),E=s(),b=!wr(h.memoizedState,E);if(b&&(h.memoizedState=E,Hn=!0),h=h.queue,Rm(Hx.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||rn!==null&&rn.memoizedState.tag&1){if(c.flags|=2048,Ru(9,Ux.bind(null,c,h,E,s),void 0,null),on===null)throw Error(n(349));(Ro&30)!==0||Bx(c,s,E)}return E}function Bx(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Ux(i,s,c,h){s.value=c,s.getSnapshot=h,zx(s)&&jx(i)}function Hx(i,s,c){return c(function(){zx(s)&&jx(i)})}function zx(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!wr(i,c)}catch(h){return!0}}function jx(i){var s=pi(i,1);s!==null&&Ar(s,i,1,-1)}function $x(i){var s=Gr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:i},s.queue=i,i=i.dispatch=qB.bind(null,Pt,i),[s.memoizedState,i]}function Ru(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i)),i}function Vx(){return cr().memoizedState}function ed(i,s,c,h){var E=Gr();Pt.flags|=i,E.memoizedState=Ru(1|s,c,void 0,h===void 0?null:h)}function td(i,s,c,h){var E=cr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var x=Xt.memoizedState;if(b=x.destroy,h!==null&&km(h,x.deps)){E.memoizedState=Ru(s,c,b,h);return}}Pt.flags|=i,E.memoizedState=Ru(1|s,c,b,h)}function qx(i,s){return ed(8390656,8,i,s)}function Rm(i,s){return td(2048,8,i,s)}function Yx(i,s){return td(4,2,i,s)}function Wx(i,s){return td(4,4,i,s)}function Gx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Xx(i,s,c){return c=c!=null?c.concat([i]):null,td(4,4,Gx.bind(null,s,i),c)}function Lm(){}function Kx(i,s){var c=cr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&km(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function Qx(i,s){var c=cr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&km(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function Jx(i,s,c){return(Ro&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=c):(wr(c,s)||(c=k_(),Pt.lanes|=c,Lo|=c,i.baseState=!0),s)}function $B(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=Cm.transition;Cm.transition={};try{i(!1),s()}finally{dt=c,Cm.transition=h}}function Zx(){return cr().memoizedState}function VB(i,s,c){var h=qi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},e2(i))t2(s,c);else if(c=Ox(i,s,c,h),c!==null){var E=On();Ar(c,i,h,E),n2(c,s,h)}}function qB(i,s,c){var h=qi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(e2(i))t2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var x=s.lastRenderedState,L=b(x,c);if(E.hasEagerState=!0,E.eagerState=L,wr(L,x)){var z=s.interleaved;z===null?(E.next=E,wm(s)):(E.next=z.next,z.next=E),s.interleaved=E;return}}catch(ee){}c=Ox(i,s,E,h),c!==null&&(E=On(),Ar(c,i,h,E),n2(c,s,h))}}function e2(i){var s=i.alternate;return i===Pt||s!==null&&s===Pt}function t2(i,s){Pu=Zc=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function n2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Mp(i,c)}}var nd={readContext:lr,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useInsertionEffect:vn,useLayoutEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useMutableSource:vn,useSyncExternalStore:vn,useId:vn,unstable_isNewReconciler:!1},YB={readContext:lr,useCallback:function(i,s){return Gr().memoizedState=[i,s===void 0?null:s],i},useContext:lr,useEffect:qx,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,ed(4194308,4,Gx.bind(null,s,i),c)},useLayoutEffect:function(i,s){return ed(4194308,4,i,s)},useInsertionEffect:function(i,s){return ed(4,2,i,s)},useMemo:function(i,s){var c=Gr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=Gr();return s=c!==void 0?c(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=VB.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var s=Gr();return i={current:i},s.memoizedState=i},useState:$x,useDebugValue:Lm,useDeferredValue:function(i){return Gr().memoizedState=i},useTransition:function(){var i=$x(!1),s=i[0];return i=$B.bind(null,i[1]),Gr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=Pt,E=Gr();if(At){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),on===null)throw Error(n(349));(Ro&30)!==0||Bx(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,qx(Hx.bind(null,h,b,i),[i]),h.flags|=2048,Ru(9,Ux.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=Gr(),s=on.identifierPrefix;if(At){var c=hi,h=fi;c=(h&~(1<<32-Tr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ou++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=jB++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},WB={readContext:lr,useCallback:Kx,useContext:lr,useEffect:Rm,useImperativeHandle:Xx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Qx,useReducer:Om,useRef:Vx,useState:function(){return Om(Iu)},useDebugValue:Lm,useDeferredValue:function(i){var s=cr();return Jx(s,Xt.memoizedState,i)},useTransition:function(){var i=Om(Iu)[0],s=cr().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1},GB={readContext:lr,useCallback:Kx,useContext:lr,useEffect:Rm,useImperativeHandle:Xx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Qx,useReducer:Im,useRef:Vx,useState:function(){return Im(Iu)},useDebugValue:Lm,useDeferredValue:function(i){var s=cr();return Xt===null?s.memoizedState=i:Jx(s,Xt.memoizedState,i)},useTransition:function(){var i=Im(Iu)[0],s=cr().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1};function xr(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Dm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var rd={isMounted:function(i){return(i=i._reactInternals)?Ao(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=On(),E=qi(i),b=mi(h,E);b.payload=s,c!=null&&(b.callback=c),s=zi(i,b,E),s!==null&&(Ar(s,i,E,h),Xc(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=On(),E=qi(i),b=mi(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=zi(i,b,E),s!==null&&(Ar(s,i,E,h),Xc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=On(),h=qi(i),E=mi(c,h);E.tag=2,s!=null&&(E.callback=s),s=zi(i,E,h),s!==null&&(Ar(s,i,h,c),Xc(s,i,h))}};function r2(i,s,c,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):s.prototype&&s.prototype.isPureReactComponent?!bu(c,h)||!bu(E,b):!0}function i2(i,s,c){var h=!1,E=Bi,b=s.contextType;return typeof b=="object"&&b!==null?b=lr(b):(E=Un(s)?ko:Sn.current,h=s.contextTypes,b=(h=h!=null)?Fs(i,E):Bi),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=rd,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function o2(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&rd.enqueueReplaceState(s,s.state,null)}function Mm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},_m(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=lr(b):(b=Un(s)?ko:Sn.current,E.context=Fs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Dm(i,s,b,c),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&rd.enqueueReplaceState(E,E.state,null),Kc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qs(i,s){try{var c="",h=s;do c+=Be(h),h=h.return;while(h);var E=c}catch(b){E=`
14
+ `+E[x].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=x&&0<=L);break}}}finally{O=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Q(i):""}function Be(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ve(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 q:return"Fragment";case R:return"Portal";case de:return"Profiler";case re:return"StrictMode";case ke:return"Suspense";case ne:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case Y:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return s=i.displayName||null,s!==null?s:ve(i.type)||"Memo";case Se:s=i._payload,i=i._init;try{return ve(i(s))}catch(c){}}return null}function xe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(s);case 8:return s===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Pe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function lt(i){var s=Ye(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function un(i){i._valueTracker||(i._valueTracker=lt(i))}function Ot(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function zt(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function kt(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Gn(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Pe(s.value!=null?s.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xn(i,s){s=s.checked,s!=null&&C(i,"checked",s,!1)}function Wt(i,s){xn(i,s);var c=Pe(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?bt(i,s.type,c):s.hasOwnProperty("defaultValue")&&bt(i,s.type,Pe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function $e(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||zt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var jt=Array.isArray;function we(i,s,c,h){if(i=i.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=s.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Pe(c),s=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function De(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Fe(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(jt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Pe(c)}}function Xe(i,s){var c=Pe(s.value),h=Pe(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function mt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Z(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 ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Z(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,c,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={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},Gt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Gt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function $t(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function ln(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=$t(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var $r=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cn(i,s){if(s){if($r[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Vr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xn=null;function Np(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pp=null,As=null,Cs=null;function p_(i){if(i=vu(i)){if(typeof Pp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Uc(s),Pp(i.stateNode,i.type,s))}}function m_(i){As?Cs?Cs.push(i):Cs=[i]:As=i}function g_(){if(As){var i=As,s=Cs;if(Cs=As=null,p_(i),s)for(i=0;i<s.length;i++)p_(s[i])}}function E_(i,s){return i(s)}function y_(){}var Op=!1;function b_(i,s,c){if(Op)return i(s,c);Op=!0;try{return E_(i,s,c)}finally{Op=!1,(As!==null||Cs!==null)&&(y_(),g_())}}function iu(i,s){var c=i.stateNode;if(c===null)return null;var h=Uc(c);if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Ip=!1;if(l)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Ip=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch(i){Ip=!1}function N7(i,s,c,h,E,b,x,L,z){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(c,ee)}catch(ce){this.onError(ce)}}var su=!1,Ec=null,yc=!1,Rp=null,P7={onError:function(i){su=!0,Ec=i}};function O7(i,s,c,h,E,b,x,L,z){su=!1,Ec=null,N7.apply(P7,arguments)}function I7(i,s,c,h,E,b,x,L,z){if(O7.apply(this,arguments),su){if(su){var ee=Ec;su=!1,Ec=null}else throw Error(n(198));yc||(yc=!0,Rp=ee)}}function Ao(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function T_(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function w_(i){if(Ao(i)!==i)throw Error(n(188))}function R7(i){var s=i.alternate;if(!s){if(s=Ao(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,h=s;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return w_(E),i;if(b===h)return w_(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var x=!1,L=E.child;L;){if(L===c){x=!0,c=E,h=b;break}if(L===h){x=!0,h=E,c=b;break}L=L.sibling}if(!x){for(L=b.child;L;){if(L===c){x=!0,c=b,h=E;break}if(L===h){x=!0,h=b,c=E;break}L=L.sibling}if(!x)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function __(i){return i=R7(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 s=x_(i);if(s!==null)return s;i=i.sibling}return null}var S_=t.unstable_scheduleCallback,v_=t.unstable_cancelCallback,L7=t.unstable_shouldYield,D7=t.unstable_requestPaint,Dt=t.unstable_now,M7=t.unstable_getCurrentPriorityLevel,Lp=t.unstable_ImmediatePriority,A_=t.unstable_UserBlockingPriority,bc=t.unstable_NormalPriority,F7=t.unstable_LowPriority,C_=t.unstable_IdlePriority,Tc=null,qr=null;function B7(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Tc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Tr=Math.clz32?Math.clz32:z7,U7=Math.log,H7=Math.LN2;function z7(i){return i>>>=0,i===0?32:31-(U7(i)/H7|0)|0}var wc=64,_c=4194304;function au(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 xc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=c&268435455;if(x!==0){var L=x&~E;L!==0?h=au(L):(b&=x,b!==0&&(h=au(b)))}else x=c&~E,x!==0?h=au(x):b!==0&&(h=au(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)c=31-Tr(s),E=1<<c,h|=i[c],s&=~E;return h}function j7(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $7(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Tr(b),L=1<<x,z=E[x];z===-1?((L&c)===0||(L&h)!==0)&&(E[x]=j7(L,s)):z<=s&&(i.expiredLanes|=L),b&=~L}}function Dp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function k_(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Mp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function uu(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Tr(s),i[s]=c}function V7(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-Tr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function Fp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Tr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function N_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var P_,Bp,O_,I_,R_,Up=!1,Sc=[],Pi=null,Oi=null,Ii=null,lu=new Map,cu=new Map,Ri=[],q7="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 L_(i,s){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(s.pointerId)}}function du(i,s,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=vu(s),s!==null&&Bp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function Y7(i,s,c,h,E){switch(s){case"focusin":return Pi=du(Pi,i,s,c,h,E),!0;case"dragenter":return Oi=du(Oi,i,s,c,h,E),!0;case"mouseover":return Ii=du(Ii,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return lu.set(b,du(lu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,cu.set(b,du(cu.get(b)||null,i,s,c,h,E)),!0}return!1}function D_(i){var s=Co(i.target);if(s!==null){var c=Ao(s);if(c!==null){if(s=c.tag,s===13){if(s=T_(c),s!==null){i.blockedOn=s,R_(i.priority,function(){O_(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function vc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=zp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Xn=h,c.target.dispatchEvent(h),Xn=null}else return s=vu(c),s!==null&&Bp(s),i.blockedOn=c,!1;s.shift()}return!0}function M_(i,s,c){vc(i)&&c.delete(s)}function W7(){Up=!1,Pi!==null&&vc(Pi)&&(Pi=null),Oi!==null&&vc(Oi)&&(Oi=null),Ii!==null&&vc(Ii)&&(Ii=null),lu.forEach(M_),cu.forEach(M_)}function fu(i,s){i.blockedOn===s&&(i.blockedOn=null,Up||(Up=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,W7)))}function hu(i){function s(E){return fu(E,i)}if(0<Sc.length){fu(Sc[0],i);for(var c=1;c<Sc.length;c++){var h=Sc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&fu(Pi,i),Oi!==null&&fu(Oi,i),Ii!==null&&fu(Ii,i),lu.forEach(s),cu.forEach(s),c=0;c<Ri.length;c++)h=Ri[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ri.length&&(c=Ri[0],c.blockedOn===null);)D_(c),c.blockedOn===null&&Ri.shift()}var ks=U.ReactCurrentBatchConfig,Ac=!0;function G7(i,s,c,h){var E=dt,b=ks.transition;ks.transition=null;try{dt=1,Hp(i,s,c,h)}finally{dt=E,ks.transition=b}}function X7(i,s,c,h){var E=dt,b=ks.transition;ks.transition=null;try{dt=4,Hp(i,s,c,h)}finally{dt=E,ks.transition=b}}function Hp(i,s,c,h){if(Ac){var E=zp(i,s,c,h);if(E===null)im(i,s,h,Cc,c),L_(i,h);else if(Y7(E,i,s,c,h))h.stopPropagation();else if(L_(i,h),s&4&&-1<q7.indexOf(i)){for(;E!==null;){var b=vu(E);if(b!==null&&P_(b),b=zp(i,s,c,h),b===null&&im(i,s,h,Cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else im(i,s,h,null,c)}}var Cc=null;function zp(i,s,c,h){if(Cc=null,i=Np(h),i=Co(i),i!==null)if(s=Ao(i),s===null)i=null;else if(c=s.tag,c===13){if(i=T_(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Cc=i,null}function F_(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(M7()){case Lp:return 1;case A_:return 4;case bc:case F7:return 16;case C_:return 536870912;default:return 16}default:return 16}}var Li=null,jp=null,kc=null;function B_(){if(kc)return kc;var i,s=jp,c=s.length,h,E="value"in Li?Li.value:Li.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var x=c-i;for(h=1;h<=x&&s[c-h]===E[b-h];h++);return kc=E.slice(i,1<h?1-h:void 0)}function Nc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Pc(){return!0}function U_(){return!1}function Kn(i){function s(c,h,E,b,x){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Pc:U_,this.isPropagationStopped=U_,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Pc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Pc)},persist:function(){},isPersistent:Pc}),s}var Ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$p=Kn(Ns),pu=k({},Ns,{view:0,detail:0}),K7=Kn(pu),Vp,qp,mu,Oc=k({},pu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wp,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!==mu&&(mu&&i.type==="mousemove"?(Vp=i.screenX-mu.screenX,qp=i.screenY-mu.screenY):qp=Vp=0,mu=i),Vp)},movementY:function(i){return"movementY"in i?i.movementY:qp}}),H_=Kn(Oc),Q7=k({},Oc,{dataTransfer:0}),J7=Kn(Q7),Z7=k({},pu,{relatedTarget:0}),Yp=Kn(Z7),eB=k({},Ns,{animationName:0,elapsedTime:0,pseudoElement:0}),tB=Kn(eB),nB=k({},Ns,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),rB=Kn(nB),iB=k({},Ns,{data:0}),z_=Kn(iB),oB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sB={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"},aB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=aB[i])?!!s[i]:!1}function Wp(){return uB}var lB=k({},pu,{key:function(i){if(i.key){var s=oB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Nc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?sB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wp,charCode:function(i){return i.type==="keypress"?Nc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Nc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),cB=Kn(lB),dB=k({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=Kn(dB),fB=k({},pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wp}),hB=Kn(fB),pB=k({},Ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),mB=Kn(pB),gB=k({},Oc,{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}),EB=Kn(gB),yB=[9,13,27,32],Gp=l&&"CompositionEvent"in window,gu=null;l&&"documentMode"in document&&(gu=document.documentMode);var bB=l&&"TextEvent"in window&&!gu,$_=l&&(!Gp||gu&&8<gu&&11>=gu),V_=" ",q_=!1;function Y_(i,s){switch(i){case"keyup":return yB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ps=!1;function TB(i,s){switch(i){case"compositionend":return W_(s);case"keypress":return s.which!==32?null:(q_=!0,V_);case"textInput":return i=s.data,i===V_&&q_?null:i;default:return null}}function wB(i,s){if(Ps)return i==="compositionend"||!Gp&&Y_(i,s)?(i=B_(),kc=jp=Li=null,Ps=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $_&&s.locale!=="ko"?null:s.data;default:return null}}var _B={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function G_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!_B[i.type]:s==="textarea"}function X_(i,s,c,h){m_(h),s=Mc(s,"onChange"),0<s.length&&(c=new $p("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Eu=null,yu=null;function xB(i){hx(i,0)}function Ic(i){var s=Ds(i);if(Ot(s))return i}function SB(i,s){if(i==="change")return s}var K_=!1;if(l){var Xp;if(l){var Kp="oninput"in document;if(!Kp){var Q_=document.createElement("div");Q_.setAttribute("oninput","return;"),Kp=typeof Q_.oninput=="function"}Xp=Kp}else Xp=!1;K_=Xp&&(!document.documentMode||9<document.documentMode)}function J_(){Eu&&(Eu.detachEvent("onpropertychange",Z_),yu=Eu=null)}function Z_(i){if(i.propertyName==="value"&&Ic(yu)){var s=[];X_(s,yu,i,Np(i)),b_(xB,s)}}function vB(i,s,c){i==="focusin"?(J_(),Eu=s,yu=c,Eu.attachEvent("onpropertychange",Z_)):i==="focusout"&&J_()}function AB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ic(yu)}function CB(i,s){if(i==="click")return Ic(s)}function kB(i,s){if(i==="input"||i==="change")return Ic(s)}function NB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var wr=typeof Object.is=="function"?Object.is:NB;function bu(i,s){if(wr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(s,E)||!wr(i[E],s[E]))return!1}return!0}function ex(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tx(i,s){var c=ex(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=ex(c)}}function nx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rx(){for(var i=window,s=zt();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=zt(i.document)}return s}function Qp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function PB(i){var s=rx(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&nx(c.ownerDocument.documentElement,c)){if(h!==null&&Qp(c)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=tx(c,b);var x=tx(c,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var OB=l&&"documentMode"in document&&11>=document.documentMode,Os=null,Jp=null,Tu=null,Zp=!1;function ix(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Zp||Os==null||Os!==zt(h)||(h=Os,"selectionStart"in h&&Qp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Tu&&bu(Tu,h)||(Tu=h,h=Mc(Jp,"onSelect"),0<h.length&&(s=new $p("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Os)))}function Rc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Is={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},em={},ox={};l&&(ox=document.createElement("div").style,"AnimationEvent"in window||(delete Is.animationend.animation,delete Is.animationiteration.animation,delete Is.animationstart.animation),"TransitionEvent"in window||delete Is.transitionend.transition);function Lc(i){if(em[i])return em[i];if(!Is[i])return i;var s=Is[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in ox)return em[i]=s[c];return i}var sx=Lc("animationend"),ax=Lc("animationiteration"),ux=Lc("animationstart"),lx=Lc("transitionend"),cx=new Map,dx="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 Di(i,s){cx.set(i,s),a(s,[i])}for(var tm=0;tm<dx.length;tm++){var nm=dx[tm],IB=nm.toLowerCase(),RB=nm[0].toUpperCase()+nm.slice(1);Di(IB,"on"+RB)}Di(sx,"onAnimationEnd"),Di(ax,"onAnimationIteration"),Di(ux,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(lx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wu="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(" "),LB=new Set("cancel close invalid load scroll toggle".split(" ").concat(wu));function fx(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,I7(h,s,void 0,i),i.currentTarget=null}function hx(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var x=h.length-1;0<=x;x--){var L=h[x],z=L.instance,ee=L.currentTarget;if(L=L.listener,z!==b&&E.isPropagationStopped())break e;fx(E,L,ee),b=z}else for(x=0;x<h.length;x++){if(L=h[x],z=L.instance,ee=L.currentTarget,L=L.listener,z!==b&&E.isPropagationStopped())break e;fx(E,L,ee),b=z}}}if(yc)throw i=Rp,yc=!1,Rp=null,i}function _t(i,s){var c=s[cm];c===void 0&&(c=s[cm]=new Set);var h=i+"__bubble";c.has(h)||(px(s,i,2,!1),c.add(h))}function rm(i,s,c){var h=0;s&&(h|=4),px(c,i,h,s)}var Dc="_reactListening"+Math.random().toString(36).slice(2);function _u(i){if(!i[Dc]){i[Dc]=!0,r.forEach(function(c){c!=="selectionchange"&&(LB.has(c)||rm(c,!1,i),rm(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Dc]||(s[Dc]=!0,rm("selectionchange",!1,s))}}function px(i,s,c,h){switch(F_(s)){case 1:var E=G7;break;case 4:E=X7;break;default:E=Hp}c=E.bind(null,s,c,i),E=void 0,!Ip||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,c,{capture:!0,passive:E}):i.addEventListener(s,c,!0):E!==void 0?i.addEventListener(s,c,{passive:E}):i.addEventListener(s,c,!1)}function im(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var z=x.tag;if((z===3||z===4)&&(z=x.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;x=x.return}for(;L!==null;){if(x=Co(L),x===null)return;if(z=x.tag,z===5||z===6){h=b=x;continue e}L=L.parentNode}}h=h.return}b_(function(){var ee=b,ce=Np(c),pe=[];e:{var ue=cx.get(i);if(ue!==void 0){var Ae=$p,Oe=i;switch(i){case"keypress":if(Nc(c)===0)break e;case"keydown":case"keyup":Ae=cB;break;case"focusin":Oe="focus",Ae=Yp;break;case"focusout":Oe="blur",Ae=Yp;break;case"beforeblur":case"afterblur":Ae=Yp;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":Ae=H_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=J7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=hB;break;case sx:case ax:case ux:Ae=tB;break;case lx:Ae=mB;break;case"scroll":Ae=K7;break;case"wheel":Ae=EB;break;case"copy":case"cut":case"paste":Ae=rB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=j_}var Ie=(s&4)!==0,Mt=!Ie&&i==="scroll",G=Ie?ue!==null?ue+"Capture":null:ue;Ie=[];for(var $=ee,K;$!==null;){K=$;var ye=K.stateNode;if(K.tag===5&&ye!==null&&(K=ye,G!==null&&(ye=iu($,G),ye!=null&&Ie.push(xu($,ye,K)))),Mt)break;$=$.return}0<Ie.length&&(ue=new Ae(ue,Oe,null,c,ce),pe.push({event:ue,listeners:Ie}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&c!==Xn&&(Oe=c.relatedTarget||c.fromElement)&&(Co(Oe)||Oe[ci]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(Oe=c.relatedTarget||c.toElement,Ae=ee,Oe=Oe?Co(Oe):null,Oe!==null&&(Mt=Ao(Oe),Oe!==Mt||Oe.tag!==5&&Oe.tag!==6)&&(Oe=null)):(Ae=null,Oe=ee),Ae!==Oe)){if(Ie=H_,ye="onMouseLeave",G="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=j_,ye="onPointerLeave",G="onPointerEnter",$="pointer"),Mt=Ae==null?ue:Ds(Ae),K=Oe==null?ue:Ds(Oe),ue=new Ie(ye,$+"leave",Ae,c,ce),ue.target=Mt,ue.relatedTarget=K,ye=null,Co(ce)===ee&&(Ie=new Ie(G,$+"enter",Oe,c,ce),Ie.target=K,Ie.relatedTarget=Mt,ye=Ie),Mt=ye,Ae&&Oe)t:{for(Ie=Ae,G=Oe,$=0,K=Ie;K;K=Rs(K))$++;for(K=0,ye=G;ye;ye=Rs(ye))K++;for(;0<$-K;)Ie=Rs(Ie),$--;for(;0<K-$;)G=Rs(G),K--;for(;$--;){if(Ie===G||G!==null&&Ie===G.alternate)break t;Ie=Rs(Ie),G=Rs(G)}Ie=null}else Ie=null;Ae!==null&&mx(pe,ue,Ae,Ie,!1),Oe!==null&&Mt!==null&&mx(pe,Mt,Oe,Ie,!0)}}e:{if(ue=ee?Ds(ee):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var Me=SB;else if(G_(ue))if(K_)Me=kB;else{Me=AB;var ze=vB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Me=CB);if(Me&&(Me=Me(i,ee))){X_(pe,Me,c,ce);break e}ze&&ze(i,ue,ee),i==="focusout"&&(ze=ue._wrapperState)&&ze.controlled&&ue.type==="number"&&bt(ue,"number",ue.value)}switch(ze=ee?Ds(ee):window,i){case"focusin":(G_(ze)||ze.contentEditable==="true")&&(Os=ze,Jp=ee,Tu=null);break;case"focusout":Tu=Jp=Os=null;break;case"mousedown":Zp=!0;break;case"contextmenu":case"mouseup":case"dragend":Zp=!1,ix(pe,c,ce);break;case"selectionchange":if(OB)break;case"keydown":case"keyup":ix(pe,c,ce)}var je;if(Gp)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ps?Y_(i,c)&&(We="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&($_&&c.locale!=="ko"&&(Ps||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ps&&(je=B_()):(Li=ce,jp="value"in Li?Li.value:Li.textContent,Ps=!0)),ze=Mc(ee,We),0<ze.length&&(We=new z_(We,i,null,c,ce),pe.push({event:We,listeners:ze}),je?We.data=je:(je=W_(c),je!==null&&(We.data=je)))),(je=bB?TB(i,c):wB(i,c))&&(ee=Mc(ee,"onBeforeInput"),0<ee.length&&(ce=new z_("onBeforeInput","beforeinput",null,c,ce),pe.push({event:ce,listeners:ee}),ce.data=je))}hx(pe,s)})}function xu(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Mc(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=iu(i,c),b!=null&&h.unshift(xu(i,b,E)),b=iu(i,s),b!=null&&h.push(xu(i,b,E))),i=i.return}return h}function Rs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function mx(i,s,c,h,E){for(var b=s._reactName,x=[];c!==null&&c!==h;){var L=c,z=L.alternate,ee=L.stateNode;if(z!==null&&z===h)break;L.tag===5&&ee!==null&&(L=ee,E?(z=iu(c,b),z!=null&&x.unshift(xu(c,z,L))):E||(z=iu(c,b),z!=null&&x.push(xu(c,z,L)))),c=c.return}x.length!==0&&i.push({event:s,listeners:x})}var DB=/\r\n?/g,MB=/\u0000|\uFFFD/g;function gx(i){return(typeof i=="string"?i:""+i).replace(DB,`
15
+ `).replace(MB,"")}function Fc(i,s,c){if(s=gx(s),gx(i)!==s&&c)throw Error(n(425))}function Bc(){}var om=null,sm=null;function am(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var um=typeof setTimeout=="function"?setTimeout:void 0,FB=typeof clearTimeout=="function"?clearTimeout:void 0,Ex=typeof Promise=="function"?Promise:void 0,BB=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex!="undefined"?function(i){return Ex.resolve(null).then(i).catch(UB)}:um;function UB(i){setTimeout(function(){throw i})}function lm(i,s){var c=s,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),hu(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);hu(s)}function Mi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function yx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var Ls=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Ls,Su="__reactProps$"+Ls,ci="__reactContainer$"+Ls,cm="__reactEvents$"+Ls,HB="__reactListeners$"+Ls,zB="__reactHandles$"+Ls;function Co(i){var s=i[Yr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ci]||c[Yr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=yx(i);i!==null;){if(c=i[Yr])return c;i=yx(i)}return s}i=c,c=i.parentNode}return null}function vu(i){return i=i[Yr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ds(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Uc(i){return i[Su]||null}var dm=[],Ms=-1;function Fi(i){return{current:i}}function xt(i){0>Ms||(i.current=dm[Ms],dm[Ms]=null,Ms--)}function Tt(i,s){Ms++,dm[Ms]=i.current,i.current=s}var Bi={},Sn=Fi(Bi),Bn=Fi(!1),ko=Bi;function Fs(i,s){var c=i.type.contextTypes;if(!c)return Bi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Hc(){xt(Bn),xt(Sn)}function bx(i,s,c){if(Sn.current!==Bi)throw Error(n(168));Tt(Sn,s),Tt(Bn,c)}function Tx(i,s,c){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,xe(i)||"Unknown",E));return k({},c,h)}function zc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bi,ko=Sn.current,Tt(Sn,i),Tt(Bn,Bn.current),!0}function wx(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Tx(i,s,ko),h.__reactInternalMemoizedMergedChildContext=i,xt(Bn),xt(Sn),Tt(Sn,i)):xt(Bn),Tt(Bn,c)}var di=null,jc=!1,fm=!1;function _x(i){di===null?di=[i]:di.push(i)}function jB(i){jc=!0,_x(i)}function Ui(){if(!fm&&di!==null){fm=!0;var i=0,s=dt;try{var c=di;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}di=null,jc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),S_(Lp,Ui),E}finally{dt=s,fm=!1}}return null}var Bs=[],Us=0,$c=null,Vc=0,ar=[],ur=0,No=null,fi=1,hi="";function Po(i,s){Bs[Us++]=Vc,Bs[Us++]=$c,$c=i,Vc=s}function xx(i,s,c){ar[ur++]=fi,ar[ur++]=hi,ar[ur++]=No,No=i;var h=fi;i=hi;var E=32-Tr(h)-1;h&=~(1<<E),c+=1;var b=32-Tr(s)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Tr(s)+E|c<<E|h,hi=b+i}else fi=1<<b|c<<E|h,hi=i}function hm(i){i.return!==null&&(Po(i,1),xx(i,1,0))}function pm(i){for(;i===$c;)$c=Bs[--Us],Bs[Us]=null,Vc=Bs[--Us],Bs[Us]=null;for(;i===No;)No=ar[--ur],ar[ur]=null,hi=ar[--ur],ar[ur]=null,fi=ar[--ur],ar[ur]=null}var Qn=null,Jn=null,At=!1,_r=null;function Sx(i,s){var c=fr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function vx(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Qn=i,Jn=Mi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Qn=i,Jn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=No!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=fr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Qn=i,Jn=null,!0):!1;default:return!1}}function mm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function gm(i){if(At){var s=Jn;if(s){var c=s;if(!vx(i,s)){if(mm(i))throw Error(n(418));s=Mi(c.nextSibling);var h=Qn;s&&vx(i,s)?Sx(h,c):(i.flags=i.flags&-4097|2,At=!1,Qn=i)}}else{if(mm(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Qn=i}}}function Ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Qn=i}function qc(i){if(i!==Qn)return!1;if(!At)return Ax(i),At=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!am(i.type,i.memoizedProps)),s&&(s=Jn)){if(mm(i))throw Cx(),Error(n(418));for(;s;)Sx(i,s),s=Mi(s.nextSibling)}if(Ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){Jn=Mi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}Jn=null}}else Jn=Qn?Mi(i.stateNode.nextSibling):null;return!0}function Cx(){for(var i=Jn;i;)i=Mi(i.nextSibling)}function Hs(){Jn=Qn=null,At=!1}function Em(i){_r===null?_r=[i]:_r.push(i)}var $B=U.ReactCurrentBatchConfig;function Au(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(x){var L=E.refs;x===null?delete L[b]:L[b]=x},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Yc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function kx(i){var s=i._init;return s(i._payload)}function Nx(i){function s(G,$){if(i){var K=G.deletions;K===null?(G.deletions=[$],G.flags|=16):K.push($)}}function c(G,$){if(!i)return null;for(;$!==null;)s(G,$),$=$.sibling;return null}function h(G,$){for(G=new Map;$!==null;)$.key!==null?G.set($.key,$):G.set($.index,$),$=$.sibling;return G}function E(G,$){return G=Wi(G,$),G.index=0,G.sibling=null,G}function b(G,$,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<$?(G.flags|=2,$):K):(G.flags|=2,$)):(G.flags|=1048576,$)}function x(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,$,K,ye){return $===null||$.tag!==6?($=u0(K,G.mode,ye),$.return=G,$):($=E($,K),$.return=G,$)}function z(G,$,K,ye){var Me=K.type;return Me===q?ce(G,$,K.props.children,ye,K.key):$!==null&&($.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Se&&kx(Me)===$.type)?(ye=E($,K.props),ye.ref=Au(G,$,K),ye.return=G,ye):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=Au(G,$,K),ye.return=G,ye)}function ee(G,$,K,ye){return $===null||$.tag!==4||$.stateNode.containerInfo!==K.containerInfo||$.stateNode.implementation!==K.implementation?($=l0(K,G.mode,ye),$.return=G,$):($=E($,K.children||[]),$.return=G,$)}function ce(G,$,K,ye,Me){return $===null||$.tag!==7?($=Bo(K,G.mode,ye,Me),$.return=G,$):($=E($,K),$.return=G,$)}function pe(G,$,K){if(typeof $=="string"&&$!==""||typeof $=="number")return $=u0(""+$,G.mode,K),$.return=G,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case V:return K=gd($.type,$.key,$.props,null,G.mode,K),K.ref=Au(G,null,$),K.return=G,K;case R:return $=l0($,G.mode,K),$.return=G,$;case Se:var ye=$._init;return pe(G,ye($._payload),K)}if(jt($)||oe($))return $=Bo($,G.mode,K,null),$.return=G,$;Yc(G,$)}return null}function ue(G,$,K,ye){var Me=$!==null?$.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Me!==null?null:L(G,$,""+K,ye);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case V:return K.key===Me?z(G,$,K,ye):null;case R:return K.key===Me?ee(G,$,K,ye):null;case Se:return Me=K._init,ue(G,$,Me(K._payload),ye)}if(jt(K)||oe(K))return Me!==null?null:ce(G,$,K,ye,null);Yc(G,K)}return null}function Ae(G,$,K,ye,Me){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(K)||null,L($,G,""+ye,Me);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case V:return G=G.get(ye.key===null?K:ye.key)||null,z($,G,ye,Me);case R:return G=G.get(ye.key===null?K:ye.key)||null,ee($,G,ye,Me);case Se:var ze=ye._init;return Ae(G,$,K,ze(ye._payload),Me)}if(jt(ye)||oe(ye))return G=G.get(K)||null,ce($,G,ye,Me,null);Yc($,ye)}return null}function Oe(G,$,K,ye){for(var Me=null,ze=null,je=$,We=$=0,sn=null;je!==null&&We<K.length;We++){je.index>We?(sn=je,je=null):sn=je.sibling;var ot=ue(G,je,K[We],ye);if(ot===null){je===null&&(je=sn);break}i&&je&&ot.alternate===null&&s(G,je),$=b(ot,$,We),ze===null?Me=ot:ze.sibling=ot,ze=ot,je=sn}if(We===K.length)return c(G,je),At&&Po(G,We),Me;if(je===null){for(;We<K.length;We++)je=pe(G,K[We],ye),je!==null&&($=b(je,$,We),ze===null?Me=je:ze.sibling=je,ze=je);return At&&Po(G,We),Me}for(je=h(G,je);We<K.length;We++)sn=Ae(je,G,We,K[We],ye),sn!==null&&(i&&sn.alternate!==null&&je.delete(sn.key===null?We:sn.key),$=b(sn,$,We),ze===null?Me=sn:ze.sibling=sn,ze=sn);return i&&je.forEach(function(Gi){return s(G,Gi)}),At&&Po(G,We),Me}function Ie(G,$,K,ye){var Me=oe(K);if(typeof Me!="function")throw Error(n(150));if(K=Me.call(K),K==null)throw Error(n(151));for(var ze=Me=null,je=$,We=$=0,sn=null,ot=K.next();je!==null&&!ot.done;We++,ot=K.next()){je.index>We?(sn=je,je=null):sn=je.sibling;var Gi=ue(G,je,ot.value,ye);if(Gi===null){je===null&&(je=sn);break}i&&je&&Gi.alternate===null&&s(G,je),$=b(Gi,$,We),ze===null?Me=Gi:ze.sibling=Gi,ze=Gi,je=sn}if(ot.done)return c(G,je),At&&Po(G,We),Me;if(je===null){for(;!ot.done;We++,ot=K.next())ot=pe(G,ot.value,ye),ot!==null&&($=b(ot,$,We),ze===null?Me=ot:ze.sibling=ot,ze=ot);return At&&Po(G,We),Me}for(je=h(G,je);!ot.done;We++,ot=K.next())ot=Ae(je,G,We,ot.value,ye),ot!==null&&(i&&ot.alternate!==null&&je.delete(ot.key===null?We:ot.key),$=b(ot,$,We),ze===null?Me=ot:ze.sibling=ot,ze=ot);return i&&je.forEach(function(_U){return s(G,_U)}),At&&Po(G,We),Me}function Mt(G,$,K,ye){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case V:e:{for(var Me=K.key,ze=$;ze!==null;){if(ze.key===Me){if(Me=K.type,Me===q){if(ze.tag===7){c(G,ze.sibling),$=E(ze,K.props.children),$.return=G,G=$;break e}}else if(ze.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Se&&kx(Me)===ze.type){c(G,ze.sibling),$=E(ze,K.props),$.ref=Au(G,ze,K),$.return=G,G=$;break e}c(G,ze);break}else s(G,ze);ze=ze.sibling}K.type===q?($=Bo(K.props.children,G.mode,ye,K.key),$.return=G,G=$):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=Au(G,$,K),ye.return=G,G=ye)}return x(G);case R:e:{for(ze=K.key;$!==null;){if($.key===ze)if($.tag===4&&$.stateNode.containerInfo===K.containerInfo&&$.stateNode.implementation===K.implementation){c(G,$.sibling),$=E($,K.children||[]),$.return=G,G=$;break e}else{c(G,$);break}else s(G,$);$=$.sibling}$=l0(K,G.mode,ye),$.return=G,G=$}return x(G);case Se:return ze=K._init,Mt(G,$,ze(K._payload),ye)}if(jt(K))return Oe(G,$,K,ye);if(oe(K))return Ie(G,$,K,ye);Yc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,$!==null&&$.tag===6?(c(G,$.sibling),$=E($,K),$.return=G,G=$):(c(G,$),$=u0(K,G.mode,ye),$.return=G,G=$),x(G)):c(G,$)}return Mt}var zs=Nx(!0),Px=Nx(!1),Wc=Fi(null),Gc=null,js=null,ym=null;function bm(){ym=js=Gc=null}function Tm(i){var s=Wc.current;xt(Wc),i._currentValue=s}function wm(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function $s(i,s){Gc=i,ym=js=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Hn=!0),i.firstContext=null)}function lr(i){var s=i._currentValue;if(ym!==i)if(i={context:i,memoizedValue:s,next:null},js===null){if(Gc===null)throw Error(n(308));js=i,Gc.dependencies={lanes:0,firstContext:i}}else js=js.next=i;return s}var Oo=null;function _m(i){Oo===null?Oo=[i]:Oo.push(i)}function Ox(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,_m(s)):(c.next=E.next,E.next=c),s.interleaved=c,pi(i,h)}function pi(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Hi=!1;function xm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ix(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function mi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function zi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,pi(i,c)}return E=h.interleaved,E===null?(s.next=s,_m(h)):(s.next=E.next,E.next=s),h.interleaved=s,pi(i,c)}function Xc(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Fp(i,c)}}function Rx(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var x={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=x:b=b.next=x,c=c.next}while(c!==null);b===null?E=b=s:b=b.next=s}else E=b=s;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Kc(i,s,c,h){var E=i.updateQueue;Hi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var z=L,ee=z.next;z.next=null,x===null?b=ee:x.next=ee,x=z;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==x&&(L===null?ce.firstBaseUpdate=ee:L.next=ee,ce.lastBaseUpdate=z))}if(b!==null){var pe=E.baseState;x=0,ce=ee=z=null,L=b;do{var ue=L.lane,Ae=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Oe=i,Ie=L;switch(ue=s,Ae=c,Ie.tag){case 1:if(Oe=Ie.payload,typeof Oe=="function"){pe=Oe.call(Ae,pe,ue);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ie.payload,ue=typeof Oe=="function"?Oe.call(Ae,pe,ue):Oe,ue==null)break e;pe=k({},pe,ue);break e;case 2:Hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else Ae={eventTime:Ae,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(ee=ce=Ae,z=pe):ce=ce.next=Ae,x|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(z=pe),E.baseState=z,E.firstBaseUpdate=ee,E.lastBaseUpdate=ce,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Lo|=x,i.lanes=x,i.memoizedState=pe}}function Lx(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Cu={},Wr=Fi(Cu),ku=Fi(Cu),Nu=Fi(Cu);function Io(i){if(i===Cu)throw Error(n(174));return i}function Sm(i,s){switch(Tt(Nu,s),Tt(ku,i),Tt(Wr,Cu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}xt(Wr),Tt(Wr,s)}function Vs(){xt(Wr),xt(ku),xt(Nu)}function Dx(i){Io(Nu.current);var s=Io(Wr.current),c=ge(s,i.type);s!==c&&(Tt(ku,i),Tt(Wr,c))}function vm(i){ku.current===i&&(xt(Wr),xt(ku))}var Nt=Fi(0);function Qc(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Am=[];function Cm(){for(var i=0;i<Am.length;i++)Am[i]._workInProgressVersionPrimary=null;Am.length=0}var Jc=U.ReactCurrentDispatcher,km=U.ReactCurrentBatchConfig,Ro=0,Pt=null,Xt=null,rn=null,Zc=!1,Pu=!1,Ou=0,VB=0;function vn(){throw Error(n(321))}function Nm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!wr(i[c],s[c]))return!1;return!0}function Pm(i,s,c,h,E,b){if(Ro=b,Pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Jc.current=i===null||i.memoizedState===null?GB:XB,i=c(h,E),Pu){b=0;do{if(Pu=!1,Ou=0,25<=b)throw Error(n(301));b+=1,rn=Xt=null,s.updateQueue=null,Jc.current=KB,i=c(h,E)}while(Pu)}if(Jc.current=nd,s=Xt!==null&&Xt.next!==null,Ro=0,rn=Xt=Pt=null,Zc=!1,s)throw Error(n(300));return i}function Om(){var i=Ou!==0;return Ou=0,i}function Gr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Pt.memoizedState=rn=i:rn=rn.next=i,rn}function cr(){if(Xt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var s=rn===null?Pt.memoizedState:rn.next;if(s!==null)rn=s,Xt=i;else{if(i===null)throw Error(n(310));Xt=i,i={memoizedState:Xt.memoizedState,baseState:Xt.baseState,baseQueue:Xt.baseQueue,queue:Xt.queue,next:null},rn===null?Pt.memoizedState=rn=i:rn=rn.next=i}return rn}function Iu(i,s){return typeof s=="function"?s(i):s}function Im(i){var s=cr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Xt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=x=null,z=null,ee=b;do{var ce=ee.lane;if((Ro&ce)===ce)z!==null&&(z=z.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var pe={lane:ce,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};z===null?(L=z=pe,x=h):z=z.next=pe,Pt.lanes|=ce,Lo|=ce}ee=ee.next}while(ee!==null&&ee!==b);z===null?x=h:z.next=L,wr(h,s.memoizedState)||(Hn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Pt.lanes|=b,Lo|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Rm(i){var s=cr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=s.memoizedState;if(E!==null){c.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);wr(b,s.memoizedState)||(Hn=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Mx(){}function Fx(i,s){var c=Pt,h=cr(),E=s(),b=!wr(h.memoizedState,E);if(b&&(h.memoizedState=E,Hn=!0),h=h.queue,Lm(Hx.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||rn!==null&&rn.memoizedState.tag&1){if(c.flags|=2048,Ru(9,Ux.bind(null,c,h,E,s),void 0,null),on===null)throw Error(n(349));(Ro&30)!==0||Bx(c,s,E)}return E}function Bx(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Ux(i,s,c,h){s.value=c,s.getSnapshot=h,zx(s)&&jx(i)}function Hx(i,s,c){return c(function(){zx(s)&&jx(i)})}function zx(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!wr(i,c)}catch(h){return!0}}function jx(i){var s=pi(i,1);s!==null&&Ar(s,i,1,-1)}function $x(i){var s=Gr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:i},s.queue=i,i=i.dispatch=WB.bind(null,Pt,i),[s.memoizedState,i]}function Ru(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i)),i}function Vx(){return cr().memoizedState}function ed(i,s,c,h){var E=Gr();Pt.flags|=i,E.memoizedState=Ru(1|s,c,void 0,h===void 0?null:h)}function td(i,s,c,h){var E=cr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var x=Xt.memoizedState;if(b=x.destroy,h!==null&&Nm(h,x.deps)){E.memoizedState=Ru(s,c,b,h);return}}Pt.flags|=i,E.memoizedState=Ru(1|s,c,b,h)}function qx(i,s){return ed(8390656,8,i,s)}function Lm(i,s){return td(2048,8,i,s)}function Yx(i,s){return td(4,2,i,s)}function Wx(i,s){return td(4,4,i,s)}function Gx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Xx(i,s,c){return c=c!=null?c.concat([i]):null,td(4,4,Gx.bind(null,s,i),c)}function Dm(){}function Kx(i,s){var c=cr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Nm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function Qx(i,s){var c=cr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Nm(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function Jx(i,s,c){return(Ro&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=c):(wr(c,s)||(c=k_(),Pt.lanes|=c,Lo|=c,i.baseState=!0),s)}function qB(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=km.transition;km.transition={};try{i(!1),s()}finally{dt=c,km.transition=h}}function Zx(){return cr().memoizedState}function YB(i,s,c){var h=qi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},e2(i))t2(s,c);else if(c=Ox(i,s,c,h),c!==null){var E=On();Ar(c,i,h,E),n2(c,s,h)}}function WB(i,s,c){var h=qi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(e2(i))t2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var x=s.lastRenderedState,L=b(x,c);if(E.hasEagerState=!0,E.eagerState=L,wr(L,x)){var z=s.interleaved;z===null?(E.next=E,_m(s)):(E.next=z.next,z.next=E),s.interleaved=E;return}}catch(ee){}c=Ox(i,s,E,h),c!==null&&(E=On(),Ar(c,i,h,E),n2(c,s,h))}}function e2(i){var s=i.alternate;return i===Pt||s!==null&&s===Pt}function t2(i,s){Pu=Zc=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function n2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Fp(i,c)}}var nd={readContext:lr,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useInsertionEffect:vn,useLayoutEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useMutableSource:vn,useSyncExternalStore:vn,useId:vn,unstable_isNewReconciler:!1},GB={readContext:lr,useCallback:function(i,s){return Gr().memoizedState=[i,s===void 0?null:s],i},useContext:lr,useEffect:qx,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,ed(4194308,4,Gx.bind(null,s,i),c)},useLayoutEffect:function(i,s){return ed(4194308,4,i,s)},useInsertionEffect:function(i,s){return ed(4,2,i,s)},useMemo:function(i,s){var c=Gr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=Gr();return s=c!==void 0?c(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=YB.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var s=Gr();return i={current:i},s.memoizedState=i},useState:$x,useDebugValue:Dm,useDeferredValue:function(i){return Gr().memoizedState=i},useTransition:function(){var i=$x(!1),s=i[0];return i=qB.bind(null,i[1]),Gr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=Pt,E=Gr();if(At){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),on===null)throw Error(n(349));(Ro&30)!==0||Bx(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,qx(Hx.bind(null,h,b,i),[i]),h.flags|=2048,Ru(9,Ux.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=Gr(),s=on.identifierPrefix;if(At){var c=hi,h=fi;c=(h&~(1<<32-Tr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ou++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=VB++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},XB={readContext:lr,useCallback:Kx,useContext:lr,useEffect:Lm,useImperativeHandle:Xx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Qx,useReducer:Im,useRef:Vx,useState:function(){return Im(Iu)},useDebugValue:Dm,useDeferredValue:function(i){var s=cr();return Jx(s,Xt.memoizedState,i)},useTransition:function(){var i=Im(Iu)[0],s=cr().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1},KB={readContext:lr,useCallback:Kx,useContext:lr,useEffect:Lm,useImperativeHandle:Xx,useInsertionEffect:Yx,useLayoutEffect:Wx,useMemo:Qx,useReducer:Rm,useRef:Vx,useState:function(){return Rm(Iu)},useDebugValue:Dm,useDeferredValue:function(i){var s=cr();return Xt===null?s.memoizedState=i:Jx(s,Xt.memoizedState,i)},useTransition:function(){var i=Rm(Iu)[0],s=cr().memoizedState;return[i,s]},useMutableSource:Mx,useSyncExternalStore:Fx,useId:Zx,unstable_isNewReconciler:!1};function xr(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Mm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var rd={isMounted:function(i){return(i=i._reactInternals)?Ao(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=On(),E=qi(i),b=mi(h,E);b.payload=s,c!=null&&(b.callback=c),s=zi(i,b,E),s!==null&&(Ar(s,i,E,h),Xc(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=On(),E=qi(i),b=mi(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=zi(i,b,E),s!==null&&(Ar(s,i,E,h),Xc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=On(),h=qi(i),E=mi(c,h);E.tag=2,s!=null&&(E.callback=s),s=zi(i,E,h),s!==null&&(Ar(s,i,h,c),Xc(s,i,h))}};function r2(i,s,c,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):s.prototype&&s.prototype.isPureReactComponent?!bu(c,h)||!bu(E,b):!0}function i2(i,s,c){var h=!1,E=Bi,b=s.contextType;return typeof b=="object"&&b!==null?b=lr(b):(E=Un(s)?ko:Sn.current,h=s.contextTypes,b=(h=h!=null)?Fs(i,E):Bi),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=rd,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function o2(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&rd.enqueueReplaceState(s,s.state,null)}function Fm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},xm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=lr(b):(b=Un(s)?ko:Sn.current,E.context=Fs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Mm(i,s,b,c),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&rd.enqueueReplaceState(E,E.state,null),Kc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qs(i,s){try{var c="",h=s;do c+=Be(h),h=h.return;while(h);var E=c}catch(b){E=`
16
16
  Error generating stack: `+b.message+`
17
- `+b.stack}return{value:i,source:s,stack:E,digest:null}}function Fm(i,s,c){return{value:i,source:null,stack:c!=null?c:null,digest:s!=null?s:null}}function Bm(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var XB=typeof WeakMap=="function"?WeakMap:Map;function s2(i,s,c){c=mi(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){cd||(cd=!0,Zm=h),Bm(i,s)},c}function a2(i,s,c){c=mi(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;c.payload=function(){return h(E)},c.callback=function(){Bm(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){Bm(i,s),typeof h!="function"&&($i===null?$i=new Set([this]):$i.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function u2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new XB;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(c)||(E.add(c),i=lU.bind(null,i,s,c),s.then(i,i))}function l2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function c2(i,s,c,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=mi(-1,1),s.tag=2,zi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var KB=U.ReactCurrentOwner,Hn=!1;function Pn(i,s,c,h){s.child=i===null?Px(s,null,c,h):zs(s,i.child,c,h)}function d2(i,s,c,h,E){c=c.render;var b=s.ref;return $s(s,E),h=Nm(i,s,c,h,b,E),c=Pm(),i!==null&&!Hn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(At&&c&&fm(s),s.flags|=1,Pn(i,s,h,E),s.child)}function f2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!s0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,h2(i,s,b,h,E)):(i=gd(c.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(c=c.compare,c=c!==null?c:bu,c(x,h)&&i.ref===s.ref)return gi(i,s,E)}return s.flags|=1,i=Wi(b,h),i.ref=s.ref,i.return=s,s.child=i}function h2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(bu(b,h)&&i.ref===s.ref)if(Hn=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return s.lanes=i.lanes,gi(i,s,E)}return Um(i,s,c,h,E)}function p2(i,s,c){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(Ws,Zn),Zn|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Tt(Ws,Zn),Zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(Ws,Zn),Zn|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(Ws,Zn),Zn|=h;return Pn(i,s,E,c),s.child}function m2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Um(i,s,c,h,E){var b=Un(c)?ko:Sn.current;return b=Fs(s,b),$s(s,E),c=Nm(i,s,c,h,b,E),h=Pm(),i!==null&&!Hn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(At&&h&&fm(s),s.flags|=1,Pn(i,s,c,E),s.child)}function g2(i,s,c,h,E){if(Un(c)){var b=!0;zc(s)}else b=!1;if($s(s,E),s.stateNode===null)od(i,s),i2(s,c,h),Mm(s,c,h,E),h=!0;else if(i===null){var x=s.stateNode,L=s.memoizedProps;x.props=L;var z=x.context,ee=c.contextType;typeof ee=="object"&&ee!==null?ee=lr(ee):(ee=Un(c)?ko:Sn.current,ee=Fs(s,ee));var ce=c.getDerivedStateFromProps,he=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";he||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==h||z!==ee)&&o2(s,x,h,ee),Hi=!1;var ue=s.memoizedState;x.state=ue,Kc(s,h,x,E),z=s.memoizedState,L!==h||ue!==z||Bn.current||Hi?(typeof ce=="function"&&(Dm(s,c,ce,h),z=s.memoizedState),(L=Hi||r2(s,c,L,h,ue,z,ee))?(he||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=z),x.props=h,x.state=z,x.context=ee,h=L):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,Ix(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:xr(s.type,L),x.props=ee,he=s.pendingProps,ue=x.context,z=c.contextType,typeof z=="object"&&z!==null?z=lr(z):(z=Un(c)?ko:Sn.current,z=Fs(s,z));var Ae=c.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==he||ue!==z)&&o2(s,x,h,z),Hi=!1,ue=s.memoizedState,x.state=ue,Kc(s,h,x,E);var Oe=s.memoizedState;L!==he||ue!==Oe||Bn.current||Hi?(typeof Ae=="function"&&(Dm(s,c,Ae,h),Oe=s.memoizedState),(ee=Hi||r2(s,c,ee,h,ue,Oe,z)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Oe,z),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Oe,z)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Oe),x.props=h,x.state=Oe,x.context=z,h=ee):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),h=!1)}return Hm(i,s,c,h,b,E)}function Hm(i,s,c,h,E,b){m2(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&wx(s,c,!1),gi(i,s,b);h=s.stateNode,KB.current=s;var L=x&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=zs(s,i.child,null,b),s.child=zs(s,null,L,b)):Pn(i,s,L,b),s.memoizedState=h.state,E&&wx(s,c,!0),s.child}function E2(i){var s=i.stateNode;s.pendingContext?bx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&bx(i,s.context,!1),xm(i,s.containerInfo)}function y2(i,s,c,h,E){return Hs(),gm(E),s.flags|=256,Pn(i,s,c,h),s.child}var zm={dehydrated:null,treeContext:null,retryLane:0};function jm(i){return{baseLanes:i,cachePool:null,transitions:null}}function b2(i,s,c){var h=s.pendingProps,E=Nt.current,b=!1,x=(s.flags&128)!==0,L;if((L=x)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Nt,E&1),i===null)return mm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=s.mode,b=s.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=Ed(x,h,0,null),i=Bo(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=jm(c),s.memoizedState=zm,i):$m(s,x));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return QB(i,s,x,h,L,E,c);if(b){b=h.fallback,x=s.mode,E=i.child,L=E.sibling;var z={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=z,s.deletions=null):(h=Wi(E,z),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Wi(L,b):(b=Bo(b,x,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,x=i.child.memoizedState,x=x===null?jm(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~c,s.memoizedState=zm,h}return b=i.child,i=b.sibling,h=Wi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=c),h.return=s,h.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=h,s.memoizedState=null,h}function $m(i,s){return s=Ed({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function id(i,s,c,h){return h!==null&&gm(h),zs(s,i.child,null,c),i=$m(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function QB(i,s,c,h,E,b,x){if(c)return s.flags&256?(s.flags&=-257,h=Fm(Error(n(422))),id(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=Ed({mode:"visible",children:h.children},E,0,null),b=Bo(b,E,x,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&zs(s,i.child,null,x),s.child.memoizedState=jm(x),s.memoizedState=zm,b);if((s.mode&1)===0)return id(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=Fm(b,h,void 0),id(i,s,x,h)}if(L=(x&i.childLanes)!==0,Hn||L){if(h=on,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,pi(i,E),Ar(h,i,E,-1))}return o0(),h=Fm(Error(n(421))),id(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=cU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,Jn=Mi(E.nextSibling),Qn=s,At=!0,_r=null,i!==null&&(ar[ur++]=fi,ar[ur++]=hi,ar[ur++]=No,fi=i.id,hi=i.overflow,No=s),s=$m(s,h.children),s.flags|=4096,s)}function T2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Tm(i.return,s,c)}function Vm(i,s,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function w2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(Pn(i,s,h.children,c),h=Nt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&T2(i,c,s);else if(i.tag===19)T2(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Tt(Nt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(c=s.child,E=null;c!==null;)i=c.alternate,i!==null&&Qc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Vm(s,!1,E,c,b);break;case"backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Qc(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Vm(s,!0,c,null,b);break;case"together":Vm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function od(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function gi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Lo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Wi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Wi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function JB(i,s,c){switch(s.tag){case 3:E2(s),Hs();break;case 5:Dx(s);break;case 1:Un(s.type)&&zc(s);break;case 4:xm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(Wc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Nt,Nt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?b2(i,s,c):(Tt(Nt,Nt.current&1),i=gi(i,s,c),i!==null?i.sibling:null);Tt(Nt,Nt.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return w2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Nt,Nt.current),h)break;return null;case 22:case 23:return s.lanes=0,p2(i,s,c)}return gi(i,s,c)}var _2,qm,x2,S2;_2=function(i,s){for(var c=s.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===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},qm=function(){},x2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Io(Wr.current);var b=null;switch(c){case"input":E=kt(i,E),h=kt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=De(i,E),h=De(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Bc)}cn(c,h);var x;c=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var L=E[ee];for(x in L)L.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var z=h[ee];if(L=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&z!==L&&(z!=null||L!=null))if(ee==="style")if(L){for(x in L)!L.hasOwnProperty(x)||z&&z.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in z)z.hasOwnProperty(x)&&L[x]!==z[x]&&(c||(c={}),c[x]=z[x])}else c||(b||(b=[]),b.push(ee,c)),c=z;else ee==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,L=L?L.__html:void 0,z!=null&&L!==z&&(b=b||[]).push(ee,z)):ee==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(ee,""+z):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(z!=null&&ee==="onScroll"&&_t("scroll",i),b||L===z||(b=[])):(b=b||[]).push(ee,z))}c&&(b=b||[]).push("style",c);var ee=b;(s.updateQueue=ee)&&(s.flags|=4)}},S2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Lu(i,s){if(!At)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function An(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function ZB(i,s,c){var h=s.pendingProps;switch(hm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(s),null;case 1:return Un(s.type)&&Hc(),An(s),null;case 3:return h=s.stateNode,Vs(),xt(Bn),xt(Sn),Am(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(qc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_r!==null&&(n0(_r),_r=null))),qm(i,s),An(s),null;case 5:Sm(s);var E=Io(Nu.current);if(c=s.type,i!==null&&s.stateNode!=null)x2(i,s,c,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return An(s),null}if(i=Io(Wr.current),qc(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[Yr]=s,h[Su]=b,i=(s.mode&1)!==0,c){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<wu.length;E++)_t(wu[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Gn(h,b),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},_t("invalid",h);break;case"textarea":Fe(h,b),_t("invalid",h)}cn(c,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var L=b[x];x==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(x)&&L!=null&&x==="onScroll"&&_t("scroll",h)}switch(c){case"input":un(h),$e(h,b,!0);break;case"textarea":un(h),mt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Bc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(c,{is:h.is}):(i=x.createElement(c),c==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,c),i[Yr]=s,i[Su]=h,_2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vr(c,h),c){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<wu.length;E++)_t(wu[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Gn(i,h),E=kt(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Fe(i,h),E=De(i,h),_t("invalid",i);break;default:E=h}cn(c,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var z=L[b];b==="style"?ln(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Ve(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Re(i,z):typeof z=="number"&&Re(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?z!=null&&b==="onScroll"&&_t("scroll",i):z!=null&&C(i,b,z,x))}switch(c){case"input":un(i),$e(i,h,!1);break;case"textarea":un(i),mt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Pe(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?we(i,!!h.multiple,b,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Bc)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return An(s),null;case 6:if(i&&s.stateNode!=null)S2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Io(Nu.current),Io(Wr.current),qc(s)){if(h=s.stateNode,c=s.memoizedProps,h[Yr]=s,(b=h.nodeValue!==c)&&(i=Qn,i!==null))switch(i.tag){case 3:Fc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Fc(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Yr]=s,s.stateNode=h}return An(s),null;case 13:if(xt(Nt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Jn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Cx(),Hs(),s.flags|=98560,b=!1;else if(b=qc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Yr]=s}else Hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;An(s),b=!1}else _r!==null&&(n0(_r),_r=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Nt.current&1)!==0?Kt===0&&(Kt=3):o0())),s.updateQueue!==null&&(s.flags|=4),An(s),null);case 4:return Vs(),qm(i,s),i===null&&_u(s.stateNode.containerInfo),An(s),null;case 10:return bm(s.type._context),An(s),null;case 17:return Un(s.type)&&Hc(),An(s),null;case 19:if(xt(Nt),b=s.memoizedState,b===null)return An(s),null;if(h=(s.flags&128)!==0,x=b.rendering,x===null)if(h)Lu(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Qc(i),x!==null){for(s.flags|=128,Lu(b,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=c,c=s.child;c!==null;)b=c,i=h,b.flags&=14680066,x=b.alternate,x===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Nt,Nt.current&1|2),s.child}i=i.sibling}b.tail!==null&&Dt()>Gs&&(s.flags|=128,h=!0,Lu(b,!1),s.lanes=4194304)}else{if(!h)if(i=Qc(x),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Lu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!At)return An(s),null}else 2*Dt()-b.renderingStartTime>Gs&&c!==1073741824&&(s.flags|=128,h=!0,Lu(b,!1),s.lanes=4194304);b.isBackwards?(x.sibling=s.child,s.child=x):(c=b.last,c!==null?c.sibling=x:s.child=x,b.last=x)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Dt(),s.sibling=null,c=Nt.current,Tt(Nt,h?c&1|2:c&1),s):(An(s),null);case 22:case 23:return i0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Zn&1073741824)!==0&&(An(s),s.subtreeFlags&6&&(s.flags|=8192)):An(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function eU(i,s){switch(hm(s),s.tag){case 1:return Un(s.type)&&Hc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Vs(),xt(Bn),xt(Sn),Am(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Sm(s),null;case 13:if(xt(Nt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Hs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Nt),null;case 4:return Vs(),null;case 10:return bm(s.type._context),null;case 22:case 23:return i0(),null;case 24:return null;default:return null}}var sd=!1,Cn=!1,tU=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Ys(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){It(i,s,h)}else c.current=null}function Ym(i,s,c){try{c()}catch(h){It(i,s,h)}}var v2=!1;function nU(i,s){if(im=Ac,i=rx(),Kp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ye){c=null;break e}var x=0,L=-1,z=-1,ee=0,ce=0,he=i,ue=null;t:for(;;){for(var Ae;he!==c||E!==0&&he.nodeType!==3||(L=x+E),he!==b||h!==0&&he.nodeType!==3||(z=x+h),he.nodeType===3&&(x+=he.nodeValue.length),(Ae=he.firstChild)!==null;)ue=he,he=Ae;for(;;){if(he===i)break t;if(ue===c&&++ee===E&&(L=x),ue===b&&++ce===h&&(z=x),(Ae=he.nextSibling)!==null)break;he=ue,ue=he.parentNode}he=Ae}c=L===-1||z===-1?null:{start:L,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(om={focusedElem:i,selectionRange:c},Ac=!1,Ne=s;Ne!==null;)if(s=Ne,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ne=i;else for(;Ne!==null;){s=Ne;try{var Oe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Oe!==null){var Ie=Oe.memoizedProps,Mt=Oe.memoizedState,G=s.stateNode,V=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:xr(s.type,Ie),Mt);G.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var K=s.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(ye){It(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ne=i;break}Ne=s.return}return Oe=v2,v2=!1,Oe}function Du(i,s,c){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Ym(s,c,b)}E=E.next}while(E!==h)}}function ad(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Wm(i){var s=i.ref;if(s!==null){var c=i.stateNode;i.tag,i=c,typeof s=="function"?s(i):s.current=i}}function A2(i){var s=i.alternate;s!==null&&(i.alternate=null,A2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Yr],delete s[Su],delete s[lm],delete s[BB],delete s[UB])),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 C2(i){return i.tag===5||i.tag===3||i.tag===4}function k2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||C2(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 Gm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Bc));else if(h!==4&&(i=i.child,i!==null))for(Gm(i,s,c),i=i.sibling;i!==null;)Gm(i,s,c),i=i.sibling}function Xm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Xm(i,s,c),i=i.sibling;i!==null;)Xm(i,s,c),i=i.sibling}var dn=null,Sr=!1;function ji(i,s,c){for(c=c.child;c!==null;)N2(i,s,c),c=c.sibling}function N2(i,s,c){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Tc,c)}catch(L){}switch(c.tag){case 5:Cn||Ys(c,s);case 6:var h=dn,E=Sr;dn=null,ji(i,s,c),dn=h,Sr=E,dn!==null&&(Sr?(i=dn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):dn.removeChild(c.stateNode));break;case 18:dn!==null&&(Sr?(i=dn,c=c.stateNode,i.nodeType===8?um(i.parentNode,c):i.nodeType===1&&um(i,c),hu(i)):um(dn,c.stateNode));break;case 4:h=dn,E=Sr,dn=c.stateNode.containerInfo,Sr=!0,ji(i,s,c),dn=h,Sr=E;break;case 0:case 11:case 14:case 15:if(!Cn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&Ym(c,s,x),E=E.next}while(E!==h)}ji(i,s,c);break;case 1:if(!Cn&&(Ys(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(L){It(c,s,L)}ji(i,s,c);break;case 21:ji(i,s,c);break;case 22:c.mode&1?(Cn=(h=Cn)||c.memoizedState!==null,ji(i,s,c),Cn=h):ji(i,s,c);break;default:ji(i,s,c)}}function P2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new tU),s.forEach(function(h){var E=dU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function vr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,x=s,L=x;e:for(;L!==null;){switch(L.tag){case 5:dn=L.stateNode,Sr=!1;break e;case 3:dn=L.stateNode.containerInfo,Sr=!0;break e;case 4:dn=L.stateNode.containerInfo,Sr=!0;break e}L=L.return}if(dn===null)throw Error(n(160));N2(b,x,E),dn=null,Sr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(ee){It(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)O2(s,i),s=s.sibling}function O2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(s,i),Xr(i),h&4){try{Du(3,i,i.return),ad(3,i)}catch(Ie){It(i,i.return,Ie)}try{Du(5,i,i.return)}catch(Ie){It(i,i.return,Ie)}}break;case 1:vr(s,i),Xr(i),h&512&&c!==null&&Ys(c,c.return);break;case 5:if(vr(s,i),Xr(i),h&512&&c!==null&&Ys(c,c.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){It(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=c!==null?c.memoizedProps:b,L=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&xn(E,b),Vr(L,x);var ee=Vr(L,b);for(x=0;x<z.length;x+=2){var ce=z[x],he=z[x+1];ce==="style"?ln(E,he):ce==="dangerouslySetInnerHTML"?Ve(E,he):ce==="children"?Re(E,he):C(E,ce,he,ee)}switch(L){case"input":Wt(E,b);break;case"textarea":Xe(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ae=b.value;Ae!=null?we(E,!!b.multiple,Ae,!1):ue!==!!b.multiple&&(b.defaultValue!=null?we(E,!!b.multiple,b.defaultValue,!0):we(E,!!b.multiple,b.multiple?[]:"",!1))}E[Su]=b}catch(Ie){It(i,i.return,Ie)}}break;case 6:if(vr(s,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){It(i,i.return,Ie)}}break;case 3:if(vr(s,i),Xr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{hu(s.containerInfo)}catch(Ie){It(i,i.return,Ie)}break;case 4:vr(s,i),Xr(i);break;case 13:vr(s,i),Xr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Jm=Dt())),h&4&&P2(i);break;case 22:if(ce=c!==null&&c.memoizedState!==null,i.mode&1?(Cn=(ee=Cn)||ce,vr(s,i),Cn=ee):vr(s,i),Xr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(he=Ne=ce;Ne!==null;){switch(ue=Ne,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Du(4,ue,ue.return);break;case 1:Ys(ue,ue.return);var Oe=ue.stateNode;if(typeof Oe.componentWillUnmount=="function"){h=ue,c=ue.return;try{s=h,Oe.props=s.memoizedProps,Oe.state=s.memoizedState,Oe.componentWillUnmount()}catch(Ie){It(h,c,Ie)}}break;case 5:Ys(ue,ue.return);break;case 22:if(ue.memoizedState!==null){L2(he);continue}}Ae!==null?(Ae.return=ue,Ne=Ae):L2(he)}ce=ce.sibling}e:for(ce=null,he=i;;){if(he.tag===5){if(ce===null){ce=he;try{E=he.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=he.stateNode,z=he.memoizedProps.style,x=z!=null&&z.hasOwnProperty("display")?z.display:null,L.style.display=$t("display",x))}catch(Ie){It(i,i.return,Ie)}}}else if(he.tag===6){if(ce===null)try{he.stateNode.nodeValue=ee?"":he.memoizedProps}catch(Ie){It(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;ce===he&&(ce=null),he=he.return}ce===he&&(ce=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:vr(s,i),Xr(i),h&4&&P2(i);break;case 21:break;default:vr(s,i),Xr(i)}}function Xr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(C2(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Re(E,""),h.flags&=-33);var b=k2(i);Xm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,L=k2(i);Gm(i,L,x);break;default:throw Error(n(161))}}catch(z){It(i,i.return,z)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function rU(i,s,c){Ne=i,I2(i)}function I2(i,s,c){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||sd;if(!x){var L=E.alternate,z=L!==null&&L.memoizedState!==null||Cn;L=sd;var ee=Cn;if(sd=x,(Cn=z)&&!ee)for(Ne=E;Ne!==null;)x=Ne,z=x.child,x.tag===22&&x.memoizedState!==null?D2(E):z!==null?(z.return=x,Ne=z):D2(E);for(;b!==null;)Ne=b,I2(b),b=b.sibling;Ne=E,sd=L,Cn=ee}R2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):R2(i)}}function R2(i){for(;Ne!==null;){var s=Ne;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Cn||ad(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Cn)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:xr(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Lx(s,b,h);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Lx(s,x,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var z=s.memoizedProps;switch(s.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(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var ce=ee.memoizedState;if(ce!==null){var he=ce.dehydrated;he!==null&&hu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Cn||s.flags&512&&Wm(s)}catch(ue){It(s,s.return,ue)}}if(s===i){Ne=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function L2(i){for(;Ne!==null;){var s=Ne;if(s===i){Ne=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function D2(i){for(;Ne!==null;){var s=Ne;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{ad(4,s)}catch(z){It(s,c,z)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(z){It(s,E,z)}}var b=s.return;try{Wm(s)}catch(z){It(s,b,z)}break;case 5:var x=s.return;try{Wm(s)}catch(z){It(s,x,z)}}}catch(z){It(s,s.return,z)}if(s===i){Ne=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Ne=L;break}Ne=s.return}}var iU=Math.ceil,ud=U.ReactCurrentDispatcher,Km=U.ReactCurrentOwner,dr=U.ReactCurrentBatchConfig,it=0,on=null,Vt=null,fn=0,Zn=0,Ws=Fi(0),Kt=0,Mu=null,Lo=0,ld=0,Qm=0,Fu=null,zn=null,Jm=0,Gs=1/0,Ei=null,cd=!1,Zm=null,$i=null,dd=!1,Vi=null,fd=0,Bu=0,e0=null,hd=-1,pd=0;function On(){return(it&6)!==0?Dt():hd!==-1?hd:hd=Dt()}function qi(i){return(i.mode&1)===0?1:(it&2)!==0&&fn!==0?fn&-fn:zB.transition!==null?(pd===0&&(pd=k_()),pd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:F_(i.type)),i)}function Ar(i,s,c,h){if(50<Bu)throw Bu=0,e0=null,Error(n(185));uu(i,c,h),((it&2)===0||i!==on)&&(i===on&&((it&2)===0&&(ld|=c),Kt===4&&Yi(i,fn)),jn(i,h),c===1&&it===0&&(s.mode&1)===0&&(Gs=Dt()+500,jc&&Ui()))}function jn(i,s){var c=i.callbackNode;z7(i,s);var h=xc(i,i===on?fn:0);if(h===0)c!==null&&v_(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&v_(c),s===1)i.tag===0?HB(F2.bind(null,i)):_x(F2.bind(null,i)),MB(function(){(it&6)===0&&Ui()}),c=null;else{switch(N_(h)){case 1:c=Rp;break;case 4:c=A_;break;case 16:c=bc;break;case 536870912:c=C_;break;default:c=bc}c=q2(c,M2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function M2(i,s){if(hd=-1,pd=0,(it&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Xs()&&i.callbackNode!==c)return null;var h=xc(i,i===on?fn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=md(i,h);else{s=h;var E=it;it|=2;var b=U2();(on!==i||fn!==s)&&(Ei=null,Gs=Dt()+500,Mo(i,s));do try{aU();break}catch(L){B2(i,L)}while(!0);ym(),ud.current=b,it=E,Vt!==null?s=0:(on=null,fn=0,s=Kt)}if(s!==0){if(s===2&&(E=Lp(i),E!==0&&(h=E,s=t0(i,E))),s===1)throw c=Mu,Mo(i,0),Yi(i,h),jn(i,Dt()),c;if(s===6)Yi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!oU(E)&&(s=md(i,h),s===2&&(b=Lp(i),b!==0&&(h=b,s=t0(i,b))),s===1))throw c=Mu,Mo(i,0),Yi(i,h),jn(i,Dt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Fo(i,zn,Ei);break;case 3:if(Yi(i,h),(h&130023424)===h&&(s=Jm+500-Dt(),10<s)){if(xc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){On(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=am(Fo.bind(null,i,zn,Ei),s);break}Fo(i,zn,Ei);break;case 4:if(Yi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-Tr(h);b=1<<x,x=s[x],x>E&&(E=x),h&=~b}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*iU(h/1960))-h,10<h){i.timeoutHandle=am(Fo.bind(null,i,zn,Ei),h);break}Fo(i,zn,Ei);break;case 5:Fo(i,zn,Ei);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===c?M2.bind(null,i):null}function t0(i,s){var c=Fu;return i.current.memoizedState.isDehydrated&&(Mo(i,s).flags|=256),i=md(i,s),i!==2&&(s=zn,zn=c,s!==null&&n0(s)),i}function n0(i){zn===null?zn=i:zn.push.apply(zn,i)}function oU(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!wr(b(),E))return!1}catch(x){return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Yi(i,s){for(s&=~Qm,s&=~ld,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Tr(s),h=1<<c;i[c]=-1,s&=~h}}function F2(i){if((it&6)!==0)throw Error(n(327));Xs();var s=xc(i,0);if((s&1)===0)return jn(i,Dt()),null;var c=md(i,s);if(i.tag!==0&&c===2){var h=Lp(i);h!==0&&(s=h,c=t0(i,h))}if(c===1)throw c=Mu,Mo(i,0),Yi(i,s),jn(i,Dt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Fo(i,zn,Ei),jn(i,Dt()),null}function r0(i,s){var c=it;it|=1;try{return i(s)}finally{it=c,it===0&&(Gs=Dt()+500,jc&&Ui())}}function Do(i){Vi!==null&&Vi.tag===0&&(it&6)===0&&Xs();var s=it;it|=1;var c=dr.transition,h=dt;try{if(dr.transition=null,dt=1,i)return i()}finally{dt=h,dr.transition=c,it=s,(it&6)===0&&Ui()}}function i0(){Zn=Ws.current,xt(Ws)}function Mo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,DB(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(hm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Hc();break;case 3:Vs(),xt(Bn),xt(Sn),Am();break;case 5:Sm(h);break;case 4:Vs();break;case 13:xt(Nt);break;case 19:xt(Nt);break;case 10:bm(h.type._context);break;case 22:case 23:i0()}c=c.return}if(on=i,Vt=i=Wi(i.current,null),fn=Zn=s,Kt=0,Mu=null,Qm=ld=Lo=0,zn=Fu=null,Oo!==null){for(s=0;s<Oo.length;s++)if(c=Oo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}c.pending=h}Oo=null}return i}function B2(i,s){do{var c=Vt;try{if(ym(),Jc.current=nd,Zc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Zc=!1}if(Ro=0,rn=Xt=Pt=null,Pu=!1,Ou=0,Km.current=null,c===null||c.return===null){Kt=1,Mu=s,Vt=null;break}e:{var b=i,x=c.return,L=c,z=s;if(s=fn,L.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var ee=z,ce=L,he=ce.tag;if((ce.mode&1)===0&&(he===0||he===11||he===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=l2(x);if(Ae!==null){Ae.flags&=-257,c2(Ae,x,L,b,s),Ae.mode&1&&u2(b,ee,s),s=Ae,z=ee;var Oe=s.updateQueue;if(Oe===null){var Ie=new Set;Ie.add(z),s.updateQueue=Ie}else Oe.add(z);break e}else{if((s&1)===0){u2(b,ee,s),o0();break e}z=Error(n(426))}}else if(At&&L.mode&1){var Mt=l2(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),c2(Mt,x,L,b,s),gm(qs(z,L));break e}}b=z=qs(z,L),Kt!==4&&(Kt=2),Fu===null?Fu=[b]:Fu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=s2(b,z,s);Rx(b,G);break e;case 1:L=z;var V=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&($i===null||!$i.has(K)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=a2(b,L,s);Rx(b,ye);break e}}b=b.return}while(b!==null)}z2(c)}catch(Me){s=Me,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function U2(){var i=ud.current;return ud.current=nd,i===null?nd:i}function o0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),on===null||(Lo&268435455)===0&&(ld&268435455)===0||Yi(on,fn)}function md(i,s){var c=it;it|=2;var h=U2();(on!==i||fn!==s)&&(Ei=null,Mo(i,s));do try{sU();break}catch(E){B2(i,E)}while(!0);if(ym(),it=c,ud.current=h,Vt!==null)throw Error(n(261));return on=null,fn=0,Kt}function sU(){for(;Vt!==null;)H2(Vt)}function aU(){for(;Vt!==null&&!I7();)H2(Vt)}function H2(i){var s=V2(i.alternate,i,Zn);i.memoizedProps=i.pendingProps,s===null?z2(i):Vt=s,Km.current=null}function z2(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=ZB(c,s,Zn),c!==null){Vt=c;return}}else{if(c=eU(c,s),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,Vt=null;return}}if(s=s.sibling,s!==null){Vt=s;return}Vt=s=i}while(s!==null);Kt===0&&(Kt=5)}function Fo(i,s,c){var h=dt,E=dr.transition;try{dr.transition=null,dt=1,uU(i,s,c,h)}finally{dr.transition=E,dt=h}return null}function uU(i,s,c,h){do Xs();while(Vi!==null);if((it&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(j7(i,b),i===on&&(Vt=on=null,fn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||dd||(dd=!0,q2(bc,function(){return Xs(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=dr.transition,dr.transition=null;var x=dt;dt=1;var L=it;it|=4,Km.current=null,nU(i,c),O2(c,i),kB(om),Ac=!!im,om=im=null,i.current=c,rU(c),R7(),it=L,dt=x,dr.transition=b}else i.current=c;if(dd&&(dd=!1,Vi=i,fd=E),b=i.pendingLanes,b===0&&($i=null),M7(c.stateNode),jn(i,Dt()),s!==null)for(h=i.onRecoverableError,c=0;c<s.length;c++)E=s[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(cd)throw cd=!1,i=Zm,Zm=null,i;return(fd&1)!==0&&i.tag!==0&&Xs(),b=i.pendingLanes,(b&1)!==0?i===e0?Bu++:(Bu=0,e0=i):Bu=0,Ui(),null}function Xs(){if(Vi!==null){var i=N_(fd),s=dr.transition,c=dt;try{if(dr.transition=null,dt=16>i?16:i,Vi===null)var h=!1;else{if(i=Vi,Vi=null,fd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var b=Ne,x=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var z=0;z<L.length;z++){var ee=L[z];for(Ne=ee;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Du(8,ce,b)}var he=ce.child;if(he!==null)he.return=ce,Ne=he;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,Ae=ce.return;if(A2(ce),ce===ee){Ne=null;break}if(ue!==null){ue.return=Ae,Ne=ue;break}Ne=Ae}}}var Oe=b.alternate;if(Oe!==null){var Ie=Oe.child;if(Ie!==null){Oe.child=null;do{var Mt=Ie.sibling;Ie.sibling=null,Ie=Mt}while(Ie!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,Ne=x;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Du(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var V=i.current;for(Ne=V;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=V;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:ad(9,L)}}catch(Me){It(L,L.return,Me)}if(L===x){Ne=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Ne=ye;break e}Ne=L.return}}if(it=E,Ui(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Tc,i)}catch(Me){}h=!0}return h}finally{dt=c,dr.transition=s}}return!1}function j2(i,s,c){s=qs(c,s),s=s2(i,s,1),i=zi(i,s,1),s=On(),i!==null&&(uu(i,1,s),jn(i,s))}function It(i,s,c){if(i.tag===3)j2(i,i,c);else for(;s!==null;){if(s.tag===3){j2(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($i===null||!$i.has(h))){i=qs(c,i),i=a2(s,i,1),s=zi(s,i,1),i=On(),s!==null&&(uu(s,1,i),jn(s,i));break}}s=s.return}}function lU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=On(),i.pingedLanes|=i.suspendedLanes&c,on===i&&(fn&c)===c&&(Kt===4||Kt===3&&(fn&130023424)===fn&&500>Dt()-Jm?Mo(i,0):Qm|=c),jn(i,s)}function $2(i,s){s===0&&((i.mode&1)===0?s=1:(s=_c,_c<<=1,(_c&130023424)===0&&(_c=4194304)));var c=On();i=pi(i,s),i!==null&&(uu(i,s,c),jn(i,c))}function cU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),$2(i,c)}function dU(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),$2(i,c)}var V2;V2=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Hn=!1,JB(i,s,c);Hn=(i.flags&131072)!==0}else Hn=!1,At&&(s.flags&1048576)!==0&&xx(s,Vc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;od(i,s),i=s.pendingProps;var E=Fs(s,Sn.current);$s(s,c),E=Nm(null,s,h,i,E,c);var b=Pm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Un(h)?(b=!0,zc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,_m(s),E.updater=rd,s.stateNode=E,E._reactInternals=s,Mm(s,h,i,c),s=Hm(null,s,h,!0,b,c)):(s.tag=0,At&&b&&fm(s),Pn(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(od(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=hU(h),i=xr(h,i),E){case 0:s=Um(null,s,h,i,c);break e;case 1:s=g2(null,s,h,i,c);break e;case 11:s=d2(null,s,h,i,c);break e;case 14:s=f2(null,s,h,xr(h.type,i),c);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),Um(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),g2(i,s,h,E,c);case 3:e:{if(E2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Ix(i,s),Kc(s,h,null,c);var x=s.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=qs(Error(n(423)),s),s=y2(i,s,h,c,E);break e}else if(h!==E){E=qs(Error(n(424)),s),s=y2(i,s,h,c,E);break e}else for(Jn=Mi(s.stateNode.containerInfo.firstChild),Qn=s,At=!0,_r=null,c=Px(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Hs(),h===E){s=gi(i,s,c);break e}Pn(i,s,h,c)}s=s.child}return s;case 5:return Dx(s),i===null&&mm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,sm(h,E)?x=null:b!==null&&sm(h,b)&&(s.flags|=32),m2(i,s),Pn(i,s,x,c),s.child;case 6:return i===null&&mm(s),null;case 13:return b2(i,s,c);case 4:return xm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=zs(s,null,h,c):Pn(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),d2(i,s,h,E,c);case 7:return Pn(i,s,s.pendingProps,c),s.child;case 8:return Pn(i,s,s.pendingProps.children,c),s.child;case 12:return Pn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,x=E.value,Tt(Wc,h._currentValue),h._currentValue=x,b!==null)if(wr(b.value,x)){if(b.children===E.children&&!Bn.current){s=gi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){x=b.child;for(var z=L.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=mi(-1,c&-c),z.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var ce=ee.pending;ce===null?z.next=z:(z.next=ce.next,ce.next=z),ee.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),Tm(b.return,c,s),L.lanes|=c;break}z=z.next}}else if(b.tag===10)x=b.type===s.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=c,L=x.alternate,L!==null&&(L.lanes|=c),Tm(x,c,s),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===s){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}Pn(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,$s(s,c),E=lr(E),h=h(E),s.flags|=1,Pn(i,s,h,c),s.child;case 14:return h=s.type,E=xr(h,s.pendingProps),E=xr(h.type,E),f2(i,s,h,E,c);case 15:return h2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),od(i,s),s.tag=1,Un(h)?(i=!0,zc(s)):i=!1,$s(s,c),i2(s,h,E),Mm(s,h,E,c),Hm(null,s,h,!0,i,c);case 19:return w2(i,s,c);case 22:return p2(i,s,c)}throw Error(n(156,s.tag))};function q2(i,s){return S_(i,s)}function fU(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(i,s,c,h){return new fU(i,s,c,h)}function s0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function hU(i){if(typeof i=="function")return s0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===ae)return 14}return 2}function Wi(i,s){var c=i.alternate;return c===null?(c=fr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,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,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function gd(i,s,c,h,E,b){var x=2;if(h=i,typeof i=="function")s0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case Y:return Bo(c.children,E,b,s);case ne:x=8,E|=8;break;case me:return i=fr(12,c,s,E|2),i.elementType=me,i.lanes=b,i;case ke:return i=fr(13,c,s,E),i.elementType=ke,i.lanes=b,i;case re:return i=fr(19,c,s,E),i.elementType=re,i.lanes=b,i;case se:return Ed(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case ie:x=9;break e;case fe:x=11;break e;case ae:x=14;break e;case Se:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=fr(x,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Bo(i,s,c,h){return i=fr(7,i,h,s),i.lanes=c,i}function Ed(i,s,c,h){return i=fr(22,i,h,s),i.elementType=se,i.lanes=c,i.stateNode={isHidden:!1},i}function a0(i,s,c){return i=fr(6,i,null,s),i.lanes=c,i}function u0(i,s,c){return s=fr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function pU(i,s,c,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dp(0),this.expirationTimes=Dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function l0(i,s,c,h,E,b,x,L,z){return i=new pU(i,s,c,L,z),s===1?(s=1,b===!0&&(s|=8)):s=0,b=fr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},_m(b),i}function mU(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function Y2(i){if(!i)return Bi;i=i._reactInternals;e:{if(Ao(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Un(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Un(c))return Tx(i,c,s)}return s}function W2(i,s,c,h,E,b,x,L,z){return i=l0(c,h,!0,i,E,b,x,L,z),i.context=Y2(null),c=i.current,h=On(),E=qi(c),b=mi(h,E),b.callback=s!=null?s:null,zi(c,b,E),i.current.lanes=E,uu(i,E,h),jn(i,h),i}function yd(i,s,c,h){var E=s.current,b=On(),x=qi(E);return c=Y2(c),s.context===null?s.context=c:s.pendingContext=c,s=mi(b,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=zi(E,s,x),i!==null&&(Ar(i,E,x,b),Xc(i,E,x)),x}function bd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function G2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function c0(i,s){G2(i,s),(i=i.alternate)&&G2(i,s)}function gU(){return null}var X2=typeof reportError=="function"?reportError:function(i){console.error(i)};function d0(i){this._internalRoot=i}Td.prototype.render=d0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));yd(i,s,null,null)},Td.prototype.unmount=d0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Do(function(){yd(null,i,null,null)}),s[ci]=null}};function Td(i){this._internalRoot=i}Td.prototype.unstable_scheduleHydration=function(i){if(i){var s=I_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ri.length&&s!==0&&s<Ri[c].priority;c++);Ri.splice(c,0,i),c===0&&D_(i)}};function f0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function K2(){}function EU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=bd(x);b.call(ee)}}var x=W2(s,h,i,0,null,!1,!1,"",K2);return i._reactRootContainer=x,i[ci]=x.current,_u(i.nodeType===8?i.parentNode:i),Do(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var ee=bd(z);L.call(ee)}}var z=l0(i,0,!1,null,null,!1,!1,"",K2);return i._reactRootContainer=z,i[ci]=z.current,_u(i.nodeType===8?i.parentNode:i),Do(function(){yd(s,z,c,h)}),z}function _d(i,s,c,h,E){var b=c._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var L=E;E=function(){var z=bd(x);L.call(z)}}yd(s,x,i,E)}else x=EU(c,s,i,E,h);return bd(x)}P_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=au(s.pendingLanes);c!==0&&(Mp(s,c|1),jn(s,Dt()),(it&6)===0&&(Gs=Dt()+500,Ui()))}break;case 13:Do(function(){var h=pi(i,1);if(h!==null){var E=On();Ar(h,i,1,E)}}),c0(i,1)}},Fp=function(i){if(i.tag===13){var s=pi(i,134217728);if(s!==null){var c=On();Ar(s,i,134217728,c)}c0(i,134217728)}},O_=function(i){if(i.tag===13){var s=qi(i),c=pi(i,s);if(c!==null){var h=On();Ar(c,i,s,h)}c0(i,s)}},I_=function(){return dt},R_=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Np=function(i,s,c){switch(s){case"input":if(Wt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var E=Uc(h);if(!E)throw Error(n(90));Ot(h),Wt(h,E)}}}break;case"textarea":Xe(i,c);break;case"select":s=c.value,s!=null&&we(i,!!c.multiple,s,!1)}},E_=r0,y_=Do;var yU={usingClientEntryPoint:!1,Events:[vu,Ds,Uc,m_,g_,r0]},Uu={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bU={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.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=__(i),i===null?null:i.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||gU,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 xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{Tc=xd.inject(bU),qr=xd}catch(i){}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yU,Rn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f0(s))throw Error(n(200));return mU(i,s,null,c)},Rn.createRoot=function(i,s){if(!f0(i))throw Error(n(299));var c=!1,h="",E=X2;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=l0(i,1,!1,null,null,c,!1,h,E),i[ci]=s.current,_u(i.nodeType===8?i.parentNode:i),new d0(s)},Rn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=__(s),i=i===null?null:i.stateNode,i},Rn.flushSync=function(i){return Do(i)},Rn.hydrate=function(i,s,c){if(!wd(s))throw Error(n(200));return _d(null,i,s,!0,c)},Rn.hydrateRoot=function(i,s,c){if(!f0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",x=X2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=W2(s,null,i,1,c!=null?c:null,E,!1,b,x),i[ci]=s.current,_u(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,E]:s.mutableSourceEagerHydrationData.push(c,E);return new Td(s)},Rn.render=function(i,s,c){if(!wd(s))throw Error(n(200));return _d(null,i,s,!1,c)},Rn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(Do(function(){_d(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},Rn.unstable_batchedUpdates=r0,Rn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!wd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return _d(i,s,c,!1,h)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var F1;function B1(){if(F1)return kf.exports;F1=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(),kf.exports=tN(),kf.exports}var Ko=B1();function U1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=U1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=U1(e))&&(r&&(r+=" "),r+=t);return r}const nN=()=>document.querySelector(`input[name="${H}-user-input"]:not(:disabled)`),Of=()=>{var e;return(e=nN())!=null?e:document.querySelector(`.${H}-dialog-content, .${H}-modal-content`)},rN=()=>{var e;return(e=Of())==null?void 0:e.focus({preventScroll:!0})},If=()=>{const e=()=>{const n=document.querySelector(`.${H}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var H1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},z1=Ki.createContext&&Ki.createContext(H1),iN=["attr","size","title"];function oN(e,t){if(e==null)return{};var n=sN(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sN(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 ml(){return ml=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},ml.apply(this,arguments)}function j1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j1(Object(n),!0).forEach(function(r){aN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aN(e,t,n){return t=uN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=lN(e,"string");return typeof t=="symbol"?t:t+""}function lN(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 $1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,gl({key:n},t.attr),$1(t.child)))}function ft(e){return t=>Ki.createElement(cN,ml({attr:gl({},e.attr)},t),$1(e.child))}function cN(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=oN(e,iN),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",ml({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:gl(gl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return z1!==void 0?Ki.createElement(z1.Consumer,null,n=>t(n)):t(H1)}function dN(e){return ft({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ri=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:W(e,`${H}-icon-button`),type:r,"aria-label":o,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:W(`${H}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),fN="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",hN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=tt(),a=o==="messaging",l=r||(a?"Open Commerce Client":"Open Copilot"),d=a?_.jsx(dN,{className:W(t,`${H}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||fN,alt:"Copilot",className:W(t,`${H}-minimized-icon-img`)});return _.jsx(ri,{className:W(t,`${H}-minimized-button`),ariaLabel:l,title:l,icon:d,onClick:e})},pN=()=>{const{globalClassName:e,themeVariables:t,layoutPreset:n}=tt(),r=()=>{Ea(!1),ti(!0),setTimeout(rN)};return Ko.createPortal(_.jsx("div",{className:W(e,`${H}-minimized-container`,`${H}-layout-${n}`),style:t,children:_.jsx(hN,{onClick:r})}),document.body)},mN=e=>({[`${$n}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${$n}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${$n}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${$n}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${$n}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${$n}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),V1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:W(e,`${H}-close-button`),disabled:r,onClick:n,type:"button",children:_.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),gN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const o=e.name||"",[a,u]=F.useState("");return F.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),_.jsxs("div",{className:W(n,`cim-${t}-component`,`${H}-image-file-preview`),children:[_.jsx("img",{className:W(n,`cim-${t}-component`,`${H}-image-preview`),src:a,alt:`${o} preview`,loading:"lazy"}),_.jsx("span",{className:W(n,`cim-${t}-component`,`${H}-image-file-name`),title:o,children:o}),_.jsx(V1,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function q1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function Y1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Qo(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function EN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function W1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function G1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function yN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function bN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function TN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function wN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function _N(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function xN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const SN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=_.jsx(xN,{}),onFiles:l})=>{const d=F.useRef(null),f=F.useId(),p=r!=null?r:f,m=F.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=F.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return _.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${H}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[_.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${H}-image-upload-label`),"aria-hidden":"true",children:u}),_.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${H}-file-input`),type:"file",id:p,accept:t,name:`${H}-file-input`,disabled:n,onInput:T})]})},El=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>_.jsx("button",{"aria-label":a,className:W(`${H}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),vN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?G1:Qo;return n?_.jsx("img",{className:W(`${H}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(r,{size:"16px"})},AN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?G1:Qo;return _.jsx(ri,{className:W(e,n,`cim-${r}-component`,`${H}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(El,{className:W(e,n,`cim-${r}-component`,`${H}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(vN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function CN(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const kN=()=>{const{messages:e}=Vn(),{handleCancel:t}=Or();return{cancelRequest:F.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},NN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=kN();return n!=null&&n.enableCancelSearch?_.jsx(ri,{className:W(t,`${H}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:_.jsx(CN,{}),disabled:!e,onClick:r}):null};function eH(){}function tH(){}function X1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function K1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const PN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ON=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IN={};function Q1(e,t){return(IN.jsx?ON:PN).test(e)}const RN=/[ \t\n\f\r]/g;function LN(e){return typeof e=="object"?e.type==="text"?J1(e.value):!1:J1(e)}function J1(e){return e.replace(RN,"")===""}class wa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wa.prototype.normal={},wa.prototype.property={},wa.prototype.space=void 0;function Z1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new wa(n,r,t)}function _a(e){return e.toLowerCase()}class Ln{constructor(t,n){this.attribute=n,this.property=t}}Ln.prototype.attribute="",Ln.prototype.booleanish=!1,Ln.prototype.boolean=!1,Ln.prototype.commaOrSpaceSeparated=!1,Ln.prototype.commaSeparated=!1,Ln.prototype.defined=!1,Ln.prototype.mustUseProperty=!1,Ln.prototype.number=!1,Ln.prototype.overloadedBoolean=!1,Ln.prototype.property="",Ln.prototype.spaceSeparated=!1,Ln.prototype.space=void 0;let DN=0;const Ge=ao(),Ht=ao(),Rf=ao(),Ee=ao(),ht=ao(),so=ao(),qn=ao();function ao(){return Hu(2,++DN)}const Lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ht,commaOrSpaceSeparated:qn,commaSeparated:so,number:Ee,overloadedBoolean:Rf,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Df=Object.keys(Lf);class Mf extends Ln{constructor(t,n,r,o){let a=-1;if(super(t,n),eE(this,"space",o),typeof r=="number")for(;++a<Df.length;){const u=Df[a];eE(this,Df[a],(r&Lf[u])===Lf[u])}}}Mf.prototype.defined=!0;function eE(e,t,n){n&&(e[t]=n)}function Jo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Mf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[_a(r)]=r,n[_a(a.attribute)]=r}return new wa(t,n,e.space)}const tE=Jo({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:ht,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:Ee,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:ht,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ht,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nE(e,t){return t in e?e[t]:t}function rE(e,t){return nE(e,t.toLowerCase())}const MN=Jo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:so,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:ht,autoFocus:Ge,autoPlay:Ge,blocking:ht,capture:null,charSet:null,checked:Ge,cite:null,className:ht,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ht,controls:Ge,controlsList:ht,coords:Ee|so,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Rf,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:ht,height:Ee,hidden:Rf,high:Ee,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ge,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:Ee,pattern:null,ping:ht,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:ht,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:ht,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ht,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:so,part:ht,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:rE}),FN=Jo({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:qn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:so,g2:so,glyphName:so,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nE}),iE=Jo({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()}}),oE=Jo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rE}),sE=Jo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BN={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"},UN=/[A-Z]/g,aE=/-[a-z]/g,HN=/^data[-\w.:]+$/i;function yl(e,t){const n=_a(t);let r=t,o=Ln;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(aE,jN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!aE.test(a)){let u=a.replace(UN,zN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Mf}return new o(r,t)}function zN(e){return"-"+e.toLowerCase()}function jN(e){return e.charAt(1).toUpperCase()}const xa=Z1([tE,MN,iE,oE,sE],"html"),Ti=Z1([tE,FN,iE,oE,sE],"svg");function uE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function lE(e){return e.join(" ").trim()}var Zo={},Ff,cE;function $N(){if(cE)return Ff;cE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
18
- `,f="/",p="*",m="",T="comment",y="declaration";function w(N,S){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];S=S||{};var A=1,C=1;function U(re){var ae=re.match(t);ae&&(A+=ae.length);var Se=re.lastIndexOf(d);C=~Se?re.length-Se:C+re.length}function q(){var re={line:A,column:C};return function(ae){return ae.position=new R(re),me(),ae}}function R(re){this.start=re,this.end={line:A,column:C},this.source=S.source}R.prototype.content=N;function Y(re){var ae=new Error(S.source+":"+A+":"+C+": "+re);if(ae.reason=re,ae.filename=S.source,ae.line=A,ae.column=C,ae.source=N,!S.silent)throw ae}function ne(re){var ae=re.exec(N);if(ae){var Se=ae[0];return U(Se),N=N.slice(Se.length),ae}}function me(){ne(n)}function $(re){var ae;for(re=re||[];ae=ie();)ae!==!1&&re.push(ae);return re}function ie(){var re=q();if(!(f!=N.charAt(0)||p!=N.charAt(1))){for(var ae=2;m!=N.charAt(ae)&&(p!=N.charAt(ae)||f!=N.charAt(ae+1));)++ae;if(ae+=2,m===N.charAt(ae-1))return Y("End of comment missing");var Se=N.slice(2,ae-2);return C+=2,U(Se),N=N.slice(ae),C+=2,re({type:T,comment:Se})}}function fe(){var re=q(),ae=ne(r);if(ae){if(ie(),!ne(o))return Y("property missing ':'");var Se=ne(a),se=re({type:y,property:v(ae[0].replace(e,m)),value:Se?v(Se[0].replace(e,m)):m});return ne(u),se}}function ke(){var re=[];$(re);for(var ae;ae=fe();)ae!==!1&&(re.push(ae),$(re));return re}return me(),ke()}function v(N){return N?N.replace(l,m):m}return Ff=w,Ff}var dE;function VN(){if(dE)return Zo;dE=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;const t=e($N());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?o(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Zo}var Sa={},fE;function qN(){if(fE)return Sa;fE=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,l):f=f.replace(r,l),f.replace(t,u))};return Sa.camelCase=d,Sa}var va,hE;function YN(){if(hE)return va;hE=1;var e=va&&va.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(VN()),n=qN();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,va=r,va}var WN=YN();const GN=Ue(WN),bl=pE("end"),Ir=pE("start");function pE(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 mE(e){const t=Ir(e),n=bl(e);if(t&&n)return{start:t,end:n}}function Aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gE(e.position):"start"in e||"end"in e?gE(e):"line"in e||"column"in e?Bf(e):""}function Bf(e){return EE(e&&e.line)+":"+EE(e&&e.column)}function gE(e){return Bf(e&&e.start)+"-"+Bf(e&&e.end)}function EE(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const 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=o,this.line=l?l.line:void 0,this.name=Aa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const Uf={}.hasOwnProperty,XN=new Map,KN=/[A-Z]/g,QN=new Set(["table","tbody","thead","tfoot","tr"]),JN=new Set(["td","th"]),yE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ZN(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=aP(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=sP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ti:xa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=bE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function bE(e,t,n){if(t.type==="element")return eP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rP(e,t,n);if(t.type==="mdxjsEsm")return nP(e,t);if(t.type==="root")return iP(e,t,n);if(t.type==="text")return oP(e,t)}function eP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ti,e.schema=o),e.ancestors.push(t);const a=wE(e,t.tagName,!1),u=uP(e,t);let l=zf(e,t);return QN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!LN(d):!0})),TE(e,u,a,t),Hf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function tP(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)}Ca(e,t.position)}function nP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ca(e,t.position)}function rP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ti,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:wE(e,t.name,!0),u=lP(e,t),l=zf(e,t);return TE(e,u,a,t),Hf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function iP(e,t,n){const r={};return Hf(r,zf(e,t)),e.create(t,e.Fragment,r,n)}function oP(e,t){return t.value}function TE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sP(e,t,n){return r;function r(o,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function aP(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Ir(r);return t(o,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function uP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Uf.call(t.properties,o)){const a=cP(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&JN.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 lP(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 Ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function zf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:XN;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const l=bE(e,a,u);l!==void 0&&n.push(l)}return n}function cP(e,t,n){const r=yl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?K1(n):lE(n)),r.property==="style"){let o=typeof n=="object"?n:dP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=fP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?BN[r.property]||r.property:r.attribute,n]}}function dP(e,t){try{return GN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=yE+"#cannot-parse-style-attribute",o}}function wE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const l=Q1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=Q1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Uf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ca(e)}function Ca(e,t){const n=new bn("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=yE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fP(e){const t={};let n;for(n in e)Uf.call(e,n)&&(t[hP(n)]=e[n]);return t}function hP(e){let t=e.replace(KN,pP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pP(e){return"-"+e.toLowerCase()}const jf={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"]},mP={};function $f(e,t){const n=mP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _E(e,r,o)}function _E(e,t,n){if(gP(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 xE(e.children,t,n)}return Array.isArray(e)?xE(e,t,n):""}function xE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=_E(e[o],t,n);return r.join("")}function gP(e){return!!(e&&typeof e=="object")}const SE=document.createElement("i");function Vf(e){const t="&"+e+";";SE.innerHTML=t;const n=SE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function ir(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const vE={}.hasOwnProperty;function AE(e){const t={};let n=-1;for(;++n<e.length;)EP(t,e[n]);return t}function EP(e,t){let n;for(n in t){const o=(vE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){vE.call(o,u)||(o[u]=[]);const l=a[u];yP(o[u],Array.isArray(l)?l:l?[l]:[])}}}function yP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yn(e,0,0,r)}function CE(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 mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=wi(/[A-Za-z]/),Tn=wi(/[\dA-Za-z]/),bP=wi(/[#-'*+\--9=?A-Z^-~]/);function Tl(e){return e!==null&&(e<32||e===127)}const qf=wi(/\d/),TP=wi(/[\dA-Fa-f]/),wP=wi(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function pt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const wl=wi(new RegExp("\\p{P}|\\p{S}","u")),uo=wi(/\s/);function wi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function rt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),l(d)):t(d)}function l(d){return Ze(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const _P={tokenize:xP};function xP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),rt(e,t,"linePrefix")}function o(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 SP={tokenize:vP},kE={tokenize:AP};function vP(e){const t=this,n=[];let r=0,o,a,u;return l;function l(C){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const U=t.events.length;let q=U,R;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){R=t.events[q][1].end;break}S(r);let Y=U;for(;Y<t.events.length;)t.events[Y][1].end=B({},R),Y++;return Yn(t.events,q+1,0,t.events.slice(U)),t.events.length=Y,f(C)}return l(C)}function f(C){if(r===n.length){if(!o)return T(C);if(o.currentConstruct&&o.currentConstruct.concrete)return w(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kE,p,m)(C)}function p(C){return o&&A(),S(r),T(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(C)}function T(C){return t.containerState={},e.attempt(kE,y,w)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),T(C)}function w(C){if(C===null){o&&A(),S(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(C)}function v(C){if(C===null){N(e.exit("chunkFlow"),!0),S(0),e.consume(C);return}return He(C)?(e.consume(C),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(C),v)}function N(C,U){const q=t.sliceStream(C);if(U&&q.push(null),C.previous=a,a&&(a.next=C),a=C,o.defineSkip(C.start),o.write(q),t.parser.lazy[C.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<u&&(!o.events[R][1].end||o.events[R][1].end.offset>u))return;const Y=t.events.length;let ne=Y,me,$;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(me){$=t.events[ne][1].end;break}me=!0}for(S(r),R=Y;R<t.events.length;)t.events[R][1].end=B({},$),R++;Yn(t.events,ne+1,0,t.events.slice(Y)),t.events.length=R}}function S(C){let U=n.length;for(;U-- >C;){const q=n[U];t.containerState=q[1],q[0].exit.call(t,e)}n.length=C}function A(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function AP(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||pt(e)||uo(e))return 1;if(wl(e))return 2}function _l(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Yf={name:"attention",resolveAll:CP,tokenize:kP};function CP(e,t){let n=-1,r,o,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);NE(m,-d),NE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:B({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},l.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=ir(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ir(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=ir(f,_l(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ir(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=ir(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Yn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=ts(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function NE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const NP={name:"autolink",tokenize:PP};function PP(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Nn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(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||Tn(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||Tl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):bP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const ka={partial:!0,tokenize:OP};function OP(e,t,n){return r;function r(a){return Ze(a)?rt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const PE={continuation:{tokenize:RP},exit:LP,name:"blockQuote",tokenize:IP};function IP(e,t,n){const r=this;return o;function o(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 Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function RP(e,t,n){const r=this;return o;function o(u){return Ze(u)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(PE,t,n)(u)}}function LP(e){e.exit("blockQuote")}const OE={name:"characterEscape",tokenize:DP};function DP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return wP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const IE={name:"characterReference",tokenize:MP};function MP(e,t,n){const r=this;let o=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=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=TP,p):(e.enter("characterReferenceValue"),a=7,u=qf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!Vf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const RE={partial:!0,tokenize:BP},LE={concrete:!0,name:"codeFenced",tokenize:FP};function FP(e,t,n){const r=this,o={partial:!0,tokenize:q};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?rt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||He(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(RE,v,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||He(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||He(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||He(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),w)}function v(R){return e.attempt(o,U,N)(R)}function N(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return a>0&&Ze(R)?rt(e,A,"linePrefix",a+1)(R):A(R)}function A(R){return R===null||He(R)?e.check(RE,v,U)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||He(R)?(e.exit("codeFlowValue"),A(R)):(e.consume(R),C)}function U(R){return e.exit("codeFenced"),t(R)}function q(R,Y,ne){let me=0;return $;function $(ae){return R.enter("lineEnding"),R.consume(ae),R.exit("lineEnding"),ie}function ie(ae){return R.enter("codeFencedFence"),Ze(ae)?rt(R,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):fe(ae)}function fe(ae){return ae===l?(R.enter("codeFencedFenceSequence"),ke(ae)):ne(ae)}function ke(ae){return ae===l?(me++,R.consume(ae),ke):me>=u?(R.exit("codeFencedFenceSequence"),Ze(ae)?rt(R,re,"whitespace")(ae):re(ae)):ne(ae)}function re(ae){return ae===null||He(ae)?(R.exit("codeFencedFence"),Y(ae)):ne(ae)}}}function BP(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Wf={name:"codeIndented",tokenize:HP},UP={partial:!0,tokenize:zP};function HP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(UP,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 zP(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):rt(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)?o(u):n(u)}}const jP={name:"codeText",previous:VP,resolve:$P,tokenize:qP};function $P(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function VP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qP(e,t,n){let r=0,o,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"),o=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class YP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Na(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),Na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Na(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);Na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Na(this.left,n.reverse())}}}function Na(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 DE(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new YP(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return Yn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function WP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,T=-1,y=n,w=0,v=0;const N=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,N.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):N.pop(),T=N.length;T--;){const S=l.slice(N[T],N[T+1]),A=a.pop();d.push([A,A+S.length-1]),e.splice(A,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return f}const GP={resolve:KP,tokenize:QP},XP={partial:!0,tokenize:JP};function KP(e){return DE(e),e}function QP(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):He(l)?e.check(XP,u,a)(l):(e.consume(l),o)}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,o}}function JP(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(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 ME(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Tl(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||He(S)?n(S):(e.consume(S),S===92?w:y)}function w(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||pt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Tl(S)?n(S):(e.consume(S),S===92?N:v)}function N(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function FE(e,t,n,r,o,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function BE(e,t,n,r,o,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||He(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Pa(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?rt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ZP={name:"definition",tokenize:t3},e3={partial:!0,tokenize:n3};function t3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return FE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=mr(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 pt(y)?Pa(e,f)(y):f(y)}function f(y){return ME(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(e3,m,m)(y)}function m(y){return Ze(y)?rt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function n3(e,t,n){return r;function r(l){return pt(l)?Pa(e,o)(l):n(l)}function o(l){return BE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ze(l)?rt(e,u,"whitespace")(l):u(l)}function u(l){return l===null||He(l)?t(l):n(l)}}const r3={name:"hardBreakEscape",tokenize:i3};function i3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const o3={name:"headingAtx",resolve:s3,tokenize:a3};function s3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function a3(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||pt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):Ze(p)?rt(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||pt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const u3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],UE=["pre","script","style","textarea"],l3={concrete:!0,name:"htmlFlow",resolveTo:f3,tokenize:h3},c3={partial:!0,tokenize:m3},d3={partial:!0,tokenize:p3};function f3(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 h3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:k):Nn(O)?(e.consume(O),u=String.fromCharCode(O),N):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,l=0,w):Nn(O)?(e.consume(O),o=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function w(O){const _e="CDATA[";return O===_e.charCodeAt(l++)?(e.consume(O),l===_e.length?r.interrupt?t:fe:w):n(O)}function v(O){return Nn(O)?(e.consume(O),u=String.fromCharCode(O),N):n(O)}function N(O){if(O===null||O===47||O===62||pt(O)){const _e=O===47,Be=u.toLowerCase();return!_e&&!a&&UE.includes(Be)?(o=1,r.interrupt?t(O):fe(O)):u3.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),S):r.interrupt?t(O):fe(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?A(O):C(O))}return O===45||Tn(O)?(e.consume(O),u+=String.fromCharCode(O),N):n(O)}function S(O){return O===62?(e.consume(O),r.interrupt?t:fe):n(O)}function A(O){return Ze(O)?(e.consume(O),A):$(O)}function C(O){return O===47?(e.consume(O),$):O===58||O===95||Nn(O)?(e.consume(O),U):Ze(O)?(e.consume(O),C):$(O)}function U(O){return O===45||O===46||O===58||O===95||Tn(O)?(e.consume(O),U):q(O)}function q(O){return O===61?(e.consume(O),R):Ze(O)?(e.consume(O),q):C(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,Y):Ze(O)?(e.consume(O),R):ne(O)}function Y(O){return O===d?(e.consume(O),d=null,me):O===null||He(O)?n(O):(e.consume(O),Y)}function ne(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||pt(O)?q(O):(e.consume(O),ne)}function me(O){return O===47||O===62||Ze(O)?C(O):n(O)}function $(O){return O===62?(e.consume(O),ie):n(O)}function ie(O){return O===null||He(O)?fe(O):Ze(O)?(e.consume(O),ie):n(O)}function fe(O){return O===45&&o===2?(e.consume(O),Se):O===60&&o===1?(e.consume(O),se):O===62&&o===4?(e.consume(O),M):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),oe):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(c3,Q,ke)(O)):O===null||He(O)?(e.exit("htmlFlowData"),ke(O)):(e.consume(O),fe)}function ke(O){return e.check(d3,re,Q)(O)}function re(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||He(O)?ke(O):(e.enter("htmlFlowData"),fe(O))}function Se(O){return O===45?(e.consume(O),k):fe(O)}function se(O){return O===47?(e.consume(O),u="",J):fe(O)}function J(O){if(O===62){const _e=u.toLowerCase();return UE.includes(_e)?(e.consume(O),M):fe(O)}return Nn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),J):fe(O)}function oe(O){return O===93?(e.consume(O),k):fe(O)}function k(O){return O===62?(e.consume(O),M):O===45&&o===2?(e.consume(O),k):fe(O)}function M(O){return O===null||He(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),M)}function Q(O){return e.exit("htmlFlow"),t(O)}}function p3(e,t,n){const r=this;return o;function o(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 m3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ka,t,n)}}const g3={name:"htmlText",tokenize:E3};function E3(e,t,n){const r=this;let o,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),q):k===63?(e.consume(k),C):Nn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Nn(k)?(e.consume(k),A):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):He(k)?(u=m,se(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Se(k):k===45?T(k):m(k)}function w(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),N):He(k)?(u=v,se(k)):(e.consume(k),v)}function N(k){return k===93?(e.consume(k),S):v(k)}function S(k){return k===62?Se(k):k===93?(e.consume(k),S):v(k)}function A(k){return k===null||k===62?Se(k):He(k)?(u=A,se(k)):(e.consume(k),A)}function C(k){return k===null?n(k):k===63?(e.consume(k),U):He(k)?(u=C,se(k)):(e.consume(k),C)}function U(k){return k===62?Se(k):C(k)}function q(k){return Nn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||Tn(k)?(e.consume(k),R):Y(k)}function Y(k){return He(k)?(u=Y,se(k)):Ze(k)?(e.consume(k),Y):Se(k)}function ne(k){return k===45||Tn(k)?(e.consume(k),ne):k===47||k===62||pt(k)?me(k):n(k)}function me(k){return k===47?(e.consume(k),Se):k===58||k===95||Nn(k)?(e.consume(k),$):He(k)?(u=me,se(k)):Ze(k)?(e.consume(k),me):Se(k)}function $(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),$):ie(k)}function ie(k){return k===61?(e.consume(k),fe):He(k)?(u=ie,se(k)):Ze(k)?(e.consume(k),ie):me(k)}function fe(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,ke):He(k)?(u=fe,se(k)):Ze(k)?(e.consume(k),fe):(e.consume(k),re)}function ke(k){return k===o?(e.consume(k),o=void 0,ae):k===null?n(k):He(k)?(u=ke,se(k)):(e.consume(k),ke)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||pt(k)?me(k):(e.consume(k),re)}function ae(k){return k===47||k===62||pt(k)?me(k):n(k)}function Se(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function se(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?rt(e,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):oe(k)}function oe(k){return e.enter("htmlTextData"),u(k)}}const Gf={name:"labelEnd",resolveAll:w3,resolveTo:_3,tokenize:x3},y3={tokenize:S3},b3={tokenize:v3},T3={tokenize:A3};function w3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function _3(e,t){let n=e.length,r=0,o,a,u,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=ir(l,e.slice(a+1,a+r+3)),l=ir(l,[["enter",p,t]]),l=ir(l,_l(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=ir(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=ir(l,e.slice(u+1)),l=ir(l,[["exit",d,t]]),Yn(e,a,e.length,l),e}function x3(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(mr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(y3,p,u?p:m)(T):T===91?e.attempt(b3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(T3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function S3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return pt(m)?Pa(e,a)(m):a(m)}function a(m){return m===41?p(m):ME(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return pt(m)?Pa(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?BE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return pt(m)?Pa(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function v3(e,t,n){const r=this;return o;function o(l){return FE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function A3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const C3={name:"labelStartImage",resolveAll:Gf.resolveAll,tokenize:k3};function k3(e,t,n){const r=this;return o;function o(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 N3={name:"labelStartLink",resolveAll:Gf.resolveAll,tokenize:P3};function P3(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Xf={name:"lineEnding",tokenize:O3};function O3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const xl={name:"thematicBreak",tokenize:I3};function I3(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,l(f)}function l(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?rt(e,l,"whitespace")(f):l(f))}}const Dn={continuation:{tokenize:M3},exit:B3,name:"list",tokenize:D3},R3={partial:!0,tokenize:U3},L3={partial:!0,tokenize:F3};function D3(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return l;function l(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:qf(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(xl,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 qf(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(ka,r.interrupt?n:p,e.attempt(R3,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function M3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ka,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ze(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(L3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function F3(e,t,n){const r=this;return rt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function B3(e){e.exit(this.containerState.type)}function U3(e,t,n){const r=this;return rt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const HE={name:"setextUnderline",resolveTo:H3,tokenize:z3};function H3(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function z3(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===o?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ze(f)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const j3={tokenize:$3};function $3(e){const t=this,n=e.attempt(ka,r,e.attempt(this.parser.constructs.flowInitial,o,rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(GP,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const V3={resolveAll:jE()},q3=zE("string"),Y3=zE("text");function zE(e){return{resolveAll:jE(e==="text"?W3:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=o[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function jE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function W3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,l=0,d;for(;a--;){const f=o[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:B({},r.end)};r.end=B({},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 G3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ZP},disable:{null:[]},document:{42:Dn,43:Dn,45:Dn,48:Dn,49:Dn,50:Dn,51:Dn,52:Dn,53:Dn,54:Dn,55:Dn,56:Dn,57:Dn,62:PE},flow:{35:o3,42:xl,45:[HE,xl],60:l3,61:HE,95:xl,96:LE,126:LE},flowInitial:{[-2]:Wf,[-1]:Wf,32:Wf},insideSpan:{null:[Yf,V3]},string:{38:IE,92:OE},text:{[-5]:Xf,[-4]:Xf,[-3]:Xf,33:C3,38:IE,42:Yf,60:[NP,g3],91:N3,92:[r3,OE],93:Gf,95:Yf,96:jP}},Symbol.toStringTag,{value:"Module"}));function X3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],l=[];const d={attempt:Y(q),check:Y(R),consume:A,enter:C,exit:U,interrupt:Y(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=ir(u,ie),N(),u[u.length-1]!==null?[]:(ne(t,0),f.events=_l(a,f.events,f),f.events)}function T(ie,fe){return Q3(y(ie),fe)}function y(ie){return K3(u,ie)}function w(){const{_bufferIndex:ie,_index:fe,line:ke,column:re,offset:ae}=r;return{_bufferIndex:ie,_index:fe,line:ke,column:re,offset:ae}}function v(ie){o[ie.line]=ie.column,$()}function N(){let ie;for(;r._index<u.length;){const fe=u[r._index];if(typeof fe=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<fe.length;)S(fe.charCodeAt(r._bufferIndex));else S(fe)}}function S(ie){p=p(ie)}function A(ie){He(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,$()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function C(ie,fe){const ke=fe||{};return ke.type=ie,ke.start=w(),f.events.push(["enter",ke,f]),l.push(ke),ke}function U(ie){const fe=l.pop();return fe.end=w(),f.events.push(["exit",fe,f]),fe}function q(ie,fe){ne(ie,fe.from)}function R(ie,fe){fe.restore()}function Y(ie,fe){return ke;function ke(re,ae,Se){let se,J,oe,k;return Array.isArray(re)?Q(re):"tokenize"in re?Q([re]):M(re);function M(ve){return xe;function xe(Pe){const Ye=Pe!==null&&ve[Pe],lt=Pe!==null&&ve.null,un=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return Q(un)(Pe)}}function Q(ve){return se=ve,J=0,ve.length===0?Se:O(ve[J])}function O(ve){return xe;function xe(Pe){return k=me(),oe=ve,ve.partial||(f.currentConstruct=ve),ve.name&&f.parser.constructs.disable.null.includes(ve.name)?Be():ve.tokenize.call(fe?Object.assign(Object.create(f),fe):f,d,_e,Be)(Pe)}}function _e(ve){return ie(oe,k),ae}function Be(ve){return k.restore(),++J<se.length?O(se[J]):Se}}}function ne(ie,fe){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&Yn(f.events,fe,f.events.length-fe,ie.resolve(f.events.slice(fe),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function me(){const ie=w(),fe=f.previous,ke=f.currentConstruct,re=f.events.length,ae=Array.from(l);return{from:re,restore:Se};function Se(){r=ie,f.previous=fe,f.currentConstruct=ke,f.events.length=re,l=ae,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function K3(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function Q3(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
17
+ `+b.stack}return{value:i,source:s,stack:E,digest:null}}function Bm(i,s,c){return{value:i,source:null,stack:c!=null?c:null,digest:s!=null?s:null}}function Um(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var QB=typeof WeakMap=="function"?WeakMap:Map;function s2(i,s,c){c=mi(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){cd||(cd=!0,e0=h),Um(i,s)},c}function a2(i,s,c){c=mi(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;c.payload=function(){return h(E)},c.callback=function(){Um(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){Um(i,s),typeof h!="function"&&($i===null?$i=new Set([this]):$i.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function u2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new QB;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(c)||(E.add(c),i=dU.bind(null,i,s,c),s.then(i,i))}function l2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function c2(i,s,c,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=mi(-1,1),s.tag=2,zi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var JB=U.ReactCurrentOwner,Hn=!1;function Pn(i,s,c,h){s.child=i===null?Px(s,null,c,h):zs(s,i.child,c,h)}function d2(i,s,c,h,E){c=c.render;var b=s.ref;return $s(s,E),h=Pm(i,s,c,h,b,E),c=Om(),i!==null&&!Hn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(At&&c&&hm(s),s.flags|=1,Pn(i,s,h,E),s.child)}function f2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!a0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,h2(i,s,b,h,E)):(i=gd(c.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(c=c.compare,c=c!==null?c:bu,c(x,h)&&i.ref===s.ref)return gi(i,s,E)}return s.flags|=1,i=Wi(b,h),i.ref=s.ref,i.return=s,s.child=i}function h2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(bu(b,h)&&i.ref===s.ref)if(Hn=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return s.lanes=i.lanes,gi(i,s,E)}return Hm(i,s,c,h,E)}function p2(i,s,c){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(Ws,Zn),Zn|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Tt(Ws,Zn),Zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(Ws,Zn),Zn|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(Ws,Zn),Zn|=h;return Pn(i,s,E,c),s.child}function m2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Hm(i,s,c,h,E){var b=Un(c)?ko:Sn.current;return b=Fs(s,b),$s(s,E),c=Pm(i,s,c,h,b,E),h=Om(),i!==null&&!Hn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(At&&h&&hm(s),s.flags|=1,Pn(i,s,c,E),s.child)}function g2(i,s,c,h,E){if(Un(c)){var b=!0;zc(s)}else b=!1;if($s(s,E),s.stateNode===null)od(i,s),i2(s,c,h),Fm(s,c,h,E),h=!0;else if(i===null){var x=s.stateNode,L=s.memoizedProps;x.props=L;var z=x.context,ee=c.contextType;typeof ee=="object"&&ee!==null?ee=lr(ee):(ee=Un(c)?ko:Sn.current,ee=Fs(s,ee));var ce=c.getDerivedStateFromProps,pe=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==h||z!==ee)&&o2(s,x,h,ee),Hi=!1;var ue=s.memoizedState;x.state=ue,Kc(s,h,x,E),z=s.memoizedState,L!==h||ue!==z||Bn.current||Hi?(typeof ce=="function"&&(Mm(s,c,ce,h),z=s.memoizedState),(L=Hi||r2(s,c,L,h,ue,z,ee))?(pe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=z),x.props=h,x.state=z,x.context=ee,h=L):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,Ix(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:xr(s.type,L),x.props=ee,pe=s.pendingProps,ue=x.context,z=c.contextType,typeof z=="object"&&z!==null?z=lr(z):(z=Un(c)?ko:Sn.current,z=Fs(s,z));var Ae=c.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==pe||ue!==z)&&o2(s,x,h,z),Hi=!1,ue=s.memoizedState,x.state=ue,Kc(s,h,x,E);var Oe=s.memoizedState;L!==pe||ue!==Oe||Bn.current||Hi?(typeof Ae=="function"&&(Mm(s,c,Ae,h),Oe=s.memoizedState),(ee=Hi||r2(s,c,ee,h,ue,Oe,z)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Oe,z),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Oe,z)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Oe),x.props=h,x.state=Oe,x.context=z,h=ee):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),h=!1)}return zm(i,s,c,h,b,E)}function zm(i,s,c,h,E,b){m2(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&wx(s,c,!1),gi(i,s,b);h=s.stateNode,JB.current=s;var L=x&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=zs(s,i.child,null,b),s.child=zs(s,null,L,b)):Pn(i,s,L,b),s.memoizedState=h.state,E&&wx(s,c,!0),s.child}function E2(i){var s=i.stateNode;s.pendingContext?bx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&bx(i,s.context,!1),Sm(i,s.containerInfo)}function y2(i,s,c,h,E){return Hs(),Em(E),s.flags|=256,Pn(i,s,c,h),s.child}var jm={dehydrated:null,treeContext:null,retryLane:0};function $m(i){return{baseLanes:i,cachePool:null,transitions:null}}function b2(i,s,c){var h=s.pendingProps,E=Nt.current,b=!1,x=(s.flags&128)!==0,L;if((L=x)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Nt,E&1),i===null)return gm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=s.mode,b=s.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=Ed(x,h,0,null),i=Bo(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=$m(c),s.memoizedState=jm,i):Vm(s,x));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return ZB(i,s,x,h,L,E,c);if(b){b=h.fallback,x=s.mode,E=i.child,L=E.sibling;var z={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=z,s.deletions=null):(h=Wi(E,z),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Wi(L,b):(b=Bo(b,x,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,x=i.child.memoizedState,x=x===null?$m(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~c,s.memoizedState=jm,h}return b=i.child,i=b.sibling,h=Wi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=c),h.return=s,h.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=h,s.memoizedState=null,h}function Vm(i,s){return s=Ed({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function id(i,s,c,h){return h!==null&&Em(h),zs(s,i.child,null,c),i=Vm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function ZB(i,s,c,h,E,b,x){if(c)return s.flags&256?(s.flags&=-257,h=Bm(Error(n(422))),id(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=Ed({mode:"visible",children:h.children},E,0,null),b=Bo(b,E,x,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&zs(s,i.child,null,x),s.child.memoizedState=$m(x),s.memoizedState=jm,b);if((s.mode&1)===0)return id(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=Bm(b,h,void 0),id(i,s,x,h)}if(L=(x&i.childLanes)!==0,Hn||L){if(h=on,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,pi(i,E),Ar(h,i,E,-1))}return s0(),h=Bm(Error(n(421))),id(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=fU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,Jn=Mi(E.nextSibling),Qn=s,At=!0,_r=null,i!==null&&(ar[ur++]=fi,ar[ur++]=hi,ar[ur++]=No,fi=i.id,hi=i.overflow,No=s),s=Vm(s,h.children),s.flags|=4096,s)}function T2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),wm(i.return,s,c)}function qm(i,s,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function w2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(Pn(i,s,h.children,c),h=Nt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&T2(i,c,s);else if(i.tag===19)T2(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Tt(Nt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(c=s.child,E=null;c!==null;)i=c.alternate,i!==null&&Qc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),qm(s,!1,E,c,b);break;case"backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Qc(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}qm(s,!0,c,null,b);break;case"together":qm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function od(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function gi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Lo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Wi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Wi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function eU(i,s,c){switch(s.tag){case 3:E2(s),Hs();break;case 5:Dx(s);break;case 1:Un(s.type)&&zc(s);break;case 4:Sm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(Wc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Nt,Nt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?b2(i,s,c):(Tt(Nt,Nt.current&1),i=gi(i,s,c),i!==null?i.sibling:null);Tt(Nt,Nt.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return w2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Nt,Nt.current),h)break;return null;case 22:case 23:return s.lanes=0,p2(i,s,c)}return gi(i,s,c)}var _2,Ym,x2,S2;_2=function(i,s){for(var c=s.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===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Ym=function(){},x2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Io(Wr.current);var b=null;switch(c){case"input":E=kt(i,E),h=kt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=De(i,E),h=De(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Bc)}cn(c,h);var x;c=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var L=E[ee];for(x in L)L.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var z=h[ee];if(L=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&z!==L&&(z!=null||L!=null))if(ee==="style")if(L){for(x in L)!L.hasOwnProperty(x)||z&&z.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in z)z.hasOwnProperty(x)&&L[x]!==z[x]&&(c||(c={}),c[x]=z[x])}else c||(b||(b=[]),b.push(ee,c)),c=z;else ee==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,L=L?L.__html:void 0,z!=null&&L!==z&&(b=b||[]).push(ee,z)):ee==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(ee,""+z):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(z!=null&&ee==="onScroll"&&_t("scroll",i),b||L===z||(b=[])):(b=b||[]).push(ee,z))}c&&(b=b||[]).push("style",c);var ee=b;(s.updateQueue=ee)&&(s.flags|=4)}},S2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Lu(i,s){if(!At)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function An(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function tU(i,s,c){var h=s.pendingProps;switch(pm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(s),null;case 1:return Un(s.type)&&Hc(),An(s),null;case 3:return h=s.stateNode,Vs(),xt(Bn),xt(Sn),Cm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(qc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_r!==null&&(r0(_r),_r=null))),Ym(i,s),An(s),null;case 5:vm(s);var E=Io(Nu.current);if(c=s.type,i!==null&&s.stateNode!=null)x2(i,s,c,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return An(s),null}if(i=Io(Wr.current),qc(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[Yr]=s,h[Su]=b,i=(s.mode&1)!==0,c){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<wu.length;E++)_t(wu[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Gn(h,b),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},_t("invalid",h);break;case"textarea":Fe(h,b),_t("invalid",h)}cn(c,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var L=b[x];x==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(x)&&L!=null&&x==="onScroll"&&_t("scroll",h)}switch(c){case"input":un(h),$e(h,b,!0);break;case"textarea":un(h),mt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Bc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(c,{is:h.is}):(i=x.createElement(c),c==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,c),i[Yr]=s,i[Su]=h,_2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vr(c,h),c){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<wu.length;E++)_t(wu[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Gn(i,h),E=kt(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Fe(i,h),E=De(i,h),_t("invalid",i);break;default:E=h}cn(c,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var z=L[b];b==="style"?ln(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Ve(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Re(i,z):typeof z=="number"&&Re(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?z!=null&&b==="onScroll"&&_t("scroll",i):z!=null&&C(i,b,z,x))}switch(c){case"input":un(i),$e(i,h,!1);break;case"textarea":un(i),mt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Pe(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?we(i,!!h.multiple,b,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Bc)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return An(s),null;case 6:if(i&&s.stateNode!=null)S2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Io(Nu.current),Io(Wr.current),qc(s)){if(h=s.stateNode,c=s.memoizedProps,h[Yr]=s,(b=h.nodeValue!==c)&&(i=Qn,i!==null))switch(i.tag){case 3:Fc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Fc(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Yr]=s,s.stateNode=h}return An(s),null;case 13:if(xt(Nt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Jn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Cx(),Hs(),s.flags|=98560,b=!1;else if(b=qc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Yr]=s}else Hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;An(s),b=!1}else _r!==null&&(r0(_r),_r=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Nt.current&1)!==0?Kt===0&&(Kt=3):s0())),s.updateQueue!==null&&(s.flags|=4),An(s),null);case 4:return Vs(),Ym(i,s),i===null&&_u(s.stateNode.containerInfo),An(s),null;case 10:return Tm(s.type._context),An(s),null;case 17:return Un(s.type)&&Hc(),An(s),null;case 19:if(xt(Nt),b=s.memoizedState,b===null)return An(s),null;if(h=(s.flags&128)!==0,x=b.rendering,x===null)if(h)Lu(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Qc(i),x!==null){for(s.flags|=128,Lu(b,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=c,c=s.child;c!==null;)b=c,i=h,b.flags&=14680066,x=b.alternate,x===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Nt,Nt.current&1|2),s.child}i=i.sibling}b.tail!==null&&Dt()>Gs&&(s.flags|=128,h=!0,Lu(b,!1),s.lanes=4194304)}else{if(!h)if(i=Qc(x),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Lu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!At)return An(s),null}else 2*Dt()-b.renderingStartTime>Gs&&c!==1073741824&&(s.flags|=128,h=!0,Lu(b,!1),s.lanes=4194304);b.isBackwards?(x.sibling=s.child,s.child=x):(c=b.last,c!==null?c.sibling=x:s.child=x,b.last=x)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Dt(),s.sibling=null,c=Nt.current,Tt(Nt,h?c&1|2:c&1),s):(An(s),null);case 22:case 23:return o0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Zn&1073741824)!==0&&(An(s),s.subtreeFlags&6&&(s.flags|=8192)):An(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function nU(i,s){switch(pm(s),s.tag){case 1:return Un(s.type)&&Hc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Vs(),xt(Bn),xt(Sn),Cm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return vm(s),null;case 13:if(xt(Nt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Hs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Nt),null;case 4:return Vs(),null;case 10:return Tm(s.type._context),null;case 22:case 23:return o0(),null;case 24:return null;default:return null}}var sd=!1,Cn=!1,rU=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Ys(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){It(i,s,h)}else c.current=null}function Wm(i,s,c){try{c()}catch(h){It(i,s,h)}}var v2=!1;function iU(i,s){if(om=Ac,i=rx(),Qp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ye){c=null;break e}var x=0,L=-1,z=-1,ee=0,ce=0,pe=i,ue=null;t:for(;;){for(var Ae;pe!==c||E!==0&&pe.nodeType!==3||(L=x+E),pe!==b||h!==0&&pe.nodeType!==3||(z=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(Ae=pe.firstChild)!==null;)ue=pe,pe=Ae;for(;;){if(pe===i)break t;if(ue===c&&++ee===E&&(L=x),ue===b&&++ce===h&&(z=x),(Ae=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=Ae}c=L===-1||z===-1?null:{start:L,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(sm={focusedElem:i,selectionRange:c},Ac=!1,Ne=s;Ne!==null;)if(s=Ne,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ne=i;else for(;Ne!==null;){s=Ne;try{var Oe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Oe!==null){var Ie=Oe.memoizedProps,Mt=Oe.memoizedState,G=s.stateNode,$=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:xr(s.type,Ie),Mt);G.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var K=s.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(ye){It(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ne=i;break}Ne=s.return}return Oe=v2,v2=!1,Oe}function Du(i,s,c){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Wm(s,c,b)}E=E.next}while(E!==h)}}function ad(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Gm(i){var s=i.ref;if(s!==null){var c=i.stateNode;i.tag,i=c,typeof s=="function"?s(i):s.current=i}}function A2(i){var s=i.alternate;s!==null&&(i.alternate=null,A2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Yr],delete s[Su],delete s[cm],delete s[HB],delete s[zB])),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 C2(i){return i.tag===5||i.tag===3||i.tag===4}function k2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||C2(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 Xm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Bc));else if(h!==4&&(i=i.child,i!==null))for(Xm(i,s,c),i=i.sibling;i!==null;)Xm(i,s,c),i=i.sibling}function Km(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Km(i,s,c),i=i.sibling;i!==null;)Km(i,s,c),i=i.sibling}var dn=null,Sr=!1;function ji(i,s,c){for(c=c.child;c!==null;)N2(i,s,c),c=c.sibling}function N2(i,s,c){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Tc,c)}catch(L){}switch(c.tag){case 5:Cn||Ys(c,s);case 6:var h=dn,E=Sr;dn=null,ji(i,s,c),dn=h,Sr=E,dn!==null&&(Sr?(i=dn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):dn.removeChild(c.stateNode));break;case 18:dn!==null&&(Sr?(i=dn,c=c.stateNode,i.nodeType===8?lm(i.parentNode,c):i.nodeType===1&&lm(i,c),hu(i)):lm(dn,c.stateNode));break;case 4:h=dn,E=Sr,dn=c.stateNode.containerInfo,Sr=!0,ji(i,s,c),dn=h,Sr=E;break;case 0:case 11:case 14:case 15:if(!Cn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&Wm(c,s,x),E=E.next}while(E!==h)}ji(i,s,c);break;case 1:if(!Cn&&(Ys(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(L){It(c,s,L)}ji(i,s,c);break;case 21:ji(i,s,c);break;case 22:c.mode&1?(Cn=(h=Cn)||c.memoizedState!==null,ji(i,s,c),Cn=h):ji(i,s,c);break;default:ji(i,s,c)}}function P2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new rU),s.forEach(function(h){var E=hU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function vr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,x=s,L=x;e:for(;L!==null;){switch(L.tag){case 5:dn=L.stateNode,Sr=!1;break e;case 3:dn=L.stateNode.containerInfo,Sr=!0;break e;case 4:dn=L.stateNode.containerInfo,Sr=!0;break e}L=L.return}if(dn===null)throw Error(n(160));N2(b,x,E),dn=null,Sr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(ee){It(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)O2(s,i),s=s.sibling}function O2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(s,i),Xr(i),h&4){try{Du(3,i,i.return),ad(3,i)}catch(Ie){It(i,i.return,Ie)}try{Du(5,i,i.return)}catch(Ie){It(i,i.return,Ie)}}break;case 1:vr(s,i),Xr(i),h&512&&c!==null&&Ys(c,c.return);break;case 5:if(vr(s,i),Xr(i),h&512&&c!==null&&Ys(c,c.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){It(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=c!==null?c.memoizedProps:b,L=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&xn(E,b),Vr(L,x);var ee=Vr(L,b);for(x=0;x<z.length;x+=2){var ce=z[x],pe=z[x+1];ce==="style"?ln(E,pe):ce==="dangerouslySetInnerHTML"?Ve(E,pe):ce==="children"?Re(E,pe):C(E,ce,pe,ee)}switch(L){case"input":Wt(E,b);break;case"textarea":Xe(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ae=b.value;Ae!=null?we(E,!!b.multiple,Ae,!1):ue!==!!b.multiple&&(b.defaultValue!=null?we(E,!!b.multiple,b.defaultValue,!0):we(E,!!b.multiple,b.multiple?[]:"",!1))}E[Su]=b}catch(Ie){It(i,i.return,Ie)}}break;case 6:if(vr(s,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){It(i,i.return,Ie)}}break;case 3:if(vr(s,i),Xr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{hu(s.containerInfo)}catch(Ie){It(i,i.return,Ie)}break;case 4:vr(s,i),Xr(i);break;case 13:vr(s,i),Xr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Zm=Dt())),h&4&&P2(i);break;case 22:if(ce=c!==null&&c.memoizedState!==null,i.mode&1?(Cn=(ee=Cn)||ce,vr(s,i),Cn=ee):vr(s,i),Xr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(pe=Ne=ce;Ne!==null;){switch(ue=Ne,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Du(4,ue,ue.return);break;case 1:Ys(ue,ue.return);var Oe=ue.stateNode;if(typeof Oe.componentWillUnmount=="function"){h=ue,c=ue.return;try{s=h,Oe.props=s.memoizedProps,Oe.state=s.memoizedState,Oe.componentWillUnmount()}catch(Ie){It(h,c,Ie)}}break;case 5:Ys(ue,ue.return);break;case 22:if(ue.memoizedState!==null){L2(pe);continue}}Ae!==null?(Ae.return=ue,Ne=Ae):L2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=pe.stateNode,z=pe.memoizedProps.style,x=z!=null&&z.hasOwnProperty("display")?z.display:null,L.style.display=$t("display",x))}catch(Ie){It(i,i.return,Ie)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Ie){It(i,i.return,Ie)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:vr(s,i),Xr(i),h&4&&P2(i);break;case 21:break;default:vr(s,i),Xr(i)}}function Xr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(C2(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Re(E,""),h.flags&=-33);var b=k2(i);Km(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,L=k2(i);Xm(i,L,x);break;default:throw Error(n(161))}}catch(z){It(i,i.return,z)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function oU(i,s,c){Ne=i,I2(i)}function I2(i,s,c){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||sd;if(!x){var L=E.alternate,z=L!==null&&L.memoizedState!==null||Cn;L=sd;var ee=Cn;if(sd=x,(Cn=z)&&!ee)for(Ne=E;Ne!==null;)x=Ne,z=x.child,x.tag===22&&x.memoizedState!==null?D2(E):z!==null?(z.return=x,Ne=z):D2(E);for(;b!==null;)Ne=b,I2(b),b=b.sibling;Ne=E,sd=L,Cn=ee}R2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):R2(i)}}function R2(i){for(;Ne!==null;){var s=Ne;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Cn||ad(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Cn)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:xr(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Lx(s,b,h);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Lx(s,x,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var z=s.memoizedProps;switch(s.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(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var ce=ee.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&hu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Cn||s.flags&512&&Gm(s)}catch(ue){It(s,s.return,ue)}}if(s===i){Ne=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function L2(i){for(;Ne!==null;){var s=Ne;if(s===i){Ne=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function D2(i){for(;Ne!==null;){var s=Ne;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{ad(4,s)}catch(z){It(s,c,z)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(z){It(s,E,z)}}var b=s.return;try{Gm(s)}catch(z){It(s,b,z)}break;case 5:var x=s.return;try{Gm(s)}catch(z){It(s,x,z)}}}catch(z){It(s,s.return,z)}if(s===i){Ne=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Ne=L;break}Ne=s.return}}var sU=Math.ceil,ud=U.ReactCurrentDispatcher,Qm=U.ReactCurrentOwner,dr=U.ReactCurrentBatchConfig,it=0,on=null,Vt=null,fn=0,Zn=0,Ws=Fi(0),Kt=0,Mu=null,Lo=0,ld=0,Jm=0,Fu=null,zn=null,Zm=0,Gs=1/0,Ei=null,cd=!1,e0=null,$i=null,dd=!1,Vi=null,fd=0,Bu=0,t0=null,hd=-1,pd=0;function On(){return(it&6)!==0?Dt():hd!==-1?hd:hd=Dt()}function qi(i){return(i.mode&1)===0?1:(it&2)!==0&&fn!==0?fn&-fn:$B.transition!==null?(pd===0&&(pd=k_()),pd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:F_(i.type)),i)}function Ar(i,s,c,h){if(50<Bu)throw Bu=0,t0=null,Error(n(185));uu(i,c,h),((it&2)===0||i!==on)&&(i===on&&((it&2)===0&&(ld|=c),Kt===4&&Yi(i,fn)),jn(i,h),c===1&&it===0&&(s.mode&1)===0&&(Gs=Dt()+500,jc&&Ui()))}function jn(i,s){var c=i.callbackNode;$7(i,s);var h=xc(i,i===on?fn:0);if(h===0)c!==null&&v_(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&v_(c),s===1)i.tag===0?jB(F2.bind(null,i)):_x(F2.bind(null,i)),BB(function(){(it&6)===0&&Ui()}),c=null;else{switch(N_(h)){case 1:c=Lp;break;case 4:c=A_;break;case 16:c=bc;break;case 536870912:c=C_;break;default:c=bc}c=q2(c,M2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function M2(i,s){if(hd=-1,pd=0,(it&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Xs()&&i.callbackNode!==c)return null;var h=xc(i,i===on?fn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=md(i,h);else{s=h;var E=it;it|=2;var b=U2();(on!==i||fn!==s)&&(Ei=null,Gs=Dt()+500,Mo(i,s));do try{lU();break}catch(L){B2(i,L)}while(!0);bm(),ud.current=b,it=E,Vt!==null?s=0:(on=null,fn=0,s=Kt)}if(s!==0){if(s===2&&(E=Dp(i),E!==0&&(h=E,s=n0(i,E))),s===1)throw c=Mu,Mo(i,0),Yi(i,h),jn(i,Dt()),c;if(s===6)Yi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!aU(E)&&(s=md(i,h),s===2&&(b=Dp(i),b!==0&&(h=b,s=n0(i,b))),s===1))throw c=Mu,Mo(i,0),Yi(i,h),jn(i,Dt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Fo(i,zn,Ei);break;case 3:if(Yi(i,h),(h&130023424)===h&&(s=Zm+500-Dt(),10<s)){if(xc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){On(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=um(Fo.bind(null,i,zn,Ei),s);break}Fo(i,zn,Ei);break;case 4:if(Yi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-Tr(h);b=1<<x,x=s[x],x>E&&(E=x),h&=~b}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*sU(h/1960))-h,10<h){i.timeoutHandle=um(Fo.bind(null,i,zn,Ei),h);break}Fo(i,zn,Ei);break;case 5:Fo(i,zn,Ei);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===c?M2.bind(null,i):null}function n0(i,s){var c=Fu;return i.current.memoizedState.isDehydrated&&(Mo(i,s).flags|=256),i=md(i,s),i!==2&&(s=zn,zn=c,s!==null&&r0(s)),i}function r0(i){zn===null?zn=i:zn.push.apply(zn,i)}function aU(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!wr(b(),E))return!1}catch(x){return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Yi(i,s){for(s&=~Jm,s&=~ld,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Tr(s),h=1<<c;i[c]=-1,s&=~h}}function F2(i){if((it&6)!==0)throw Error(n(327));Xs();var s=xc(i,0);if((s&1)===0)return jn(i,Dt()),null;var c=md(i,s);if(i.tag!==0&&c===2){var h=Dp(i);h!==0&&(s=h,c=n0(i,h))}if(c===1)throw c=Mu,Mo(i,0),Yi(i,s),jn(i,Dt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Fo(i,zn,Ei),jn(i,Dt()),null}function i0(i,s){var c=it;it|=1;try{return i(s)}finally{it=c,it===0&&(Gs=Dt()+500,jc&&Ui())}}function Do(i){Vi!==null&&Vi.tag===0&&(it&6)===0&&Xs();var s=it;it|=1;var c=dr.transition,h=dt;try{if(dr.transition=null,dt=1,i)return i()}finally{dt=h,dr.transition=c,it=s,(it&6)===0&&Ui()}}function o0(){Zn=Ws.current,xt(Ws)}function Mo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,FB(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(pm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Hc();break;case 3:Vs(),xt(Bn),xt(Sn),Cm();break;case 5:vm(h);break;case 4:Vs();break;case 13:xt(Nt);break;case 19:xt(Nt);break;case 10:Tm(h.type._context);break;case 22:case 23:o0()}c=c.return}if(on=i,Vt=i=Wi(i.current,null),fn=Zn=s,Kt=0,Mu=null,Jm=ld=Lo=0,zn=Fu=null,Oo!==null){for(s=0;s<Oo.length;s++)if(c=Oo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}c.pending=h}Oo=null}return i}function B2(i,s){do{var c=Vt;try{if(bm(),Jc.current=nd,Zc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Zc=!1}if(Ro=0,rn=Xt=Pt=null,Pu=!1,Ou=0,Qm.current=null,c===null||c.return===null){Kt=1,Mu=s,Vt=null;break}e:{var b=i,x=c.return,L=c,z=s;if(s=fn,L.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var ee=z,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=l2(x);if(Ae!==null){Ae.flags&=-257,c2(Ae,x,L,b,s),Ae.mode&1&&u2(b,ee,s),s=Ae,z=ee;var Oe=s.updateQueue;if(Oe===null){var Ie=new Set;Ie.add(z),s.updateQueue=Ie}else Oe.add(z);break e}else{if((s&1)===0){u2(b,ee,s),s0();break e}z=Error(n(426))}}else if(At&&L.mode&1){var Mt=l2(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),c2(Mt,x,L,b,s),Em(qs(z,L));break e}}b=z=qs(z,L),Kt!==4&&(Kt=2),Fu===null?Fu=[b]:Fu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=s2(b,z,s);Rx(b,G);break e;case 1:L=z;var $=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&($i===null||!$i.has(K)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=a2(b,L,s);Rx(b,ye);break e}}b=b.return}while(b!==null)}z2(c)}catch(Me){s=Me,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function U2(){var i=ud.current;return ud.current=nd,i===null?nd:i}function s0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),on===null||(Lo&268435455)===0&&(ld&268435455)===0||Yi(on,fn)}function md(i,s){var c=it;it|=2;var h=U2();(on!==i||fn!==s)&&(Ei=null,Mo(i,s));do try{uU();break}catch(E){B2(i,E)}while(!0);if(bm(),it=c,ud.current=h,Vt!==null)throw Error(n(261));return on=null,fn=0,Kt}function uU(){for(;Vt!==null;)H2(Vt)}function lU(){for(;Vt!==null&&!L7();)H2(Vt)}function H2(i){var s=V2(i.alternate,i,Zn);i.memoizedProps=i.pendingProps,s===null?z2(i):Vt=s,Qm.current=null}function z2(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=tU(c,s,Zn),c!==null){Vt=c;return}}else{if(c=nU(c,s),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,Vt=null;return}}if(s=s.sibling,s!==null){Vt=s;return}Vt=s=i}while(s!==null);Kt===0&&(Kt=5)}function Fo(i,s,c){var h=dt,E=dr.transition;try{dr.transition=null,dt=1,cU(i,s,c,h)}finally{dr.transition=E,dt=h}return null}function cU(i,s,c,h){do Xs();while(Vi!==null);if((it&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(V7(i,b),i===on&&(Vt=on=null,fn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||dd||(dd=!0,q2(bc,function(){return Xs(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=dr.transition,dr.transition=null;var x=dt;dt=1;var L=it;it|=4,Qm.current=null,iU(i,c),O2(c,i),PB(sm),Ac=!!om,sm=om=null,i.current=c,oU(c),D7(),it=L,dt=x,dr.transition=b}else i.current=c;if(dd&&(dd=!1,Vi=i,fd=E),b=i.pendingLanes,b===0&&($i=null),B7(c.stateNode),jn(i,Dt()),s!==null)for(h=i.onRecoverableError,c=0;c<s.length;c++)E=s[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(cd)throw cd=!1,i=e0,e0=null,i;return(fd&1)!==0&&i.tag!==0&&Xs(),b=i.pendingLanes,(b&1)!==0?i===t0?Bu++:(Bu=0,t0=i):Bu=0,Ui(),null}function Xs(){if(Vi!==null){var i=N_(fd),s=dr.transition,c=dt;try{if(dr.transition=null,dt=16>i?16:i,Vi===null)var h=!1;else{if(i=Vi,Vi=null,fd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var b=Ne,x=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var z=0;z<L.length;z++){var ee=L[z];for(Ne=ee;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Du(8,ce,b)}var pe=ce.child;if(pe!==null)pe.return=ce,Ne=pe;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,Ae=ce.return;if(A2(ce),ce===ee){Ne=null;break}if(ue!==null){ue.return=Ae,Ne=ue;break}Ne=Ae}}}var Oe=b.alternate;if(Oe!==null){var Ie=Oe.child;if(Ie!==null){Oe.child=null;do{var Mt=Ie.sibling;Ie.sibling=null,Ie=Mt}while(Ie!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,Ne=x;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Du(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var $=i.current;for(Ne=$;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=$;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:ad(9,L)}}catch(Me){It(L,L.return,Me)}if(L===x){Ne=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Ne=ye;break e}Ne=L.return}}if(it=E,Ui(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Tc,i)}catch(Me){}h=!0}return h}finally{dt=c,dr.transition=s}}return!1}function j2(i,s,c){s=qs(c,s),s=s2(i,s,1),i=zi(i,s,1),s=On(),i!==null&&(uu(i,1,s),jn(i,s))}function It(i,s,c){if(i.tag===3)j2(i,i,c);else for(;s!==null;){if(s.tag===3){j2(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($i===null||!$i.has(h))){i=qs(c,i),i=a2(s,i,1),s=zi(s,i,1),i=On(),s!==null&&(uu(s,1,i),jn(s,i));break}}s=s.return}}function dU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=On(),i.pingedLanes|=i.suspendedLanes&c,on===i&&(fn&c)===c&&(Kt===4||Kt===3&&(fn&130023424)===fn&&500>Dt()-Zm?Mo(i,0):Jm|=c),jn(i,s)}function $2(i,s){s===0&&((i.mode&1)===0?s=1:(s=_c,_c<<=1,(_c&130023424)===0&&(_c=4194304)));var c=On();i=pi(i,s),i!==null&&(uu(i,s,c),jn(i,c))}function fU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),$2(i,c)}function hU(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),$2(i,c)}var V2;V2=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Hn=!1,eU(i,s,c);Hn=(i.flags&131072)!==0}else Hn=!1,At&&(s.flags&1048576)!==0&&xx(s,Vc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;od(i,s),i=s.pendingProps;var E=Fs(s,Sn.current);$s(s,c),E=Pm(null,s,h,i,E,c);var b=Om();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Un(h)?(b=!0,zc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,xm(s),E.updater=rd,s.stateNode=E,E._reactInternals=s,Fm(s,h,i,c),s=zm(null,s,h,!0,b,c)):(s.tag=0,At&&b&&hm(s),Pn(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(od(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=mU(h),i=xr(h,i),E){case 0:s=Hm(null,s,h,i,c);break e;case 1:s=g2(null,s,h,i,c);break e;case 11:s=d2(null,s,h,i,c);break e;case 14:s=f2(null,s,h,xr(h.type,i),c);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),Hm(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),g2(i,s,h,E,c);case 3:e:{if(E2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Ix(i,s),Kc(s,h,null,c);var x=s.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=qs(Error(n(423)),s),s=y2(i,s,h,c,E);break e}else if(h!==E){E=qs(Error(n(424)),s),s=y2(i,s,h,c,E);break e}else for(Jn=Mi(s.stateNode.containerInfo.firstChild),Qn=s,At=!0,_r=null,c=Px(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Hs(),h===E){s=gi(i,s,c);break e}Pn(i,s,h,c)}s=s.child}return s;case 5:return Dx(s),i===null&&gm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,am(h,E)?x=null:b!==null&&am(h,b)&&(s.flags|=32),m2(i,s),Pn(i,s,x,c),s.child;case 6:return i===null&&gm(s),null;case 13:return b2(i,s,c);case 4:return Sm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=zs(s,null,h,c):Pn(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),d2(i,s,h,E,c);case 7:return Pn(i,s,s.pendingProps,c),s.child;case 8:return Pn(i,s,s.pendingProps.children,c),s.child;case 12:return Pn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,x=E.value,Tt(Wc,h._currentValue),h._currentValue=x,b!==null)if(wr(b.value,x)){if(b.children===E.children&&!Bn.current){s=gi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){x=b.child;for(var z=L.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=mi(-1,c&-c),z.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var ce=ee.pending;ce===null?z.next=z:(z.next=ce.next,ce.next=z),ee.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),wm(b.return,c,s),L.lanes|=c;break}z=z.next}}else if(b.tag===10)x=b.type===s.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=c,L=x.alternate,L!==null&&(L.lanes|=c),wm(x,c,s),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===s){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}Pn(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,$s(s,c),E=lr(E),h=h(E),s.flags|=1,Pn(i,s,h,c),s.child;case 14:return h=s.type,E=xr(h,s.pendingProps),E=xr(h.type,E),f2(i,s,h,E,c);case 15:return h2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:xr(h,E),od(i,s),s.tag=1,Un(h)?(i=!0,zc(s)):i=!1,$s(s,c),i2(s,h,E),Fm(s,h,E,c),zm(null,s,h,!0,i,c);case 19:return w2(i,s,c);case 22:return p2(i,s,c)}throw Error(n(156,s.tag))};function q2(i,s){return S_(i,s)}function pU(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(i,s,c,h){return new pU(i,s,c,h)}function a0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function mU(i){if(typeof i=="function")return a0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===ae)return 14}return 2}function Wi(i,s){var c=i.alternate;return c===null?(c=fr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,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,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function gd(i,s,c,h,E,b){var x=2;if(h=i,typeof i=="function")a0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Bo(c.children,E,b,s);case re:x=8,E|=8;break;case de:return i=fr(12,c,s,E|2),i.elementType=de,i.lanes=b,i;case ke:return i=fr(13,c,s,E),i.elementType=ke,i.lanes=b,i;case ne:return i=fr(19,c,s,E),i.elementType=ne,i.lanes=b,i;case se:return Ed(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case Y:x=10;break e;case ie:x=9;break e;case he:x=11;break e;case ae:x=14;break e;case Se:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=fr(x,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Bo(i,s,c,h){return i=fr(7,i,h,s),i.lanes=c,i}function Ed(i,s,c,h){return i=fr(22,i,h,s),i.elementType=se,i.lanes=c,i.stateNode={isHidden:!1},i}function u0(i,s,c){return i=fr(6,i,null,s),i.lanes=c,i}function l0(i,s,c){return s=fr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function gU(i,s,c,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mp(0),this.expirationTimes=Mp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function c0(i,s,c,h,E,b,x,L,z){return i=new gU(i,s,c,L,z),s===1?(s=1,b===!0&&(s|=8)):s=0,b=fr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},xm(b),i}function EU(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function Y2(i){if(!i)return Bi;i=i._reactInternals;e:{if(Ao(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Un(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Un(c))return Tx(i,c,s)}return s}function W2(i,s,c,h,E,b,x,L,z){return i=c0(c,h,!0,i,E,b,x,L,z),i.context=Y2(null),c=i.current,h=On(),E=qi(c),b=mi(h,E),b.callback=s!=null?s:null,zi(c,b,E),i.current.lanes=E,uu(i,E,h),jn(i,h),i}function yd(i,s,c,h){var E=s.current,b=On(),x=qi(E);return c=Y2(c),s.context===null?s.context=c:s.pendingContext=c,s=mi(b,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=zi(E,s,x),i!==null&&(Ar(i,E,x,b),Xc(i,E,x)),x}function bd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function G2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function d0(i,s){G2(i,s),(i=i.alternate)&&G2(i,s)}function yU(){return null}var X2=typeof reportError=="function"?reportError:function(i){console.error(i)};function f0(i){this._internalRoot=i}Td.prototype.render=f0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));yd(i,s,null,null)},Td.prototype.unmount=f0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Do(function(){yd(null,i,null,null)}),s[ci]=null}};function Td(i){this._internalRoot=i}Td.prototype.unstable_scheduleHydration=function(i){if(i){var s=I_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ri.length&&s!==0&&s<Ri[c].priority;c++);Ri.splice(c,0,i),c===0&&D_(i)}};function h0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function K2(){}function bU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=bd(x);b.call(ee)}}var x=W2(s,h,i,0,null,!1,!1,"",K2);return i._reactRootContainer=x,i[ci]=x.current,_u(i.nodeType===8?i.parentNode:i),Do(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var ee=bd(z);L.call(ee)}}var z=c0(i,0,!1,null,null,!1,!1,"",K2);return i._reactRootContainer=z,i[ci]=z.current,_u(i.nodeType===8?i.parentNode:i),Do(function(){yd(s,z,c,h)}),z}function _d(i,s,c,h,E){var b=c._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var L=E;E=function(){var z=bd(x);L.call(z)}}yd(s,x,i,E)}else x=bU(c,s,i,E,h);return bd(x)}P_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=au(s.pendingLanes);c!==0&&(Fp(s,c|1),jn(s,Dt()),(it&6)===0&&(Gs=Dt()+500,Ui()))}break;case 13:Do(function(){var h=pi(i,1);if(h!==null){var E=On();Ar(h,i,1,E)}}),d0(i,1)}},Bp=function(i){if(i.tag===13){var s=pi(i,134217728);if(s!==null){var c=On();Ar(s,i,134217728,c)}d0(i,134217728)}},O_=function(i){if(i.tag===13){var s=qi(i),c=pi(i,s);if(c!==null){var h=On();Ar(c,i,s,h)}d0(i,s)}},I_=function(){return dt},R_=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Pp=function(i,s,c){switch(s){case"input":if(Wt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var E=Uc(h);if(!E)throw Error(n(90));Ot(h),Wt(h,E)}}}break;case"textarea":Xe(i,c);break;case"select":s=c.value,s!=null&&we(i,!!c.multiple,s,!1)}},E_=i0,y_=Do;var TU={usingClientEntryPoint:!1,Events:[vu,Ds,Uc,m_,g_,i0]},Uu={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wU={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.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=__(i),i===null?null:i.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||yU,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 xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{Tc=xd.inject(wU),qr=xd}catch(i){}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=TU,Rn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h0(s))throw Error(n(200));return EU(i,s,null,c)},Rn.createRoot=function(i,s){if(!h0(i))throw Error(n(299));var c=!1,h="",E=X2;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=c0(i,1,!1,null,null,c,!1,h,E),i[ci]=s.current,_u(i.nodeType===8?i.parentNode:i),new f0(s)},Rn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=__(s),i=i===null?null:i.stateNode,i},Rn.flushSync=function(i){return Do(i)},Rn.hydrate=function(i,s,c){if(!wd(s))throw Error(n(200));return _d(null,i,s,!0,c)},Rn.hydrateRoot=function(i,s,c){if(!h0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",x=X2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=W2(s,null,i,1,c!=null?c:null,E,!1,b,x),i[ci]=s.current,_u(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,E]:s.mutableSourceEagerHydrationData.push(c,E);return new Td(s)},Rn.render=function(i,s,c){if(!wd(s))throw Error(n(200));return _d(null,i,s,!1,c)},Rn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(Do(function(){_d(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},Rn.unstable_batchedUpdates=i0,Rn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!wd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return _d(i,s,c,!1,h)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var B1;function U1(){if(B1)return kf.exports;B1=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(),kf.exports=tN(),kf.exports}var Ko=U1();function H1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=H1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=H1(e))&&(r&&(r+=" "),r+=t);return r}const nN=()=>document.querySelector(`input[name="${H}-user-input"]:not(:disabled)`),Of=()=>{var e;return(e=nN())!=null?e:document.querySelector(`.${H}-dialog-content, .${H}-modal-content`)},rN=()=>{var e;return(e=Of())==null?void 0:e.focus({preventScroll:!0})},If=()=>{const e=()=>{const n=document.querySelector(`.${H}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var z1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},j1=Ki.createContext&&Ki.createContext(z1),iN=["attr","size","title"];function oN(e,t){if(e==null)return{};var n=sN(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sN(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 ml(){return ml=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},ml.apply(this,arguments)}function $1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$1(Object(n),!0).forEach(function(r){aN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aN(e,t,n){return t=uN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=lN(e,"string");return typeof t=="symbol"?t:t+""}function lN(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 V1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,gl({key:n},t.attr),V1(t.child)))}function ft(e){return t=>Ki.createElement(cN,ml({attr:gl({},e.attr)},t),V1(e.child))}function cN(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=oN(e,iN),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",ml({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:gl(gl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return j1!==void 0?Ki.createElement(j1.Consumer,null,n=>t(n)):t(z1)}function dN(e){return ft({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ri=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:W(e,`${H}-icon-button`),type:r,"aria-label":o,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:W(`${H}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),fN="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",hN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=tt(),a=o==="messaging",l=r||(a?"Open Commerce Client":"Open Copilot"),d=a?_.jsx(dN,{className:W(t,`${H}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||fN,alt:"Copilot",className:W(t,`${H}-minimized-icon-img`)});return _.jsx(ri,{className:W(t,`${H}-minimized-button`),ariaLabel:l,title:l,icon:d,onClick:e})},pN=()=>{const{globalClassName:e,themeVariables:t,layoutPreset:n}=tt(),r=()=>{Ea(!1),ti(!0),setTimeout(rN)};return Ko.createPortal(_.jsx("div",{className:W(e,`${H}-minimized-container`,`${H}-layout-${n}`),style:t,children:_.jsx(hN,{onClick:r})}),document.body)},mN=e=>({[`${$n}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${$n}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${$n}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${$n}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${$n}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${$n}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),Rf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:W(e,`${H}-close-button`),disabled:r,onClick:n,type:"button",children:_.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),gN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const o=e.name||"",[a,u]=F.useState("");return F.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),_.jsxs("div",{className:W(n,`cim-${t}-component`,`${H}-image-file-preview`),children:[_.jsx("img",{className:W(n,`cim-${t}-component`,`${H}-image-preview`),src:a,alt:`${o} preview`,loading:"lazy"}),_.jsx("span",{className:W(n,`cim-${t}-component`,`${H}-image-file-name`),title:o,children:o}),_.jsx(Rf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function q1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function Y1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Qo(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function EN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function W1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function G1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function yN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function bN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function TN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function wN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function _N(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function xN(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const SN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=_.jsx(xN,{}),onFiles:l})=>{const d=F.useRef(null),f=F.useId(),p=r!=null?r:f,m=F.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=F.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return _.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${H}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[_.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${H}-image-upload-label`),"aria-hidden":"true",children:u}),_.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${H}-file-input`),type:"file",id:p,accept:t,name:`${H}-file-input`,disabled:n,onInput:T})]})},El=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>_.jsx("button",{"aria-label":a,className:W(`${H}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),vN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?G1:Qo;return n?_.jsx("img",{className:W(`${H}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(r,{size:"16px"})},AN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?G1:Qo;return _.jsx(ri,{className:W(e,n,`cim-${r}-component`,`${H}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(El,{className:W(e,n,`cim-${r}-component`,`${H}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(vN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function CN(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const kN=()=>{const{messages:e}=Vn(),{handleCancel:t}=Or();return{cancelRequest:F.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},NN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=kN();return n!=null&&n.enableCancelSearch?_.jsx(ri,{className:W(t,`${H}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:_.jsx(CN,{}),disabled:!e,onClick:r}):null};function nH(){}function rH(){}function X1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function K1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const PN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ON=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IN={};function Q1(e,t){return(IN.jsx?ON:PN).test(e)}const RN=/[ \t\n\f\r]/g;function LN(e){return typeof e=="object"?e.type==="text"?J1(e.value):!1:J1(e)}function J1(e){return e.replace(RN,"")===""}class wa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wa.prototype.normal={},wa.prototype.property={},wa.prototype.space=void 0;function Z1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new wa(n,r,t)}function _a(e){return e.toLowerCase()}class Ln{constructor(t,n){this.attribute=n,this.property=t}}Ln.prototype.attribute="",Ln.prototype.booleanish=!1,Ln.prototype.boolean=!1,Ln.prototype.commaOrSpaceSeparated=!1,Ln.prototype.commaSeparated=!1,Ln.prototype.defined=!1,Ln.prototype.mustUseProperty=!1,Ln.prototype.number=!1,Ln.prototype.overloadedBoolean=!1,Ln.prototype.property="",Ln.prototype.spaceSeparated=!1,Ln.prototype.space=void 0;let DN=0;const Ge=ao(),Ht=ao(),Lf=ao(),Ee=ao(),ht=ao(),so=ao(),qn=ao();function ao(){return Hu(2,++DN)}const Df=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ht,commaOrSpaceSeparated:qn,commaSeparated:so,number:Ee,overloadedBoolean:Lf,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Mf=Object.keys(Df);class Ff extends Ln{constructor(t,n,r,o){let a=-1;if(super(t,n),eE(this,"space",o),typeof r=="number")for(;++a<Mf.length;){const u=Mf[a];eE(this,Mf[a],(r&Df[u])===Df[u])}}}Ff.prototype.defined=!0;function eE(e,t,n){n&&(e[t]=n)}function Jo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Ff(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[_a(r)]=r,n[_a(a.attribute)]=r}return new wa(t,n,e.space)}const tE=Jo({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:ht,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:Ee,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:ht,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ht,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nE(e,t){return t in e?e[t]:t}function rE(e,t){return nE(e,t.toLowerCase())}const MN=Jo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:so,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:ht,autoFocus:Ge,autoPlay:Ge,blocking:ht,capture:null,charSet:null,checked:Ge,cite:null,className:ht,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ht,controls:Ge,controlsList:ht,coords:Ee|so,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Lf,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:ht,height:Ee,hidden:Lf,high:Ee,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ge,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:Ee,pattern:null,ping:ht,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:ht,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:ht,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ht,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:so,part:ht,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:rE}),FN=Jo({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:qn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:so,g2:so,glyphName:so,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nE}),iE=Jo({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()}}),oE=Jo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rE}),sE=Jo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BN={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"},UN=/[A-Z]/g,aE=/-[a-z]/g,HN=/^data[-\w.:]+$/i;function yl(e,t){const n=_a(t);let r=t,o=Ln;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(aE,jN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!aE.test(a)){let u=a.replace(UN,zN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Ff}return new o(r,t)}function zN(e){return"-"+e.toLowerCase()}function jN(e){return e.charAt(1).toUpperCase()}const xa=Z1([tE,MN,iE,oE,sE],"html"),Ti=Z1([tE,FN,iE,oE,sE],"svg");function uE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function lE(e){return e.join(" ").trim()}var Zo={},Bf,cE;function $N(){if(cE)return Bf;cE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
18
+ `,f="/",p="*",m="",T="comment",y="declaration";function w(N,S){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];S=S||{};var A=1,C=1;function U(ne){var ae=ne.match(t);ae&&(A+=ae.length);var Se=ne.lastIndexOf(d);C=~Se?ne.length-Se:C+ne.length}function V(){var ne={line:A,column:C};return function(ae){return ae.position=new R(ne),de(),ae}}function R(ne){this.start=ne,this.end={line:A,column:C},this.source=S.source}R.prototype.content=N;function q(ne){var ae=new Error(S.source+":"+A+":"+C+": "+ne);if(ae.reason=ne,ae.filename=S.source,ae.line=A,ae.column=C,ae.source=N,!S.silent)throw ae}function re(ne){var ae=ne.exec(N);if(ae){var Se=ae[0];return U(Se),N=N.slice(Se.length),ae}}function de(){re(n)}function Y(ne){var ae;for(ne=ne||[];ae=ie();)ae!==!1&&ne.push(ae);return ne}function ie(){var ne=V();if(!(f!=N.charAt(0)||p!=N.charAt(1))){for(var ae=2;m!=N.charAt(ae)&&(p!=N.charAt(ae)||f!=N.charAt(ae+1));)++ae;if(ae+=2,m===N.charAt(ae-1))return q("End of comment missing");var Se=N.slice(2,ae-2);return C+=2,U(Se),N=N.slice(ae),C+=2,ne({type:T,comment:Se})}}function he(){var ne=V(),ae=re(r);if(ae){if(ie(),!re(o))return q("property missing ':'");var Se=re(a),se=ne({type:y,property:v(ae[0].replace(e,m)),value:Se?v(Se[0].replace(e,m)):m});return re(u),se}}function ke(){var ne=[];Y(ne);for(var ae;ae=he();)ae!==!1&&(ne.push(ae),Y(ne));return ne}return de(),ke()}function v(N){return N?N.replace(l,m):m}return Bf=w,Bf}var dE;function VN(){if(dE)return Zo;dE=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;const t=e($N());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?o(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Zo}var Sa={},fE;function qN(){if(fE)return Sa;fE=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,l):f=f.replace(r,l),f.replace(t,u))};return Sa.camelCase=d,Sa}var va,hE;function YN(){if(hE)return va;hE=1;var e=va&&va.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(VN()),n=qN();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,va=r,va}var WN=YN();const GN=Ue(WN),bl=pE("end"),Ir=pE("start");function pE(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 mE(e){const t=Ir(e),n=bl(e);if(t&&n)return{start:t,end:n}}function Aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gE(e.position):"start"in e||"end"in e?gE(e):"line"in e||"column"in e?Uf(e):""}function Uf(e){return EE(e&&e.line)+":"+EE(e&&e.column)}function gE(e){return Uf(e&&e.start)+"-"+Uf(e&&e.end)}function EE(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const 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=o,this.line=l?l.line:void 0,this.name=Aa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const Hf={}.hasOwnProperty,XN=new Map,KN=/[A-Z]/g,QN=new Set(["table","tbody","thead","tfoot","tr"]),JN=new Set(["td","th"]),yE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ZN(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=aP(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=sP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ti:xa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=bE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function bE(e,t,n){if(t.type==="element")return eP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rP(e,t,n);if(t.type==="mdxjsEsm")return nP(e,t);if(t.type==="root")return iP(e,t,n);if(t.type==="text")return oP(e,t)}function eP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ti,e.schema=o),e.ancestors.push(t);const a=wE(e,t.tagName,!1),u=uP(e,t);let l=jf(e,t);return QN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!LN(d):!0})),TE(e,u,a,t),zf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function tP(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)}Ca(e,t.position)}function nP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ca(e,t.position)}function rP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ti,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:wE(e,t.name,!0),u=lP(e,t),l=jf(e,t);return TE(e,u,a,t),zf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function iP(e,t,n){const r={};return zf(r,jf(e,t)),e.create(t,e.Fragment,r,n)}function oP(e,t){return t.value}function TE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sP(e,t,n){return r;function r(o,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function aP(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Ir(r);return t(o,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function uP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Hf.call(t.properties,o)){const a=cP(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&JN.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 lP(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 Ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function jf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:XN;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const l=bE(e,a,u);l!==void 0&&n.push(l)}return n}function cP(e,t,n){const r=yl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?K1(n):lE(n)),r.property==="style"){let o=typeof n=="object"?n:dP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=fP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?BN[r.property]||r.property:r.attribute,n]}}function dP(e,t){try{return GN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=yE+"#cannot-parse-style-attribute",o}}function wE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const l=Q1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=Q1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Hf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ca(e)}function Ca(e,t){const n=new bn("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=yE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fP(e){const t={};let n;for(n in e)Hf.call(e,n)&&(t[hP(n)]=e[n]);return t}function hP(e){let t=e.replace(KN,pP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pP(e){return"-"+e.toLowerCase()}const $f={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"]},mP={};function Vf(e,t){const n=mP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _E(e,r,o)}function _E(e,t,n){if(gP(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 xE(e.children,t,n)}return Array.isArray(e)?xE(e,t,n):""}function xE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=_E(e[o],t,n);return r.join("")}function gP(e){return!!(e&&typeof e=="object")}const SE=document.createElement("i");function qf(e){const t="&"+e+";";SE.innerHTML=t;const n=SE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function ir(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const vE={}.hasOwnProperty;function AE(e){const t={};let n=-1;for(;++n<e.length;)EP(t,e[n]);return t}function EP(e,t){let n;for(n in t){const o=(vE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){vE.call(o,u)||(o[u]=[]);const l=a[u];yP(o[u],Array.isArray(l)?l:l?[l]:[])}}}function yP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yn(e,0,0,r)}function CE(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 mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=wi(/[A-Za-z]/),Tn=wi(/[\dA-Za-z]/),bP=wi(/[#-'*+\--9=?A-Z^-~]/);function Tl(e){return e!==null&&(e<32||e===127)}const Yf=wi(/\d/),TP=wi(/[\dA-Fa-f]/),wP=wi(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function pt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const wl=wi(new RegExp("\\p{P}|\\p{S}","u")),uo=wi(/\s/);function wi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function rt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),l(d)):t(d)}function l(d){return Ze(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const _P={tokenize:xP};function xP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),rt(e,t,"linePrefix")}function o(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 SP={tokenize:vP},kE={tokenize:AP};function vP(e){const t=this,n=[];let r=0,o,a,u;return l;function l(C){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const U=t.events.length;let V=U,R;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){R=t.events[V][1].end;break}S(r);let q=U;for(;q<t.events.length;)t.events[q][1].end=B({},R),q++;return Yn(t.events,V+1,0,t.events.slice(U)),t.events.length=q,f(C)}return l(C)}function f(C){if(r===n.length){if(!o)return T(C);if(o.currentConstruct&&o.currentConstruct.concrete)return w(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kE,p,m)(C)}function p(C){return o&&A(),S(r),T(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(C)}function T(C){return t.containerState={},e.attempt(kE,y,w)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),T(C)}function w(C){if(C===null){o&&A(),S(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(C)}function v(C){if(C===null){N(e.exit("chunkFlow"),!0),S(0),e.consume(C);return}return He(C)?(e.consume(C),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(C),v)}function N(C,U){const V=t.sliceStream(C);if(U&&V.push(null),C.previous=a,a&&(a.next=C),a=C,o.defineSkip(C.start),o.write(V),t.parser.lazy[C.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<u&&(!o.events[R][1].end||o.events[R][1].end.offset>u))return;const q=t.events.length;let re=q,de,Y;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(de){Y=t.events[re][1].end;break}de=!0}for(S(r),R=q;R<t.events.length;)t.events[R][1].end=B({},Y),R++;Yn(t.events,re+1,0,t.events.slice(q)),t.events.length=R}}function S(C){let U=n.length;for(;U-- >C;){const V=n[U];t.containerState=V[1],V[0].exit.call(t,e)}n.length=C}function A(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function AP(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||pt(e)||uo(e))return 1;if(wl(e))return 2}function _l(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wf={name:"attention",resolveAll:CP,tokenize:kP};function CP(e,t){let n=-1,r,o,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);NE(m,-d),NE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:B({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},l.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=ir(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ir(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=ir(f,_l(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ir(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=ir(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Yn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=ts(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function NE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const NP={name:"autolink",tokenize:PP};function PP(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Nn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(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||Tn(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||Tl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):bP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const ka={partial:!0,tokenize:OP};function OP(e,t,n){return r;function r(a){return Ze(a)?rt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const PE={continuation:{tokenize:RP},exit:LP,name:"blockQuote",tokenize:IP};function IP(e,t,n){const r=this;return o;function o(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 Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function RP(e,t,n){const r=this;return o;function o(u){return Ze(u)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(PE,t,n)(u)}}function LP(e){e.exit("blockQuote")}const OE={name:"characterEscape",tokenize:DP};function DP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return wP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const IE={name:"characterReference",tokenize:MP};function MP(e,t,n){const r=this;let o=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=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=TP,p):(e.enter("characterReferenceValue"),a=7,u=Yf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!qf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const RE={partial:!0,tokenize:BP},LE={concrete:!0,name:"codeFenced",tokenize:FP};function FP(e,t,n){const r=this,o={partial:!0,tokenize:V};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?rt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||He(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(RE,v,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||He(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||He(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||He(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),w)}function v(R){return e.attempt(o,U,N)(R)}function N(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return a>0&&Ze(R)?rt(e,A,"linePrefix",a+1)(R):A(R)}function A(R){return R===null||He(R)?e.check(RE,v,U)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||He(R)?(e.exit("codeFlowValue"),A(R)):(e.consume(R),C)}function U(R){return e.exit("codeFenced"),t(R)}function V(R,q,re){let de=0;return Y;function Y(ae){return R.enter("lineEnding"),R.consume(ae),R.exit("lineEnding"),ie}function ie(ae){return R.enter("codeFencedFence"),Ze(ae)?rt(R,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):he(ae)}function he(ae){return ae===l?(R.enter("codeFencedFenceSequence"),ke(ae)):re(ae)}function ke(ae){return ae===l?(de++,R.consume(ae),ke):de>=u?(R.exit("codeFencedFenceSequence"),Ze(ae)?rt(R,ne,"whitespace")(ae):ne(ae)):re(ae)}function ne(ae){return ae===null||He(ae)?(R.exit("codeFencedFence"),q(ae)):re(ae)}}}function BP(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Gf={name:"codeIndented",tokenize:HP},UP={partial:!0,tokenize:zP};function HP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(UP,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 zP(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):rt(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)?o(u):n(u)}}const jP={name:"codeText",previous:VP,resolve:$P,tokenize:qP};function $P(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function VP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qP(e,t,n){let r=0,o,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"),o=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class YP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Na(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),Na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Na(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);Na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Na(this.left,n.reverse())}}}function Na(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 DE(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new YP(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return Yn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function WP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,T=-1,y=n,w=0,v=0;const N=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,N.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):N.pop(),T=N.length;T--;){const S=l.slice(N[T],N[T+1]),A=a.pop();d.push([A,A+S.length-1]),e.splice(A,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return f}const GP={resolve:KP,tokenize:QP},XP={partial:!0,tokenize:JP};function KP(e){return DE(e),e}function QP(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):He(l)?e.check(XP,u,a)(l):(e.consume(l),o)}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,o}}function JP(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(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 ME(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Tl(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||He(S)?n(S):(e.consume(S),S===92?w:y)}function w(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||pt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Tl(S)?n(S):(e.consume(S),S===92?N:v)}function N(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function FE(e,t,n,r,o,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function BE(e,t,n,r,o,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||He(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Pa(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?rt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ZP={name:"definition",tokenize:t3},e3={partial:!0,tokenize:n3};function t3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return FE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=mr(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 pt(y)?Pa(e,f)(y):f(y)}function f(y){return ME(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(e3,m,m)(y)}function m(y){return Ze(y)?rt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function n3(e,t,n){return r;function r(l){return pt(l)?Pa(e,o)(l):n(l)}function o(l){return BE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ze(l)?rt(e,u,"whitespace")(l):u(l)}function u(l){return l===null||He(l)?t(l):n(l)}}const r3={name:"hardBreakEscape",tokenize:i3};function i3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const o3={name:"headingAtx",resolve:s3,tokenize:a3};function s3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function a3(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||pt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):Ze(p)?rt(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||pt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const u3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],UE=["pre","script","style","textarea"],l3={concrete:!0,name:"htmlFlow",resolveTo:f3,tokenize:h3},c3={partial:!0,tokenize:m3},d3={partial:!0,tokenize:p3};function f3(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 h3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:k):Nn(O)?(e.consume(O),u=String.fromCharCode(O),N):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,l=0,w):Nn(O)?(e.consume(O),o=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function w(O){const _e="CDATA[";return O===_e.charCodeAt(l++)?(e.consume(O),l===_e.length?r.interrupt?t:he:w):n(O)}function v(O){return Nn(O)?(e.consume(O),u=String.fromCharCode(O),N):n(O)}function N(O){if(O===null||O===47||O===62||pt(O)){const _e=O===47,Be=u.toLowerCase();return!_e&&!a&&UE.includes(Be)?(o=1,r.interrupt?t(O):he(O)):u3.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),S):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?A(O):C(O))}return O===45||Tn(O)?(e.consume(O),u+=String.fromCharCode(O),N):n(O)}function S(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function A(O){return Ze(O)?(e.consume(O),A):Y(O)}function C(O){return O===47?(e.consume(O),Y):O===58||O===95||Nn(O)?(e.consume(O),U):Ze(O)?(e.consume(O),C):Y(O)}function U(O){return O===45||O===46||O===58||O===95||Tn(O)?(e.consume(O),U):V(O)}function V(O){return O===61?(e.consume(O),R):Ze(O)?(e.consume(O),V):C(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,q):Ze(O)?(e.consume(O),R):re(O)}function q(O){return O===d?(e.consume(O),d=null,de):O===null||He(O)?n(O):(e.consume(O),q)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||pt(O)?V(O):(e.consume(O),re)}function de(O){return O===47||O===62||Ze(O)?C(O):n(O)}function Y(O){return O===62?(e.consume(O),ie):n(O)}function ie(O){return O===null||He(O)?he(O):Ze(O)?(e.consume(O),ie):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Se):O===60&&o===1?(e.consume(O),se):O===62&&o===4?(e.consume(O),M):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),oe):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(c3,Q,ke)(O)):O===null||He(O)?(e.exit("htmlFlowData"),ke(O)):(e.consume(O),he)}function ke(O){return e.check(d3,ne,Q)(O)}function ne(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||He(O)?ke(O):(e.enter("htmlFlowData"),he(O))}function Se(O){return O===45?(e.consume(O),k):he(O)}function se(O){return O===47?(e.consume(O),u="",J):he(O)}function J(O){if(O===62){const _e=u.toLowerCase();return UE.includes(_e)?(e.consume(O),M):he(O)}return Nn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),J):he(O)}function oe(O){return O===93?(e.consume(O),k):he(O)}function k(O){return O===62?(e.consume(O),M):O===45&&o===2?(e.consume(O),k):he(O)}function M(O){return O===null||He(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),M)}function Q(O){return e.exit("htmlFlow"),t(O)}}function p3(e,t,n){const r=this;return o;function o(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 m3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ka,t,n)}}const g3={name:"htmlText",tokenize:E3};function E3(e,t,n){const r=this;let o,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),V):k===63?(e.consume(k),C):Nn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Nn(k)?(e.consume(k),A):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):He(k)?(u=m,se(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Se(k):k===45?T(k):m(k)}function w(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),N):He(k)?(u=v,se(k)):(e.consume(k),v)}function N(k){return k===93?(e.consume(k),S):v(k)}function S(k){return k===62?Se(k):k===93?(e.consume(k),S):v(k)}function A(k){return k===null||k===62?Se(k):He(k)?(u=A,se(k)):(e.consume(k),A)}function C(k){return k===null?n(k):k===63?(e.consume(k),U):He(k)?(u=C,se(k)):(e.consume(k),C)}function U(k){return k===62?Se(k):C(k)}function V(k){return Nn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||Tn(k)?(e.consume(k),R):q(k)}function q(k){return He(k)?(u=q,se(k)):Ze(k)?(e.consume(k),q):Se(k)}function re(k){return k===45||Tn(k)?(e.consume(k),re):k===47||k===62||pt(k)?de(k):n(k)}function de(k){return k===47?(e.consume(k),Se):k===58||k===95||Nn(k)?(e.consume(k),Y):He(k)?(u=de,se(k)):Ze(k)?(e.consume(k),de):Se(k)}function Y(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),Y):ie(k)}function ie(k){return k===61?(e.consume(k),he):He(k)?(u=ie,se(k)):Ze(k)?(e.consume(k),ie):de(k)}function he(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,ke):He(k)?(u=he,se(k)):Ze(k)?(e.consume(k),he):(e.consume(k),ne)}function ke(k){return k===o?(e.consume(k),o=void 0,ae):k===null?n(k):He(k)?(u=ke,se(k)):(e.consume(k),ke)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||pt(k)?de(k):(e.consume(k),ne)}function ae(k){return k===47||k===62||pt(k)?de(k):n(k)}function Se(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function se(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?rt(e,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):oe(k)}function oe(k){return e.enter("htmlTextData"),u(k)}}const Xf={name:"labelEnd",resolveAll:w3,resolveTo:_3,tokenize:x3},y3={tokenize:S3},b3={tokenize:v3},T3={tokenize:A3};function w3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function _3(e,t){let n=e.length,r=0,o,a,u,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=ir(l,e.slice(a+1,a+r+3)),l=ir(l,[["enter",p,t]]),l=ir(l,_l(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=ir(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=ir(l,e.slice(u+1)),l=ir(l,[["exit",d,t]]),Yn(e,a,e.length,l),e}function x3(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(mr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(y3,p,u?p:m)(T):T===91?e.attempt(b3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(T3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function S3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return pt(m)?Pa(e,a)(m):a(m)}function a(m){return m===41?p(m):ME(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return pt(m)?Pa(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?BE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return pt(m)?Pa(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function v3(e,t,n){const r=this;return o;function o(l){return FE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function A3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const C3={name:"labelStartImage",resolveAll:Xf.resolveAll,tokenize:k3};function k3(e,t,n){const r=this;return o;function o(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 N3={name:"labelStartLink",resolveAll:Xf.resolveAll,tokenize:P3};function P3(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Kf={name:"lineEnding",tokenize:O3};function O3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const xl={name:"thematicBreak",tokenize:I3};function I3(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,l(f)}function l(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?rt(e,l,"whitespace")(f):l(f))}}const Dn={continuation:{tokenize:M3},exit:B3,name:"list",tokenize:D3},R3={partial:!0,tokenize:U3},L3={partial:!0,tokenize:F3};function D3(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return l;function l(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Yf(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(xl,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 Yf(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(ka,r.interrupt?n:p,e.attempt(R3,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function M3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ka,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ze(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(L3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function F3(e,t,n){const r=this;return rt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function B3(e){e.exit(this.containerState.type)}function U3(e,t,n){const r=this;return rt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const HE={name:"setextUnderline",resolveTo:H3,tokenize:z3};function H3(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function z3(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===o?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ze(f)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const j3={tokenize:$3};function $3(e){const t=this,n=e.attempt(ka,r,e.attempt(this.parser.constructs.flowInitial,o,rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(GP,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const V3={resolveAll:jE()},q3=zE("string"),Y3=zE("text");function zE(e){return{resolveAll:jE(e==="text"?W3:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=o[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function jE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function W3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,l=0,d;for(;a--;){const f=o[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:B({},r.end)};r.end=B({},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 G3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ZP},disable:{null:[]},document:{42:Dn,43:Dn,45:Dn,48:Dn,49:Dn,50:Dn,51:Dn,52:Dn,53:Dn,54:Dn,55:Dn,56:Dn,57:Dn,62:PE},flow:{35:o3,42:xl,45:[HE,xl],60:l3,61:HE,95:xl,96:LE,126:LE},flowInitial:{[-2]:Gf,[-1]:Gf,32:Gf},insideSpan:{null:[Wf,V3]},string:{38:IE,92:OE},text:{[-5]:Kf,[-4]:Kf,[-3]:Kf,33:C3,38:IE,42:Wf,60:[NP,g3],91:N3,92:[r3,OE],93:Xf,95:Wf,96:jP}},Symbol.toStringTag,{value:"Module"}));function X3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],l=[];const d={attempt:q(V),check:q(R),consume:A,enter:C,exit:U,interrupt:q(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=ir(u,ie),N(),u[u.length-1]!==null?[]:(re(t,0),f.events=_l(a,f.events,f),f.events)}function T(ie,he){return Q3(y(ie),he)}function y(ie){return K3(u,ie)}function w(){const{_bufferIndex:ie,_index:he,line:ke,column:ne,offset:ae}=r;return{_bufferIndex:ie,_index:he,line:ke,column:ne,offset:ae}}function v(ie){o[ie.line]=ie.column,Y()}function N(){let ie;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<he.length;)S(he.charCodeAt(r._bufferIndex));else S(he)}}function S(ie){p=p(ie)}function A(ie){He(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,Y()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function C(ie,he){const ke=he||{};return ke.type=ie,ke.start=w(),f.events.push(["enter",ke,f]),l.push(ke),ke}function U(ie){const he=l.pop();return he.end=w(),f.events.push(["exit",he,f]),he}function V(ie,he){re(ie,he.from)}function R(ie,he){he.restore()}function q(ie,he){return ke;function ke(ne,ae,Se){let se,J,oe,k;return Array.isArray(ne)?Q(ne):"tokenize"in ne?Q([ne]):M(ne);function M(ve){return xe;function xe(Pe){const Ye=Pe!==null&&ve[Pe],lt=Pe!==null&&ve.null,un=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return Q(un)(Pe)}}function Q(ve){return se=ve,J=0,ve.length===0?Se:O(ve[J])}function O(ve){return xe;function xe(Pe){return k=de(),oe=ve,ve.partial||(f.currentConstruct=ve),ve.name&&f.parser.constructs.disable.null.includes(ve.name)?Be():ve.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Be)(Pe)}}function _e(ve){return ie(oe,k),ae}function Be(ve){return k.restore(),++J<se.length?O(se[J]):Se}}}function re(ie,he){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&Yn(f.events,he,f.events.length-he,ie.resolve(f.events.slice(he),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function de(){const ie=w(),he=f.previous,ke=f.currentConstruct,ne=f.events.length,ae=Array.from(l);return{from:ne,restore:Se};function Se(){r=ie,f.previous=he,f.currentConstruct=ke,f.events.length=ne,l=ae,Y()}}function Y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function K3(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function Q3(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
19
19
  `;break}case-3:{u=`\r
20
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function J3(e){const r={constructs:AE([G3,...(e||{}).extensions||[]]),content:o(_P),defined:[],document:o(SP),flow:o(j3),lazy:{},string:o(q3),text:o(Y3)};return r;function o(a){return u;function u(l){return X3(r,a,l)}}}function Z3(e){for(;!DE(e););return e}const $E=/[\0\t\n\r]/g;function eO(){let e=1,t="",n=!0,r;return o;function o(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if($E.lastIndex=m,f=$E.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const tO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nO(e){return e.replace(tO,rO)}function rO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return CE(n.slice(a?2:1),a?16:10)}return Vf(n)||e}const VE={}.hasOwnProperty;function iO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),oO(n)(Z3(J3(n).document().write(eO()(e,t,!0))))}function oO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(Gn),blockQuote:a(lt),characterEscape:me,characterReference:me,codeFenced:a(un),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(un,u),codeText:a(Ot,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(zt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(kt),hardBreakEscape:a(xn),hardBreakTrailing:a(xn),htmlFlow:a(Wt,u),htmlFlowData:me,htmlText:a(Wt,u),htmlTextData:me,image:a($e),label:u,link:a(bt),listItem:a(we),listItemValue:T,listOrdered:a(jt,m),listUnordered:a(jt),paragraph:a(De),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Gn),strong:a(Fe),thematicBreak:a(mt)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Pe,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:ve,characterReference:xe,codeFenced:d(N),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:$,codeIndented:d(S),codeText:d(ae),codeTextData:$,data:$,definition:d(),definitionDestinationString:U,definitionLabelString:A,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(fe),hardBreakTrailing:d(fe),htmlFlow:d(ke),htmlFlowData:$,htmlText:d(re),htmlTextData:$,image:d(se),label:oe,labelText:J,lineEnding:ie,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:M,resource:Q,setextHeading:d(ne),setextHeadingLineSequence:Y,setextHeadingText:R,strong:d(),thematicBreak:d()}};qE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ve=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ve.push(Re);else{const ct=Ve.pop();Re=o(Z,ct,Re)}for(Re=-1;++Re<Z.length;){const ct=t[Z[Re][0]];VE.call(ct,Z[Re][1].type)&&ct[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},Ce),Z[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||YE).call(Ce,void 0,ct[0])}for(ge.position={start:_i(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:_i(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)ge=t.transforms[Re](ge)||ge;return ge}function o(Z,ge,Ce){let Ve=ge-1,Re=-1,ct=!1,Gt,$t,ln,$r;for(;++Ve<=Ce;){const cn=Z[Ve];switch(cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cn[0]==="enter"?Re++:Re--,$r=void 0;break}case"lineEndingBlank":{cn[0]==="enter"&&(Gt&&!$r&&!Re&&!ln&&(ln=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Re&&cn[0]==="enter"&&cn[1].type==="listItemPrefix"||Re===-1&&cn[0]==="exit"&&(cn[1].type==="listUnordered"||cn[1].type==="listOrdered")){if(Gt){let Vr=Ve;for($t=void 0;Vr--;){const Xn=Z[Vr];if(Xn[1].type==="lineEnding"||Xn[1].type==="lineEndingBlank"){if(Xn[0]==="exit")continue;$t&&(Z[$t][1].type="lineEndingBlank",ct=!0),Xn[1].type="lineEnding",$t=Vr}else if(!(Xn[1].type==="linePrefix"||Xn[1].type==="blockQuotePrefix"||Xn[1].type==="blockQuotePrefixWhitespace"||Xn[1].type==="blockQuoteMarker"||Xn[1].type==="listItemIndent"))break}ln&&(!$t||ln<$t)&&(Gt._spread=!0),Gt.end=Object.assign({},$t?Z[$t][1].start:cn[1].end),Z.splice($t||Ve,0,["exit",Gt,cn[2]]),Ve++,Ce++}if(cn[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},cn[1].start),end:void 0};Gt=Vr,Z.splice(Ve,0,["enter",Vr,cn[2]]),Ve++,Ce++,ln=void 0,$r=!0}}}return Z[ge][1]._spread=ct,Ce}function a(Z,ge){return Ce;function Ce(Ve){l.call(this,Z(Ve),Ve),ge&&ge.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:_i(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==Z.type&&(ge?ge.call(this,Z,Ve[0]):(Ve[1]||YE).call(this,Z,Ve[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Aa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=_i(Z.end)}function p(){return $f(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function A(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=mr(this.sliceSerialize(Z)).toLowerCase()}function C(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function q(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function Y(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function me(Z){const Ce=this.stack[this.stack.length-1].children;let Ve=Ce[Ce.length-1];(!Ve||Ve.type!=="text")&&(Ve=Xe(),Ve.position={start:_i(Z.start),end:void 0},Ce.push(Ve)),this.stack.push(Ve)}function $(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=_i(Z.end)}function ie(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=_i(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,Z),$.call(this,Z))}function fe(){this.data.atHardBreak=!0}function ke(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function re(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function ae(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function Se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=nO(ge),Ce.identifier=mr(ge).toLowerCase()}function oe(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ve=Z.children;Ce.children=Ve}else Ce.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function M(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=mr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Be(Z){this.data.characterReferenceType=Z.type}function ve(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let Ve;Ce?(Ve=CE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Vf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ve}function xe(Z){const ge=this.stack.pop();ge.position.end=_i(Z.end)}function Pe(Z){$.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ye(Z){$.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function lt(){return{type:"blockquote",children:[]}}function un(){return{type:"code",lang:null,meta:null,value:""}}function Ot(){return{type:"inlineCode",value:""}}function zt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kt(){return{type:"emphasis",children:[]}}function Gn(){return{type:"heading",depth:0,children:[]}}function xn(){return{type:"break"}}function Wt(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function jt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function we(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Fe(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function mt(){return{type:"thematicBreak"}}}function _i(e){return{line:e.line,column:e.column,offset:e.offset}}function qE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?qE(e,r):sO(e,r)}}function sO(e,t){let n;for(n in t)if(VE.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 YE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Aa({start:t.start,end:t.end})+") is still open")}function aO(e){const t=this;t.parser=n;function n(r){return iO(r,pe(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function uO(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 lO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
20
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function J3(e){const r={constructs:AE([G3,...(e||{}).extensions||[]]),content:o(_P),defined:[],document:o(SP),flow:o(j3),lazy:{},string:o(q3),text:o(Y3)};return r;function o(a){return u;function u(l){return X3(r,a,l)}}}function Z3(e){for(;!DE(e););return e}const $E=/[\0\t\n\r]/g;function eO(){let e=1,t="",n=!0,r;return o;function o(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if($E.lastIndex=m,f=$E.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const tO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nO(e){return e.replace(tO,rO)}function rO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return CE(n.slice(a?2:1),a?16:10)}return qf(n)||e}const VE={}.hasOwnProperty;function iO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),oO(n)(Z3(J3(n).document().write(eO()(e,t,!0))))}function oO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Gn),blockQuote:a(lt),characterEscape:de,characterReference:de,codeFenced:a(un),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(un,u),codeText:a(Ot,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(zt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(kt),hardBreakEscape:a(xn),hardBreakTrailing:a(xn),htmlFlow:a(Wt,u),htmlFlowData:de,htmlText:a(Wt,u),htmlTextData:de,image:a($e),label:u,link:a(bt),listItem:a(we),listItemValue:T,listOrdered:a(jt,m),listUnordered:a(jt),paragraph:a(De),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Gn),strong:a(Fe),thematicBreak:a(mt)},exit:{atxHeading:d(),atxHeadingSequence:V,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Pe,blockQuote:d(),characterEscapeValue:Y,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:ve,characterReference:xe,codeFenced:d(N),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:Y,codeIndented:d(S),codeText:d(ae),codeTextData:Y,data:Y,definition:d(),definitionDestinationString:U,definitionLabelString:A,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ke),htmlFlowData:Y,htmlText:d(ne),htmlTextData:Y,image:d(se),label:oe,labelText:J,lineEnding:ie,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:M,resource:Q,setextHeading:d(re),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};qE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ve=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ve.push(Re);else{const ct=Ve.pop();Re=o(Z,ct,Re)}for(Re=-1;++Re<Z.length;){const ct=t[Z[Re][0]];VE.call(ct,Z[Re][1].type)&&ct[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},Ce),Z[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||YE).call(Ce,void 0,ct[0])}for(ge.position={start:_i(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:_i(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)ge=t.transforms[Re](ge)||ge;return ge}function o(Z,ge,Ce){let Ve=ge-1,Re=-1,ct=!1,Gt,$t,ln,$r;for(;++Ve<=Ce;){const cn=Z[Ve];switch(cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cn[0]==="enter"?Re++:Re--,$r=void 0;break}case"lineEndingBlank":{cn[0]==="enter"&&(Gt&&!$r&&!Re&&!ln&&(ln=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Re&&cn[0]==="enter"&&cn[1].type==="listItemPrefix"||Re===-1&&cn[0]==="exit"&&(cn[1].type==="listUnordered"||cn[1].type==="listOrdered")){if(Gt){let Vr=Ve;for($t=void 0;Vr--;){const Xn=Z[Vr];if(Xn[1].type==="lineEnding"||Xn[1].type==="lineEndingBlank"){if(Xn[0]==="exit")continue;$t&&(Z[$t][1].type="lineEndingBlank",ct=!0),Xn[1].type="lineEnding",$t=Vr}else if(!(Xn[1].type==="linePrefix"||Xn[1].type==="blockQuotePrefix"||Xn[1].type==="blockQuotePrefixWhitespace"||Xn[1].type==="blockQuoteMarker"||Xn[1].type==="listItemIndent"))break}ln&&(!$t||ln<$t)&&(Gt._spread=!0),Gt.end=Object.assign({},$t?Z[$t][1].start:cn[1].end),Z.splice($t||Ve,0,["exit",Gt,cn[2]]),Ve++,Ce++}if(cn[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},cn[1].start),end:void 0};Gt=Vr,Z.splice(Ve,0,["enter",Vr,cn[2]]),Ve++,Ce++,ln=void 0,$r=!0}}}return Z[ge][1]._spread=ct,Ce}function a(Z,ge){return Ce;function Ce(Ve){l.call(this,Z(Ve),Ve),ge&&ge.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:_i(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==Z.type&&(ge?ge.call(this,Z,Ve[0]):(Ve[1]||YE).call(this,Z,Ve[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Aa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=_i(Z.end)}function p(){return Vf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function A(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=mr(this.sliceSerialize(Z)).toLowerCase()}function C(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function V(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function q(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function de(Z){const Ce=this.stack[this.stack.length-1].children;let Ve=Ce[Ce.length-1];(!Ve||Ve.type!=="text")&&(Ve=Xe(),Ve.position={start:_i(Z.start),end:void 0},Ce.push(Ve)),this.stack.push(Ve)}function Y(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=_i(Z.end)}function ie(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=_i(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(de.call(this,Z),Y.call(this,Z))}function he(){this.data.atHardBreak=!0}function ke(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function ne(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function ae(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function Se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=nO(ge),Ce.identifier=mr(ge).toLowerCase()}function oe(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ve=Z.children;Ce.children=Ve}else Ce.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function M(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=mr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Be(Z){this.data.characterReferenceType=Z.type}function ve(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let Ve;Ce?(Ve=CE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=qf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ve}function xe(Z){const ge=this.stack.pop();ge.position.end=_i(Z.end)}function Pe(Z){Y.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ye(Z){Y.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function lt(){return{type:"blockquote",children:[]}}function un(){return{type:"code",lang:null,meta:null,value:""}}function Ot(){return{type:"inlineCode",value:""}}function zt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kt(){return{type:"emphasis",children:[]}}function Gn(){return{type:"heading",depth:0,children:[]}}function xn(){return{type:"break"}}function Wt(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function jt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function we(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Fe(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function mt(){return{type:"thematicBreak"}}}function _i(e){return{line:e.line,column:e.column,offset:e.offset}}function qE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?qE(e,r):sO(e,r)}}function sO(e,t){let n;for(n in t)if(VE.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 YE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Aa({start:t.start,end:t.end})+") is still open")}function aO(e){const t=this;t.parser=n;function n(r){return iO(r,me(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function uO(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 lO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
21
  `}]}function cO(e,t){const n=t.value?t.value+`
22
22
  `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function dO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=es(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-"+o,id:n+"fnref-"+o+(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 pO(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 mO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function WE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function gO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WE(e,t);const o={src:es(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function EO(e,t){const n={src:es(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 yO(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 bO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WE(e,t);const o={href:es(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function TO(e,t){const n={href:es(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 wO(e,t,n){const r=e.all(t),o=n?_O(n):GE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(o||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
23
23
  `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
24
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function _O(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=GE(n[r])}return t}function GE(e){const t=e.spread;return t==null?e.children.length>1:t}function xO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function SO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ir(t.children[1]),d=bl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function kO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function NO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const XE=9,KE=32;function PO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(QE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(QE(t.slice(o),o>0,!1)),a.join("")}function QE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===XE||a===KE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===XE||a===KE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function OO(e,t){const n={type:"text",value:PO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RO={blockquote:uO,break:lO,code:cO,delete:dO,emphasis:fO,footnoteReference:hO,heading:pO,html:mO,imageReference:gO,image:EO,inlineCode:yO,linkReference:bO,link:TO,listItem:wO,list:xO,paragraph:SO,root:vO,strong:AO,table:CO,tableCell:NO,tableRow:kO,text:OO,thematicBreak:IO,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const JE=-1,vl=0,Oa=1,Al=2,Kf=3,Qf=4,Jf=5,Zf=6,ZE=7,ey=8,{defineProperty:LO}=Object,ty=typeof self=="object"?self:globalThis,ny=(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 ty[e](t)},DO=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case vl:case JE:return n(u,o);case Oa:{const l=n([],o);for(const d of u)l.push(r(d));return l}case Al:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?LO(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case Kf:return n(new Date(u),o);case Qf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case Jf:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case Zf:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case ZE:{const{name:l,message:d}=u;return n(typeof ty[l]=="function"?ny(l,d):new Error(d),o)}case ey:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}case"-0":return-0}return n(ny(a,u),o)};return r},ry=e=>DO(new Map,e)(0),lo="",{toString:MO}={},{keys:FO,is:BO}=Object,Ia=e=>{const t=typeof e;if(t!=="object"||!e)return[vl,t];const n=MO.call(e).slice(8,-1);switch(n){case"Array":return[Oa,lo];case"Object":return[Al,lo];case"Date":return[Kf,lo];case"RegExp":return[Qf,lo];case"Map":return[Jf,lo];case"Set":return[Zf,lo];case"DataView":return[Oa,n]}return n.includes("Array")?[Oa,n]:e instanceof Error?[ZE,e.name||"Error"]:[Al,n]},Cl=([e,t])=>e===vl&&(t==="function"||t==="symbol"),UO=(e,t,n,r)=>{const o=(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]=Ia(u);switch(l){case vl:{let p=u;switch(d){case"bigint":l=ey,p=u.toString();break;case"number":if(!u&&BO(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([JE],u)}return o([l,p],u)}case Oa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],m=o([l,p],u);for(const T of u)p.push(a(T));return m}case Al:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=o([l,p],u);for(const T of FO(u))(e||!Cl(Ia(u[T])))&&p.push([a(T),a(u[T])]);return m}case Kf:return o([l,isNaN(u.getTime())?lo:u.toISOString()],u);case Qf:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case Jf:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(Cl(Ia(T))||Cl(Ia(y))))&&p.push([a(T),a(y)]);return m}case Zf:{const p=[],m=o([l,p],u);for(const T of u)(e||!Cl(Ia(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},iy=(e,{json:t,lossy:n}={})=>{const r=[];return UO(!(t||n),!!t,new Map,r)(e),r},co=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ry(iy(e,t)):structuredClone(e):(e,t)=>ry(iy(e,t));function HO(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 zO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||HO,r=e.options.footnoteBackLabel||zO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=es(m.toLowerCase());let y=0;const w=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,y);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else p.push(...w);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:pe(B({},co(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
24
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function _O(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=GE(n[r])}return t}function GE(e){const t=e.spread;return t==null?e.children.length>1:t}function xO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function SO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ir(t.children[1]),d=bl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function kO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function NO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const XE=9,KE=32;function PO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(QE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(QE(t.slice(o),o>0,!1)),a.join("")}function QE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===XE||a===KE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===XE||a===KE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function OO(e,t){const n={type:"text",value:PO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RO={blockquote:uO,break:lO,code:cO,delete:dO,emphasis:fO,footnoteReference:hO,heading:pO,html:mO,imageReference:gO,image:EO,inlineCode:yO,linkReference:bO,link:TO,listItem:wO,list:xO,paragraph:SO,root:vO,strong:AO,table:CO,tableCell:NO,tableRow:kO,text:OO,thematicBreak:IO,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const JE=-1,vl=0,Oa=1,Al=2,Qf=3,Jf=4,Zf=5,eh=6,ZE=7,ey=8,{defineProperty:LO}=Object,ty=typeof self=="object"?self:globalThis,ny=(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 ty[e](t)},DO=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case vl:case JE:return n(u,o);case Oa:{const l=n([],o);for(const d of u)l.push(r(d));return l}case Al:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?LO(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case Qf:return n(new Date(u),o);case Jf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case Zf:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case eh:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case ZE:{const{name:l,message:d}=u;return n(typeof ty[l]=="function"?ny(l,d):new Error(d),o)}case ey:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}case"-0":return-0}return n(ny(a,u),o)};return r},ry=e=>DO(new Map,e)(0),lo="",{toString:MO}={},{keys:FO,is:BO}=Object,Ia=e=>{const t=typeof e;if(t!=="object"||!e)return[vl,t];const n=MO.call(e).slice(8,-1);switch(n){case"Array":return[Oa,lo];case"Object":return[Al,lo];case"Date":return[Qf,lo];case"RegExp":return[Jf,lo];case"Map":return[Zf,lo];case"Set":return[eh,lo];case"DataView":return[Oa,n]}return n.includes("Array")?[Oa,n]:e instanceof Error?[ZE,e.name||"Error"]:[Al,n]},Cl=([e,t])=>e===vl&&(t==="function"||t==="symbol"),UO=(e,t,n,r)=>{const o=(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]=Ia(u);switch(l){case vl:{let p=u;switch(d){case"bigint":l=ey,p=u.toString();break;case"number":if(!u&&BO(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([JE],u)}return o([l,p],u)}case Oa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],m=o([l,p],u);for(const T of u)p.push(a(T));return m}case Al:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=o([l,p],u);for(const T of FO(u))(e||!Cl(Ia(u[T])))&&p.push([a(T),a(u[T])]);return m}case Qf:return o([l,isNaN(u.getTime())?lo:u.toISOString()],u);case Jf:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case Zf:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(Cl(Ia(T))||Cl(Ia(y))))&&p.push([a(T),a(y)]);return m}case eh:{const p=[],m=o([l,p],u);for(const T of u)(e||!Cl(Ia(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},iy=(e,{json:t,lossy:n}={})=>{const r=[];return UO(!(t||n),!!t,new Map,r)(e),r},co=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ry(iy(e,t)):structuredClone(e):(e,t)=>ry(iy(e,t));function HO(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 zO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||HO,r=e.options.footnoteBackLabel||zO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=es(m.toLowerCase());let y=0;const w=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,y);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else p.push(...w);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(B({},co(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
25
25
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
26
- `}]}}const kl=(function(e){if(e==null)return YO;if(typeof e=="function")return Nl(e);if(typeof e=="object")return Array.isArray(e)?$O(e):VO(e);if(typeof e=="string")return qO(e);throw new Error("Expected function, string, or object as test")});function $O(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kl(e[n]);return Nl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function VO(e){const t=e;return Nl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function qO(e){return Nl(t);function t(n){return n&&n.type===e}}function Nl(e){return t;function t(n,r,o){return!!(WO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function YO(){return!0}function WO(e){return e!==null&&typeof e=="object"&&"type"in e}function dH(e){return e}const oy=[],GO=!0,eh=!1,XO="skip";function sy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=kl(o),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=oy,w,v,N;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=KO(n(d,p)),y[0]===eh))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==XO)for(v=(r?S.children.length:-1)+u,N=p.concat(S);v>-1&&v<S.children.length;){const A=S.children[v];if(w=l(A,v,N)(),w[0]===eh)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function KO(e){return Array.isArray(e)?e:typeof e=="number"?[GO,e]:e==null?oy:[e]}function Pl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),sy(e,a,l,o);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const th={}.hasOwnProperty,QO={};function JO(e,t){const n=t||QO,r=new Map,o=new Map,a=new Map,u=B(B({},RO),n.handlers),l={all:f,applyData:eI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:ZO,wrap:nI};return Pl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(th.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:N}=v,S=hn(v,["children"]),A=co(S);return A.children=l.all(p),A}return co(p)}return(l.options.unknownHandler||tI)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const w=l.one(T[y],p);if(w){if(y&&T[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=ay(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=ay(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function ZO(e,t){e.position&&(t.position=mE(e))}function eI(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,co(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function tI(e,t){const n=t.data||{},r="value"in t&&!(th.call(n,"hProperties")||th.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const kl=(function(e){if(e==null)return YO;if(typeof e=="function")return Nl(e);if(typeof e=="object")return Array.isArray(e)?$O(e):VO(e);if(typeof e=="string")return qO(e);throw new Error("Expected function, string, or object as test")});function $O(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kl(e[n]);return Nl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function VO(e){const t=e;return Nl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function qO(e){return Nl(t);function t(n){return n&&n.type===e}}function Nl(e){return t;function t(n,r,o){return!!(WO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function YO(){return!0}function WO(e){return e!==null&&typeof e=="object"&&"type"in e}function hH(e){return e}const oy=[],GO=!0,th=!1,XO="skip";function sy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=kl(o),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=oy,w,v,N;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=KO(n(d,p)),y[0]===th))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==XO)for(v=(r?S.children.length:-1)+u,N=p.concat(S);v>-1&&v<S.children.length;){const A=S.children[v];if(w=l(A,v,N)(),w[0]===th)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function KO(e){return Array.isArray(e)?e:typeof e=="number"?[GO,e]:e==null?oy:[e]}function Pl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),sy(e,a,l,o);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const nh={}.hasOwnProperty,QO={};function JO(e,t){const n=t||QO,r=new Map,o=new Map,a=new Map,u=B(B({},RO),n.handlers),l={all:f,applyData:eI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:ZO,wrap:nI};return Pl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(nh.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:N}=v,S=hn(v,["children"]),A=co(S);return A.children=l.all(p),A}return co(p)}return(l.options.unknownHandler||tI)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const w=l.one(T[y],p);if(w){if(y&&T[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=ay(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=ay(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function ZO(e,t){e.position&&(t.position=mE(e))}function eI(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,co(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function tI(e,t){const n=t.data||{},r="value"in t&&!(nh.call(n,"hProperties")||nh.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 nI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
27
27
  `});++r<e.length;)r&&n.push({type:"text",value:`
28
28
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
29
29
  `}),n}function ay(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uy(e,t){const n=JO(e,t),r=n.one(e,void 0),o=jO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
30
- `},o),a}function rI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=uy(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return uy(n,B({file:r},e||t))}}function ly(e){if(e)throw e}var nh,cy;function iI(){if(cy)return nh;cy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return nh=function d(){var f,p,m,T,y,w,v=arguments[0],N=1,S=arguments.length,A=!1;for(typeof v=="boolean"&&(A=v,v=arguments[1]||{},N=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});N<S;++N)if(f=arguments[N],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(A&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(v,{name:p,newValue:d(A,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},nh}var oI=iI();const rh=Ue(oI);function ih(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 sI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...o);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?aI(p,l)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function aI(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return o(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...l){n||(n=!0,t(u,...l))}function a(u){o(null,u)}}const Rr={basename:uI,dirname:lI,extname:cI,join:dI,sep:"/"};function uI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ra(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function lI(e){if(Ra(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 cI(e){Ra(e);let t=e.length,n=-1,r=0,o=-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?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function dI(...e){let t=-1,n;for(;++t<e.length;)Ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":fI(n)}function fI(e){Ra(e);const t=e.codePointAt(0)===47;let n=hI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hI(e,t){let n="",r=0,o=-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(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const pI={cwd:mI};function mI(){return"/"}function oh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gI(e){if(typeof e=="string")e=new URL(e);else if(!oh(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 EI(e)}function EI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const sh=["history","path","basename","stem","extname","dirname"];class dy{constructor(t){let n;t?oh(t)?n={path:t}:typeof t=="string"||yI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":pI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sh.length;){const a=sh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)sh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){uh(t,"basename"),ah(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){fy(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(ah(t,"extname"),fy(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){oh(t)&&(t=gI(t)),uh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){uh(t,"stem"),ah(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new bn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ah(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function uh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),TI={}.hasOwnProperty;class lh extends bI{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=sI()}copy(){const t=new lh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fh("data",this.frozen),this.namespace[t]=n,this):TI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ol(t),r=this.parser||this.Parser;return ch("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ch("process",this.parser||this.Parser),dh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,w=r.stringify(y,T);xI(w)?T.value=w:T.result=w,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),ch("processSync",this.parser||this.Parser),dh("processSync",this.compiler||this.Compiler),this.process(t,o),py("processSync","process",n),r;function o(a,u){n=!0,ly(a),r=u}}run(t,n,r){hy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=Ol(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),py("runSync","run",r),o;function a(u,l){ly(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Ol(n),o=this.compiler||this.Compiler;return dh("stringify",o),hy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(fh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(o.settings=rh(!0,o.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];ih(v)&&ih(y)&&(y=rh(!0,v,y)),r[T]=[f,y,...w]}}}}const wI=new lh().freeze();function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fh(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 hy(e){if(!ih(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function py(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ol(e){return _I(e)?e:new dy(e)}function _I(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xI(e){return typeof e=="string"||SI(e)}function SI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",my=[],gy={allowDangerousHtml:!0},AI=/^(https?|ircs?|mailto|xmpp)$/i,CI=[{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 Ey(e){const t=kI(e),n=NI(e);return PI(t.runSync(t.parse(n),n),e)}function kI(e){const t=e.rehypePlugins||my,n=e.remarkPlugins||my,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),gy):gy;return wI().use(aO).use(n).use(rI,r).use(t)}function NI(e){const t=e.children||"",n=new dy;return typeof t=="string"&&(n.value=t),n}function PI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||yy;for(const p of CI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+vI+p.id,void 0);return Pl(e,f),ZN(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in jf)if(Object.hasOwn(jf,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=jf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function yy(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||AI.test(e.slice(0,t))?e:""}const by=/[#.]/g;function OI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){by.lastIndex=o;const l=by.exec(n),d=n.slice(o,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),l&&(a=l[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Ty(e,t,n){const r=n?DI(n):void 0;function o(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=OI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,II(u))l.unshift(u);else for(const[m,T]of Object.entries(u))RI(e,d.properties,m,T)}for(const f of l)hh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function II(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function RI(e,t,n,r){const o=yl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=uE(r):o.commaSeparated?a=X1(r):o.commaOrSpaceSeparated?a=uE(X1(r).join(" ")):a=wy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?LI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(wy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function hh(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)hh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?hh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||_a(n)===_a(t)))return!0}return n}function LI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function DI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const MI=["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"],FI=Ty(xa,"div"),BI=Ty(Ti,"g",MI);function UI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=_y(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 o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=_y(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 _y(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const fo={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/"},xy={}.hasOwnProperty,HI=Object.prototype;function zI(e,t){const n=t||{};return ph({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ti:xa,verbose:n.verbose||!1},e)}function ph(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Il(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Sy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=UI(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"},Il(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Il(e,r,n),n}default:return n=jI(e,t),n}}function Sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=ph(e,t[n]);r.push(o)}return r}function jI(e,t){const n=e.schema;e.schema=t.namespaceURI===fo.svg?Ti:xa;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;xy.call(HI,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?BI:FI)(t.tagName,o,Sy(e,t.childNodes));if(Il(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&ns(d.startTag),p=d&&d.endTag&&ns(d.endTag),m=ph(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Il(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=$I(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function $I(e,t,n){const r=ns(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)xy.call(n.attrs,u)&&(a[yl(e.schema,u).property]=ns(n.attrs[u]));n.startTag;const l=ns(n.startTag),d=n.endTag?ns(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ns(e){const t=vy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vy(e){return e.line&&e.column?e:void 0}const Ay={}.hasOwnProperty;function Cy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Ay.call(o,e)){const d=String(o[e]);u=Ay.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const VI={},qI={}.hasOwnProperty,ky=Cy("type",{handlers:{root:WI,element:JI,text:KI,comment:QI,doctype:XI}});function YI(e,t){const r=(t||VI).space;return ky(e,r==="svg"?Ti:xa)}function WI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mh(e.children,n,t),rs(e,n),n}function GI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mh(e.children,n,t),rs(e,n),n}function XI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return rs(e,t),t}function KI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return rs(e,t),t}function QI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return rs(e,t),t}function JI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ti);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&qI.call(e.properties,a)){const d=ZI(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:fo[u],childNodes:[],parentNode:null};return l.childNodes=mh(e.children,l,r),rs(e,l),e.tagName==="template"&&e.content&&(l.content=GI(e.content,r)),l}function ZI(e,t,n){const r=yl(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?K1(n):lE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=fo[r.space]}return o}function mh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=ky(e[r],n);a.parentNode=t,o.push(a)}return o}function rs(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 eR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tR=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 P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Mn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function nR(e){return e>=56320&&e<=57343}function rR(e,t){return(e-55296)*1024+9216+t}function Py(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Oy(e){return e>=64976&&e<=65007||tR.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const iR=65536;class oR{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=iR,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,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(nR(n))return this.pos++,this._addGap(),rR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ny(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Py(t)?this._err(te.controlCharacterInInputStream):Oy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(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"})(Ke||(Ke={}));function Iy(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 sR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),aR=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 uR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=aR.get(e))!==null&&t!==void 0?t:e}var Zt;(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"})(Zt||(Zt={}));const lR=32;var xi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xi||(xi={}));function gh(e){return e>=Zt.ZERO&&e<=Zt.NINE}function cR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function dR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||gh(e)}function fR(e){return e===Zt.EQUALS||dR(e)}var en;(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"})(en||(en={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class hR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|lR)===Zt.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(gh(o)||cR(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(gh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(uR(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&xi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=pR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||fR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&xi.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&xi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~xi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function pR(e,t,n,r){const o=(t&xi.BRANCH_LENGTH)>>7,a=t&xi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,l=u+o-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+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var ho;(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"})(ho||(ho={}));var or;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(or||(or={}));var X;(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"})(X||(X={}));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 mR=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function is(e){var t;return(t=mR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const de=g,gR={[le.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[le.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[le.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Eh=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var I;(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"})(I||(I={}));const Lt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function ER(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function La(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function yR(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Si(e){return yR(e)||La(e)}function Ry(e){return Si(e)||ER(e)}function Rl(e){return e+32}function Ly(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Dy(e){return Ly(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function bR(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Oy(e)?te.noncharacterCharacterReference:Py(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class TR{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new oR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new hR(sR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=bR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.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(Iy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=is(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.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:Ke.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=Ly(t)?Ke.WHITESPACE_CHARACTER:t===P.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Si(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Si(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Si(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Si(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Si(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Si(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Si(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&Dy(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&Dy(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=St;break}default:this.currentAttr.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=St;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Mn.DASH_DASH,!0)?(this._createCommentToken(Mn.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(Mn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Mn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(Mn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Mn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=St;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(La(t))this._createDoctypeToken(String.fromCharCode(Rl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(St),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=St;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Mn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Mn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ry(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ry(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const My=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Fy=new Set([...My,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),wR=new Set([...Ll,g.OL,g.UL]),_R=new Set([...Ll,g.BUTTON]),By=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Uy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),xR=new Set([g.TR,g.TEMPLATE,g.HTML]),SR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),vR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),AR=new Set([g.TD,g.TH]);class CR{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)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(AR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(vR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(SR,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(xR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(Uy.has(o))return!1;break}case le.MATHML:{if(By.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,wR)}hasInButtonScope(t){return this.hasInDynamicScope(t,_R)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(Eh.has(n))return!0;if(Ll.has(n))return!1;break}case le.SVG:{if(Uy.has(n))return!1;break}case le.MATHML:{if(By.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===le.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])===le.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&&My.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Fy.has(this.currentTagId);)this.pop()}}const yh=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Hy={type:Lr.Marker};class kR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Lr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yh)return;const o=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=>o.get(d.name)===d.value)&&(a+=1,a>=yh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Hy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.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(Hy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const vi={createDocument(){return{nodeName:"#document",mode:or.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};vi.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(vi.isTextNode(n)){n.value+=t;return}}vi.appendChild(e,vi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&vi.isTextNode(r)?r.value+=t:vi.insertBefore(e,vi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},zy="html",NR="about:legacy-compat",PR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jy=["+//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//"],OR=[...jy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],IR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),$y=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],RR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Vy(e,t){return t.some(n=>e.startsWith(n))}function LR(e){return e.name===zy&&e.publicId===null&&(e.systemId===null||e.systemId===NR)}function DR(e){if(e.name!==zy)return or.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===PR)return or.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),IR.has(n))return or.QUIRKS;let r=t===null?OR:jy;if(Vy(n,r))return or.QUIRKS;if(r=t===null?$y:RR,Vy(n,r))return or.LIMITED_QUIRKS}return or.NO_QUIRKS}const qy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},MR="definitionurl",FR="definitionURL",BR=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])),UR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),HR=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])),zR=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 jR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||zR.has(t)}function Yy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===MR){e.attrs[t].name=FR;break}}function Wy(e){for(let t=0;t<e.attrs.length;t++){const n=BR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bh(e){for(let t=0;t<e.attrs.length;t++){const n=UR.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 $R(e){const t=HR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=is(e.tagName))}function VR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function qR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===qy.TEXT_HTML||o===qy.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function YR(e,t,n,r){return(!r||r===le.HTML)&&qR(e,t,n)||(!r||r===le.MATHML)&&VR(e,t)}const WR="hidden",GR=8,XR=3;var D;(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"})(D||(D={}));const KR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Gy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Xy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vi,onParseError:null};class Ky{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},Xy),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 TR(this.options,this),this.activeFormattingElements=new kR(this.treeAdapter),this.fragmentContextID=r?is(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new CR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},Xy),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:KR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=Lt.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)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&o===n.tagName?{endTag:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return YR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.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=D.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=D.IN_TABLE;return}case g.BODY:{this.insertionMode=D.IN_BODY;return}case g.FRAMESET:{this.insertionMode=D.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?D.AFTER_HEAD:D.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.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=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return Gy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.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 gR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){A6(this,t);return}switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{Jy(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{xh(this,t);break}case D.IN_TABLE_TEXT:{sb(this,t);break}case D.IN_COLUMN_GROUP:{Fl(this,t);break}case D.AFTER_BODY:{Hl(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v6(this,t);return}switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{xh(this,t);break}case D.IN_COLUMN_GROUP:{Fl(this,t);break}case D.AFTER_BODY:{Hl(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wh(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{wh(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.AFTER_BODY:{r4(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{i4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{o4(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case D.IN_TABLE_TEXT:{$a(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?C6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{s4(this,t);break}case D.BEFORE_HEAD:{u4(this,t);break}case D.IN_HEAD:{gr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{d4(this,t);break}case D.AFTER_HEAD:{h4(this,t);break}case D.IN_BODY:{wn(this,t);break}case D.IN_TABLE:{os(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_CAPTION:{l6(this,t);break}case D.IN_COLUMN_GROUP:{Sh(this,t);break}case D.IN_TABLE_BODY:{Bl(this,t);break}case D.IN_ROW:{Ul(this,t);break}case D.IN_CELL:{f6(this,t);break}case D.IN_SELECT:{lb(this,t);break}case D.IN_SELECT_IN_TABLE:{p6(this,t);break}case D.IN_TEMPLATE:{g6(this,t);break}case D.AFTER_BODY:{y6(this,t);break}case D.IN_FRAMESET:{b6(this,t);break}case D.AFTER_FRAMESET:{w6(this,t);break}case D.AFTER_AFTER_BODY:{x6(this,t);break}case D.AFTER_AFTER_FRAMESET:{S6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?k6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{a4(this,t);break}case D.BEFORE_HEAD:{l4(this,t);break}case D.IN_HEAD:{c4(this,t);break}case D.IN_HEAD_NO_SCRIPT:{f4(this,t);break}case D.AFTER_HEAD:{p4(this,t);break}case D.IN_BODY:{Ml(this,t);break}case D.TEXT:{Z4(this,t);break}case D.IN_TABLE:{za(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_CAPTION:{c6(this,t);break}case D.IN_COLUMN_GROUP:{d6(this,t);break}case D.IN_TABLE_BODY:{vh(this,t);break}case D.IN_ROW:{ub(this,t);break}case D.IN_CELL:{h6(this,t);break}case D.IN_SELECT:{cb(this,t);break}case D.IN_SELECT_IN_TABLE:{m6(this,t);break}case D.IN_TEMPLATE:{E6(this,t);break}case D.AFTER_BODY:{fb(this,t);break}case D.IN_FRAMESET:{T6(this,t);break}case D.AFTER_FRAMESET:{_6(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{ib(this,t);break}case D.TEXT:{e6(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_TEMPLATE:{db(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{_h(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{Qy(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{xh(this,t);break}case D.IN_TABLE_TEXT:{ob(this,t);break}}}}function QR(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):rb(e,t),n}function JR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function ZR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=XR;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=e4(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function e4(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 t4(e,t,n){const r=e.treeAdapter.getTagName(t),o=is(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function n4(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Th(e,t){for(let n=0;n<GR;n++){const r=QR(e,t);if(!r)break;const o=JR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=ZR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&t4(e,u,a),n4(e,o,r)}}function wh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function r4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function i4(e,t){e._appendCommentNode(t,e.document)}function _h(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function o4(e,t){e._setDocumentType(t);const n=t.forceQuirks?or.QUIRKS:DR(t);LR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=D.BEFORE_HTML}function Da(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,or.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function s4(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=D.BEFORE_HEAD):Ma(e,t)}function a4(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ma(e,t)}function Ma(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function u4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Fa(e,t)}}function l4(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Fa(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Fa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function gr(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function c4(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ba(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function po(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ba(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function d4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{gr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Ua(e,t)}}function f4(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case g.BR:{Ua(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ua(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function h4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),gr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ha(e,t)}}function p4(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ha(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ha(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=D.IN_BODY,Dl(e,t)}function Dl(e,t){switch(t.type){case Ke.CHARACTER:{Jy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Qy(e,t);break}case Ke.COMMENT:{wh(e,t);break}case Ke.START_TAG:{wn(e,t);break}case Ke.END_TAG:{Ml(e,t);break}case Ke.EOF:{ib(e,t);break}}}function Qy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function m4(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function g4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function E4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET)}function y4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function b4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function T4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function w4(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function _4(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function x4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Lt.PLAINTEXT}function S4(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function v4(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function A4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C4(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function k4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function N4(e,t){e.treeAdapter.getDocumentMode(e.document)!==or.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function Zy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function eb(e){const t=Iy(e,ho.TYPE);return t!=null&&t.toLowerCase()===WR}function P4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),eb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function O4(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function I4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function R4(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Zy(e,t)}function L4(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function D4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function M4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function tb(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function F4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function B4(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function U4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function H4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function z4(e,t){e._reconstructActiveFormattingElements(),Yy(t),bh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function j4(e,t){e._reconstructActiveFormattingElements(),Wy(t),bh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function nb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function wn(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:{A4(e,t);break}case g.A:{v4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{b4(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:{y4(e,t);break}case g.LI:case g.DD:case g.DT:{_4(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Zy(e,t);break}case g.HR:{I4(e,t);break}case g.RB:case g.RTC:{U4(e,t);break}case g.RT:case g.RP:{H4(e,t);break}case g.PRE:case g.LISTING:{T4(e,t);break}case g.XMP:{D4(e,t);break}case g.SVG:{j4(e,t);break}case g.HTML:{m4(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:{gr(e,t);break}case g.BODY:{g4(e,t);break}case g.FORM:{w4(e,t);break}case g.NOBR:{C4(e,t);break}case g.MATH:{z4(e,t);break}case g.TABLE:{N4(e,t);break}case g.INPUT:{P4(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{O4(e,t);break}case g.IMAGE:{R4(e,t);break}case g.BUTTON:{S4(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{k4(e,t);break}case g.IFRAME:{M4(e,t);break}case g.SELECT:{F4(e,t);break}case g.OPTION:case g.OPTGROUP:{B4(e,t);break}case g.NOEMBED:case g.NOFRAMES:{tb(e,t);break}case g.FRAMESET:{E4(e,t);break}case g.TEXTAREA:{L4(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?tb(e,t):nb(e,t);break}case g.PLAINTEXT:{x4(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:nb(e,t)}}function $4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function V4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,fb(e,t))}function q4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Y4(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 W4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function G4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function X4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function K4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Q4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function J4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function rb(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Ml(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:{Th(e,t);break}case g.P:{W4(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:{q4(e,t);break}case g.LI:{G4(e);break}case g.DD:case g.DT:{X4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{K4(e);break}case g.BR:{J4(e);break}case g.BODY:{$4(e,t);break}case g.HTML:{V4(e,t);break}case g.FORM:{Y4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{Q4(e,t);break}case g.TEMPLATE:{po(e,t);break}default:rb(e,t)}}function ib(e,t){e.tmplInsertionModeStack.length>0?db(e,t):_h(e,t)}function Z4(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 e6(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xh(e,t){if(e.openElements.currentTagId!==void 0&&Gy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{sb(e,t);break}case Ke.WHITESPACE_CHARACTER:{ob(e,t);break}}else ja(e,t)}function t6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_CAPTION}function n6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function r6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,Sh(e,t)}function i6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_TABLE_BODY}function o6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=D.IN_TABLE_BODY,Bl(e,t)}function s6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function a6(e,t){eb(t)?e._appendElement(t,le.HTML):ja(e,t),t.ackSelfClosing=!0}function u6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function os(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{o6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{gr(e,t);break}case g.COL:{r6(e,t);break}case g.FORM:{u6(e,t);break}case g.TABLE:{s6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{i6(e,t);break}case g.INPUT:{a6(e,t);break}case g.CAPTION:{t6(e,t);break}case g.COLGROUP:{n6(e,t);break}default:ja(e,t)}}function za(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{po(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:ja(e,t)}}function ja(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dl(e,t),e.fosterParentingEnabled=n}function ob(e,t){e.pendingCharacterTokens.push(t)}function sb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $a(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ja(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ab=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function l6(e,t){const n=t.tagID;ab.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,os(e,t)):wn(e,t)}function c6(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=D.IN_TABLE,n===g.TABLE&&za(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:Ml(e,t)}}function Sh(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{gr(e,t);break}default:Fl(e,t)}}function d6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TEMPLATE:{po(e,t);break}case g.COL:break;default:Fl(e,t)}}function Fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function Bl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=D.IN_ROW,Ul(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=D.IN_TABLE,os(e,t));break}default:os(e,t)}}function vh(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=D.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,za(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:za(e,t)}}function Ul(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=D.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=D.IN_TABLE_BODY,Bl(e,t));break}default:os(e,t)}}function ub(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,vh(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=D.IN_TABLE_BODY,vh(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:za(e,t)}}function f6(e,t){const n=t.tagID;ab.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ul(e,t)):wn(e,t)}function h6(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=D.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ub(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ml(e,t)}}function lb(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.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:{gr(e,t);break}}}function cb(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:{po(e,t);break}}}function p6(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)):lb(e,t)}function m6(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)):cb(e,t)}function g6(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:{gr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,os(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,Sh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,Bl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,Ul(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,wn(e,t)}}function E6(e,t){t.tagID===g.TEMPLATE&&po(e,t)}function db(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):_h(e,t)}function y6(e,t){t.tagID===g.HTML?wn(e,t):Hl(e,t)}function fb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=D.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 Hl(e,t)}function Hl(e,t){e.insertionMode=D.IN_BODY,Dl(e,t)}function b6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{gr(e,t);break}}}function T6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function w6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function _6(e,t){t.tagID===g.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function x6(e,t){t.tagID===g.HTML?wn(e,t):zl(e,t)}function zl(e,t){e.insertionMode=D.IN_BODY,Dl(e,t)}function S6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function v6(e,t){t.chars=St,e._insertCharacters(t)}function A6(e,t){e._insertCharacters(t),e.framesetOk=!1}function hb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function C6(e,t){if(jR(t))hb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Yy(t):r===le.SVG&&($R(t),Wy(t)),bh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function k6(e,t){if(t.tagID===g.P||t.tagID===g.BR){hb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const N6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,P6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),pb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function mb(e,t){const n=H6(e),r=Cy("type",{handlers:{root:O6,element:I6,text:R6,comment:Eb,doctype:L6,raw:M6},unknown:F6}),o={parser:n?new Ky(pb):Ky.getFragmentParser(void 0,pb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),ss(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=zI(a,{file:o.options.file});return o.stitches&&Pl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function gb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function O6(e,t){gb(e.children,t)}function I6(e,t){B6(e,t),gb(e.children,t),U6(e,t)}function R6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function L6(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function D6(e,t){t.stitches=!0;const n=z6(e);if("children"in e&&"children"in n){const r=mb({type:"root",children:e.children},t.options);n.children=r.children}Eb({type:"comment",value:{stitch:n}},t)}function Eb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function M6(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,yb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(N6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function F6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))D6(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 ss(e,t){yb(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=Lt.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 yb(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 B6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;ss(t,Ir(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:fo.html;o===fo.html&&n==="svg"&&(o=fo.svg);const a=YI(pe(B({},e),{children:[]}),{space:o===fo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:is(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Va(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function U6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&eR.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;ss(t,bl(e));const r={type:Ke.END_TAG,tagName:n,tagID:is(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Va(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function H6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Va(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=bl(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 z6(e){return"children"in e?co(pe(B({},e),{children:[]})):co(e)}function bb(e){return function(t,n){return mb(t,pe(B({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Tb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...mo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...mo],h2:[["className","sr-only"]],img:[...mo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...mo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...mo],table:[...mo],ul:[...mo,["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"]},Ai={}.hasOwnProperty;function j6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Tb),t):Tb,stack:[]},o=wb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function wb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return $6(e,n);case"doctype":return V6(e,n);case"element":return q6(e,n);case"root":return Y6(e,n);case"text":return W6(e,n)}}}function $6(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 qa(a,t),a}}function V6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return qa(n,t),n}}function q6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=_b(e,t.children),o=G6(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&&Ai.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:o,children:r};return qa(u,t),u}function Y6(e,t){const r={type:"root",children:_b(e,t.children)};return qa(r,t),r}function W6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return qa(r,t),r}function _b(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=wb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function G6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ai.call(r,n)?r[n]:void 0,u=r&&Ai.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ai.call(l,f)){const p=l[f];let m=xb(e,vb(a,f),f,p);m==null&&(m=xb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ai.call(o,n)){const p=o[n];for(f in p)Ai.call(p,f)&&!Ai.call(d,f)&&(d[f]=p[f])}return d}function xb(e,t,n,r){return t?Array.isArray(r)?X6(e,t,n,r):Sb(e,t,n,r):void 0}function X6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Sb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Sb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&K6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function K6(e,t,n){const r=e.schema.protocols&&Ai.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),l=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function qa(e,t){const n=mE(t);t.data&&(e.data=co(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Q6(e){return function(t){return j6(t,e)}}const Ab=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:o,children:a})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return _.jsx("a",pe(B(B({className:W(e,`${H}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},J6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:_.jsx("div",{className:W(n,`${H}-disclaimer`),children:t?_.jsx(Ey,{rehypePlugins:[bb,Q6],components:{ul:({children:r})=>_.jsx("ul",{className:W(n,`${H}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:W(n,`${H}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:W(n,`${H}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Ab,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:W(n,`${H}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:W(n,`${H}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:e})})},Ah=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Vn(),{setImageFile:u}=Xo(),{logger:l,globalClassName:d,searchConfig:f,features:p}=tt(),m=F.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!o||!1,w=y?"connected":"disconnected",v=t||!y,N=()=>a?new Promise((U,q)=>{const R=new FileReader;R.readAsDataURL(a),R.onload=()=>U(R.result),R.onerror=Y=>q(Y)}):Promise.resolve(""),S=()=>{u(null)},A=F.useCallback(U=>{const q=U==null?void 0:U[0];if(q&&!v){if(q.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(q)}},[v,u]),C=U=>et(null,null,function*(){var Y;U.preventDefault();const q=(((Y=m.current)==null?void 0:Y.value)||"").trim();let R="";try{R=yield N()}catch(ne){l==null||l.error("Error converting file to base64:",ne),alert("There was an error processing the file. Please try again.");return}q&&(S(),m.current.value="",r(q,R))});return _.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${H}-search-bar-wrapper`),children:[a&&_.jsx(gN,{file:a,componentType:n,globalClassName:d,onRemove:S}),_.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${H}-search-bar`),name:`${H}-search-form`,onSubmit:C,children:[_.jsx("span",{role:"status",className:W(`${H}-connection-status-icon`,w),children:_.jsx("span",{className:`${H}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&_.jsx(SN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:v,globalClassName:d,className:e,onFiles:A}),_.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question",name:`${H}-user-input`}),_.jsx(NN,{isLoading:v}),_.jsx(AN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),_.jsx(J6,{})]})};function Z6(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function eL(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Cb=F.createContext({isOpen:!1}),Ch=F.createContext(null),kb=F.createContext(null),go=()=>{var n,r;const e=F.useContext(Ch),t=F.useContext(kb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=go(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(eL,{}),"Clear chat"]})};function tL(e){return e==null?[]:Array.isArray(e)?e:[e]}var nL=(e,...t)=>e.concat(t),rL=(e,...t)=>e.filter(n=>!t.includes(n)),iL=e=>Array.from(new Set(e));function Pb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function oL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Pb(e,t,{step:-r,loop:o})}var sL=e=>Array.isArray(e),Ob=e=>e!=null&&typeof e=="object",aL=e=>Ob(e)&&!sL(e),jl=e=>typeof e=="string",as=e=>typeof e=="function",uL=e=>e==null,lL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),cL=e=>Object.prototype.toString.call(e),Ib=Function.prototype.toString,dL=Ib.call(Object),fL=e=>{if(!Ob(e)||cL(e)!="[object Object]"||mL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=lL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ib.call(n)==dL},hL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,pL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,mL=e=>hL(e)||pL(e),gL=e=>e(),EL=()=>{},kh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function yL(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:bL,max:TL}=Math,wL=e=>Number.isNaN(e),_L=e=>wL(e)?0:e,Rb=(e,t,n)=>bL(TL(_L(e),t),n);function Nh(e){if(!fL(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Nh(o))}return n}function Ph(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function xL(e,t){if(e==null)throw new Error(t())}function SL(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var vL=Object.defineProperty,AL=(e,t,n)=>t in e?vL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t,n)=>AL(e,typeof t!="symbol"?t+"":t,n),Lb=()=>{},$l=e=>typeof e=="object"&&e!==null,us=e=>e?"":void 0,Db=e=>e?"true":void 0,CL=1,kL=9,NL=11,tn=e=>$l(e)&&e.nodeType===CL&&typeof e.nodeName=="string",Vl=e=>$l(e)&&e.nodeType===kL,PL=e=>$l(e)&&e===e.window,Mb=e=>tn(e)?e.localName||"":"#document";function OL(e){return["html","body","#document"].includes(Mb(e))}var IL=e=>$l(e)&&e.nodeType!==void 0,Eo=e=>IL(e)&&e.nodeType===NL&&"host"in e,RL=e=>tn(e)&&e.localName==="input",LL=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ya(e){if(!e)return!1;const t=e.getRootNode();return ds(t)===e}var DL=/(textarea|select)/;function ML(e){if(e==null||!tn(e))return!1;try{return RL(e)&&e.selectionStart!=null||DL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ls(e,t){var r;if(!e||!t||!tn(e)||!tn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Eo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Dr(e){var t;return Vl(e)?e:PL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function FL(e){return Dr(e).documentElement}function cs(e){var t,n,r;return Eo(e)?cs(e.host):Vl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ds(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 BL(e){if(Mb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||FL(e);return Eo(t)?t.host:t}function Ih(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Vl(t)||Eo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Rh=new WeakMap;function fs(e){return Rh.has(e)||Rh.set(e,cs(e).getComputedStyle(e)),Rh.get(e)}var Lh=new Set(["menu","listbox","dialog","grid","tree","region"]),UL=e=>Lh.has(e),Fb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Bb(e,t){const n=new Set,r=Ih(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Fb(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&UL(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Ub(e,t){const n=Ih(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Fb(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Lh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function HL(e){const t=new Set;return Ub(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function zL(e){const t=e.getAttribute("role");return!!(t&&Lh.has(t))}function jL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function $L(e){var t;return jL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function VL(e){if(!e.id)return!1;const t=Ih(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&zL(e))}var Dh=()=>typeof document!="undefined";function qL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Mh=e=>Dh()&&e.test(qL()),YL=e=>Dh()&&e.test(navigator.vendor),Hb=()=>Dh()&&!!navigator.maxTouchPoints,WL=()=>Mh(/^iPhone/i),GL=()=>Mh(/^iPad/i)||Fh()&&navigator.maxTouchPoints>1,ql=()=>WL()||GL(),XL=()=>Fh()||ql(),Fh=()=>Mh(/^Mac/i),KL=()=>XL()&&YL(/apple/i);function QL(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Er(e){var n;const t=QL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var zb=e=>e.button===0,JL=e=>e.button===2||Fh()&&e.ctrlKey&&e.button===0,ZL=e=>"touches"in e&&e.touches.length>0,e5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},jb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function t5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=e5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in jb&&(o=jb[o]),o}function $b(e,t="client"){const n=ZL(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Vb=e=>tn(e)&&e.tagName==="IFRAME",n5=/^(audio|video|details)$/;function qb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var r5=e=>!Number.isNaN(qb(e)),i5=e=>qb(e)<0;function o5(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 Yb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<o.length;){const d=o[l++];if(!d||a.has(d))continue;a.add(d);const f=o5(d,t);if(f){const p=Array.from(f.querySelectorAll(Yl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var Yl="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",Wb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Yl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Mr(e)&&o.unshift(e);const u=[];for(const l of o)if(Mr(l)){if(Vb(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...Wb(d,{getShadowRoot:r}));continue}u.push(l)}return r?Yb(u,r,Mr):u};function Mr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Yl)&&LL(e)}function hs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Yl));n&&yo(e)&&o.unshift(e);const a=[];for(const u of o)if(yo(u)){if(Vb(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...hs(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Yb(a,r,yo);return!u.length&&n?o:u}return!a.length&&n?o:a}function yo(e){return tn(e)&&e.tabIndex>0?!0:Mr(e)&&!i5(e)}function s5(e,t={}){const n=hs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function a5(e,t={}){const{current:n,getShadowRoot:r}=t,o=hs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ds(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function Wa(e){return e.tabIndex<0&&(n5.test(e.localName)||ML(e))&&!r5(e)?0:e.tabIndex}function Gb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=hs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var u5=class nS{constructor(){Oh(this,"id",null),Oh(this,"fn_cleanup"),Oh(this,"cleanup",()=>{this.cancel()})}static create(){return new nS}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=u5.create();return t.request(e),t.cleanup}function Xb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Bh(e){const t=BL(e);return OL(t)?Dr(t).body:tn(t)&&d5(t)?t:Bh(t)}var l5=/auto|scroll|overlay|hidden|clip/,c5=new Set(["inline","contents"]);function d5(e){const t=cs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return l5.test(n+o+r)&&!c5.has(a)}var ps="default",Uh="",Wl=new WeakMap;function f5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return ql()?(ps==="default"&&(Uh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),ps="disabled"):t&&(Wl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>h5({target:t,doc:r})}function h5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(ql()){if(ps!=="disabled")return;ps="restoring",setTimeout(()=>{Xb(()=>{ps==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Uh||""),Uh="",ps="default")})},300)}else if(t&&Wl.has(t)){const a=Wl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Wl.delete(t)}}function p5(e={}){const u=e,{defer:t,target:n}=u,r=hn(u,["defer","target"]),o=t?qt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(f5(pe(B({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function m5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=$b(l),f=Math.sqrt(Hu(d.x,2)+Hu(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=$b(l);r({point:d,event:l})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),p5({doc:e})];return()=>{u.forEach(l=>l())}}function g5(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=s5(e,{includeContainer:!0,getShadowRoot:a}),y=a5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&Ya(y)?(o==null||o(),p=T):f.shiftKey&&(Ya(m)||w)?p=n:!f.shiftKey&&Ya(n)?(o==null||o(),p=m):!f.shiftKey&&(Ya(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function E5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=hn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(g5(d,B({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function y5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Gl(e,t){if(!e)return Lb;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function b5(e,t,n){if(!e)return Lb;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 T5(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 w5(e,t){const{timeout:n,rootNode:r}=t,o=cs(r),a=Dr(r),u=new o.AbortController;return T5(new Promise(l=>{const d=e();if(d){l(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var _5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),x5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Kb=e=>{const t={};let n;for(;n=x5.exec(e);)t[n[1]]=n[2];return t},S5=(e,t)=>{if(jl(e)){if(jl(t))return`${e};${t}`;e=Kb(e)}else jl(t)&&(t=Kb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=kh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=_5(t[o],n[o]);continue}if(o==="style"){t[o]=S5(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function fH(e){return e}var ms=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ms||{}),Hh="__init__";function v5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ds(t()),a=u=>t().getElementById(u);return pe(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ya,getById:a})}function A5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var gs=()=>e=>Array.from(new Set(e)),Qb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Xl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=F.useState(t),[o,a]=F.useState(r),u=e().value!==void 0,l=F.useRef(o);l.current=u?e().value:o;const d=F.useRef(l.current);Qb(()=>{d.current=l.current},[o,e().value]);const f=y=>{var N,S;const w=d.current,v=as(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(S=(N=e()).onChange)==null||S.call(N,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?Ko.flushSync:gL)(()=>f(y))},invoke(y,w){var v,N;(N=(v=e()).onChange)==null||N.call(v,y,w)},hash(y){var w,v,N;return(N=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?N:String(y)}}}Xl.cleanup=e=>{F.useEffect(()=>e,[])},Xl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function C5(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var k5=(e,t)=>{const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Kl(e,t={}){var ie,fe,ke,re,ae,Se;const n=F.useMemo(()=>{const{id:se,ids:J,getRootNode:oe}=t;return v5({id:se,ids:J,getRootNode:oe})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(fe=(ie=e.props)==null?void 0:ie.call(e,{props:Nh(t),scope:n}))!=null?fe:t,a=N5(o),u=(ke=e.context)==null?void 0:ke.call(e,{prop:a,bindable:Xl,scope:n,flush:Zb,getContext(){return d},getComputed(){return q},getRefs(){return v},getEvent(){return y()}}),l=Jb(u),d={get(se){var J;return(J=l.current)==null?void 0:J[se].ref.current},set(se,J){var oe;(oe=l.current)==null||oe[se].set(J)},initial(se){var J;return(J=l.current)==null?void 0:J[se].initial},hash(se){var oe,k;const J=(oe=l.current)==null?void 0:oe[se].get();return(k=l.current)==null?void 0:k[se].hash(J)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>pe(B({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>pe(B({},R),{matches(...se){return se.includes(R.ref.current)},hasTag(se){var J,oe;return!!((oe=(J=e.states[R.ref.current])==null?void 0:J.tags)!=null&&oe.includes(se))}}),v=C5((ae=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?ae:{}),N=()=>({state:w(),context:d,event:y(),prop:a,send:$,action:S,guard:A,track:k5,refs:v,computed:q,flush:Zb,scope:n,choose:U}),S=se=>{const J=as(se)?se(N()):se;if(!J)return;const oe=J.map(k=>{var Q,O;const M=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[k];return M||Ph(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of oe)k==null||k(N())},A=se=>{var J,oe;return as(se)?se(N()):(oe=(J=e.implementations)==null?void 0:J.guards)==null?void 0:oe[se](N())},C=se=>{const J=as(se)?se(N()):se;if(!J)return;const oe=J.map(M=>{var O,_e;const Q=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return Q||Ph(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),Q}),k=[];for(const M of oe){const Q=M==null?void 0:M(N());Q&&k.push(Q)}return()=>k.forEach(M=>M==null?void 0:M())},U=se=>tL(se).find(J=>{let oe=!J.guard;return jl(J.guard)?oe=!!A(J.guard):as(J.guard)&&(oe=J.guard(N())),oe}),q=se=>{xL(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[se];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:q})},R=Xl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,J){var k,M,Q,O;if(J){const _e=f.current.get(J);_e==null||_e(),f.current.delete(J)}J&&S((k=e.states[J])==null?void 0:k.exit),S((M=p.current)==null?void 0:M.actions);const oe=C((Q=e.states[se])==null?void 0:Q.effects);if(oe&&f.current.set(se,oe),J===Hh){S(e.entry);const _e=C(e.effects);_e&&f.current.set(Hh,_e)}S((O=e.states[se])==null?void 0:O.entry)}})),Y=F.useRef(void 0),ne=F.useRef(ms.NotStarted);Qb(()=>{queueMicrotask(()=>{var M;const oe=ne.current===ms.Started;ne.current=ms.Started,r(oe?"rehydrating...":"initializing...");const k=(M=Y.current)!=null?M:R.initial;R.invoke(k,oe?R.get():Hh)});const se=f.current,J=R.ref.current;return()=>{r("unmounting..."),Y.current=J,ne.current=ms.Stopped,se.forEach(oe=>oe==null?void 0:oe()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const me=()=>"ref"in R?R.ref.current:R.get(),$=se=>{queueMicrotask(()=>{var O,_e,Be,ve,xe;if(ne.current!==ms.Started)return;m.current=T.current,T.current=se;let J=me();const oe=(Be=(O=e.states[J].on)==null?void 0:O[se.type])!=null?Be:(_e=e.on)==null?void 0:_e[se.type],k=U(oe);if(!k)return;p.current=k;const M=(ve=k.target)!=null?ve:J;r("transition",se.type,k.target||J,`(${k.actions})`);const Q=M!==J;Q?Ko.flushSync(()=>R.set(M)):k.reenter&&!Q?R.invoke(J,J):S((xe=k.actions)!=null?xe:[])})};return(Se=e.watch)==null||Se.call(e,N()),{state:w(),send:$,context:d,prop:a,scope:n,refs:v,computed:q,event:y(),getStatus:()=>ne.current}}function Jb(e){const t=F.useRef(e);return t.current=e,t}function N5(e){const t=Jb(e);return function(r){return t.current[r]}}function Zb(e){queueMicrotask(()=>{Ko.flushSync(()=>e())})}var zh=A5(e=>e);function Ql(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function P5(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const jh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=hn(f,["asChild","children"]);if(!o)return F.createElement(e,pe(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const l=F.Children.only(a),d=P5(l);return F.cloneElement(l,pe(B({},Yt(u,l.props)),{ref:r?Ql(r,d):d}))}));return t.displayName=e.displayName||e.name,t},_n=(()=>{const e=new Map;return new Proxy(jh,{apply(t,n,r){return jh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,jh(r)),e.get(r)}})})();function O5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function bo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=F.createContext(u);l.displayName=t;function d(){var p;const f=F.useContext(l);if(!f&&n){const m=new Error(a!=null?a:O5(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[I5,$h]=bo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[eT,Ga]=bo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),tT=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(_n.div,pe(B({},o),{ref:Ql(r.ref,t)}))});tT.displayName="PopoverContent";const nT=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),o=Yt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(_n.div,pe(B({},o),{ref:t}))});nT.displayName="PopoverPositioner";const Xa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),rT=e=>Xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function R5(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var L5={props({props:e}){return pe(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",fs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});qt(()=>{var l,d;const u=Jl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{qt(()=>{e.set("prevAnimationName",Jl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Jl(t.get("styles")))},u=d=>{const f=Jl(t.get("styles"));Er(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const l=Gl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Xb(()=>l())}}}}};function Jl(e){return(e==null?void 0:e.animationName)||"none"}gs()(["onExitComplete","present","immediate"]);function D5(e,t={}){const{sync:n=!1}=t,r=M5(e);return F.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function M5(e){const t=F.useRef(e);return t.current=e,t}const Vh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=hn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),l=pe(B({},a),{present:r,onExitComplete:D5(e.onExitComplete)}),d=Kl(L5,l),f=R5(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var To=(e,t=[])=>({parts:(...n)=>{if(F5(t))return To(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>To(e,[...t,...n]),omit:(...n)=>To(e,t.filter(r=>!n.includes(r))),rename:n=>To(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Es(e)}"][data-part="${Es(r)}"]`,`& [data-scope="${Es(e)}"][data-part="${Es(r)}"]`].join(", "),attrs:{"data-scope":Es(e),"data-part":Es(r)}}}),{})}),Es=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),F5=e=>e.length===0;const B5=["top","right","bottom","left"],Ci=Math.min,oi=Math.max,Zl=Math.round,ec=Math.floor,Fr=e=>({x:e,y:e}),U5={left:"right",right:"left",bottom:"top",top:"bottom"};function iT(e,t,n){return oi(e,Ci(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function ys(e){return e.split("-")[1]}function qh(e){return e==="x"?"y":"x"}function Yh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Wh(e){return qh(Br(e))}function H5(e,t,n){n===void 0&&(n=!1);const r=ys(e),o=Wh(e),a=Yh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=tc(u)),[u,tc(u)]}function z5(e){const t=tc(e);return[Gh(e),t,Gh(t)]}function Gh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const oT=["left","right"],sT=["right","left"],j5=["top","bottom"],$5=["bottom","top"];function V5(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?j5:$5;default:return[]}}function q5(e,t,n,r){const o=ys(e);let a=V5(ki(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Gh)))),a}function tc(e){const t=ki(e);return U5[t]+e.slice(t.length)}function Y5(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function aT(e){return typeof e!="number"?Y5(e):{top:e,right:e,bottom:e,left:e}}function nc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Br(t),u=Wh(t),l=Yh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[l]/2-o[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}const w=ys(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function W5(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=si(t,e),w=aT(y),N=l[T?m==="floating"?"reference":"floating":m],S=nc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(N))==null||n?N:N.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),A=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},q=nc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:C,strategy:d}):A);return{top:(S.top-q.top+w.top)/U.y,bottom:(q.bottom-S.bottom+w.bottom)/U.y,left:(S.left-q.left+w.left)/U.x,right:(q.right-S.right+w.right)/U.x}})}const G5=50,X5=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:pe(B({},u),{detectOverflow:W5}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const N=a[v];if(!N)continue;const{name:S,fn:A}=N,{x:C,y:U,data:q,reset:R}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});p=C!=null?C:p,m=U!=null?U:m,w[S]=B(B({},w[S]),q),R&&y<G5&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:m}=uT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),K5=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},w=Wh(a),v=Yh(w),N=yield l.getDimensions(p),S=w==="y",A=S?"top":"left",C=S?"bottom":"right",U=S?"clientHeight":"clientWidth",q=u.reference[v]+u.reference[w]-y[w]-u.floating[v],R=y[w]-u.reference[w],Y=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=Y?Y[U]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement(Y)))&&(ne=d.floating[U]||u.floating[v]);const me=q/2-R/2,$=ne/2-N[v]/2-1,ie=Ci(T[A],$),fe=Ci(T[C],$),ke=ne-N[v]-fe,re=ne/2-N[v]/2+me,ae=iT(ie,re,ke),Se=!f.arrow&&ys(a)!=null&&re!==ae&&u.reference[v]/2-(re<ie?ie:fe)-N[v]/2<0,se=Se?re<ie?re-ie:re-ke:0;return{[w]:y[w]+se,data:B({[w]:ae,centerOffset:re-ae-se},Se&&{alignmentOffset:se}),reset:Se}})}}),Q5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ae=si(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:N=!0}=ae,S=hn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const A=ki(a),C=Br(d),U=ki(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!N?[tc(d)]:z5(d)),Y=v!=="none";!y&&Y&&R.push(...q5(d,N,v,q));const ne=[d,...R],me=yield f.detectOverflow(n,S),$=[];let ie=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&$.push(me[A]),T){const Se=H5(a,l,q);$.push(me[Se[0]],me[Se[1]])}if(ie=[...ie,{placement:a,overflows:$}],!$.every(Se=>Se<=0)){var fe,ke;const Se=(((fe=u.flip)==null?void 0:fe.index)||0)+1,se=ne[Se];if(se&&(!(T==="alignment"?C!==Br(se):!1)||ie.every(k=>Br(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Se,overflows:ie},reset:{placement:se}};let J=(ke=ie.filter(oe=>oe.overflows[0]<=0).sort((oe,k)=>oe.overflows[1]-k.overflows[1])[0])==null?void 0:ke.placement;if(!J)switch(w){case"bestFit":{var re;const oe=(re=ie.filter(k=>{if(Y){const M=Br(k.placement);return M===C||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,Q)=>M+Q,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:re[0];oe&&(J=oe);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function lT(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 B5.some(t=>e[t]>=0)}const J5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:o}=n,l=si(e,n),{strategy:a="referenceHidden"}=l,u=hn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,pe(B({},u),{elementContext:"reference"})),f=lT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:cT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,pe(B({},u),{altBoundary:!0})),f=lT(d,r.floating);return{data:{escapedOffsets:f,escaped:cT(f)}}}default:return{}}})}}},dT=new Set(["left","top"]);function Z5(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=ki(n),l=ys(n),d=Br(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof w=="number"&&(y=l==="end"?w*-1:w),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const eD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield Z5(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(B({},f),{placement:l})}})}}},tD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,platform:u}=n,C=si(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:q,y:R}=U;return{x:q,y:R}}}}=C,p=hn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=Br(a),w=qh(y);let v=m[w],N=m[y];const S=(U,q)=>iT(q+T[U==="y"?"top":"left"],q,q-T[U==="y"?"bottom":"right"]);l&&(v=S(w,v)),d&&(N=S(y,N));const A=f.fn(pe(B({},n),{[w]:v,[y]:N}));return pe(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[w]:l,[y]:d}}})})}}},nD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=si(e,t),T={x:o,y:a},y=Br(u),w=qh(y);let v=T[w],N=T[y];const S=si(f,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const q=w==="y"?"height":"width",R=l.reference[w]-l.floating[q]+A.mainAxis,Y=l.reference[w]+l.reference[q]-A.mainAxis;v<R?v=R:v>Y&&(v=Y)}if(m){var C,U;const q=w==="y"?"width":"height",R=dT.has(ki(u)),Y=l.reference[y]-l.floating[q]+(R&&((C=d.offset)==null?void 0:C[y])||0)+(R?0:A.crossAxis),ne=l.reference[y]+l.reference[q]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?A.crossAxis:0);N<Y?N=Y:N>ne&&(N=ne)}return{[w]:v,[y]:N}}}},rD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,$=si(e,n),{apply:l=()=>{}}=$,d=hn($,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=ys(r),T=Br(r)==="y",{width:y,height:w}=o.floating;let v,N;p==="top"||p==="bottom"?(v=p,N=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,v=m==="end"?"top":"bottom");const S=w-f.top-f.bottom,A=y-f.left-f.right,C=Ci(w-f[v],S),U=Ci(y-f[N],A),q=n.middlewareData.shift,R=!q;let Y=C,ne=U;q!=null&&q.enabled.x&&(ne=A),q!=null&&q.enabled.y&&(Y=S),R&&!m&&(T?ne=y-2*oi(f.left,f.right):Y=w-2*oi(f.top,f.bottom)),yield l(pe(B({},n),{availableWidth:ne,availableHeight:Y}));const me=yield a.getDimensions(u.floating);return y!==me.width||w!==me.height?{reset:{rects:!0}}:{}})}}};function rc(){return typeof window!="undefined"}function bs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return rc()?e instanceof Node||e instanceof Wn(e).Node:!1}function yr(e){return rc()?e instanceof Element||e instanceof Wn(e).Element:!1}function Hr(e){return rc()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function hT(e){return!rc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function iD(e){return/^(table|td|th)$/.test(bs(e))}function ic(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const oD=/transform|translate|scale|rotate|perspective|filter/,sD=/paint|layout|strict|content/,wo=e=>!!e&&e!=="none";let Xh;function Kh(e){const t=yr(e)?br(e):e;return wo(t.transform)||wo(t.translate)||wo(t.scale)||wo(t.rotate)||wo(t.perspective)||!Qh()&&(wo(t.backdropFilter)||wo(t.filter))||oD.test(t.willChange||"")||sD.test(t.contain||"")}function aD(e){let t=Ni(e);for(;Hr(t)&&!Ts(t);){if(Kh(t))return t;if(ic(t))return null;t=Ni(t)}return null}function Qh(){return Xh==null&&(Xh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xh}function Ts(e){return/^(html|body|#document)$/.test(bs(e))}function br(e){return Wn(e).getComputedStyle(e)}function oc(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Ur(e);return hT(t)?t.host:t}function pT(e){const t=Ni(e);return Ts(t)?(e.ownerDocument||e).body:Hr(t)&&Ka(t)?t:pT(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Wn(o);if(a){const l=Jh(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],l&&n?Qa(l):[])}else return t.concat(o,Qa(o,[],n))}function Jh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Hr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=Zl(n)!==a||Zl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Zh(e){return yr(e)?e:e.contextElement}function ws(e){const t=Zh(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?Zl(n.width):n.width)/r,l=(a?Zl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const uD=Fr(0);function gT(e){const t=Wn(e);return!Qh()||!t.visualViewport?uD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function _o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Zh(e);let u=Fr(1);t&&(r?yr(r)&&(u=ws(r)):u=ws(e));const l=lD(a,n,r)?gT(a):Fr(0);let d=(o.left+l.x)/u.x,f=(o.top+l.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Wn(a),y=r&&yr(r)?Wn(r):r;let w=T,v=Jh(w);for(;v&&r&&y!==w;){const N=ws(v),S=v.getBoundingClientRect(),A=br(v),C=S.left+(v.clientLeft+parseFloat(A.paddingLeft))*N.x,U=S.top+(v.clientTop+parseFloat(A.paddingTop))*N.y;d*=N.x,f*=N.y,p*=N.x,m*=N.y,d+=C,f+=U,w=Wn(v),v=Jh(w)}}return nc({width:p,height:m,x:d,y:f})}function sc(e,t){const n=oc(e).scrollLeft;return t?t.left+n:_o(Ur(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-sc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function cD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ur(r),l=t?ic(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((bs(r)!=="body"||Ka(u))&&(d=oc(r)),Hr(r))){const y=_o(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):Fr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function dD(e){return Array.from(e.getClientRects())}function fD(e){const t=Ur(e),n=oc(e),r=e.ownerDocument.body,o=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+sc(e);const l=-n.scrollTop;return br(r).direction==="rtl"&&(u+=oi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const yT=25;function hD(e,t){const n=Wn(e),r=Ur(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(o){a=o.width,u=o.height;const p=Qh();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=sc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,w=Math.abs(r.clientWidth-m.clientWidth-y);w<=yT&&(a-=w)}else f<=yT&&(a+=f);return{width:a,height:u,x:l,y:d}}const pD=new Set(["absolute","fixed"]);function mD(e,t){const n=_o(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Hr(e)?ws(e):Fr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=hD(e,n);else if(t==="document")r=fD(Ur(e));else if(yr(t))r=mD(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nc(r)}function TT(e,t){const n=Ni(e);return n===t||!yr(n)||Ts(n)?!1:br(n).position==="fixed"||TT(n,t)}function gD(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(l=>yr(l)&&bs(l)!=="body"),o=null;const a=br(e).position==="fixed";let u=a?Ni(e):e;for(;yr(u)&&!Ts(u);){const l=br(u),d=Kh(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&pD.has(o.position)||Ka(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=l,u=Ni(u)}return t.set(e,r),r}function ED(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ic(t)?[]:gD(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=oi(m.top,f.top),f.right=Ci(m.right,f.right),f.bottom=Ci(m.bottom,f.bottom),f.left=oi(m.left,f.left),f},bT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function yD(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function bD(e,t,n){const r=Hr(t),o=Ur(t),a=n==="fixed",u=_o(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=sc(o)}if(r||!r&&!a)if((bs(t)!=="body"||Ka(o))&&(l=oc(t)),r){const y=_o(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,l):Fr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function ep(e){return br(e).position==="static"}function wT(e,t){if(!Hr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function _T(e,t){const n=Wn(e);if(ic(e))return n;if(!Hr(e)){let o=Ni(e);for(;o&&!Ts(o);){if(yr(o)&&!ep(o))return o;o=Ni(o)}return n}let r=wT(e,t);for(;r&&iD(r)&&ep(r);)r=wT(r,t);return r&&Ts(r)&&ep(r)&&!Kh(r)?n:r||aD(e)||n}const TD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||_T,n=this.getDimensions,r=yield n(e.floating);return{reference:bD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function wD(e){return br(e).direction==="rtl"}const _D={convertOffsetParentRelativeRectToViewportRelativeRect:cD,getDocumentElement:Ur,getClippingRect:ED,getOffsetParent:_T,getElementRects:TD,getClientRects:dD,getDimensions:yD,getScale:ws,isElement:yr,isRTL:wD};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xD(e,t){let n=null,r;const o=Ur(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const w=ec(m),v=ec(o.clientWidth-(p+T)),N=ec(o.clientHeight-(m+y)),S=ec(p),C={rootMargin:-w+"px "+-v+"px "+-N+"px "+-S+"px",threshold:oi(0,Ci(1,d))||1};let U=!0;function q(R){const Y=R[0].intersectionRatio;if(Y!==d){if(!U)return u();Y?u(!1,Y):r=setTimeout(()=>{u(!1,1e-7)},1e3)}Y===1&&!xT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(q,pe(B({},C),{root:o.ownerDocument}))}catch(R){n=new IntersectionObserver(q,C)}n.observe(e)}return u(!0),a}function SD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Zh(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?xD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[A]=S;A&&A.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,v=d?_o(e):null;d&&N();function N(){const S=_o(e);v&&!xT(v,S)&&n(),v=S,w=requestAnimationFrame(N)}return n(),()=>{var S;p.forEach(A=>{o&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const vD=eD,AD=tD,CD=Q5,kD=rD,ND=J5,PD=K5,OD=nD,ID=(e,t,n)=>{const r=new Map,o=B({platform:_D},n),a=pe(B({},o.platform),{_c:r});return X5(e,t,pe(B({},o),{platform:a}))};function ST(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(B({},o),{toJSON:()=>o})}function RD(e){if(!e)return ST();const{x:t,y:n,width:r,height:o}=e;return ST(t,n,r,o)}function LD(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?RD(r):n.getBoundingClientRect()}}}var Ja=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Ja("--arrow-size"),arrowSizeHalf:Ja("--arrow-size-half"),arrowBg:Ja("--arrow-background"),transformOrigin:Ja("--transform-origin"),arrowOffset:Ja("--arrow-offset")},DD=e=>e==="top"||e==="bottom"?"y":"x";function MD(e,t){return{name:"transformOrigin",fn(n){var me,$,ie,fe,ke;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=DD(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=(($=o.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=m+y/2,N=Math.abs(((ie=o.shift)==null?void 0:ie.y)||0),S=u.reference.height/2,A=y/2,C=(ke=(fe=e.offset)==null?void 0:fe.mainAxis)!=null?ke:e.gutter,U=typeof C=="number"?C+A:C!=null?C:A,q=N>U,R={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],Y=`${w}px ${u.reference.y+S-l}px`,ne=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(ai.transformOrigin.variable,ne?Y:R),{data:{transformOrigin:ne?Y:R}}}}}var FD={name:"rects",fn({rects:e}){return{data:e}}},BD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${ai.arrowOffset.reference})`}),{}}}};function UD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var HD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function vT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function tp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function zD(e,t,n){const r=e||t.createElement("div");return PD({element:r,padding:n.arrowPadding})}function jD(e,t){var n;if(!uL((n=t.offset)!=null?n:t.gutter))return vD(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:l}=UD(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Nh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function $D(e){if(!e.flip)return;const t=tp(e.boundary);return CD(pe(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function VD(e){if(!e.slide&&!e.overlap)return;const t=tp(e.boundary);return AD(pe(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:OD()}))}function qD(e){return kD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function YD(e){var t;if(e.hideWhenDetached)return ND({strategy:"referenceHidden",boundary:(t=tp(e.boundary))!=null?t:"clippingAncestors"})}function WD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function GD(e,t,n={}){const r=LD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},HD,n),a=t.querySelector("[data-part=arrow]"),u=[jD(a,o),$D(o),VD(o),zD(a,t.ownerDocument,o),BD(a),MD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),qD(o),YD(o),FD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const v=yield ID(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const N=cs(t),S=vT(N,v.x),A=vT(N,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${A}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const q=fs(C);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=WD(o.listeners),w=o.listeners?SD(r,t,T,y):EL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function AT(e,t,n={}){const l=n,{defer:r}=l,o=hn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(GD(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var XD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function KD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?XD[t.split("-")[0]]:void 0,background:ai.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var _s=new WeakMap,ac=new WeakMap,uc={},np=0,CT=e=>e&&(e.host||CT(e.parentNode)),QD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(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),JD=new Set(["script","output","status","next-route-announcer"]),ZD=e=>JD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),e8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=QD(n,Array.isArray(e)?e:[e]);uc[r]||(uc[r]=new WeakMap);const l=uc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&tn(y)&&Ub(y,w=>{m(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(f.has(w))T(w);else try{if(ZD(w))return;const N=w.getAttribute(o)==="true",S=(_s.get(w)||0)+1,A=(l.get(w)||0)+1;_s.set(w,S),l.set(w,A),d.push(w),S===1&&N&&ac.set(w,!0),A===1&&w.setAttribute(r,""),N||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),np++,()=>{d.forEach(y=>{const w=_s.get(y)-1,v=l.get(y)-1;_s.set(y,w),l.set(y,v),w||(ac.has(y)||y.removeAttribute(o),ac.delete(y)),v||y.removeAttribute(r)}),np--,np||(_s=new WeakMap,_s=new WeakMap,ac=new WeakMap,uc={})}},t8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,n8=(e,t=t8(e),n="data-aria-hidden",r=!0)=>{if(t)return e8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},r8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?r8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(n8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function i8(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function o8(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var NT="pointerdown.outside",PT="focus.outside";function s8(e){for(const t of e)if(tn(t)&&Mr(t))return!0;return!1}var OT=e=>"clientY"in e;function a8(e,t){if(!OT(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 u8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},l={x:e.clientX,y:e.clientY};return u8(u,l)?r||a:!1}function l8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Dr(e),f=cs(e),p=i8(f),m=o8(f);function T(C,U){if(!tn(U)||!U.isConnected||ls(e,U)||a8(e,C)||l&&Bb(e,U))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const Y=Bh(q);if(IT(C,Y))return!1}const R=Bh(e);return IT(C,R)?!1:!(n!=null&&n(U))}const y=new Set,w=Eo(e==null?void 0:e.getRootNode());function v(C){function U(q){var me,$;const R=u&&!Hb()?qt:ie=>ie(),Y=q!=null?q:C,ne=($=(me=Y==null?void 0:Y.composedPath)==null?void 0:me.call(Y))!=null?$:[Y==null?void 0:Y.target];R(()=>{const ie=w?ne[0]:Er(C);if(!(!e||!T(C,ie))){if(o||a){const fe=kh(o,a);e.addEventListener(NT,fe,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:Y,contextmenu:JL(Y),focusable:s8(ne),target:ie}})}})}C.pointerType==="touch"?(y.forEach(q=>q()),y.add(nn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const N=new Set,S=setTimeout(()=>{N.add(nn(d,"pointerdown",v,!0)),N.add(m.addEventListener("pointerdown",v,!0)),N.add(p.addEventListener("pointerdown",v,!0))},0);function A(C){(u?qt:q=>q())(()=>{var Y,ne;const q=(ne=(Y=C==null?void 0:C.composedPath)==null?void 0:Y.call(C))!=null?ne:[C==null?void 0:C.target],R=w?q[0]:Er(C);if(!(!e||!T(C,R))){if(r||a){const me=kh(r,a);e.addEventListener(PT,me,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(R),target:R}})}})}return Hb()||(N.add(nn(d,"focusin",A,!0)),N.add(m.addEventListener("focusin",A,!0)),N.add(p.addEventListener("focusin",A,!0))),()=>{clearTimeout(S),y.forEach(C=>C()),N.forEach(C=>C())}}function c8(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(l8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function d8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn(Dr(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",sr={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=>ls(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ls(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=>sr.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];h8(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),f8(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function f8(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function h8(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){sr.layers.forEach(({node:e})=>{e.style.pointerEvents=sr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function p8(e){e.style.pointerEvents=""}function m8(e,t){const n=Dr(e),r=[];return sr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=w5(()=>{const l=o();return tn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Gl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{sr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function g8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ph("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};sr.add(f),MT();function p(v){var S,A;const N=Er(v.detail.originalEvent);sr.isBelowPointerBlockingLayer(e)||sr.isInBranch(N)||((S=t.onPointerDownOutside)==null||S.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,A;const N=Er(v.detail.originalEvent);sr.isInBranch(N)||((S=t.onFocusOutside)==null||S.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var N;sr.isTopMost(e)&&((N=t.onEscapeKeyDown)==null||N.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var C;if(!e)return!1;const N=typeof u=="function"?u():u,S=Array.isArray(N)?N:[N],A=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(tn);return A&&S.push(...A),S.some(U=>ls(U,v))||sr.isInNestedLayer(e,v)}const w=[a?m8(e,t.persistentElements):void 0,d8(e,T),c8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{sr.remove(e),MT(),p8(e),w.forEach(v=>v==null?void 0:v())}}function FT(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=as(e)?e():e;o.push(g8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var E8=Object.defineProperty,y8=(e,t,n)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>y8(e,typeof t!="symbol"?t+"":t,n),BT={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()}},b8=[],T8=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 o=Er(r),a=this.findContainerIndex(o,r)>=0;if(a||Vl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Wa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Wa(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 o=Er(r);if(!(this.findContainerIndex(o,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),vt(this,"handleClick",r=>{const o=Er(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(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 o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Za(r)&&r.preventDefault(),this.tryFocus(a)}}),vt(this,"handleEscapeKey",r=>{w8(r)&&eu(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(o=>{o.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.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 $L(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?VL(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(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),vt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const o=ds(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),vt(this,"tryFocus",r=>{if(r!==!1&&r!==ds(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,_8(r)&&r.select()}}),vt(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),l=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),vt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),vt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),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 o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),vt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),vt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let 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&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),vt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Er(o);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!yo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=Wa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Za(o)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!yo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=Wa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Za(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||b8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Za(r)&&!r.shiftKey},isKeyBackward(r){return Za(r)&&r.shiftKey}},t);this.doc=n.document||Dr(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=>{HL(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Bb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=hs(e,{getShadowRoot:this.config.getShadowRoot}),n=Wb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let l=!1;for(let f=0;f<t.length;f++)if(Wa(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(yo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(yo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(nn(this.doc,"focusin",this.handleFocus,!0),nn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),nn(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=ds(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Za=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,w8=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),_8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=qt(()=>{const o=typeof e=="function"?e():e;if(o){n=new T8(o,pe(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Dr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var rp="data-scroll-lock";function x8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=fs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(rp))return;const u=zT(r)||zT(o),l=n.innerWidth-r.clientWidth;o.setAttribute(rp,"");const d=()=>b5(r,"--scrollbar-width",`${l}px`),f=x8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),Gl(o,w)},m=()=>{var q,R;const{scrollX:w,scrollY:v,visualViewport:N}=n,S=(q=N==null?void 0:N.offsetLeft)!=null?q:0,A=(R=N==null?void 0:N.offsetTop)!=null?R:0,C={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(A))}px`,left:`${-(w-Math.floor(S))}px`,right:"0"};!u&&l>0&&(C[f]=`${l}px`);const U=Gl(o,C);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),ql()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(rp)}}var S8=To("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=S8.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},v8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},A8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),xs=e=>e.getById(VT(e)),Ss=e=>e.getById(ip(e)),WT=e=>e.getById(qT(e)),C8=e=>e.getById(op(e)),k8=e=>e.getById(sp(e));function N8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=KD(pe(B({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(B({id:v8(l)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(B({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(B({},zr.anchor.attrs),{dir:u("dir"),id:$T(l)}))},getTriggerProps(){return t.button(pe(B({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ip(l),onPointerDown(y){zb(y)&&KL()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(B({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(B({id:qT(l)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(B({},zr.content.attrs),{dir:u("dir"),id:ip(l),tabIndex:-1,role:"dialog","aria-modal":Db(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":us(d),"aria-labelledby":m.title?op(l):void 0,"aria-describedby":m.description?sp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(B({},zr.title.attrs),{id:op(l),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(B({},zr.description.attrs),{id:sp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(B({},zr.closeTrigger.attrs),{dir:u("dir"),id:A8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var P8={props({props:e}){return pe(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=YT(n))!=null?a:xs(n);return AT(r,()=>WT(n),pe(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ss(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:xs(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:E5(()=>Ss(t),{triggerElement:xs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Ss(t),xs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Ss(t),{initialFocus:()=>Gb({root:Ss(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:xs(n);AT(o,()=>WT(n),pe(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!C8(t),description:!!k8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=Gb({root:Ss(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||qt(()=>{const a=xs(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})}}}};gs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[pH,lc]=bo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[mH,ap]=bo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),O8=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),o=B({id:t,dir:r,getRootNode:n},e),a=Kl(P8,o);return N8(a,zh)},I8=e=>{const[t,u]=rT(e),l=u,{children:n}=l,r=hn(l,["children"]),o=O8(r),a=Vh(Yt({present:o.open},t));return _.jsx(I5,{value:o,children:_.jsx(eT,{value:a,children:n})})},GT=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),o=Yt(pe(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(_n.button,pe(B({},o),{ref:t}))});GT.displayName="PopoverTrigger";function R8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function L8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function D8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function M8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function F8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function B8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function up(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function XT(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const U8=({className:e,componentType:t,children:n})=>{const[r,o]=F.useState(!1),{globalClassName:a}=tt(),u=f=>{o(f.open)},l=F.useCallback(()=>{o(!1)},[]),d=F.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(I8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(XT,{})}),_.jsx(nT,{children:_.jsx(tT,{className:W(`${H}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(kb.Provider,{value:d,children:n})})})]})};function KT(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function QT(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[H8,xo]=bo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getControlProps(),e);return _.jsx(_n.div,pe(B(B({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["readOnly","index"]),o=xo(),a=Yt(o.getIndicatorProps(n),r);return _.jsx(_n.button,pe(B({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const ew=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getIndicatorGroupProps(),e);return _.jsx(_n.div,pe(B({},r),{ref:t}))});ew.displayName="CarouselIndicatorGroup";const tw=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["index","snapAlign"]),o=xo(),a=Yt(o.getItemProps(n),r);return _.jsx(_n.div,pe(B({},a),{ref:t}))});tw.displayName="CarouselItem";const nw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getItemGroupProps(),e);return _.jsx(_n.div,pe(B({},r),{ref:t}))});nw.displayName="CarouselItemGroup";const rw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getNextTriggerProps(),e);return _.jsx(_n.button,pe(B({},r),{ref:t}))});rw.displayName="CarouselNextTrigger";const iw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getPrevTriggerProps(),e);return _.jsx(_n.button,pe(B({},r),{ref:t}))});iw.displayName="CarouselPrevTrigger";function z8(e){const t=fs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=l(r,n.width),f=l(o,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function j8(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 ow(e){let t=[];for(const n of e.children)t=t.concat(n,ow(n));return t}function sw(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?ow(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!j8(n,m,u))continue;const T=fs(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,N=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:N});break;case"center":r[a].center.push({node:p,position:N+m[d]/2});break;case"end":r[a].end.push({node:p,position:N+m[d]});break}}}return r}function aw(e){const t=e.getBoundingClientRect(),n=z8(e),r=sw(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:uw([...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(lw(0,o.x))),y:uw([...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(lw(0,o.y)))}}function $8(e,t,n){const r=sw(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var uw=e=>[...new Set(e)],lw=(e,t)=>n=>Math.max(e,Math.min(t,n)),V8=To("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=V8.build(),q8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Y8=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},cc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},W8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},G8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},X8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},cw=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Fn=e=>e.getById(cc(e)),dw=e=>y5(Fn(e),"[data-part=item]"),K8=(e,t)=>e.getById(cw(e,t)),fw=e=>{const t=Fn(e);if(!t)return;const n=hs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function Q8(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=l("slidesPerPage"),N=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return w/y.length},scrollToIndex(A,C){a({type:"INDEX.SET",index:A,instant:C})},scrollTo(A,C){a({type:"PAGE.SET",index:A,instant:C})},scrollNext(A){a({type:"PAGE.NEXT",instant:A})},scrollPrev(A){a({type:"PAGE.PREV",instant:A})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(A){return Array.from(r.get("slidesInView")).includes(A)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(B({},ui.root.attrs),{id:q8(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(pe(B({},ui.itemGroup.attrs),{id:cc(u),"data-orientation":l("orientation"),"data-dragging":us(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(A){ls(A.currentTarget,Er(A))&&a({type:"VIEWPORT.FOCUS"})},onBlur(A){ls(A.currentTarget,A.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(A){if(A.defaultPrevented||!l("allowMouseDrag")||!zb(A))return;const C=Er(A);Mr(C)&&C!==A.currentTarget||(A.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:yL(A=>{const C=l("orientation")==="horizontal"?"deltaX":"deltaY";A[C]<0&&!o("canScrollPrev")||A[C]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:N,[T?"paddingInline":"paddingBlock"]:N,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(A){const C=r.get("slidesInView").includes(A.index);return t.element(pe(B({},ui.item.attrs),{id:Y8(u,A.index),dir:l("dir"),role:"group","data-index":A.index,"data-inview":us(C),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(A.index,l("slideCount")),"aria-hidden":Db(!C),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=A.snapAlign)!=null?ne:"start",q=l("slidesPerMove"),R=q==="auto"?Math.floor(l("slidesPerPage")):q;return(A.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(pe(B({},ui.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(pe(B({},ui.prevTrigger.attrs),{id:G8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":cc(u),onClick(A){A.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(B({},ui.nextTrigger.attrs),{dir:l("dir"),id:W8(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":cc(u),disabled:!p,onClick(A){A.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(B({},ui.indicatorGroup.attrs),{dir:l("dir"),id:X8(u),"data-orientation":l("orientation"),onKeyDown(A){if(A.defaultPrevented)return;const C="indicator",U={ArrowDown(Y){T||(a({type:"PAGE.NEXT",src:C}),Y.preventDefault())},ArrowUp(Y){T||(a({type:"PAGE.PREV",src:C}),Y.preventDefault())},ArrowRight(Y){T&&(a({type:"PAGE.NEXT",src:C}),Y.preventDefault())},ArrowLeft(Y){T&&(a({type:"PAGE.PREV",src:C}),Y.preventDefault())},Home(Y){a({type:"PAGE.SET",index:0,src:C}),Y.preventDefault()},End(Y){a({type:"PAGE.SET",index:y.length-1,src:C}),Y.preventDefault()}},q=t5(A,{dir:l("dir"),orientation:l("orientation")}),R=U[q];R==null||R(A)}}))},getIndicatorProps(A){return t.button(pe(B({},ui.indicator.attrs),{dir:l("dir"),id:cw(u,A.index),type:"button","data-orientation":l("orientation"),"data-index":A.index,"data-readonly":us(A.readOnly),"data-current":us(A.index===w),"aria-label":S.indicator(A.index),onClick(C){C.defaultPrevented||A.readOnly||a({type:"PAGE.SET",index:A.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(B({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":us(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(A){A.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var J8={props({props:e}){return SL(e,["slideCount"],"carousel"),pe(B({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:B({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:Z8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return aL(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Fn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Fn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),fw(e)});return fw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Fn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{o(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return dw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Fn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?nL(d,m):rL(d,m)},n.get("slidesInView"));n.set("slidesInView",iL(l))},{root:r,threshold:t("inViewThreshold")});return dw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Fn(n);return r?nn(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 nn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return m5(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 nn(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Rb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Fn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";o(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Fn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Pb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=oL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Fn(r);if(!o)return;const a=$8(o,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=Rb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Fn(n);if(!r)return;const o=aw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Fn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Fn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Fn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=aw(r),l=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=K8(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function Z8(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}gs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),gs()(["index","readOnly"]),gs()(["index","snapAlign"]);const eM=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),o=B({id:t,dir:r,getRootNode:n},e),a=Kl(J8,o);return Q8(a,zh)},hw=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=eM(n),a=Yt(o.getRootProps(),r);return _.jsx(H8,{value:o,children:_.jsx(_n.div,pe(B({},a),{ref:t}))})});hw.displayName="CarouselRoot";function tM(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function nM(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}const rM=180,iM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},oM=({globalClassName:e,className:t,itemMinWidth:n=rM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:p="Product carousel",children:m})=>{const T=Array.from(m).map(($,ie)=>({node:$,key:F.isValidElement($)&&$.key!=null?$.key:`carousel-item-${ie}`})),y=T.length,w=F.useRef(null),[v,N]=F.useState(0),{width:S}=sk();F.useLayoutEffect(()=>{w.current&&N(w.current.getBoundingClientRect().width)},[S,y]);const A=iM(r),C=n+A,U=v>0?(v+A)/C:1,q=Math.max(1,Math.floor(U));if(y===0)return null;const R=y>q,Y=Math.ceil(y/q),ne=R?Math.max(1,U):q,me=d==="circle-arrow";return _.jsxs(hw,{ref:w,className:W(e,t,`${H}-carousel`,{[`${H}-carousel--circle-arrow-navigation`]:me}),slidesPerPage:ne,slidesPerMove:q,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[_.jsx(nw,{className:W(e,`${H}-carousel__item-group`,{"carousel-row-container":!R}),children:T.map(({node:$,key:ie},fe)=>_.jsx(tw,{index:fe,className:W(e,`${H}-carousel__item`),children:$},ie))}),l&&R&&_.jsxs(JT,{className:W(e,`${H}-carousel__control`),children:[_.jsx(iw,{className:W(e,`${H}-carousel__prev-trigger`),"aria-label":"Previous slide",children:me?_.jsx(tM,{size:"16px"}):_.jsx(D8,{size:"16px"})}),_.jsx(rw,{className:W(e,`${H}-carousel__next-trigger`),"aria-label":"Next slide",children:me?_.jsx(nM,{size:"16px"}):_.jsx(M8,{size:"16px"})})]}),u&&R&&_.jsx(ew,{className:W(e,`${H}-carousel__indicator-group`),children:Array.from({length:Y},($,ie)=>_.jsx(ZT,{index:ie,className:W(e,`${H}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},[sM,aM]=bo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),uM=e=>Xa()(e,["lazyMount","unmountOnExit"]),[lM,tu]=bo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),pw=F.forwardRef((e,t)=>{const n=tu(),r=aM(),o=Vh(pe(B({},r),{present:n.open})),a=Yt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(_n.div,pe(B({},a),{ref:Ql(o.ref,t)}))});pw.displayName="DialogBackdrop";const lp=F.forwardRef((e,t)=>{const n=tu(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(_n.div,pe(B({},o),{ref:Ql(r.ref,t)}))});lp.displayName="DialogContent";const cp=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getDescriptionProps(),e);return _.jsx(_n.div,pe(B({},r),{ref:t}))});cp.displayName="DialogDescription";const dp=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getPositionerProps(),e);return Ga().unmounted?null:_.jsx(_n.div,pe(B({},r),{ref:t}))});dp.displayName="DialogPositioner";var cM=To("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=cM.build(),mw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},dc=e=>e.getById(fp(e)),dM=e=>e.getById(mw(e)),fM=e=>e.getById(gw(e)),hM=e=>e.getById(Ew(e)),pM=e=>e.getById(hp(e)),mM=e=>e.getById(pp(e)),gM=e=>e.getById(yw(e));function EM(e,t){const{state:n,send:r,context:o,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(pe(B({},So.trigger.attrs),{dir:a("dir"),id:Ew(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":fp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(B({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:gw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(B({},So.positioner.attrs),{dir:a("dir"),id:mw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(B({},So.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:fp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:hp(u),"aria-describedby":f.description?pp(u):void 0}))},getTitleProps(){return t.element(pe(B({},So.title.attrs),{dir:a("dir"),id:hp(u)}))},getDescriptionProps(){return t.element(pe(B({},So.description.attrs),{dir:a("dir"),id:pp(u)}))},getCloseTriggerProps(){return t.button(pe(B({},So.closeTrigger.attrs),{dir:a("dir"),id:yw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var yM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>gM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>dc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[hM(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>dc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[dc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!pM(t),description:!!mM(t)})})},syncZIndex({scope:e}){qt(()=>{const t=dc(e);if(!t)return;const n=fs(t);[dM(e),fM(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};gs()(["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 bM=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),o=B({id:t,getRootNode:n,dir:r},e),a=Kl(yM,o);return EM(a,zh)},bw=e=>{const[t,l]=rT(e),d=l,{children:n}=d,r=hn(d,["children"]),[o]=uM(t),a=bM(r),u=Vh(Yt({present:a.open},t));return _.jsx(lM,{value:a,children:_.jsx(sM,{value:o,children:_.jsx(eT,{value:u,children:n})})})},Tw=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getTitleProps(),e);return _.jsx(_n.h2,pe(B({},r),{ref:t}))});Tw.displayName="DialogTitle";const TM=({children:e})=>{const[t,n]=F.useState(!1),r=F.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=F.useMemo(()=>({isOpen:t}),[t]);return _.jsx(Ch.Provider,{value:r,children:_.jsx(Cb.Provider,{value:o,children:e})})},ww=()=>F.useContext(Cb),_w=()=>{const e=F.useContext(Ch);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},wM=`${H}-overflow-menu-button-trigger`,_M=({componentType:e,children:t})=>{const{isOpen:n}=ww(),{closeMenu:r}=_w(),{globalClassName:o}=tt(),a=F.useRef(null);return F.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${wM}`)||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,className:W(`${H}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},xM=({componentType:e,className:t})=>{const{toggleMenu:n}=_w(),{isOpen:r}=ww(),{globalClassName:o}=tt();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:_.jsx(XT,{})})},mp=()=>{const{status:e,entryType:t}=rr(),{messages:n}=Vn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},SM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=rr(),o=go(),a=()=>{pl(r||"dialog"),o()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(KT,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(KT,{}),"Show ",r||"dialog"]})},vM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=rr(),o=go(),a=()=>{xf(!r),o()},u=r?TN:wN,l="Toggle Fullscreen";return t?_.jsx(ri,{ariaLabel:l,title:l,className:W(n,`${H}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},AM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=rr(),o=go(),a=r==="bottom-left",u=()=>{Sf(a?"bottom-right":"bottom-left"),o()},l=a?L8:R8,d=a?"Move right":"Move left";return t?_.jsx(ri,{className:W(n,`${H}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},xw=({componentType:e,overflowActions:t,onClearChat:n,onEndConversation:r,onClose:o,onDownloadTranscript:a,availableActions:u})=>{const{headerConfig:l,globalClassName:d,layoutPreset:f}=tt(),{mode:p}=rr(),m=p==="standalone",T=e==="modal",y=T?SM:Sw,w=T?vM:AM,v=$=>u===void 0||u[$],N=($,ie=!0)=>t.includes($)&&v($)&&ie,S=v("toggleExpanded"),A=N(T?"toggleFullscreen":"toggleDialogPosition"),C=N("minimize"),U=N("clearChat"),q=v("close"),R=N("endConversation",!!r),Y=N("downloadTranscript",!!a),ne=A||C||U||R||Y,me=F.useMemo(()=>l?mN(l):{},[l]);return _.jsx(TM,{children:_.jsxs("div",{className:W(d,`${H}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:W(d,`${H}-${e}-header`,{standalone:m,embedded:!m}),style:me,children:[l!=null&&l.logoUrl?_.jsx("img",{alt:"",className:W(d,`${H}-${e}-logo`,{standalone:m,embedded:!m}),src:l.logoUrl}):f==="commerce"?_.jsx("svg",{className:W(d,`${H}-${e}-logo`,{standalone:m,embedded:!m}),viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:_.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,_.jsx(Tw,{className:W(d,`${H}-${e}-title`,{standalone:m,embedded:!m}),children:l==null?void 0:l.headerText}),_.jsxs("div",{className:W(d,`${H}-${e}-controls`),children:[ne&&_.jsx(xM,{componentType:e}),S&&_.jsx(y,{componentType:e,isIcon:!0}),q&&_.jsx(V1,{className:W(d,`cim-${e}-component`),label:l==null?void 0:l.closeButtonAriaLabel,onClick:o})]})]}),ne&&_.jsxs(_M,{componentType:e,children:[A&&_.jsx(w,{componentType:e}),C&&_.jsx(OM,{componentType:e}),U&&_.jsx(Nb,{componentType:e,onClearChat:n}),R&&r&&_.jsx(kM,{componentType:e,onEndConversation:r}),Y&&a&&_.jsx(CM,{componentType:e,onDownloadTranscript:a})]})]})})},CM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=go(),[o,a]=F.useState(!1),u=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(Z6,{}),"Download transcript"]})},kM=({onEndConversation:e,componentType:t})=>{const n=go(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[_.jsx(_N,{}),"End conversation"]})},NM={sparkle:up,plus:F8,"paper-plane":B8},gp=({icon:e,className:t})=>{const n=NM[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},PM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=w=>()=>{a(w)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=w=>_.jsxs(_.Fragment,{children:[l&&_.jsx(gp,{icon:l,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:w})]});return _.jsx("div",{className:W(t,`${H}-suggestion-container ${f}`,e),children:n.map(w=>o?_.jsx(El,{disabled:r,className:W(t,`${H}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):_.jsx("button",{disabled:r,className:W(t,`${H}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},OM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const o=()=>{ti(!1),Ea(!0),If()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(Y1,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(Y1,{}),"Minimize"]})},Sw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=go(),o=()=>{pl("modal"),r()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(QT,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(QT,{}),"Show modal"]})},IM=({isWidgetStandalone:e})=>{var N,S;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:l,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Or(),m=o==null?void 0:o.icon,T=(N=o==null?void 0:o.iconPosition)!=null?N:"left",y=F.useMemo(()=>{const A=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return d.some(U=>U.name==="conversation_reset")&&r||A},[d,n,r]),w=F.useMemo(()=>{var C,U;const A=((U=(C=l.message)==null?void 0:C.suggestions)!=null?U:[]).map(q=>q.displayText.trim()).filter(Boolean);return j0(A,a||[],u)},[(S=l.message)==null?void 0:S.suggestions,a,u]),v=A=>()=>{p({userPrompt:A})};return _.jsxs("div",{className:W(t,`${H}-ask-cim-entry-message`,`${H}-message-group`,e?"standalone":"embedded"),children:[_.jsx("p",{className:W(t,`${H}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&_.jsx("div",{className:W(t,`${H}-ask-cim-suggestions-container`,`${H}-suggestion-container`,e?"standalone":"embedded"),children:w.map(A=>_.jsxs(El,{disabled:f,className:W(t,`${H}-ask-cim-suggestion-button`,`${H}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(A),children:[m&&_.jsx(gp,{icon:m,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:A})]},A))})]})};function RM(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function LM(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function Ep({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!RM(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!LM(o)||r(o,e)}const DM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=tt();if(!n)return null;const u=n.getName(t),l=n.getBrand(t),d=n.getPriceDisplay(t),f=n.getRelativePdp(t),p=n.getPdp(t),m=n.getImage(t),T=f&&typeof f=="string"?new URL(f,window.location.origin).href:p,y=w=>Ep({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return _.jsxs("div",{className:W(r,`${H}-product-tile`,{embedded:!e,standalone:e}),children:[T?_.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:_.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):_.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),_.jsxs("div",{className:W(r,`${H}-product-tile-details`,{embedded:!e,standalone:e}),children:[_.jsxs("div",{className:W(r,`${H}-product-tile-content`),children:[l&&_.jsx("p",{className:`${H}-product-tile-brand`,children:l}),T?_.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${H}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",_.jsx("span",{className:W(r,`${H}-product-tile-pdp-arrow`),children:"→"})]}):_.jsx("p",{className:W(r,`${H}-product-tile-name`),title:u,children:u})]}),_.jsx("div",{className:W(r,`${H}-product-tile-footer`),children:_.jsx("p",{className:W(r,`${H}-product-tile-price`),children:d})})]})]})},MM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r,layoutPreset:o}=tt(),a=t;return n?_.jsxs("div",{className:W(r,`${H}-display-products`),children:[_.jsx("p",{children:a.message}),a.products&&a.products.length>0&&_.jsx(oM,{globalClassName:r,spacing:o==="commerce"?"12px":"0.5rem",ariaLabel:"Recommended products",children:a.products.map(u=>{const l=n.getPid(u);return _.jsx(DM,{isWidgetStandalone:e,product:u},`${l}`)})})]}):null},FM=({globalClassName:e,message:t,isWidgetStandalone:n})=>_.jsx("div",{className:W(e,`${H}-error-message`,{standalone:n,embedded:!n}),children:_.jsxs("p",{className:W(e,`${H}-error-message-text`,{standalone:n,embedded:!n}),children:[_.jsx(EN,{})," ",t.message||"An error occurred while processing your request."]})}),BM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Or(),{messages:u}=Vn(),l=u.find(v=>v.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Nv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const N=n.suggestions.find(S=>S.displayText===v);N&&o(N,n.eventSourceId||n.id)};return _.jsxs("div",{className:W(e,`${H}-follow-up`),children:[_.jsx("p",{className:W(e,`${H}-text`),children:n.message}),_.jsx(PM,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function vw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function UM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function HM(e,t,n){const o=kl((n||{}).ignore||[]),a=zM(t);let u=-1;for(;++u<a.length;)sy(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],w=T?T.children:void 0;if(o(y,w?w.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let w=0;const N=m.children.indexOf(f);let S=!1,A=[];T.lastIndex=0;let C=T.exec(f.value);for(;C;){const U=C.index,q={index:C.index,input:C.input,stack:[...p,f]};let R=y(...C,q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=U+1:(w!==U&&A.push({type:"text",value:f.value.slice(w,U)}),Array.isArray(R)?A.push(...R):R&&A.push(R),w=U+C[0].length,S=!0),!T.global)break;C=T.exec(f.value)}return S?(w<f.value.length&&A.push({type:"text",value:f.value.slice(w)}),m.children.splice(N,1,...A)):A=[f],N+A.length}}function zM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([jM(o[0]),$M(o[1])])}return t}function jM(e){return typeof e=="string"?new RegExp(UM(e),"g"):e}function $M(e){return typeof e=="function"?e:function(){return e}}const yp="phrasing",bp=["autolink","link","image","label"];function VM(){return{transforms:[QM],enter:{literalAutolink:YM,literalAutolinkEmail:Tp,literalAutolinkHttp:Tp,literalAutolinkWww:Tp},exit:{literalAutolink:KM,literalAutolinkEmail:XM,literalAutolinkHttp:WM,literalAutolinkWww:GM}}}function qM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:bp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:bp},{character:":",before:"[ps]",after:"\\/",inConstruct:yp,notInConstruct:bp}]}}function YM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tp(e){this.config.enter.autolinkProtocol.call(this,e)}function WM(e){this.config.exit.autolinkProtocol.call(this,e)}function GM(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 XM(e){this.config.exit.autolinkEmail.call(this,e)}function KM(e){this.exit(e)}function QM(e){HM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,JM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ZM]],{ignore:["link","linkReference"]})}function JM(e,t,n,r,o){let a="";if(!Aw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!eF(n)))return!1;const u=tF(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 ZM(e,t,n,r){return!Aw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function eF(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 tF(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=vw(e,"(");let a=vw(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Aw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||wl(n))&&(!t||n!==47)}Cw.peek=cF;function nF(){this.buffer()}function rF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iF(){this.buffer()}function oF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function aF(e){this.exit(e)}function uF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lF(e){this.exit(e)}function cF(){return"["}function Cw(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=o.move("]"),a}function dF(){return{enter:{gfmFootnoteCallString:nF,gfmFootnoteCall:rF,gfmFootnoteDefinitionLabelString:iF,gfmFootnoteDefinition:oF},exit:{gfmFootnoteCallString:sF,gfmFootnoteCall:aF,gfmFootnoteDefinitionLabelString:uF,gfmFootnoteDefinition:lF}}}function fF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
32
- `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?kw:hF))),f(),d}}function hF(e,t,n){return t===0?e:kw(e,t,n)}function kw(e,t,n){return(n?"":" ")+e}const pF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Nw.peek=bF;function mF(){return{canContainEols:["delete"],enter:{strikethrough:EF},exit:{strikethrough:yF}}}function gF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pF}],handlers:{delete:Nw}}}function EF(e){this.enter({type:"delete",children:[]},e)}function yF(e){this.exit(e)}function Nw(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function bF(){return"~"}function TF(e){return e.length}function wF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||TF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],N=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const A=_F(e[p][S]);if(n.alignDelimiters!==!1){const C=o(A);N[S]=C,(d[S]===void 0||C>d[S])&&(d[S]=C)}v.push(A)}u[p]=v,l[p]=N}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Pw(r[m]);else{const v=Pw(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let N="",S="";v===99?(N=":",S=":"):v===108?N=":":v===114&&(S=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[m]-N.length-S.length);const C=N+"-".repeat(A)+S;n.alignDelimiters!==!1&&(A=N.length+A+S.length,A>d[m]&&(d[m]=A),y[m]=A),T[m]=C}u.splice(1,0,T),l.splice(1,0,y),p=-1;const w=[];for(;++p<u.length;){const v=u[p],N=l[p];m=-1;const S=[];for(;++m<f;){const A=v[m]||"";let C="",U="";if(n.alignDelimiters!==!1){const q=d[m]-(N[m]||0),R=a[m];R===114?C=" ".repeat(q):R===99?q%2?(C=" ".repeat(q/2+.5),U=" ".repeat(q/2-.5)):(C=" ".repeat(q/2),U=C):U=" ".repeat(q)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(C),S.push(A),n.alignDelimiters!==!1&&S.push(U),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}w.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return w.join(`
33
- `)}function _F(e){return e==null?"":String(e)}function Pw(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 xF(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),SF);return o(),u}function SF(e,t,n){return">"+(n?"":" ")+e}function vF(e,t){return Ow(e,t.inConstruct,!0)&&!Ow(e,t.notInConstruct,!1)}function Ow(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 Iw(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
- `&&vF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
- `}function AF(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function CF(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 kF(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 NF(e,t,n,r){const o=kF(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(CF(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,PF);return m(),T}const l=n.createTracker(r),d=o.repeat(Math.max(AF(a,o)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,B({before:p,after:`
30
+ `},o),a}function rI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=uy(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return uy(n,B({file:r},e||t))}}function ly(e){if(e)throw e}var rh,cy;function iI(){if(cy)return rh;cy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return rh=function d(){var f,p,m,T,y,w,v=arguments[0],N=1,S=arguments.length,A=!1;for(typeof v=="boolean"&&(A=v,v=arguments[1]||{},N=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});N<S;++N)if(f=arguments[N],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(A&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(v,{name:p,newValue:d(A,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},rh}var oI=iI();const ih=Ue(oI);function oh(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 sI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...o);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?aI(p,l)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function aI(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return o(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...l){n||(n=!0,t(u,...l))}function a(u){o(null,u)}}const Rr={basename:uI,dirname:lI,extname:cI,join:dI,sep:"/"};function uI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ra(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function lI(e){if(Ra(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 cI(e){Ra(e);let t=e.length,n=-1,r=0,o=-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?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function dI(...e){let t=-1,n;for(;++t<e.length;)Ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":fI(n)}function fI(e){Ra(e);const t=e.codePointAt(0)===47;let n=hI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hI(e,t){let n="",r=0,o=-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(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const pI={cwd:mI};function mI(){return"/"}function sh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gI(e){if(typeof e=="string")e=new URL(e);else if(!sh(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 EI(e)}function EI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ah=["history","path","basename","stem","extname","dirname"];class dy{constructor(t){let n;t?sh(t)?n={path:t}:typeof t=="string"||yI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":pI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ah.length;){const a=ah[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){lh(t,"basename"),uh(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){fy(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(uh(t,"extname"),fy(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sh(t)&&(t=gI(t)),lh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){lh(t,"stem"),uh(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new bn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function lh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),TI={}.hasOwnProperty;class ch extends bI{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=sI()}copy(){const t=new ch;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ih(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hh("data",this.frozen),this.namespace[t]=n,this):TI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ol(t),r=this.parser||this.Parser;return dh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),dh("process",this.parser||this.Parser),fh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,w=r.stringify(y,T);xI(w)?T.value=w:T.result=w,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),dh("processSync",this.parser||this.Parser),fh("processSync",this.compiler||this.Compiler),this.process(t,o),py("processSync","process",n),r;function o(a,u){n=!0,ly(a),r=u}}run(t,n,r){hy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=Ol(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),py("runSync","run",r),o;function a(u,l){ly(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Ol(n),o=this.compiler||this.Compiler;return fh("stringify",o),hy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(hh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(o.settings=ih(!0,o.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];oh(v)&&oh(y)&&(y=ih(!0,v,y)),r[T]=[f,y,...w]}}}}const wI=new ch().freeze();function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hh(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 hy(e){if(!oh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function py(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ol(e){return _I(e)?e:new dy(e)}function _I(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xI(e){return typeof e=="string"||SI(e)}function SI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",my=[],gy={allowDangerousHtml:!0},AI=/^(https?|ircs?|mailto|xmpp)$/i,CI=[{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 Ey(e){const t=kI(e),n=NI(e);return PI(t.runSync(t.parse(n),n),e)}function kI(e){const t=e.rehypePlugins||my,n=e.remarkPlugins||my,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),gy):gy;return wI().use(aO).use(n).use(rI,r).use(t)}function NI(e){const t=e.children||"",n=new dy;return typeof t=="string"&&(n.value=t),n}function PI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||yy;for(const p of CI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+vI+p.id,void 0);return Pl(e,f),ZN(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in $f)if(Object.hasOwn($f,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=$f[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function yy(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||AI.test(e.slice(0,t))?e:""}const by=/[#.]/g;function OI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){by.lastIndex=o;const l=by.exec(n),d=n.slice(o,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),l&&(a=l[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Ty(e,t,n){const r=n?DI(n):void 0;function o(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=OI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,II(u))l.unshift(u);else for(const[m,T]of Object.entries(u))RI(e,d.properties,m,T)}for(const f of l)ph(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function II(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function RI(e,t,n,r){const o=yl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=uE(r):o.commaSeparated?a=X1(r):o.commaOrSpaceSeparated?a=uE(X1(r).join(" ")):a=wy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?LI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(wy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ph(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)ph(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ph(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||_a(n)===_a(t)))return!0}return n}function LI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function DI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const MI=["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"],FI=Ty(xa,"div"),BI=Ty(Ti,"g",MI);function UI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=_y(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 o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=_y(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 _y(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const fo={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/"},xy={}.hasOwnProperty,HI=Object.prototype;function zI(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ti:xa,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Il(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Sy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=UI(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"},Il(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Il(e,r,n),n}default:return n=jI(e,t),n}}function Sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function jI(e,t){const n=e.schema;e.schema=t.namespaceURI===fo.svg?Ti:xa;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;xy.call(HI,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?BI:FI)(t.tagName,o,Sy(e,t.childNodes));if(Il(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&ns(d.startTag),p=d&&d.endTag&&ns(d.endTag),m=mh(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Il(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=$I(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function $I(e,t,n){const r=ns(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)xy.call(n.attrs,u)&&(a[yl(e.schema,u).property]=ns(n.attrs[u]));n.startTag;const l=ns(n.startTag),d=n.endTag?ns(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ns(e){const t=vy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vy(e){return e.line&&e.column?e:void 0}const Ay={}.hasOwnProperty;function Cy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Ay.call(o,e)){const d=String(o[e]);u=Ay.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const VI={},qI={}.hasOwnProperty,ky=Cy("type",{handlers:{root:WI,element:JI,text:KI,comment:QI,doctype:XI}});function YI(e,t){const r=(t||VI).space;return ky(e,r==="svg"?Ti:xa)}function WI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=gh(e.children,n,t),rs(e,n),n}function GI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=gh(e.children,n,t),rs(e,n),n}function XI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return rs(e,t),t}function KI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return rs(e,t),t}function QI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return rs(e,t),t}function JI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ti);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&qI.call(e.properties,a)){const d=ZI(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:fo[u],childNodes:[],parentNode:null};return l.childNodes=gh(e.children,l,r),rs(e,l),e.tagName==="template"&&e.content&&(l.content=GI(e.content,r)),l}function ZI(e,t,n){const r=yl(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?K1(n):lE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=fo[r.space]}return o}function gh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=ky(e[r],n);a.parentNode=t,o.push(a)}return o}function rs(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 eR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tR=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 P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Mn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function nR(e){return e>=56320&&e<=57343}function rR(e,t){return(e-55296)*1024+9216+t}function Py(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Oy(e){return e>=64976&&e<=65007||tR.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const iR=65536;class oR{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=iR,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,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(nR(n))return this.pos++,this._addGap(),rR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ny(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Py(t)?this._err(te.controlCharacterInInputStream):Oy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(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"})(Ke||(Ke={}));function Iy(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 sR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),aR=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 uR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=aR.get(e))!==null&&t!==void 0?t:e}var Zt;(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"})(Zt||(Zt={}));const lR=32;var xi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xi||(xi={}));function Eh(e){return e>=Zt.ZERO&&e<=Zt.NINE}function cR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function dR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||Eh(e)}function fR(e){return e===Zt.EQUALS||dR(e)}var en;(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"})(en||(en={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class hR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|lR)===Zt.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Eh(o)||cR(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Eh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(uR(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&xi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=pR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||fR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&xi.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&xi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~xi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function pR(e,t,n,r){const o=(t&xi.BRANCH_LENGTH)>>7,a=t&xi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,l=u+o-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+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var ho;(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"})(ho||(ho={}));var or;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(or||(or={}));var X;(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"})(X||(X={}));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 mR=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function is(e){var t;return(t=mR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,gR={[le.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[le.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[le.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},yh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var I;(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"})(I||(I={}));const Lt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function ER(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function La(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function yR(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Si(e){return yR(e)||La(e)}function Ry(e){return Si(e)||ER(e)}function Rl(e){return e+32}function Ly(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Dy(e){return Ly(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function bR(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Oy(e)?te.noncharacterCharacterReference:Py(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class TR{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new oR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new hR(sR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=bR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.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(Iy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=is(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.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:Ke.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=Ly(t)?Ke.WHITESPACE_CHARACTER:t===P.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Si(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Si(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Si(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Si(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Si(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Si(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Si(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&Dy(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&Dy(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=St;break}default:this.currentAttr.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=St;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=St;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Mn.DASH_DASH,!0)?(this._createCommentToken(Mn.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(Mn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Mn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(Mn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Mn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=St;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(La(t))this._createDoctypeToken(String.fromCharCode(Rl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(St),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=St;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Mn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Mn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=St;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ry(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ry(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const My=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Fy=new Set([...My,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),wR=new Set([...Ll,g.OL,g.UL]),_R=new Set([...Ll,g.BUTTON]),By=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Uy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),xR=new Set([g.TR,g.TEMPLATE,g.HTML]),SR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),vR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),AR=new Set([g.TD,g.TH]);class CR{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)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(yh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(AR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(vR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(SR,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(xR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(Uy.has(o))return!1;break}case le.MATHML:{if(By.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,wR)}hasInButtonScope(t){return this.hasInDynamicScope(t,_R)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(yh.has(n))return!0;if(Ll.has(n))return!1;break}case le.SVG:{if(Uy.has(n))return!1;break}case le.MATHML:{if(By.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===le.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])===le.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&&My.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Fy.has(this.currentTagId);)this.pop()}}const bh=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Hy={type:Lr.Marker};class kR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Lr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<bh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<bh)return;const o=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=>o.get(d.name)===d.value)&&(a+=1,a>=bh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Hy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.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(Hy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const vi={createDocument(){return{nodeName:"#document",mode:or.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};vi.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(vi.isTextNode(n)){n.value+=t;return}}vi.appendChild(e,vi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&vi.isTextNode(r)?r.value+=t:vi.insertBefore(e,vi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},zy="html",NR="about:legacy-compat",PR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jy=["+//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//"],OR=[...jy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],IR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),$y=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],RR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Vy(e,t){return t.some(n=>e.startsWith(n))}function LR(e){return e.name===zy&&e.publicId===null&&(e.systemId===null||e.systemId===NR)}function DR(e){if(e.name!==zy)return or.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===PR)return or.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),IR.has(n))return or.QUIRKS;let r=t===null?OR:jy;if(Vy(n,r))return or.QUIRKS;if(r=t===null?$y:RR,Vy(n,r))return or.LIMITED_QUIRKS}return or.NO_QUIRKS}const qy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},MR="definitionurl",FR="definitionURL",BR=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])),UR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),HR=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])),zR=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 jR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||zR.has(t)}function Yy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===MR){e.attrs[t].name=FR;break}}function Wy(e){for(let t=0;t<e.attrs.length;t++){const n=BR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Th(e){for(let t=0;t<e.attrs.length;t++){const n=UR.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 $R(e){const t=HR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=is(e.tagName))}function VR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function qR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===qy.TEXT_HTML||o===qy.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function YR(e,t,n,r){return(!r||r===le.HTML)&&qR(e,t,n)||(!r||r===le.MATHML)&&VR(e,t)}const WR="hidden",GR=8,XR=3;var D;(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"})(D||(D={}));const KR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Gy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Xy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vi,onParseError:null};class Ky{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},Xy),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 TR(this.options,this),this.activeFormattingElements=new kR(this.treeAdapter),this.fragmentContextID=r?is(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new CR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},Xy),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:KR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=Lt.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)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&me(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&o===n.tagName?{endTag:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return YR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.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=D.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=D.IN_TABLE;return}case g.BODY:{this.insertionMode=D.IN_BODY;return}case g.FRAMESET:{this.insertionMode=D.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?D.AFTER_HEAD:D.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.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=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return Gy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.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 gR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){A6(this,t);return}switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{Jy(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Sh(this,t);break}case D.IN_TABLE_TEXT:{sb(this,t);break}case D.IN_COLUMN_GROUP:{Fl(this,t);break}case D.AFTER_BODY:{Hl(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v6(this,t);return}switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Sh(this,t);break}case D.IN_COLUMN_GROUP:{Fl(this,t);break}case D.AFTER_BODY:{Hl(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_h(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{_h(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.AFTER_BODY:{r4(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{i4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{o4(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case D.IN_TABLE_TEXT:{$a(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?C6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{s4(this,t);break}case D.BEFORE_HEAD:{u4(this,t);break}case D.IN_HEAD:{gr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{d4(this,t);break}case D.AFTER_HEAD:{h4(this,t);break}case D.IN_BODY:{wn(this,t);break}case D.IN_TABLE:{os(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_CAPTION:{l6(this,t);break}case D.IN_COLUMN_GROUP:{vh(this,t);break}case D.IN_TABLE_BODY:{Bl(this,t);break}case D.IN_ROW:{Ul(this,t);break}case D.IN_CELL:{f6(this,t);break}case D.IN_SELECT:{lb(this,t);break}case D.IN_SELECT_IN_TABLE:{p6(this,t);break}case D.IN_TEMPLATE:{g6(this,t);break}case D.AFTER_BODY:{y6(this,t);break}case D.IN_FRAMESET:{b6(this,t);break}case D.AFTER_FRAMESET:{w6(this,t);break}case D.AFTER_AFTER_BODY:{x6(this,t);break}case D.AFTER_AFTER_FRAMESET:{S6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?k6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{a4(this,t);break}case D.BEFORE_HEAD:{l4(this,t);break}case D.IN_HEAD:{c4(this,t);break}case D.IN_HEAD_NO_SCRIPT:{f4(this,t);break}case D.AFTER_HEAD:{p4(this,t);break}case D.IN_BODY:{Ml(this,t);break}case D.TEXT:{Z4(this,t);break}case D.IN_TABLE:{za(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_CAPTION:{c6(this,t);break}case D.IN_COLUMN_GROUP:{d6(this,t);break}case D.IN_TABLE_BODY:{Ah(this,t);break}case D.IN_ROW:{ub(this,t);break}case D.IN_CELL:{h6(this,t);break}case D.IN_SELECT:{cb(this,t);break}case D.IN_SELECT_IN_TABLE:{m6(this,t);break}case D.IN_TEMPLATE:{E6(this,t);break}case D.AFTER_BODY:{fb(this,t);break}case D.IN_FRAMESET:{T6(this,t);break}case D.AFTER_FRAMESET:{_6(this,t);break}case D.AFTER_AFTER_BODY:{zl(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{Da(this,t);break}case D.BEFORE_HTML:{Ma(this,t);break}case D.BEFORE_HEAD:{Fa(this,t);break}case D.IN_HEAD:{Ba(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case D.AFTER_HEAD:{Ha(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{ib(this,t);break}case D.TEXT:{e6(this,t);break}case D.IN_TABLE_TEXT:{$a(this,t);break}case D.IN_TEMPLATE:{db(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{xh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{Qy(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Sh(this,t);break}case D.IN_TABLE_TEXT:{ob(this,t);break}}}}function QR(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):rb(e,t),n}function JR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function ZR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=XR;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=e4(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function e4(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 t4(e,t,n){const r=e.treeAdapter.getTagName(t),o=is(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function n4(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function wh(e,t){for(let n=0;n<GR;n++){const r=QR(e,t);if(!r)break;const o=JR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=ZR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&t4(e,u,a),n4(e,o,r)}}function _h(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function r4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function i4(e,t){e._appendCommentNode(t,e.document)}function xh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function o4(e,t){e._setDocumentType(t);const n=t.forceQuirks?or.QUIRKS:DR(t);LR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=D.BEFORE_HTML}function Da(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,or.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function s4(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=D.BEFORE_HEAD):Ma(e,t)}function a4(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ma(e,t)}function Ma(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function u4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Fa(e,t)}}function l4(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Fa(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Fa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function gr(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function c4(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ba(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function po(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ba(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function d4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{gr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Ua(e,t)}}function f4(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case g.BR:{Ua(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ua(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function h4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),gr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ha(e,t)}}function p4(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ha(e,t);break}case g.TEMPLATE:{po(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ha(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=D.IN_BODY,Dl(e,t)}function Dl(e,t){switch(t.type){case Ke.CHARACTER:{Jy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Qy(e,t);break}case Ke.COMMENT:{_h(e,t);break}case Ke.START_TAG:{wn(e,t);break}case Ke.END_TAG:{Ml(e,t);break}case Ke.EOF:{ib(e,t);break}}}function Qy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function m4(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function g4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function E4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_FRAMESET)}function y4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function b4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&yh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function T4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function w4(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function _4(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function x4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Lt.PLAINTEXT}function S4(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function v4(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(wh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function A4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C4(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(wh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function k4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function N4(e,t){e.treeAdapter.getDocumentMode(e.document)!==or.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function Zy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function eb(e){const t=Iy(e,ho.TYPE);return t!=null&&t.toLowerCase()===WR}function P4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),eb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function O4(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function I4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function R4(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Zy(e,t)}function L4(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function D4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function M4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function tb(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function F4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function B4(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function U4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function H4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function z4(e,t){e._reconstructActiveFormattingElements(),Yy(t),Th(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function j4(e,t){e._reconstructActiveFormattingElements(),Wy(t),Th(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function nb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function wn(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:{A4(e,t);break}case g.A:{v4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{b4(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:{y4(e,t);break}case g.LI:case g.DD:case g.DT:{_4(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Zy(e,t);break}case g.HR:{I4(e,t);break}case g.RB:case g.RTC:{U4(e,t);break}case g.RT:case g.RP:{H4(e,t);break}case g.PRE:case g.LISTING:{T4(e,t);break}case g.XMP:{D4(e,t);break}case g.SVG:{j4(e,t);break}case g.HTML:{m4(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:{gr(e,t);break}case g.BODY:{g4(e,t);break}case g.FORM:{w4(e,t);break}case g.NOBR:{C4(e,t);break}case g.MATH:{z4(e,t);break}case g.TABLE:{N4(e,t);break}case g.INPUT:{P4(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{O4(e,t);break}case g.IMAGE:{R4(e,t);break}case g.BUTTON:{S4(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{k4(e,t);break}case g.IFRAME:{M4(e,t);break}case g.SELECT:{F4(e,t);break}case g.OPTION:case g.OPTGROUP:{B4(e,t);break}case g.NOEMBED:case g.NOFRAMES:{tb(e,t);break}case g.FRAMESET:{E4(e,t);break}case g.TEXTAREA:{L4(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?tb(e,t):nb(e,t);break}case g.PLAINTEXT:{x4(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:nb(e,t)}}function $4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function V4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,fb(e,t))}function q4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Y4(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 W4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function G4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function X4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function K4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Q4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function J4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function rb(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Ml(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:{wh(e,t);break}case g.P:{W4(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:{q4(e,t);break}case g.LI:{G4(e);break}case g.DD:case g.DT:{X4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{K4(e);break}case g.BR:{J4(e);break}case g.BODY:{$4(e,t);break}case g.HTML:{V4(e,t);break}case g.FORM:{Y4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{Q4(e,t);break}case g.TEMPLATE:{po(e,t);break}default:rb(e,t)}}function ib(e,t){e.tmplInsertionModeStack.length>0?db(e,t):xh(e,t)}function Z4(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 e6(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Sh(e,t){if(e.openElements.currentTagId!==void 0&&Gy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{sb(e,t);break}case Ke.WHITESPACE_CHARACTER:{ob(e,t);break}}else ja(e,t)}function t6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_CAPTION}function n6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function r6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,vh(e,t)}function i6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_TABLE_BODY}function o6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=D.IN_TABLE_BODY,Bl(e,t)}function s6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function a6(e,t){eb(t)?e._appendElement(t,le.HTML):ja(e,t),t.ackSelfClosing=!0}function u6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function os(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{o6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{gr(e,t);break}case g.COL:{r6(e,t);break}case g.FORM:{u6(e,t);break}case g.TABLE:{s6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{i6(e,t);break}case g.INPUT:{a6(e,t);break}case g.CAPTION:{t6(e,t);break}case g.COLGROUP:{n6(e,t);break}default:ja(e,t)}}function za(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{po(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:ja(e,t)}}function ja(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dl(e,t),e.fosterParentingEnabled=n}function ob(e,t){e.pendingCharacterTokens.push(t)}function sb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $a(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ja(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ab=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function l6(e,t){const n=t.tagID;ab.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,os(e,t)):wn(e,t)}function c6(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=D.IN_TABLE,n===g.TABLE&&za(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:Ml(e,t)}}function vh(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{gr(e,t);break}default:Fl(e,t)}}function d6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TEMPLATE:{po(e,t);break}case g.COL:break;default:Fl(e,t)}}function Fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function Bl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=D.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=D.IN_ROW,Ul(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=D.IN_TABLE,os(e,t));break}default:os(e,t)}}function Ah(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,za(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:za(e,t)}}function Ul(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=D.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=D.IN_TABLE_BODY,Bl(e,t));break}default:os(e,t)}}function ub(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Ah(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Ah(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:za(e,t)}}function f6(e,t){const n=t.tagID;ab.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ul(e,t)):wn(e,t)}function h6(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=D.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ub(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ml(e,t)}}function lb(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.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:{gr(e,t);break}}}function cb(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:{po(e,t);break}}}function p6(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)):lb(e,t)}function m6(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)):cb(e,t)}function g6(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:{gr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,os(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,vh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,Bl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,Ul(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,wn(e,t)}}function E6(e,t){t.tagID===g.TEMPLATE&&po(e,t)}function db(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xh(e,t)}function y6(e,t){t.tagID===g.HTML?wn(e,t):Hl(e,t)}function fb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=D.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 Hl(e,t)}function Hl(e,t){e.insertionMode=D.IN_BODY,Dl(e,t)}function b6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{gr(e,t);break}}}function T6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function w6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function _6(e,t){t.tagID===g.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function x6(e,t){t.tagID===g.HTML?wn(e,t):zl(e,t)}function zl(e,t){e.insertionMode=D.IN_BODY,Dl(e,t)}function S6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function v6(e,t){t.chars=St,e._insertCharacters(t)}function A6(e,t){e._insertCharacters(t),e.framesetOk=!1}function hb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function C6(e,t){if(jR(t))hb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Yy(t):r===le.SVG&&($R(t),Wy(t)),Th(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function k6(e,t){if(t.tagID===g.P||t.tagID===g.BR){hb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const N6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,P6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),pb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function mb(e,t){const n=H6(e),r=Cy("type",{handlers:{root:O6,element:I6,text:R6,comment:Eb,doctype:L6,raw:M6},unknown:F6}),o={parser:n?new Ky(pb):Ky.getFragmentParser(void 0,pb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),ss(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=zI(a,{file:o.options.file});return o.stitches&&Pl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function gb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function O6(e,t){gb(e.children,t)}function I6(e,t){B6(e,t),gb(e.children,t),U6(e,t)}function R6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function L6(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function D6(e,t){t.stitches=!0;const n=z6(e);if("children"in e&&"children"in n){const r=mb({type:"root",children:e.children},t.options);n.children=r.children}Eb({type:"comment",value:{stitch:n}},t)}function Eb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Va(e)};ss(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function M6(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,yb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(N6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function F6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))D6(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 ss(e,t){yb(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=Lt.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 yb(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 B6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;ss(t,Ir(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:fo.html;o===fo.html&&n==="svg"&&(o=fo.svg);const a=YI(me(B({},e),{children:[]}),{space:o===fo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:is(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Va(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function U6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&eR.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;ss(t,bl(e));const r={type:Ke.END_TAG,tagName:n,tagID:is(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Va(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function H6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Va(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=bl(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 z6(e){return"children"in e?co(me(B({},e),{children:[]})):co(e)}function bb(e){return function(t,n){return mb(t,me(B({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Tb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...mo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...mo],h2:[["className","sr-only"]],img:[...mo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...mo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...mo],table:[...mo],ul:[...mo,["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"]},Ai={}.hasOwnProperty;function j6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Tb),t):Tb,stack:[]},o=wb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function wb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return $6(e,n);case"doctype":return V6(e,n);case"element":return q6(e,n);case"root":return Y6(e,n);case"text":return W6(e,n)}}}function $6(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 qa(a,t),a}}function V6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return qa(n,t),n}}function q6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=_b(e,t.children),o=G6(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&&Ai.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:o,children:r};return qa(u,t),u}function Y6(e,t){const r={type:"root",children:_b(e,t.children)};return qa(r,t),r}function W6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return qa(r,t),r}function _b(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=wb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function G6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ai.call(r,n)?r[n]:void 0,u=r&&Ai.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ai.call(l,f)){const p=l[f];let m=xb(e,vb(a,f),f,p);m==null&&(m=xb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ai.call(o,n)){const p=o[n];for(f in p)Ai.call(p,f)&&!Ai.call(d,f)&&(d[f]=p[f])}return d}function xb(e,t,n,r){return t?Array.isArray(r)?X6(e,t,n,r):Sb(e,t,n,r):void 0}function X6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Sb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Sb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&K6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function K6(e,t,n){const r=e.schema.protocols&&Ai.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),l=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function qa(e,t){const n=mE(t);t.data&&(e.data=co(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Q6(e){return function(t){return j6(t,e)}}const Ab=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:o,children:a})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return _.jsx("a",me(B(B({className:W(e,`${H}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},J6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:_.jsx("div",{className:W(n,`${H}-disclaimer`),children:t?_.jsx(Ey,{rehypePlugins:[bb,Q6],components:{ul:({children:r})=>_.jsx("ul",{className:W(n,`${H}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:W(n,`${H}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:W(n,`${H}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Ab,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:W(n,`${H}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:W(n,`${H}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:e})})},Ch=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Vn(),{setImageFile:u}=Xo(),{logger:l,globalClassName:d,searchConfig:f,features:p}=tt(),m=F.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!o||!1,w=y?"connected":"disconnected",v=t||!y,N=()=>a?new Promise((U,V)=>{const R=new FileReader;R.readAsDataURL(a),R.onload=()=>U(R.result),R.onerror=q=>V(q)}):Promise.resolve(""),S=()=>{u(null)},A=F.useCallback(U=>{const V=U==null?void 0:U[0];if(V&&!v){if(V.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(V)}},[v,u]),C=U=>et(null,null,function*(){var q;U.preventDefault();const V=(((q=m.current)==null?void 0:q.value)||"").trim();let R="";try{R=yield N()}catch(re){l==null||l.error("Error converting file to base64:",re),alert("There was an error processing the file. Please try again.");return}V&&(S(),m.current.value="",r(V,R))});return _.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${H}-search-bar-wrapper`),children:[a&&_.jsx(gN,{file:a,componentType:n,globalClassName:d,onRemove:S}),_.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${H}-search-bar`),name:`${H}-search-form`,onSubmit:C,children:[_.jsx("span",{role:"status",className:W(`${H}-connection-status-icon`,w),children:_.jsx("span",{className:`${H}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&_.jsx(SN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:v,globalClassName:d,className:e,onFiles:A}),_.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question",name:`${H}-user-input`}),_.jsx(NN,{isLoading:v}),_.jsx(AN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),_.jsx(J6,{})]})};function Z6(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function eL(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Cb=F.createContext({isOpen:!1}),kh=F.createContext(null),kb=F.createContext(null),go=()=>{var n,r;const e=F.useContext(kh),t=F.useContext(kb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=go(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(eL,{}),"Clear chat"]})};function tL(e){return e==null?[]:Array.isArray(e)?e:[e]}var nL=(e,...t)=>e.concat(t),rL=(e,...t)=>e.filter(n=>!t.includes(n)),iL=e=>Array.from(new Set(e));function Pb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function oL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Pb(e,t,{step:-r,loop:o})}var sL=e=>Array.isArray(e),Ob=e=>e!=null&&typeof e=="object",aL=e=>Ob(e)&&!sL(e),jl=e=>typeof e=="string",as=e=>typeof e=="function",uL=e=>e==null,lL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),cL=e=>Object.prototype.toString.call(e),Ib=Function.prototype.toString,dL=Ib.call(Object),fL=e=>{if(!Ob(e)||cL(e)!="[object Object]"||mL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=lL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ib.call(n)==dL},hL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,pL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,mL=e=>hL(e)||pL(e),gL=e=>e(),EL=()=>{},Nh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function yL(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:bL,max:TL}=Math,wL=e=>Number.isNaN(e),_L=e=>wL(e)?0:e,Rb=(e,t,n)=>bL(TL(_L(e),t),n);function Ph(e){if(!fL(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Ph(o))}return n}function Oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function xL(e,t){if(e==null)throw new Error(t())}function SL(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var vL=Object.defineProperty,AL=(e,t,n)=>t in e?vL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ih=(e,t,n)=>AL(e,typeof t!="symbol"?t+"":t,n),Lb=()=>{},$l=e=>typeof e=="object"&&e!==null,us=e=>e?"":void 0,Db=e=>e?"true":void 0,CL=1,kL=9,NL=11,tn=e=>$l(e)&&e.nodeType===CL&&typeof e.nodeName=="string",Vl=e=>$l(e)&&e.nodeType===kL,PL=e=>$l(e)&&e===e.window,Mb=e=>tn(e)?e.localName||"":"#document";function OL(e){return["html","body","#document"].includes(Mb(e))}var IL=e=>$l(e)&&e.nodeType!==void 0,Eo=e=>IL(e)&&e.nodeType===NL&&"host"in e,RL=e=>tn(e)&&e.localName==="input",LL=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ya(e){if(!e)return!1;const t=e.getRootNode();return ds(t)===e}var DL=/(textarea|select)/;function ML(e){if(e==null||!tn(e))return!1;try{return RL(e)&&e.selectionStart!=null||DL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ls(e,t){var r;if(!e||!t||!tn(e)||!tn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Eo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Dr(e){var t;return Vl(e)?e:PL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function FL(e){return Dr(e).documentElement}function cs(e){var t,n,r;return Eo(e)?cs(e.host):Vl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ds(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 BL(e){if(Mb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||FL(e);return Eo(t)?t.host:t}function Rh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Vl(t)||Eo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Lh=new WeakMap;function fs(e){return Lh.has(e)||Lh.set(e,cs(e).getComputedStyle(e)),Lh.get(e)}var Dh=new Set(["menu","listbox","dialog","grid","tree","region"]),UL=e=>Dh.has(e),Fb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Bb(e,t){const n=new Set,r=Rh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Fb(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&UL(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Ub(e,t){const n=Rh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Fb(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Dh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function HL(e){const t=new Set;return Ub(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function zL(e){const t=e.getAttribute("role");return!!(t&&Dh.has(t))}function jL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function $L(e){var t;return jL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function VL(e){if(!e.id)return!1;const t=Rh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&zL(e))}var Mh=()=>typeof document!="undefined";function qL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Fh=e=>Mh()&&e.test(qL()),YL=e=>Mh()&&e.test(navigator.vendor),Hb=()=>Mh()&&!!navigator.maxTouchPoints,WL=()=>Fh(/^iPhone/i),GL=()=>Fh(/^iPad/i)||Bh()&&navigator.maxTouchPoints>1,ql=()=>WL()||GL(),XL=()=>Bh()||ql(),Bh=()=>Fh(/^Mac/i),KL=()=>XL()&&YL(/apple/i);function QL(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Er(e){var n;const t=QL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var zb=e=>e.button===0,JL=e=>e.button===2||Bh()&&e.ctrlKey&&e.button===0,ZL=e=>"touches"in e&&e.touches.length>0,e5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},jb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function t5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=e5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in jb&&(o=jb[o]),o}function $b(e,t="client"){const n=ZL(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Vb=e=>tn(e)&&e.tagName==="IFRAME",n5=/^(audio|video|details)$/;function qb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var r5=e=>!Number.isNaN(qb(e)),i5=e=>qb(e)<0;function o5(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 Yb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<o.length;){const d=o[l++];if(!d||a.has(d))continue;a.add(d);const f=o5(d,t);if(f){const p=Array.from(f.querySelectorAll(Yl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var Yl="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",Wb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Yl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Mr(e)&&o.unshift(e);const u=[];for(const l of o)if(Mr(l)){if(Vb(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...Wb(d,{getShadowRoot:r}));continue}u.push(l)}return r?Yb(u,r,Mr):u};function Mr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Yl)&&LL(e)}function hs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Yl));n&&yo(e)&&o.unshift(e);const a=[];for(const u of o)if(yo(u)){if(Vb(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...hs(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Yb(a,r,yo);return!u.length&&n?o:u}return!a.length&&n?o:a}function yo(e){return tn(e)&&e.tabIndex>0?!0:Mr(e)&&!i5(e)}function s5(e,t={}){const n=hs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function a5(e,t={}){const{current:n,getShadowRoot:r}=t,o=hs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ds(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function Wa(e){return e.tabIndex<0&&(n5.test(e.localName)||ML(e))&&!r5(e)?0:e.tabIndex}function Gb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=hs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var u5=class nS{constructor(){Ih(this,"id",null),Ih(this,"fn_cleanup"),Ih(this,"cleanup",()=>{this.cancel()})}static create(){return new nS}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=u5.create();return t.request(e),t.cleanup}function Xb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Uh(e){const t=BL(e);return OL(t)?Dr(t).body:tn(t)&&d5(t)?t:Uh(t)}var l5=/auto|scroll|overlay|hidden|clip/,c5=new Set(["inline","contents"]);function d5(e){const t=cs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return l5.test(n+o+r)&&!c5.has(a)}var ps="default",Hh="",Wl=new WeakMap;function f5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return ql()?(ps==="default"&&(Hh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),ps="disabled"):t&&(Wl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>h5({target:t,doc:r})}function h5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(ql()){if(ps!=="disabled")return;ps="restoring",setTimeout(()=>{Xb(()=>{ps==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Hh||""),Hh="",ps="default")})},300)}else if(t&&Wl.has(t)){const a=Wl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Wl.delete(t)}}function p5(e={}){const u=e,{defer:t,target:n}=u,r=hn(u,["defer","target"]),o=t?qt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(f5(me(B({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function m5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=$b(l),f=Math.sqrt(Hu(d.x,2)+Hu(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=$b(l);r({point:d,event:l})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),p5({doc:e})];return()=>{u.forEach(l=>l())}}function g5(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=s5(e,{includeContainer:!0,getShadowRoot:a}),y=a5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&Ya(y)?(o==null||o(),p=T):f.shiftKey&&(Ya(m)||w)?p=n:!f.shiftKey&&Ya(n)?(o==null||o(),p=m):!f.shiftKey&&(Ya(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function E5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=hn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(g5(d,B({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function y5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Gl(e,t){if(!e)return Lb;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function b5(e,t,n){if(!e)return Lb;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 T5(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 w5(e,t){const{timeout:n,rootNode:r}=t,o=cs(r),a=Dr(r),u=new o.AbortController;return T5(new Promise(l=>{const d=e();if(d){l(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var _5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),x5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Kb=e=>{const t={};let n;for(;n=x5.exec(e);)t[n[1]]=n[2];return t},S5=(e,t)=>{if(jl(e)){if(jl(t))return`${e};${t}`;e=Kb(e)}else jl(t)&&(t=Kb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Nh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=_5(t[o],n[o]);continue}if(o==="style"){t[o]=S5(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function pH(e){return e}var ms=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ms||{}),zh="__init__";function v5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ds(t()),a=u=>t().getElementById(u);return me(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ya,getById:a})}function A5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var gs=()=>e=>Array.from(new Set(e)),Qb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Xl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=F.useState(t),[o,a]=F.useState(r),u=e().value!==void 0,l=F.useRef(o);l.current=u?e().value:o;const d=F.useRef(l.current);Qb(()=>{d.current=l.current},[o,e().value]);const f=y=>{var N,S;const w=d.current,v=as(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(S=(N=e()).onChange)==null||S.call(N,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?Ko.flushSync:gL)(()=>f(y))},invoke(y,w){var v,N;(N=(v=e()).onChange)==null||N.call(v,y,w)},hash(y){var w,v,N;return(N=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?N:String(y)}}}Xl.cleanup=e=>{F.useEffect(()=>e,[])},Xl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function C5(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var k5=(e,t)=>{const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Kl(e,t={}){var ie,he,ke,ne,ae,Se;const n=F.useMemo(()=>{const{id:se,ids:J,getRootNode:oe}=t;return v5({id:se,ids:J,getRootNode:oe})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(he=(ie=e.props)==null?void 0:ie.call(e,{props:Ph(t),scope:n}))!=null?he:t,a=N5(o),u=(ke=e.context)==null?void 0:ke.call(e,{prop:a,bindable:Xl,scope:n,flush:Zb,getContext(){return d},getComputed(){return V},getRefs(){return v},getEvent(){return y()}}),l=Jb(u),d={get(se){var J;return(J=l.current)==null?void 0:J[se].ref.current},set(se,J){var oe;(oe=l.current)==null||oe[se].set(J)},initial(se){var J;return(J=l.current)==null?void 0:J[se].initial},hash(se){var oe,k;const J=(oe=l.current)==null?void 0:oe[se].get();return(k=l.current)==null?void 0:k[se].hash(J)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>me(B({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>me(B({},R),{matches(...se){return se.includes(R.ref.current)},hasTag(se){var J,oe;return!!((oe=(J=e.states[R.ref.current])==null?void 0:J.tags)!=null&&oe.includes(se))}}),v=C5((ae=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?ae:{}),N=()=>({state:w(),context:d,event:y(),prop:a,send:Y,action:S,guard:A,track:k5,refs:v,computed:V,flush:Zb,scope:n,choose:U}),S=se=>{const J=as(se)?se(N()):se;if(!J)return;const oe=J.map(k=>{var Q,O;const M=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[k];return M||Oh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of oe)k==null||k(N())},A=se=>{var J,oe;return as(se)?se(N()):(oe=(J=e.implementations)==null?void 0:J.guards)==null?void 0:oe[se](N())},C=se=>{const J=as(se)?se(N()):se;if(!J)return;const oe=J.map(M=>{var O,_e;const Q=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return Q||Oh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),Q}),k=[];for(const M of oe){const Q=M==null?void 0:M(N());Q&&k.push(Q)}return()=>k.forEach(M=>M==null?void 0:M())},U=se=>tL(se).find(J=>{let oe=!J.guard;return jl(J.guard)?oe=!!A(J.guard):as(J.guard)&&(oe=J.guard(N())),oe}),V=se=>{xL(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[se];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:V})},R=Xl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,J){var k,M,Q,O;if(J){const _e=f.current.get(J);_e==null||_e(),f.current.delete(J)}J&&S((k=e.states[J])==null?void 0:k.exit),S((M=p.current)==null?void 0:M.actions);const oe=C((Q=e.states[se])==null?void 0:Q.effects);if(oe&&f.current.set(se,oe),J===zh){S(e.entry);const _e=C(e.effects);_e&&f.current.set(zh,_e)}S((O=e.states[se])==null?void 0:O.entry)}})),q=F.useRef(void 0),re=F.useRef(ms.NotStarted);Qb(()=>{queueMicrotask(()=>{var M;const oe=re.current===ms.Started;re.current=ms.Started,r(oe?"rehydrating...":"initializing...");const k=(M=q.current)!=null?M:R.initial;R.invoke(k,oe?R.get():zh)});const se=f.current,J=R.ref.current;return()=>{r("unmounting..."),q.current=J,re.current=ms.Stopped,se.forEach(oe=>oe==null?void 0:oe()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const de=()=>"ref"in R?R.ref.current:R.get(),Y=se=>{queueMicrotask(()=>{var O,_e,Be,ve,xe;if(re.current!==ms.Started)return;m.current=T.current,T.current=se;let J=de();const oe=(Be=(O=e.states[J].on)==null?void 0:O[se.type])!=null?Be:(_e=e.on)==null?void 0:_e[se.type],k=U(oe);if(!k)return;p.current=k;const M=(ve=k.target)!=null?ve:J;r("transition",se.type,k.target||J,`(${k.actions})`);const Q=M!==J;Q?Ko.flushSync(()=>R.set(M)):k.reenter&&!Q?R.invoke(J,J):S((xe=k.actions)!=null?xe:[])})};return(Se=e.watch)==null||Se.call(e,N()),{state:w(),send:Y,context:d,prop:a,scope:n,refs:v,computed:V,event:y(),getStatus:()=>re.current}}function Jb(e){const t=F.useRef(e);return t.current=e,t}function N5(e){const t=Jb(e);return function(r){return t.current[r]}}function Zb(e){queueMicrotask(()=>{Ko.flushSync(()=>e())})}var jh=A5(e=>e);function Ql(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function P5(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $h=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=hn(f,["asChild","children"]);if(!o)return F.createElement(e,me(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const l=F.Children.only(a),d=P5(l);return F.cloneElement(l,me(B({},Yt(u,l.props)),{ref:r?Ql(r,d):d}))}));return t.displayName=e.displayName||e.name,t},_n=(()=>{const e=new Map;return new Proxy($h,{apply(t,n,r){return $h(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,$h(r)),e.get(r)}})})();function O5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function bo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=F.createContext(u);l.displayName=t;function d(){var p;const f=F.useContext(l);if(!f&&n){const m=new Error(a!=null?a:O5(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[I5,Vh]=bo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[eT,Ga]=bo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),tT=F.forwardRef((e,t)=>{const n=Vh(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(_n.div,me(B({},o),{ref:Ql(r.ref,t)}))});tT.displayName="PopoverContent";const nT=F.forwardRef((e,t)=>{const n=Vh(),r=Ga(),o=Yt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(_n.div,me(B({},o),{ref:t}))});nT.displayName="PopoverPositioner";const Xa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),rT=e=>Xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function R5(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var L5={props({props:e}){return me(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",fs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});qt(()=>{var l,d;const u=Jl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{qt(()=>{e.set("prevAnimationName",Jl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Jl(t.get("styles")))},u=d=>{const f=Jl(t.get("styles"));Er(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const l=Gl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Xb(()=>l())}}}}};function Jl(e){return(e==null?void 0:e.animationName)||"none"}gs()(["onExitComplete","present","immediate"]);function D5(e,t={}){const{sync:n=!1}=t,r=M5(e);return F.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function M5(e){const t=F.useRef(e);return t.current=e,t}const qh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=hn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),l=me(B({},a),{present:r,onExitComplete:D5(e.onExitComplete)}),d=Kl(L5,l),f=R5(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var To=(e,t=[])=>({parts:(...n)=>{if(F5(t))return To(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>To(e,[...t,...n]),omit:(...n)=>To(e,t.filter(r=>!n.includes(r))),rename:n=>To(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Es(e)}"][data-part="${Es(r)}"]`,`& [data-scope="${Es(e)}"][data-part="${Es(r)}"]`].join(", "),attrs:{"data-scope":Es(e),"data-part":Es(r)}}}),{})}),Es=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),F5=e=>e.length===0;const B5=["top","right","bottom","left"],Ci=Math.min,oi=Math.max,Zl=Math.round,ec=Math.floor,Fr=e=>({x:e,y:e}),U5={left:"right",right:"left",bottom:"top",top:"bottom"};function iT(e,t,n){return oi(e,Ci(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function ys(e){return e.split("-")[1]}function Yh(e){return e==="x"?"y":"x"}function Wh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gh(e){return Yh(Br(e))}function H5(e,t,n){n===void 0&&(n=!1);const r=ys(e),o=Gh(e),a=Wh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=tc(u)),[u,tc(u)]}function z5(e){const t=tc(e);return[Xh(e),t,Xh(t)]}function Xh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const oT=["left","right"],sT=["right","left"],j5=["top","bottom"],$5=["bottom","top"];function V5(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?j5:$5;default:return[]}}function q5(e,t,n,r){const o=ys(e);let a=V5(ki(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Xh)))),a}function tc(e){const t=ki(e);return U5[t]+e.slice(t.length)}function Y5(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function aT(e){return typeof e!="number"?Y5(e):{top:e,right:e,bottom:e,left:e}}function nc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Br(t),u=Gh(t),l=Wh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[l]/2-o[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}const w=ys(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function W5(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=si(t,e),w=aT(y),N=l[T?m==="floating"?"reference":"floating":m],S=nc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(N))==null||n?N:N.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),A=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},V=nc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:C,strategy:d}):A);return{top:(S.top-V.top+w.top)/U.y,bottom:(V.bottom-S.bottom+w.bottom)/U.y,left:(S.left-V.left+w.left)/U.x,right:(V.right-S.right+w.right)/U.x}})}const G5=50,X5=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:me(B({},u),{detectOverflow:W5}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const N=a[v];if(!N)continue;const{name:S,fn:A}=N,{x:C,y:U,data:V,reset:R}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});p=C!=null?C:p,m=U!=null?U:m,w[S]=B(B({},w[S]),V),R&&y<G5&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:m}=uT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),K5=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},w=Gh(a),v=Wh(w),N=yield l.getDimensions(p),S=w==="y",A=S?"top":"left",C=S?"bottom":"right",U=S?"clientHeight":"clientWidth",V=u.reference[v]+u.reference[w]-y[w]-u.floating[v],R=y[w]-u.reference[w],q=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let re=q?q[U]:0;(!re||!(yield l.isElement==null?void 0:l.isElement(q)))&&(re=d.floating[U]||u.floating[v]);const de=V/2-R/2,Y=re/2-N[v]/2-1,ie=Ci(T[A],Y),he=Ci(T[C],Y),ke=re-N[v]-he,ne=re/2-N[v]/2+de,ae=iT(ie,ne,ke),Se=!f.arrow&&ys(a)!=null&&ne!==ae&&u.reference[v]/2-(ne<ie?ie:he)-N[v]/2<0,se=Se?ne<ie?ne-ie:ne-ke:0;return{[w]:y[w]+se,data:B({[w]:ae,centerOffset:ne-ae-se},Se&&{alignmentOffset:se}),reset:Se}})}}),Q5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ae=si(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:N=!0}=ae,S=hn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const A=ki(a),C=Br(d),U=ki(d)===d,V=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!N?[tc(d)]:z5(d)),q=v!=="none";!y&&q&&R.push(...q5(d,N,v,V));const re=[d,...R],de=yield f.detectOverflow(n,S),Y=[];let ie=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&Y.push(de[A]),T){const Se=H5(a,l,V);Y.push(de[Se[0]],de[Se[1]])}if(ie=[...ie,{placement:a,overflows:Y}],!Y.every(Se=>Se<=0)){var he,ke;const Se=(((he=u.flip)==null?void 0:he.index)||0)+1,se=re[Se];if(se&&(!(T==="alignment"?C!==Br(se):!1)||ie.every(k=>Br(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Se,overflows:ie},reset:{placement:se}};let J=(ke=ie.filter(oe=>oe.overflows[0]<=0).sort((oe,k)=>oe.overflows[1]-k.overflows[1])[0])==null?void 0:ke.placement;if(!J)switch(w){case"bestFit":{var ne;const oe=(ne=ie.filter(k=>{if(q){const M=Br(k.placement);return M===C||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,Q)=>M+Q,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:ne[0];oe&&(J=oe);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function lT(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 B5.some(t=>e[t]>=0)}const J5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:o}=n,l=si(e,n),{strategy:a="referenceHidden"}=l,u=hn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,me(B({},u),{elementContext:"reference"})),f=lT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:cT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,me(B({},u),{altBoundary:!0})),f=lT(d,r.floating);return{data:{escapedOffsets:f,escaped:cT(f)}}}default:return{}}})}}},dT=new Set(["left","top"]);function Z5(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=ki(n),l=ys(n),d=Br(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof w=="number"&&(y=l==="end"?w*-1:w),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const eD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield Z5(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:me(B({},f),{placement:l})}})}}},tD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,platform:u}=n,C=si(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:V,y:R}=U;return{x:V,y:R}}}}=C,p=hn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=Br(a),w=Yh(y);let v=m[w],N=m[y];const S=(U,V)=>iT(V+T[U==="y"?"top":"left"],V,V-T[U==="y"?"bottom":"right"]);l&&(v=S(w,v)),d&&(N=S(y,N));const A=f.fn(me(B({},n),{[w]:v,[y]:N}));return me(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[w]:l,[y]:d}}})})}}},nD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=si(e,t),T={x:o,y:a},y=Br(u),w=Yh(y);let v=T[w],N=T[y];const S=si(f,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const V=w==="y"?"height":"width",R=l.reference[w]-l.floating[V]+A.mainAxis,q=l.reference[w]+l.reference[V]-A.mainAxis;v<R?v=R:v>q&&(v=q)}if(m){var C,U;const V=w==="y"?"width":"height",R=dT.has(ki(u)),q=l.reference[y]-l.floating[V]+(R&&((C=d.offset)==null?void 0:C[y])||0)+(R?0:A.crossAxis),re=l.reference[y]+l.reference[V]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?A.crossAxis:0);N<q?N=q:N>re&&(N=re)}return{[w]:v,[y]:N}}}},rD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,Y=si(e,n),{apply:l=()=>{}}=Y,d=hn(Y,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=ys(r),T=Br(r)==="y",{width:y,height:w}=o.floating;let v,N;p==="top"||p==="bottom"?(v=p,N=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,v=m==="end"?"top":"bottom");const S=w-f.top-f.bottom,A=y-f.left-f.right,C=Ci(w-f[v],S),U=Ci(y-f[N],A),V=n.middlewareData.shift,R=!V;let q=C,re=U;V!=null&&V.enabled.x&&(re=A),V!=null&&V.enabled.y&&(q=S),R&&!m&&(T?re=y-2*oi(f.left,f.right):q=w-2*oi(f.top,f.bottom)),yield l(me(B({},n),{availableWidth:re,availableHeight:q}));const de=yield a.getDimensions(u.floating);return y!==de.width||w!==de.height?{reset:{rects:!0}}:{}})}}};function rc(){return typeof window!="undefined"}function bs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return rc()?e instanceof Node||e instanceof Wn(e).Node:!1}function yr(e){return rc()?e instanceof Element||e instanceof Wn(e).Element:!1}function Hr(e){return rc()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function hT(e){return!rc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function iD(e){return/^(table|td|th)$/.test(bs(e))}function ic(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const oD=/transform|translate|scale|rotate|perspective|filter/,sD=/paint|layout|strict|content/,wo=e=>!!e&&e!=="none";let Kh;function Qh(e){const t=yr(e)?br(e):e;return wo(t.transform)||wo(t.translate)||wo(t.scale)||wo(t.rotate)||wo(t.perspective)||!Jh()&&(wo(t.backdropFilter)||wo(t.filter))||oD.test(t.willChange||"")||sD.test(t.contain||"")}function aD(e){let t=Ni(e);for(;Hr(t)&&!Ts(t);){if(Qh(t))return t;if(ic(t))return null;t=Ni(t)}return null}function Jh(){return Kh==null&&(Kh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kh}function Ts(e){return/^(html|body|#document)$/.test(bs(e))}function br(e){return Wn(e).getComputedStyle(e)}function oc(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Ur(e);return hT(t)?t.host:t}function pT(e){const t=Ni(e);return Ts(t)?(e.ownerDocument||e).body:Hr(t)&&Ka(t)?t:pT(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Wn(o);if(a){const l=Zh(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],l&&n?Qa(l):[])}else return t.concat(o,Qa(o,[],n))}function Zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Hr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=Zl(n)!==a||Zl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function ep(e){return yr(e)?e:e.contextElement}function ws(e){const t=ep(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?Zl(n.width):n.width)/r,l=(a?Zl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const uD=Fr(0);function gT(e){const t=Wn(e);return!Jh()||!t.visualViewport?uD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function _o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ep(e);let u=Fr(1);t&&(r?yr(r)&&(u=ws(r)):u=ws(e));const l=lD(a,n,r)?gT(a):Fr(0);let d=(o.left+l.x)/u.x,f=(o.top+l.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Wn(a),y=r&&yr(r)?Wn(r):r;let w=T,v=Zh(w);for(;v&&r&&y!==w;){const N=ws(v),S=v.getBoundingClientRect(),A=br(v),C=S.left+(v.clientLeft+parseFloat(A.paddingLeft))*N.x,U=S.top+(v.clientTop+parseFloat(A.paddingTop))*N.y;d*=N.x,f*=N.y,p*=N.x,m*=N.y,d+=C,f+=U,w=Wn(v),v=Zh(w)}}return nc({width:p,height:m,x:d,y:f})}function sc(e,t){const n=oc(e).scrollLeft;return t?t.left+n:_o(Ur(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-sc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function cD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ur(r),l=t?ic(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((bs(r)!=="body"||Ka(u))&&(d=oc(r)),Hr(r))){const y=_o(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):Fr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function dD(e){return Array.from(e.getClientRects())}function fD(e){const t=Ur(e),n=oc(e),r=e.ownerDocument.body,o=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+sc(e);const l=-n.scrollTop;return br(r).direction==="rtl"&&(u+=oi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const yT=25;function hD(e,t){const n=Wn(e),r=Ur(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(o){a=o.width,u=o.height;const p=Jh();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=sc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,w=Math.abs(r.clientWidth-m.clientWidth-y);w<=yT&&(a-=w)}else f<=yT&&(a+=f);return{width:a,height:u,x:l,y:d}}const pD=new Set(["absolute","fixed"]);function mD(e,t){const n=_o(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Hr(e)?ws(e):Fr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=hD(e,n);else if(t==="document")r=fD(Ur(e));else if(yr(t))r=mD(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nc(r)}function TT(e,t){const n=Ni(e);return n===t||!yr(n)||Ts(n)?!1:br(n).position==="fixed"||TT(n,t)}function gD(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(l=>yr(l)&&bs(l)!=="body"),o=null;const a=br(e).position==="fixed";let u=a?Ni(e):e;for(;yr(u)&&!Ts(u);){const l=br(u),d=Qh(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&pD.has(o.position)||Ka(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=l,u=Ni(u)}return t.set(e,r),r}function ED(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ic(t)?[]:gD(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=oi(m.top,f.top),f.right=Ci(m.right,f.right),f.bottom=Ci(m.bottom,f.bottom),f.left=oi(m.left,f.left),f},bT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function yD(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function bD(e,t,n){const r=Hr(t),o=Ur(t),a=n==="fixed",u=_o(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=sc(o)}if(r||!r&&!a)if((bs(t)!=="body"||Ka(o))&&(l=oc(t)),r){const y=_o(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,l):Fr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function tp(e){return br(e).position==="static"}function wT(e,t){if(!Hr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function _T(e,t){const n=Wn(e);if(ic(e))return n;if(!Hr(e)){let o=Ni(e);for(;o&&!Ts(o);){if(yr(o)&&!tp(o))return o;o=Ni(o)}return n}let r=wT(e,t);for(;r&&iD(r)&&tp(r);)r=wT(r,t);return r&&Ts(r)&&tp(r)&&!Qh(r)?n:r||aD(e)||n}const TD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||_T,n=this.getDimensions,r=yield n(e.floating);return{reference:bD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function wD(e){return br(e).direction==="rtl"}const _D={convertOffsetParentRelativeRectToViewportRelativeRect:cD,getDocumentElement:Ur,getClippingRect:ED,getOffsetParent:_T,getElementRects:TD,getClientRects:dD,getDimensions:yD,getScale:ws,isElement:yr,isRTL:wD};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xD(e,t){let n=null,r;const o=Ur(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const w=ec(m),v=ec(o.clientWidth-(p+T)),N=ec(o.clientHeight-(m+y)),S=ec(p),C={rootMargin:-w+"px "+-v+"px "+-N+"px "+-S+"px",threshold:oi(0,Ci(1,d))||1};let U=!0;function V(R){const q=R[0].intersectionRatio;if(q!==d){if(!U)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!xT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(V,me(B({},C),{root:o.ownerDocument}))}catch(R){n=new IntersectionObserver(V,C)}n.observe(e)}return u(!0),a}function SD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ep(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?xD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[A]=S;A&&A.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,v=d?_o(e):null;d&&N();function N(){const S=_o(e);v&&!xT(v,S)&&n(),v=S,w=requestAnimationFrame(N)}return n(),()=>{var S;p.forEach(A=>{o&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const vD=eD,AD=tD,CD=Q5,kD=rD,ND=J5,PD=K5,OD=nD,ID=(e,t,n)=>{const r=new Map,o=B({platform:_D},n),a=me(B({},o.platform),{_c:r});return X5(e,t,me(B({},o),{platform:a}))};function ST(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return me(B({},o),{toJSON:()=>o})}function RD(e){if(!e)return ST();const{x:t,y:n,width:r,height:o}=e;return ST(t,n,r,o)}function LD(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?RD(r):n.getBoundingClientRect()}}}var Ja=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Ja("--arrow-size"),arrowSizeHalf:Ja("--arrow-size-half"),arrowBg:Ja("--arrow-background"),transformOrigin:Ja("--transform-origin"),arrowOffset:Ja("--arrow-offset")},DD=e=>e==="top"||e==="bottom"?"y":"x";function MD(e,t){return{name:"transformOrigin",fn(n){var de,Y,ie,he,ke;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=DD(d),p=((de=o.arrow)==null?void 0:de.x)||0,m=((Y=o.arrow)==null?void 0:Y.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=m+y/2,N=Math.abs(((ie=o.shift)==null?void 0:ie.y)||0),S=u.reference.height/2,A=y/2,C=(ke=(he=e.offset)==null?void 0:he.mainAxis)!=null?ke:e.gutter,U=typeof C=="number"?C+A:C!=null?C:A,V=N>U,R={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],q=`${w}px ${u.reference.y+S-l}px`,re=!!e.overlap&&f==="y"&&V;return r.floating.style.setProperty(ai.transformOrigin.variable,re?q:R),{data:{transformOrigin:re?q:R}}}}}var FD={name:"rects",fn({rects:e}){return{data:e}}},BD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${ai.arrowOffset.reference})`}),{}}}};function UD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var HD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function vT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function np(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function zD(e,t,n){const r=e||t.createElement("div");return PD({element:r,padding:n.arrowPadding})}function jD(e,t){var n;if(!uL((n=t.offset)!=null?n:t.gutter))return vD(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:l}=UD(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Ph({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function $D(e){if(!e.flip)return;const t=np(e.boundary);return CD(me(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function VD(e){if(!e.slide&&!e.overlap)return;const t=np(e.boundary);return AD(me(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:OD()}))}function qD(e){return kD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function YD(e){var t;if(e.hideWhenDetached)return ND({strategy:"referenceHidden",boundary:(t=np(e.boundary))!=null?t:"clippingAncestors"})}function WD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function GD(e,t,n={}){const r=LD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},HD,n),a=t.querySelector("[data-part=arrow]"),u=[jD(a,o),$D(o),VD(o),zD(a,t.ownerDocument,o),BD(a),MD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),qD(o),YD(o),FD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const v=yield ID(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const N=cs(t),S=vT(N,v.x),A=vT(N,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${A}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const V=fs(C);t.style.setProperty("--z-index",V.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=WD(o.listeners),w=o.listeners?SD(r,t,T,y):EL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function AT(e,t,n={}){const l=n,{defer:r}=l,o=hn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(GD(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var XD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function KD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?XD[t.split("-")[0]]:void 0,background:ai.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var _s=new WeakMap,ac=new WeakMap,uc={},rp=0,CT=e=>e&&(e.host||CT(e.parentNode)),QD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(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),JD=new Set(["script","output","status","next-route-announcer"]),ZD=e=>JD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),e8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=QD(n,Array.isArray(e)?e:[e]);uc[r]||(uc[r]=new WeakMap);const l=uc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&tn(y)&&Ub(y,w=>{m(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(f.has(w))T(w);else try{if(ZD(w))return;const N=w.getAttribute(o)==="true",S=(_s.get(w)||0)+1,A=(l.get(w)||0)+1;_s.set(w,S),l.set(w,A),d.push(w),S===1&&N&&ac.set(w,!0),A===1&&w.setAttribute(r,""),N||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),rp++,()=>{d.forEach(y=>{const w=_s.get(y)-1,v=l.get(y)-1;_s.set(y,w),l.set(y,v),w||(ac.has(y)||y.removeAttribute(o),ac.delete(y)),v||y.removeAttribute(r)}),rp--,rp||(_s=new WeakMap,_s=new WeakMap,ac=new WeakMap,uc={})}},t8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,n8=(e,t=t8(e),n="data-aria-hidden",r=!0)=>{if(t)return e8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},r8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?r8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(n8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function i8(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function o8(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var NT="pointerdown.outside",PT="focus.outside";function s8(e){for(const t of e)if(tn(t)&&Mr(t))return!0;return!1}var OT=e=>"clientY"in e;function a8(e,t){if(!OT(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 u8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},l={x:e.clientX,y:e.clientY};return u8(u,l)?r||a:!1}function l8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Dr(e),f=cs(e),p=i8(f),m=o8(f);function T(C,U){if(!tn(U)||!U.isConnected||ls(e,U)||a8(e,C)||l&&Bb(e,U))return!1;const V=d.querySelector(`[aria-controls="${e.id}"]`);if(V){const q=Uh(V);if(IT(C,q))return!1}const R=Uh(e);return IT(C,R)?!1:!(n!=null&&n(U))}const y=new Set,w=Eo(e==null?void 0:e.getRootNode());function v(C){function U(V){var de,Y;const R=u&&!Hb()?qt:ie=>ie(),q=V!=null?V:C,re=(Y=(de=q==null?void 0:q.composedPath)==null?void 0:de.call(q))!=null?Y:[q==null?void 0:q.target];R(()=>{const ie=w?re[0]:Er(C);if(!(!e||!T(C,ie))){if(o||a){const he=Nh(o,a);e.addEventListener(NT,he,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:JL(q),focusable:s8(re),target:ie}})}})}C.pointerType==="touch"?(y.forEach(V=>V()),y.add(nn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const N=new Set,S=setTimeout(()=>{N.add(nn(d,"pointerdown",v,!0)),N.add(m.addEventListener("pointerdown",v,!0)),N.add(p.addEventListener("pointerdown",v,!0))},0);function A(C){(u?qt:V=>V())(()=>{var q,re;const V=(re=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?re:[C==null?void 0:C.target],R=w?V[0]:Er(C);if(!(!e||!T(C,R))){if(r||a){const de=Nh(r,a);e.addEventListener(PT,de,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(R),target:R}})}})}return Hb()||(N.add(nn(d,"focusin",A,!0)),N.add(m.addEventListener("focusin",A,!0)),N.add(p.addEventListener("focusin",A,!0))),()=>{clearTimeout(S),y.forEach(C=>C()),N.forEach(C=>C())}}function c8(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(l8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function d8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn(Dr(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",sr={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=>ls(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ls(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=>sr.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];h8(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),f8(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function f8(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function h8(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){sr.layers.forEach(({node:e})=>{e.style.pointerEvents=sr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function p8(e){e.style.pointerEvents=""}function m8(e,t){const n=Dr(e),r=[];return sr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=w5(()=>{const l=o();return tn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Gl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{sr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function g8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Oh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};sr.add(f),MT();function p(v){var S,A;const N=Er(v.detail.originalEvent);sr.isBelowPointerBlockingLayer(e)||sr.isInBranch(N)||((S=t.onPointerDownOutside)==null||S.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,A;const N=Er(v.detail.originalEvent);sr.isInBranch(N)||((S=t.onFocusOutside)==null||S.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var N;sr.isTopMost(e)&&((N=t.onEscapeKeyDown)==null||N.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var C;if(!e)return!1;const N=typeof u=="function"?u():u,S=Array.isArray(N)?N:[N],A=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(tn);return A&&S.push(...A),S.some(U=>ls(U,v))||sr.isInNestedLayer(e,v)}const w=[a?m8(e,t.persistentElements):void 0,d8(e,T),c8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{sr.remove(e),MT(),p8(e),w.forEach(v=>v==null?void 0:v())}}function FT(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=as(e)?e():e;o.push(g8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var E8=Object.defineProperty,y8=(e,t,n)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>y8(e,typeof t!="symbol"?t+"":t,n),BT={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()}},b8=[],T8=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 o=Er(r),a=this.findContainerIndex(o,r)>=0;if(a||Vl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Wa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Wa(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 o=Er(r);if(!(this.findContainerIndex(o,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),vt(this,"handleClick",r=>{const o=Er(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(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 o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Za(r)&&r.preventDefault(),this.tryFocus(a)}}),vt(this,"handleEscapeKey",r=>{w8(r)&&eu(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(o=>{o.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.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 $L(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?VL(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(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),vt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const o=ds(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),vt(this,"tryFocus",r=>{if(r!==!1&&r!==ds(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,_8(r)&&r.select()}}),vt(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),l=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),vt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),vt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),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 o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),vt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),vt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let 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&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),vt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Er(o);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!yo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=Wa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Za(o)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!yo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=Wa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Za(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||b8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Za(r)&&!r.shiftKey},isKeyBackward(r){return Za(r)&&r.shiftKey}},t);this.doc=n.document||Dr(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=>{HL(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Bb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=hs(e,{getShadowRoot:this.config.getShadowRoot}),n=Wb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let l=!1;for(let f=0;f<t.length;f++)if(Wa(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(yo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(yo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(nn(this.doc,"focusin",this.handleFocus,!0),nn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),nn(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=ds(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Za=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,w8=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),_8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=qt(()=>{const o=typeof e=="function"?e():e;if(o){n=new T8(o,me(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Dr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var ip="data-scroll-lock";function x8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=fs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(ip))return;const u=zT(r)||zT(o),l=n.innerWidth-r.clientWidth;o.setAttribute(ip,"");const d=()=>b5(r,"--scrollbar-width",`${l}px`),f=x8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),Gl(o,w)},m=()=>{var V,R;const{scrollX:w,scrollY:v,visualViewport:N}=n,S=(V=N==null?void 0:N.offsetLeft)!=null?V:0,A=(R=N==null?void 0:N.offsetTop)!=null?R:0,C={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(A))}px`,left:`${-(w-Math.floor(S))}px`,right:"0"};!u&&l>0&&(C[f]=`${l}px`);const U=Gl(o,C);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),ql()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(ip)}}var S8=To("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=S8.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},v8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},A8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),xs=e=>e.getById(VT(e)),Ss=e=>e.getById(op(e)),WT=e=>e.getById(qT(e)),C8=e=>e.getById(sp(e)),k8=e=>e.getById(ap(e));function N8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=KD(me(B({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(me(B({id:v8(l)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(me(B({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(me(B({},zr.anchor.attrs),{dir:u("dir"),id:$T(l)}))},getTriggerProps(){return t.button(me(B({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":op(l),onPointerDown(y){zb(y)&&KL()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(B({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({id:qT(l)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(me(B({},zr.content.attrs),{dir:u("dir"),id:op(l),tabIndex:-1,role:"dialog","aria-modal":Db(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":us(d),"aria-labelledby":m.title?sp(l):void 0,"aria-describedby":m.description?ap(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(B({},zr.title.attrs),{id:sp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(me(B({},zr.description.attrs),{id:ap(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(B({},zr.closeTrigger.attrs),{dir:u("dir"),id:A8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var P8={props({props:e}){return me(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=YT(n))!=null?a:xs(n);return AT(r,()=>WT(n),me(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ss(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:xs(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:E5(()=>Ss(t),{triggerElement:xs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Ss(t),xs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Ss(t),{initialFocus:()=>Gb({root:Ss(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:xs(n);AT(o,()=>WT(n),me(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!C8(t),description:!!k8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=Gb({root:Ss(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||qt(()=>{const a=xs(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})}}}};gs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[gH,lc]=bo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[EH,up]=bo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),O8=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=up(),o=B({id:t,dir:r,getRootNode:n},e),a=Kl(P8,o);return N8(a,jh)},I8=e=>{const[t,u]=rT(e),l=u,{children:n}=l,r=hn(l,["children"]),o=O8(r),a=qh(Yt({present:o.open},t));return _.jsx(I5,{value:o,children:_.jsx(eT,{value:a,children:n})})},GT=F.forwardRef((e,t)=>{const n=Vh(),r=Ga(),o=Yt(me(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(_n.button,me(B({},o),{ref:t}))});GT.displayName="PopoverTrigger";function R8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function L8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function D8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function M8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function F8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function B8(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function lp(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function XT(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const U8=({className:e,componentType:t,children:n})=>{const[r,o]=F.useState(!1),{globalClassName:a}=tt(),u=f=>{o(f.open)},l=F.useCallback(()=>{o(!1)},[]),d=F.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(I8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(XT,{})}),_.jsx(nT,{children:_.jsx(tT,{className:W(`${H}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(kb.Provider,{value:d,children:n})})})]})};function KT(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function QT(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[H8,xo]=bo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getControlProps(),e);return _.jsx(_n.div,me(B(B({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["readOnly","index"]),o=xo(),a=Yt(o.getIndicatorProps(n),r);return _.jsx(_n.button,me(B({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const ew=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getIndicatorGroupProps(),e);return _.jsx(_n.div,me(B({},r),{ref:t}))});ew.displayName="CarouselIndicatorGroup";const tw=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["index","snapAlign"]),o=xo(),a=Yt(o.getItemProps(n),r);return _.jsx(_n.div,me(B({},a),{ref:t}))});tw.displayName="CarouselItem";const nw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getItemGroupProps(),e);return _.jsx(_n.div,me(B({},r),{ref:t}))});nw.displayName="CarouselItemGroup";const rw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getNextTriggerProps(),e);return _.jsx(_n.button,me(B({},r),{ref:t}))});rw.displayName="CarouselNextTrigger";const iw=F.forwardRef((e,t)=>{const n=xo(),r=Yt(n.getPrevTriggerProps(),e);return _.jsx(_n.button,me(B({},r),{ref:t}))});iw.displayName="CarouselPrevTrigger";function z8(e){const t=fs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=l(r,n.width),f=l(o,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function j8(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 ow(e){let t=[];for(const n of e.children)t=t.concat(n,ow(n));return t}function sw(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?ow(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!j8(n,m,u))continue;const T=fs(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,N=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:N});break;case"center":r[a].center.push({node:p,position:N+m[d]/2});break;case"end":r[a].end.push({node:p,position:N+m[d]});break}}}return r}function aw(e){const t=e.getBoundingClientRect(),n=z8(e),r=sw(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:uw([...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(lw(0,o.x))),y:uw([...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(lw(0,o.y)))}}function $8(e,t,n){const r=sw(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var uw=e=>[...new Set(e)],lw=(e,t)=>n=>Math.max(e,Math.min(t,n)),V8=To("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=V8.build(),q8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Y8=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},cc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},W8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},G8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},X8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},cw=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Fn=e=>e.getById(cc(e)),dw=e=>y5(Fn(e),"[data-part=item]"),K8=(e,t)=>e.getById(cw(e,t)),fw=e=>{const t=Fn(e);if(!t)return;const n=hs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function Q8(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=l("slidesPerPage"),N=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return w/y.length},scrollToIndex(A,C){a({type:"INDEX.SET",index:A,instant:C})},scrollTo(A,C){a({type:"PAGE.SET",index:A,instant:C})},scrollNext(A){a({type:"PAGE.NEXT",instant:A})},scrollPrev(A){a({type:"PAGE.PREV",instant:A})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(A){return Array.from(r.get("slidesInView")).includes(A)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(B({},ui.root.attrs),{id:q8(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(me(B({},ui.itemGroup.attrs),{id:cc(u),"data-orientation":l("orientation"),"data-dragging":us(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(A){ls(A.currentTarget,Er(A))&&a({type:"VIEWPORT.FOCUS"})},onBlur(A){ls(A.currentTarget,A.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(A){if(A.defaultPrevented||!l("allowMouseDrag")||!zb(A))return;const C=Er(A);Mr(C)&&C!==A.currentTarget||(A.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:yL(A=>{const C=l("orientation")==="horizontal"?"deltaX":"deltaY";A[C]<0&&!o("canScrollPrev")||A[C]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:N,[T?"paddingInline":"paddingBlock"]:N,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(A){const C=r.get("slidesInView").includes(A.index);return t.element(me(B({},ui.item.attrs),{id:Y8(u,A.index),dir:l("dir"),role:"group","data-index":A.index,"data-inview":us(C),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(A.index,l("slideCount")),"aria-hidden":Db(!C),style:{scrollSnapAlign:(()=>{var re;const U=(re=A.snapAlign)!=null?re:"start",V=l("slidesPerMove"),R=V==="auto"?Math.floor(l("slidesPerPage")):V;return(A.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(me(B({},ui.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(me(B({},ui.prevTrigger.attrs),{id:G8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":cc(u),onClick(A){A.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(B({},ui.nextTrigger.attrs),{dir:l("dir"),id:W8(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":cc(u),disabled:!p,onClick(A){A.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(B({},ui.indicatorGroup.attrs),{dir:l("dir"),id:X8(u),"data-orientation":l("orientation"),onKeyDown(A){if(A.defaultPrevented)return;const C="indicator",U={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},V=t5(A,{dir:l("dir"),orientation:l("orientation")}),R=U[V];R==null||R(A)}}))},getIndicatorProps(A){return t.button(me(B({},ui.indicator.attrs),{dir:l("dir"),id:cw(u,A.index),type:"button","data-orientation":l("orientation"),"data-index":A.index,"data-readonly":us(A.readOnly),"data-current":us(A.index===w),"aria-label":S.indicator(A.index),onClick(C){C.defaultPrevented||A.readOnly||a({type:"PAGE.SET",index:A.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(B({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":us(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(A){A.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var J8={props({props:e}){return SL(e,["slideCount"],"carousel"),me(B({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:B({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:Z8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return aL(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Fn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Fn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),fw(e)});return fw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Fn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{o(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return dw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Fn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?nL(d,m):rL(d,m)},n.get("slidesInView"));n.set("slidesInView",iL(l))},{root:r,threshold:t("inViewThreshold")});return dw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Fn(n);return r?nn(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 nn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return m5(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 nn(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Rb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Fn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";o(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Fn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Pb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=oL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Fn(r);if(!o)return;const a=$8(o,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=Rb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Fn(n);if(!r)return;const o=aw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Fn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Fn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Fn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=aw(r),l=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=K8(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function Z8(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}gs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),gs()(["index","readOnly"]),gs()(["index","snapAlign"]);const eM=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=up(),o=B({id:t,dir:r,getRootNode:n},e),a=Kl(J8,o);return Q8(a,jh)},hw=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=eM(n),a=Yt(o.getRootProps(),r);return _.jsx(H8,{value:o,children:_.jsx(_n.div,me(B({},a),{ref:t}))})});hw.displayName="CarouselRoot";function tM(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function nM(e){return ft({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}const rM=180,iM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},oM=({globalClassName:e,className:t,itemMinWidth:n=rM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:p="Product carousel",children:m})=>{const T=Array.from(m).map((Y,ie)=>({node:Y,key:F.isValidElement(Y)&&Y.key!=null?Y.key:`carousel-item-${ie}`})),y=T.length,w=F.useRef(null),[v,N]=F.useState(0),{width:S}=sk();F.useLayoutEffect(()=>{w.current&&N(w.current.getBoundingClientRect().width)},[S,y]);const A=iM(r),C=n+A,U=v>0?(v+A)/C:1,V=Math.max(1,Math.floor(U));if(y===0)return null;const R=y>V,q=Math.ceil(y/V),re=R?Math.max(1,U):V,de=d==="circle-arrow";return _.jsxs(hw,{ref:w,className:W(e,t,`${H}-carousel`,{[`${H}-carousel--circle-arrow-navigation`]:de}),slidesPerPage:re,slidesPerMove:V,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[_.jsx(nw,{className:W(e,`${H}-carousel__item-group`,{"carousel-row-container":!R}),children:T.map(({node:Y,key:ie},he)=>_.jsx(tw,{index:he,className:W(e,`${H}-carousel__item`),children:Y},ie))}),l&&R&&_.jsxs(JT,{className:W(e,`${H}-carousel__control`),children:[_.jsx(iw,{className:W(e,`${H}-carousel__prev-trigger`),"aria-label":"Previous slide",children:de?_.jsx(tM,{size:"16px"}):_.jsx(D8,{size:"16px"})}),_.jsx(rw,{className:W(e,`${H}-carousel__next-trigger`),"aria-label":"Next slide",children:de?_.jsx(nM,{size:"16px"}):_.jsx(M8,{size:"16px"})})]}),u&&R&&_.jsx(ew,{className:W(e,`${H}-carousel__indicator-group`),children:Array.from({length:q},(Y,ie)=>_.jsx(ZT,{index:ie,className:W(e,`${H}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},[sM,aM]=bo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),uM=e=>Xa()(e,["lazyMount","unmountOnExit"]),[lM,tu]=bo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),pw=F.forwardRef((e,t)=>{const n=tu(),r=aM(),o=qh(me(B({},r),{present:n.open})),a=Yt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(_n.div,me(B({},a),{ref:Ql(o.ref,t)}))});pw.displayName="DialogBackdrop";const cp=F.forwardRef((e,t)=>{const n=tu(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(_n.div,me(B({},o),{ref:Ql(r.ref,t)}))});cp.displayName="DialogContent";const dp=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getDescriptionProps(),e);return _.jsx(_n.div,me(B({},r),{ref:t}))});dp.displayName="DialogDescription";const fp=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getPositionerProps(),e);return Ga().unmounted?null:_.jsx(_n.div,me(B({},r),{ref:t}))});fp.displayName="DialogPositioner";var cM=To("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=cM.build(),mw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},mp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},yw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},dc=e=>e.getById(hp(e)),dM=e=>e.getById(mw(e)),fM=e=>e.getById(gw(e)),hM=e=>e.getById(Ew(e)),pM=e=>e.getById(pp(e)),mM=e=>e.getById(mp(e)),gM=e=>e.getById(yw(e));function EM(e,t){const{state:n,send:r,context:o,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(me(B({},So.trigger.attrs),{dir:a("dir"),id:Ew(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":hp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(B({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:gw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({},So.positioner.attrs),{dir:a("dir"),id:mw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(B({},So.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:hp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:pp(u),"aria-describedby":f.description?mp(u):void 0}))},getTitleProps(){return t.element(me(B({},So.title.attrs),{dir:a("dir"),id:pp(u)}))},getDescriptionProps(){return t.element(me(B({},So.description.attrs),{dir:a("dir"),id:mp(u)}))},getCloseTriggerProps(){return t.button(me(B({},So.closeTrigger.attrs),{dir:a("dir"),id:yw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var yM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>gM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>dc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[hM(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>dc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[dc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!pM(t),description:!!mM(t)})})},syncZIndex({scope:e}){qt(()=>{const t=dc(e);if(!t)return;const n=fs(t);[dM(e),fM(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};gs()(["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 bM=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=up(),o=B({id:t,getRootNode:n,dir:r},e),a=Kl(yM,o);return EM(a,jh)},bw=e=>{const[t,l]=rT(e),d=l,{children:n}=d,r=hn(d,["children"]),[o]=uM(t),a=bM(r),u=qh(Yt({present:a.open},t));return _.jsx(lM,{value:a,children:_.jsx(sM,{value:o,children:_.jsx(eT,{value:u,children:n})})})},Tw=F.forwardRef((e,t)=>{const n=tu(),r=Yt(n.getTitleProps(),e);return _.jsx(_n.h2,me(B({},r),{ref:t}))});Tw.displayName="DialogTitle";const TM=({children:e})=>{const[t,n]=F.useState(!1),r=F.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=F.useMemo(()=>({isOpen:t}),[t]);return _.jsx(kh.Provider,{value:r,children:_.jsx(Cb.Provider,{value:o,children:e})})},ww=()=>F.useContext(Cb),_w=()=>{const e=F.useContext(kh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},wM=`${H}-overflow-menu-button-trigger`,_M=({componentType:e,children:t})=>{const{isOpen:n}=ww(),{closeMenu:r}=_w(),{globalClassName:o}=tt(),a=F.useRef(null);return F.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${wM}`)||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,className:W(`${H}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},xM=({componentType:e,className:t})=>{const{toggleMenu:n}=_w(),{isOpen:r}=ww(),{globalClassName:o}=tt();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:_.jsx(XT,{})})},gp=()=>{const{status:e,entryType:t}=rr(),{messages:n}=Vn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},SM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=rr(),o=go(),a=()=>{pl(r||"dialog"),o()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(KT,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(KT,{}),"Show ",r||"dialog"]})},vM=({componentType:e,globalClassName:t,controls:n,showClose:r,closeButtonAriaLabel:o,onClose:a,showOverflowMenu:u,showPrimaryToggle:l})=>{const d=e==="modal"?SM:Sw;return _.jsx("div",{className:W(t,`${H}-${e}-controls`),children:n!=null?_.jsxs(_.Fragment,{children:[n,r&&_.jsx(Rf,{className:W(t,`cim-${e}-component`),label:o,onClick:a})]}):_.jsxs(_.Fragment,{children:[u&&_.jsx(xM,{componentType:e}),l&&_.jsx(d,{componentType:e,isIcon:!0}),r&&_.jsx(Rf,{className:W(t,`cim-${e}-component`),label:o,onClick:a})]})})},AM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=rr(),o=go(),a=()=>{xf(!r),o()},u=r?TN:wN,l="Toggle Fullscreen";return t?_.jsx(ri,{ariaLabel:l,title:l,className:W(n,`${H}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},CM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=rr(),o=go(),a=r==="bottom-left",u=()=>{Sf(a?"bottom-right":"bottom-left"),o()},l=a?L8:R8,d=a?"Move right":"Move left";return t?_.jsx(ri,{className:W(n,`${H}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},kM=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:o,showClearChat:a,showEndConversation:u,showDownloadTranscript:l,onClearChat:d,onEndConversation:f,onDownloadTranscript:p})=>{if(t!=null||!n)return null;const m=e==="modal"?AM:CM;return _.jsxs(_M,{componentType:e,children:[r&&_.jsx(m,{componentType:e}),o&&_.jsx(RM,{componentType:e}),a&&_.jsx(Nb,{componentType:e,onClearChat:d}),u&&f&&_.jsx(PM,{componentType:e,onEndConversation:f}),l&&p&&_.jsx(NM,{componentType:e,onDownloadTranscript:p})]})},xw=({componentType:e,overflowActions:t,availableActions:n,controls:r,onClearChat:o,onEndConversation:a,onClose:u,onDownloadTranscript:l})=>{const{headerConfig:d,globalClassName:f,layoutPreset:p}=tt(),{mode:m}=rr(),T=m==="standalone",y=e==="modal",w=de=>n===void 0||n[de],v=(de,Y=!0)=>t.includes(de)&&w(de)&&Y,N=w("toggleExpanded"),S=v(y?"toggleFullscreen":"toggleDialogPosition"),A=v("minimize"),C=v("clearChat"),U=w("close"),V=v("endConversation",!!a),R=v("downloadTranscript",!!l),q=S||A||C||V||R,re=F.useMemo(()=>d?mN(d):{},[d]);return _.jsx(TM,{children:_.jsxs("div",{className:W(f,`${H}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:W(f,`${H}-${e}-header`,{standalone:T,embedded:!T}),style:re,children:[d!=null&&d.logoUrl?_.jsx("img",{alt:"",className:W(f,`${H}-${e}-logo`,{standalone:T,embedded:!T}),src:d.logoUrl}):p==="commerce"?_.jsx("svg",{className:W(f,`${H}-${e}-logo`,{standalone:T,embedded:!T}),viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:_.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,_.jsx(Tw,{className:W(f,`${H}-${e}-title`,{standalone:T,embedded:!T}),children:d==null?void 0:d.headerText}),_.jsx(vM,{componentType:e,globalClassName:f,controls:r,showClose:U,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,onClose:u,showOverflowMenu:q,showPrimaryToggle:N})]}),_.jsx(kM,{componentType:e,controls:r,showOverflowMenu:q,showSecondaryToggle:S,showMinimize:A,showClearChat:C,showEndConversation:V,showDownloadTranscript:R,onClearChat:o,onEndConversation:a,onDownloadTranscript:l})]})})},NM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=go(),[o,a]=F.useState(!1),u=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(Z6,{}),"Download transcript"]})},PM=({onEndConversation:e,componentType:t})=>{const n=go(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${H}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[_.jsx(_N,{}),"End conversation"]})},OM={sparkle:lp,plus:F8,"paper-plane":B8},Ep=({icon:e,className:t})=>{const n=OM[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},IM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=w=>()=>{a(w)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=w=>_.jsxs(_.Fragment,{children:[l&&_.jsx(Ep,{icon:l,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:w})]});return _.jsx("div",{className:W(t,`${H}-suggestion-container ${f}`,e),children:n.map(w=>o?_.jsx(El,{disabled:r,className:W(t,`${H}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):_.jsx("button",{disabled:r,className:W(t,`${H}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},RM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const o=()=>{ti(!1),Ea(!0),If()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(Y1,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(Y1,{}),"Minimize"]})},Sw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=go(),o=()=>{pl("modal"),r()};return t?_.jsx(ri,{className:W(n,`${H}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(QT,{})}):_.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(QT,{}),"Show modal"]})},LM=({isWidgetStandalone:e})=>{var N,S;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:l,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Or(),m=o==null?void 0:o.icon,T=(N=o==null?void 0:o.iconPosition)!=null?N:"left",y=F.useMemo(()=>{const A=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return d.some(U=>U.name==="conversation_reset")&&r||A},[d,n,r]),w=F.useMemo(()=>{var C,U;const A=((U=(C=l.message)==null?void 0:C.suggestions)!=null?U:[]).map(V=>V.displayText.trim()).filter(Boolean);return $0(A,a||[],u)},[(S=l.message)==null?void 0:S.suggestions,a,u]),v=A=>()=>{p({userPrompt:A})};return _.jsxs("div",{className:W(t,`${H}-ask-cim-entry-message`,`${H}-message-group`,e?"standalone":"embedded"),children:[_.jsx("p",{className:W(t,`${H}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&_.jsx("div",{className:W(t,`${H}-ask-cim-suggestions-container`,`${H}-suggestion-container`,e?"standalone":"embedded"),children:w.map(A=>_.jsxs(El,{disabled:f,className:W(t,`${H}-ask-cim-suggestion-button`,`${H}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(A),children:[m&&_.jsx(Ep,{icon:m,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:A})]},A))})]})};function DM(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function MM(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function yp({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!DM(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!MM(o)||r(o,e)}const FM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=tt();if(!n)return null;const u=n.getName(t),l=n.getBrand(t),d=n.getPriceDisplay(t),f=n.getRelativePdp(t),p=n.getPdp(t),m=n.getImage(t),T=f&&typeof f=="string"?new URL(f,window.location.origin).href:p,y=w=>yp({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return _.jsxs("div",{className:W(r,`${H}-product-tile`,{embedded:!e,standalone:e}),children:[T?_.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:_.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):_.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),_.jsxs("div",{className:W(r,`${H}-product-tile-details`,{embedded:!e,standalone:e}),children:[_.jsxs("div",{className:W(r,`${H}-product-tile-content`),children:[l&&_.jsx("p",{className:`${H}-product-tile-brand`,children:l}),T?_.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${H}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",_.jsx("span",{className:W(r,`${H}-product-tile-pdp-arrow`),children:"→"})]}):_.jsx("p",{className:W(r,`${H}-product-tile-name`),title:u,children:u})]}),_.jsx("div",{className:W(r,`${H}-product-tile-footer`),children:_.jsx("p",{className:W(r,`${H}-product-tile-price`),children:d})})]})]})},BM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r,layoutPreset:o}=tt(),a=t;return n?_.jsxs("div",{className:W(r,`${H}-display-products`),children:[_.jsx("p",{children:a.message}),a.products&&a.products.length>0&&_.jsx(oM,{globalClassName:r,spacing:o==="commerce"?"12px":"0.5rem",ariaLabel:"Recommended products",children:a.products.map(u=>{const l=n.getPid(u);return _.jsx(FM,{isWidgetStandalone:e,product:u},`${l}`)})})]}):null},UM=({globalClassName:e,message:t,isWidgetStandalone:n})=>_.jsx("div",{className:W(e,`${H}-error-message`,{standalone:n,embedded:!n}),children:_.jsxs("p",{className:W(e,`${H}-error-message-text`,{standalone:n,embedded:!n}),children:[_.jsx(EN,{})," ",t.message||"An error occurred while processing your request."]})}),HM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Or(),{messages:u}=Vn(),l=u.find(v=>v.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Nv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const N=n.suggestions.find(S=>S.displayText===v);N&&o(N,n.eventSourceId||n.id)};return _.jsxs("div",{className:W(e,`${H}-follow-up`),children:[_.jsx("p",{className:W(e,`${H}-text`),children:n.message}),_.jsx(IM,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function vw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function zM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jM(e,t,n){const o=kl((n||{}).ignore||[]),a=$M(t);let u=-1;for(;++u<a.length;)sy(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],w=T?T.children:void 0;if(o(y,w?w.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let w=0;const N=m.children.indexOf(f);let S=!1,A=[];T.lastIndex=0;let C=T.exec(f.value);for(;C;){const U=C.index,V={index:C.index,input:C.input,stack:[...p,f]};let R=y(...C,V);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=U+1:(w!==U&&A.push({type:"text",value:f.value.slice(w,U)}),Array.isArray(R)?A.push(...R):R&&A.push(R),w=U+C[0].length,S=!0),!T.global)break;C=T.exec(f.value)}return S?(w<f.value.length&&A.push({type:"text",value:f.value.slice(w)}),m.children.splice(N,1,...A)):A=[f],N+A.length}}function $M(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([VM(o[0]),qM(o[1])])}return t}function VM(e){return typeof e=="string"?new RegExp(zM(e),"g"):e}function qM(e){return typeof e=="function"?e:function(){return e}}const bp="phrasing",Tp=["autolink","link","image","label"];function YM(){return{transforms:[ZM],enter:{literalAutolink:GM,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:JM,literalAutolinkEmail:QM,literalAutolinkHttp:XM,literalAutolinkWww:KM}}}function WM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bp,notInConstruct:Tp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bp,notInConstruct:Tp},{character:":",before:"[ps]",after:"\\/",inConstruct:bp,notInConstruct:Tp}]}}function GM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function XM(e){this.config.exit.autolinkProtocol.call(this,e)}function KM(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 QM(e){this.config.exit.autolinkEmail.call(this,e)}function JM(e){this.exit(e)}function ZM(e){jM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),tF]],{ignore:["link","linkReference"]})}function eF(e,t,n,r,o){let a="";if(!Aw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!nF(n)))return!1;const u=rF(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 tF(e,t,n,r){return!Aw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nF(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 rF(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=vw(e,"(");let a=vw(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Aw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||wl(n))&&(!t||n!==47)}Cw.peek=fF;function iF(){this.buffer()}function oF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sF(){this.buffer()}function aF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lF(e){this.exit(e)}function cF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dF(e){this.exit(e)}function fF(){return"["}function Cw(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=o.move("]"),a}function hF(){return{enter:{gfmFootnoteCallString:iF,gfmFootnoteCall:oF,gfmFootnoteDefinitionLabelString:sF,gfmFootnoteDefinition:aF},exit:{gfmFootnoteCallString:uF,gfmFootnoteCall:lF,gfmFootnoteDefinitionLabelString:cF,gfmFootnoteDefinition:dF}}}function pF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?kw:mF))),f(),d}}function mF(e,t,n){return t===0?e:kw(e,t,n)}function kw(e,t,n){return(n?"":" ")+e}const gF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Nw.peek=wF;function EF(){return{canContainEols:["delete"],enter:{strikethrough:bF},exit:{strikethrough:TF}}}function yF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gF}],handlers:{delete:Nw}}}function bF(e){this.enter({type:"delete",children:[]},e)}function TF(e){this.exit(e)}function Nw(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,me(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function wF(){return"~"}function _F(e){return e.length}function xF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||_F,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],N=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const A=SF(e[p][S]);if(n.alignDelimiters!==!1){const C=o(A);N[S]=C,(d[S]===void 0||C>d[S])&&(d[S]=C)}v.push(A)}u[p]=v,l[p]=N}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Pw(r[m]);else{const v=Pw(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let N="",S="";v===99?(N=":",S=":"):v===108?N=":":v===114&&(S=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[m]-N.length-S.length);const C=N+"-".repeat(A)+S;n.alignDelimiters!==!1&&(A=N.length+A+S.length,A>d[m]&&(d[m]=A),y[m]=A),T[m]=C}u.splice(1,0,T),l.splice(1,0,y),p=-1;const w=[];for(;++p<u.length;){const v=u[p],N=l[p];m=-1;const S=[];for(;++m<f;){const A=v[m]||"";let C="",U="";if(n.alignDelimiters!==!1){const V=d[m]-(N[m]||0),R=a[m];R===114?C=" ".repeat(V):R===99?V%2?(C=" ".repeat(V/2+.5),U=" ".repeat(V/2-.5)):(C=" ".repeat(V/2),U=C):U=" ".repeat(V)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(C),S.push(A),n.alignDelimiters!==!1&&S.push(U),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}w.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return w.join(`
33
+ `)}function SF(e){return e==null?"":String(e)}function Pw(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 vF(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),AF);return o(),u}function AF(e,t,n){return">"+(n?"":" ")+e}function CF(e,t){return Ow(e,t.inConstruct,!0)&&!Ow(e,t.notInConstruct,!1)}function Ow(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 Iw(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
+ `&&CF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function kF(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function NF(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 PF(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 OF(e,t,n,r){const o=PF(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(NF(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,IF);return m(),T}const l=n.createTracker(r),d=o.repeat(Math.max(kF(a,o)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,B({before:p,after:`
36
36
  `,encode:["`"]},l.current()))),m()}return p+=l.move(`
37
37
  `),a&&(p+=l.move(a+`
38
- `)),p+=l.move(d),f(),p}function PF(e,t,n){return(n?"":" ")+e}function wp(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 OF(e,t,n,r){const o=wp(n),a=o==='"'?"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),B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":`
39
- `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,B({before:f,after:o},d.current()))),f+=d.move(o),l()),u(),f}function IF(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 nu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function fc(e,t,n){const r=ts(e),o=ts(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Rw.peek=RF;function Rw(e,t,n,r){const o=IF(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(o);let d=u.move(n.containerPhrasing(e,B({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=fc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function RF(e,t,n){return n.options.emphasis||"*"}function LF(e,t){let n=!1;return Pl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,eh}),!!((!e.depth||e.depth<3)&&$f(e)&&(t.options.setext||n))}function DF(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(LF(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,pe(B({},a.current()),{before:`
38
+ `)),p+=l.move(d),f(),p}function IF(e,t,n){return(n?"":" ")+e}function _p(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 RF(e,t,n,r){const o=_p(n),a=o==='"'?"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),B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":`
39
+ `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,B({before:f,after:o},d.current()))),f+=d.move(o),l()),u(),f}function LF(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 nu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function fc(e,t,n){const r=ts(e),o=ts(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Rw.peek=DF;function Rw(e,t,n,r){const o=LF(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(o);let d=u.move(n.containerPhrasing(e,B({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=fc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function DF(e,t,n){return n.options.emphasis||"*"}function MF(e,t){let n=!1;return Pl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,th}),!!((!e.depth||e.depth<3)&&Vf(e)&&(t.options.setext||n))}function FF(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(MF(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,me(B({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return m(),p(),T+`
42
42
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(o),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,B({before:"# ",after:`
44
- `},a.current()));return/^[\t ]/.test(f)&&(f=nu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Lw.peek=MF;function Lw(e){return e.value||""}function MF(){return"<"}Dw.peek=FF;function Dw(e,t,n,r){const o=wp(n),a=o==='"'?"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,B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,B({before:f,after:o},d.current()))),f+=d.move(o),l()),f+=d.move(")"),u(),f}function FF(){return"!"}Mw.peek=BF;function Mw(e,t,n,r){const o=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,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function BF(){return"!"}Fw.peek=UF;function Fw(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],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 o+r+o}function UF(){return"`"}function Bw(e,t){const n=$f(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))}Uw.peek=HF;function Uw(e,t,n,r){const o=wp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Bw(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,B({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,B({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,B({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,B({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),l(),f}function HF(e,t,n){return Bw(e,n)?"<":"["}Hw.peek=zF;function Hw(e,t,n,r){const o=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,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function zF(){return"["}function _p(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 jF(e){const t=_p(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 $F(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 zw(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 VF(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?$F(n):_p(n);const l=e.ordered?u==="."?")":".":jF(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),zw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function qF(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 YF(e,t,n,r){const o=qF(n);let a=n.bulletCurrent||_p(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function WF(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const GF=kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function XF(e,t,n,r){return(e.children.some(function(u){return GF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function KF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jw.peek=QF;function jw(e,t,n,r){const o=KF(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=fc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function QF(e,t,n){return n.options.strong||"*"}function JF(e,t,n,r){return n.safe(e.value,r)}function ZF(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 e9(e,t,n){const r=(zw(n)+(n.options.ruleSpaces?" ":"")).repeat(ZF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $w={blockquote:xF,break:Iw,code:NF,definition:OF,emphasis:Rw,hardBreak:Iw,heading:DF,html:Lw,image:Dw,imageReference:Mw,inlineCode:Fw,link:Uw,linkReference:Hw,list:VF,listItem:YF,paragraph:WF,root:XF,strong:jw,text:JF,thematicBreak:e9};function t9(){return{enter:{table:n9,tableData:Vw,tableHeader:Vw,tableRow:i9},exit:{codeText:o9,table:r9,tableData:xp,tableHeader:xp,tableRow:xp}}}function n9(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 r9(e){this.exit(e),this.data.inTable=void 0}function i9(e){this.enter({type:"tableRow",children:[]},e)}function xp(e){this.exit(e)}function Vw(e){this.enter({type:"tableCell",children:[]},e)}function o9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,s9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function s9(e,t){return t==="|"?t:e}function a9(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=nu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Lw.peek=BF;function Lw(e){return e.value||""}function BF(){return"<"}Dw.peek=UF;function Dw(e,t,n,r){const o=_p(n),a=o==='"'?"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,B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,B({before:f,after:o},d.current()))),f+=d.move(o),l()),f+=d.move(")"),u(),f}function UF(){return"!"}Mw.peek=HF;function Mw(e,t,n,r){const o=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,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function HF(){return"!"}Fw.peek=zF;function Fw(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],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 o+r+o}function zF(){return"`"}function Bw(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))}Uw.peek=jF;function Uw(e,t,n,r){const o=_p(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Bw(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,B({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,B({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,B({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,B({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),l(),f}function jF(e,t,n){return Bw(e,n)?"<":"["}Hw.peek=$F;function Hw(e,t,n,r){const o=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,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function $F(){return"["}function xp(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 VF(e){const t=xp(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 qF(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 zw(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 YF(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?qF(n):xp(n);const l=e.ordered?u==="."?")":".":VF(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),zw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function WF(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 GF(e,t,n,r){const o=WF(n);let a=n.bulletCurrent||xp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function XF(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const KF=kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function QF(e,t,n,r){return(e.children.some(function(u){return KF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function JF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jw.peek=ZF;function jw(e,t,n,r){const o=JF(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=fc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function ZF(e,t,n){return n.options.strong||"*"}function e9(e,t,n,r){return n.safe(e.value,r)}function t9(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 n9(e,t,n){const r=(zw(n)+(n.options.ruleSpaces?" ":"")).repeat(t9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $w={blockquote:vF,break:Iw,code:OF,definition:RF,emphasis:Rw,hardBreak:Iw,heading:FF,html:Lw,image:Dw,imageReference:Mw,inlineCode:Fw,link:Uw,linkReference:Hw,list:YF,listItem:GF,paragraph:XF,root:QF,strong:jw,text:e9,thematicBreak:n9};function r9(){return{enter:{table:i9,tableData:Vw,tableHeader:Vw,tableRow:s9},exit:{codeText:a9,table:o9,tableData:Sp,tableHeader:Sp,tableRow:Sp}}}function i9(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 o9(e){this.exit(e),this.data.inTable=void 0}function s9(e){this.enter({type:"tableRow",children:[]},e)}function Sp(e){this.exit(e)}function Vw(e){this.enter({type:"tableCell",children:[]},e)}function a9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,u9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function u9(e,t){return t==="|"?t:e}function l9(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
45
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:l}};function u(y,w,v,N){return f(p(y,v,N),y.align)}function l(y,w,v,N){const S=m(y,v,N),A=f([S]);return A.slice(0,A.indexOf(`
46
- `))}function d(y,w,v,N){const S=v.enter("tableCell"),A=v.enter("phrasing"),C=v.containerPhrasing(y,pe(B({},N),{before:a,after:a}));return A(),S(),C}function f(y,w){return wF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const N=y.children;let S=-1;const A=[],C=w.enter("table");for(;++S<N.length;)A[S]=m(N[S],w,v);return C(),A}function m(y,w,v){const N=y.children;let S=-1;const A=[],C=w.enter("tableRow");for(;++S<N.length;)A[S]=d(N[S],y,w,v);return C(),A}function T(y,w,v){let N=$w.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function u9(){return{exit:{taskListCheckValueChecked:qw,taskListCheckValueUnchecked:qw,paragraph:c9}}}function l9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:d9}}}function qw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function c9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const l=o[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 d9(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=$w.listItem(e,t,n,B(B({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function f9(){return[VM(),dF(),mF(),t9(),u9()]}function h9(e){return{extensions:[qM(),fF(e),gF(),a9(e),l9()]}}const p9={tokenize:T9,partial:!0},Yw={tokenize:w9,partial:!0},Ww={tokenize:_9,partial:!0},Gw={tokenize:x9,partial:!0},m9={tokenize:S9,partial:!0},Xw={name:"wwwAutolink",tokenize:y9,previous:Qw},Kw={name:"protocolAutolink",tokenize:b9,previous:Jw},li={name:"emailAutolink",tokenize:E9,previous:Zw},jr={};function g9(){return{text:jr}}let vo=48;for(;vo<123;)jr[vo]=li,vo++,vo===58?vo=65:vo===91&&(vo=97);jr[43]=li,jr[45]=li,jr[46]=li,jr[95]=li,jr[72]=[li,Kw],jr[104]=[li,Kw],jr[87]=[li,Xw],jr[119]=[li,Xw];function E9(e,t,n){const r=this;let o,a;return u;function u(m){return!Sp(m)||!Zw.call(r,r.previous)||vp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Sp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(m9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function y9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Qw.call(r,r.previous)||vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(p9,e.attempt(Yw,e.attempt(Ww,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function b9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&Jw.call(r,r.previous)&&!vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Nn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Tl(m)||pt(m)||uo(m)||wl(m)?n(m):e.attempt(Yw,e.attempt(Ww,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function T9(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function w9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(Gw,d,l)(f):f===null||pt(f)||uo(f)||f!==45&&wl(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function _9(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Gw,t,a)(u):u===null||pt(u)||uo(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function x9(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),o):l===60||l===null||pt(l)||uo(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||pt(l)||uo(l)?t(l):r(l)}function a(l){return Nn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),u):n(l)}}function S9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function Qw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function Jw(e){return!Nn(e)}function Zw(e){return!(e===47||Sp(e))}function Sp(e){return e===43||e===45||e===46||e===95||Tn(e)}function vp(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 v9={tokenize:R9,partial:!0};function A9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:P9,continuation:{tokenize:O9},exit:I9}},text:{91:{name:"gfmFootnoteCall",tokenize:N9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:C9,resolveTo:k9}}}}function C9(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=mr(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 k9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function N9(e,t,n){const r=this,o=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||pt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(mr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return pt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function P9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!l||w===null||w===91||pt(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=mr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return pt(w)||(l=!0),u++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function O9(e,t,n){return e.check(ka,t,e.attempt(v9,t,n))}function I9(e){e.exit("gfmFootnoteDefinition")}function R9(e,t,n){const r=this;return rt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function L9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Yn(T,T.length,0,_l(y,u.slice(f+1,d),l)),Yn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Yn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(w){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=ts(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const N=u.exit("strikethroughSequenceTemporary"),S=ts(w);return N._open=!S||S===2&&!!v,N._close=!v||v===2&&!!S,l(w)}}}class D9{constructor(){this.map=[]}add(t,n,r){M9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function M9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function F9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function B9(){return{flow:{null:{name:"table",tokenize:U9,resolveAll:H9}}}}function U9(e,t,n){const r=this;let o=0,a=0,u;return l;function l($){let ie=r.events.length-1;for(;ie>-1;){const re=r.events[ie][1].type;if(re==="lineEnding"||re==="linePrefix")ie--;else break}const fe=ie>-1?r.events[ie][1].type:null,ke=fe==="tableHead"||fe==="tableRow"?R:d;return ke===R&&r.parser.lazy[r.now().line]?n($):ke($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):He($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ze($)?rt(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||pt($)?(e.exit("data"),p($)):(e.consume($),$===92?T:m)}function T($){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,Ze($)?rt(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):w($))}function w($){return $===45||$===58?N($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):q($)}function v($){return Ze($)?rt(e,N,"whitespace")($):N($)}function N($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),S):$===45?(a+=1,S($)):$===null||He($)?U($):q($)}function S($){return $===45?(e.enter("tableDelimiterFiller"),A($)):q($)}function A($){return $===45?(e.consume($),A):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C($))}function C($){return Ze($)?rt(e,U,"whitespace")($):U($)}function U($){return $===124?w($):$===null||He($)?!u||o!==a?q($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):q($)}function q($){return n($)}function R($){return e.enter("tableRow"),Y($)}function Y($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),Y):$===null||He($)?(e.exit("tableRow"),t($)):Ze($)?rt(e,Y,"whitespace")($):(e.enter("data"),ne($))}function ne($){return $===null||$===124||pt($)?(e.exit("data"),Y($)):(e.consume($),$===92?me:ne)}function me($){return $===92||$===124?(e.consume($),ne):ne($)}}function H9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new D9;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(e_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=hc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=hc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(l=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=hc(T,t,a,o,n,m)):u[1]!==0&&(m=hc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&e_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=F9(t.events,n))}return e}function hc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},vs(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vs(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=vs(t.events,n[2]),p=vs(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},vs(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function e_(e,t,n,r,o){const a=[],u=vs(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const z9={name:"tasklistCheck",tokenize:$9};function j9(){return{text:{91:z9}}}function $9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return pt(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):Ze(d)?e.check({tokenize:V9},t,n)(d):n(d)}}function V9(e,t,n){return rt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function q9(e){return AE([g9(),A9(),L9(e),B9(),j9()])}const Y9={};function W9(e){const t=this,n=e||Y9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(q9(n)),a.push(f9()),u.push(h9(n))}const pc=()=>_.jsx("span",{className:`${H}-blinking-cursor`,children:_.jsx("svg",{"aria-hidden":"true",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"})})});function G9(e){return/^tel:/i.test(e)?e:yy(e)}const Ap=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>_.jsx("div",{className:W(e,`${H}-markdown`),children:_.jsx(Ey,{remarkPlugins:[W9],rehypePlugins:[bb],urlTransform:G9,components:{h1:({children:a})=>_.jsx("h1",{className:W(e,`${H}-header h1`),children:a}),h2:({children:a})=>_.jsx("h2",{className:W(e,`${H}-header h2`),children:a}),h3:({children:a})=>_.jsx("h3",{className:W(e,`${H}-header h3`),children:a}),ul:({children:a})=>_.jsx("ul",{className:W(e,`${H}-ul`),children:a}),ol:({children:a})=>_.jsx("ol",{className:W(e,`${H}-ol`),children:a}),li:({children:a})=>_.jsx("li",{className:W(e,`${H}-li`),children:a}),a:({href:a,children:u})=>_.jsx(Ab,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>_.jsx("div",{className:W(e,`${H}-table-container`),children:_.jsx("table",{className:W(e,`${H}-table`),children:a})}),thead:({children:a})=>_.jsx("thead",{className:W(e,`${H}-thead`),children:a}),tbody:({children:a})=>_.jsx("tbody",{className:W(e,`${H}-tbody`),children:a}),tr:({children:a})=>_.jsx("tr",{className:W(e,`${H}-tr`),children:a}),th:({children:a})=>_.jsx("th",{className:W(e,`${H}-th`),children:a}),td:({children:a})=>_.jsx("td",{className:W(e,`${H}-td`),children:a}),span:({className:a,children:u})=>a===`${H}-blinking-cursor`?_.jsx(pc,{}):_.jsx("span",{children:u})},children:r+(n?`<span className='${H}-blinking-cursor'></span>`:"")})}),X9=({globalClassName:e,message:t})=>{const[n,r]=F.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return _.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${H}-progress-message`,"standalone"),children:[_.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","standalone"),children:_.jsx(q1,{})}),_.jsx("p",{className:W(e,`${H}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&_.jsxs(_.Fragment,{children:[_.jsx(El,{className:W(e,`${H}-thought-context-button`),onClick:l,children:n?_.jsxs(_.Fragment,{children:["Hide ",_.jsx(yN,{})]}):_.jsxs(_.Fragment,{children:["Context ",_.jsx(bN,{})]})}),n&&_.jsx("div",{className:W(e,`${H}-thought-container`),children:a&&_.jsx("p",{className:W(e,`${H}-progress-thought`),children:t.thought})})]})]})},K9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?_.jsx(X9,{globalClassName:e,message:t}):_.jsxs("div",{className:W(e,`${H}-progress-message`,"embedded"),title:t.message,children:[_.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","embedded"),children:_.jsx(q1,{})}),_.jsx("i",{className:W(e,`${H}-progress-text`,"embedded"),children:t.message})]}),Q9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return _.jsxs("div",{className:W(e,`${H}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&_.jsxs("div",{className:W(e,`${H}-refined-event-query`,{embedded:!n,standalone:n}),children:[_.jsx("span",{className:W(e,`${H}-message-icon`,`${H}-refined-event-icon`,{embedded:!n,standalone:n}),children:_.jsx(Qo,{role:"img"})}),_.jsx("p",{className:W(e,`${H}-text`,`${H}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),_.jsx(Ap,{text:t.message})]})},t_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),l=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:l}},mc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>_.jsx("span",{className:W(t,`${H}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),n_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(l=>{var f;const d=((f=o[l])==null?void 0:f.join(", "))||"";return _.jsxs("div",{className:W(e,`${H}-facets`),children:[_.jsx("p",{className:W(e,`${H}-facet-category`),children:l}),_.jsx("p",{className:W(e,`${H}-facet-values`),children:d})]},l)})},ru=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>_.jsx("span",{className:W(e,`${H}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),J9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=t_(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?_.jsxs("div",{className:W(e,`${H}-user-message standalone`),children:[_.jsxs("div",{className:W(e,`${H}-user-message-row standalone`),children:[d?_.jsx("img",{className:W(e,`${H}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-message-icon standalone`),children:_.jsx(W1,{})}),_.jsx("p",{className:W(e,`${H}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&_.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),_.jsx(n_,{globalClassName:e,facetFiltersList:a,message:t}),_.jsx(ru,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):_.jsxs("div",{className:W(e,`${H}-user-message embedded`),children:[_.jsxs("div",{className:W(e,`${H}-user-message-row embedded`),children:[d?_.jsx("img",{className:W(e,`${H}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-message-icon embedded`),children:_.jsx(W1,{})}),_.jsx("p",{className:W(e,`${H}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&_.jsx(mc,{isWidgetStandalone:!1,filterCount:u})]}),_.jsx(ru,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},Z9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>_.jsxs("div",{className:W(e,`${H}-user-search standalone`),children:[_.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${H}-user-search-query standalone`),children:[d?_.jsx("img",{className:W(e,`${H}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-search-icon standalone`),children:_.jsx(Qo,{})}),_.jsx("p",{className:W(e,`${H}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&_.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),_.jsx(n_,{globalClassName:e,facetFiltersList:u,message:a})]}),_.jsx(ru,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),e7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=t_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=F.useMemo(()=>{var v,N,S;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(N=r==null?void 0:r.clientContext)==null?void 0:N.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(S=r==null?void 0:r.browseParams)==null?void 0:S.categoryId,queryLabel:w||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:w||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?_.jsx(Z9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):_.jsxs("div",{className:W(e,`${H}-user-search embedded`),children:[_.jsxs("div",{className:W(e,`${H}-user-search-query embedded`),children:[f?_.jsx("img",{className:W(e,`${H}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-search-icon embedded`),children:_.jsx(Qo,{})}),_.jsx("p",{className:W(e,`${H}-text bold embedded`),children:T||m}),u.length>0&&_.jsx(mc,{isWidgetStandalone:!1,filterCount:l})]}),_.jsx(ru,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},r_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Or(),{onNavigate:f}=tt(),p=v=>Ep({event:v,openLinksInNewTab:n,onNavigate:f}),m=l&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const T=e.name,y=!!((w=e.request)!=null&&w.userPrompt);switch(T){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return y?_.jsx(J9,{globalClassName:t,isWidgetStandalone:a,message:e}):_.jsx(e7,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return _.jsx(Q9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return _.jsx(BM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return _.jsx(Ap,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return _.jsx(FM,{message:e,isWidgetStandalone:a});case"display_products":return _.jsx(MM,{message:e,isWidgetStandalone:a});case"progress":return _.jsx(K9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:_.jsxs(_.Fragment,{children:[_.jsx("p",{className:W(t,`${H}-reset-message`),children:"This conversation has been reset."}),_.jsx("p",{className:W(t,`${H}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},t7=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=tt(),{groupedMessages:a}=Vn(),{entryType:u}=rr();return _.jsxs(_.Fragment,{children:[u==="ask_cim"&&_.jsx(IM,{isWidgetStandalone:e}),a.map(l=>{if(l.messages&&l.type==="group"){let d=new Date(l.createdAt).toLocaleString();const f=l.messages[l.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),_.jsxs("div",{className:W(n,`${H}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>_.jsx("div",{className:`${H}-message-group-child`,children:_.jsx(r_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),_.jsx(ru,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return _.jsx("div",{className:W(n,`${H}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:_.jsx(r_,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},n7=4e3,r7=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,n7),i7=({message:e,announcementKey:t})=>{const[n,r]=F.useState("");return F.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),_.jsx("span",{className:`${H}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},o7=()=>{const{groupedMessages:e}=Vn(),n=e.flatMap(r=>{var o;return r.type==="group"?(o=r.messages)!=null?o:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return _.jsx(i7,{message:n?r7(n.message):"",announcementKey:n==null?void 0:n.id})},s7=({isOpen:e}={})=>{const{messages:t}=Or(),{autoScroll:n}=tt(),r=F.useRef(null);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),F.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},a7={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Cp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=s7({isOpen:e});return _.jsxs(_.Fragment,{children:[_.jsx(t7,{isWidgetStandalone:t,handleSuggestionClick:r}),_.jsx(o7,{}),n&&_.jsx("div",{style:B(B({},a7),o),children:_.jsx(pc,{})}),_.jsx("div",{ref:a})]})},i_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{copilot:o,isLoading:a,handleUserInput:u,handleSuggestion:l,resetConversation:d}=Or();return mp()?o?_.jsxs("div",{className:W(t,`${H}-container`,`${H}-embedded-chat`,`${H}-layout-${e}`),style:n,children:[_.jsx("div",{className:W(t,`${H}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:_.jsx(Cp,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:l})}),_.jsx(Ah,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u}),_.jsx("div",{className:W(`${H}-embedded-chat-menu`),children:_.jsxs(U8,{componentType:"chat",children:[_.jsx(Sw,{componentType:"chat"}),_.jsx(Nb,{componentType:"chat",onClearChat:d})]})})]}):_.jsx("div",{children:"Loading Copilot..."}):null},o_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(l7,()=>!1,()=>!0),{getRootNode:u}=lc();if(F.useEffect(()=>{o(()=>{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:u7(u);return _.jsx(_.Fragment,{children:F.Children.map(t,f=>Ko.createPortal(f,l))})},u7=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Eo(n)?n:Dr(t).body},l7=()=>()=>{},c7=["toggleDialogPosition","minimize","clearChat"],d7=["toggleFullscreen","minimize","clearChat"],s_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{mode:o,status:a,dialogPosition:u,isDialogFullHeight:l,dialogWidth:d}=rr(),{copilot:f,isLoading:p,handleUserInput:m,handleSuggestion:T,resetConversation:y}=Or(),w=mp(),{isOpen:v}=a||{},N=o==="standalone",S=()=>{ti(!1),If()};return f?_.jsx(bw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:w,initialFocusEl:Of,children:_.jsx(o_,{children:_.jsx(dp,{className:W(t,`${H}-dialog-positioner`),style:n,children:_.jsxs(lp,{className:W(t,`${H}-container`,`${H}-dialog`,`${H}-dialog-content`,`${H}-layout-${e}`,u,l&&"full-height",{standalone:N,embedded:!N}),style:d?{width:d}:void 0,children:[_.jsx(xw,{componentType:"dialog",overflowActions:c7,onClearChat:y,onClose:S}),_.jsx(cp,{className:W(t,`${H}-message-container`,`container-${r}`,{standalone:N,embedded:!N}),role:"region","aria-label":"Conversation",children:_.jsx(Cp,{isWidgetStandalone:N,isLoading:p,isOpen:v,handleSuggestionClick:T})}),_.jsx(Ah,{componentType:"dialog",isLoading:p,onSubmit:m})]})})})}):_.jsx("div",{children:"Loading Copilot..."})},a_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{mode:o,status:a,isModalFullscreen:u}=rr(),{copilot:l,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:m}=Or(),{isOpen:T}=a||{},y=o==="standalone",w=mp(),v=({open:S})=>{if(S){ti(!0);return}N()},N=()=>{ti(!1),If()};return w?l?_.jsx(bw,{lazyMount:!0,unmountOnExit:!0,open:w,onOpenChange:v,initialFocusEl:Of,children:_.jsx(o_,{children:_.jsxs("div",{className:W(t,`${H}-modal-container`),style:n,children:[_.jsx(pw,{className:W(t,`${H}-modal-backdrop`)}),_.jsx(dp,{className:W(t,`${H}-container`,`${H}-modal`,`${H}-layout-${e}`,{fullscreen:u,standalone:y,embedded:!y}),children:_.jsxs(lp,{className:W(t,`${H}-modal-content`,{standalone:y,embedded:!y}),children:[_.jsx(xw,{componentType:"modal",overflowActions:d7,onClearChat:m,onClose:N}),_.jsx(cp,{className:W(t,`${H}-message-container`,`container-${r}`,{standalone:y,embedded:!y}),role:"region","aria-label":"Conversation",children:_.jsx(Cp,{isWidgetStandalone:y,isLoading:d,isOpen:T,handleSuggestionClick:p,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),_.jsx(Ah,{componentType:"modal",isLoading:d,onSubmit:f})]})})]})})}):_.jsx("div",{children:"Loading Copilot..."}):null},f7=()=>{const e=rr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(pN,{}):t==="dialog"?_.jsx(s_,{}):t==="modal"?_.jsx(a_,{}):_.jsx(i_,{})},h7=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Cf();F.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"&&o(d))};return _k(a),()=>{xk(a)}},[e,t,n,r,o])},p7=()=>{const{copilot:e}=Vn(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:l,setIsResponseLoading:d}=Cf(),{getCopilotSuggestions:f}=I1();h7();const p=F.useCallback(w=>{if(!t||!w)return;f(w,t,N=>{a(N.id)})},[t,f,a]);F.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=F.useCallback(w=>{w.eventSourceId===n&&(u(w),a(w.id),o(!0))},[n,u,a,o]),T=F.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(l(w),d(!1))},[n,l,d]),y=F.useCallback(()=>{o(!0),d(!1)},[o,d]);return F.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},u_={copilot:"Ask Copilot",messaging:"Ask a question"},m7=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:o,isResponseLoading:a}=ni(),u=o||u_[r],[l,d]=F.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:W(n,`${H}-prompts-input-container`),name:`${H}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${H}-prompts-input`,"aria-label":u,children:_.jsx(up,{className:W(n,`${H}-prompts-input-icon`)})}),_.jsx("input",{id:`${H}-prompts-input`,className:W(n,`${H}-prompts-input`),name:`${H}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(ri,{className:W(n,`${H}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(Qo,{}),disabled:f})]})},g7=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ni(),r=n||u_[t];return _.jsxs("div",{className:W(e,`${H}-prompts-header`),children:[_.jsx(up,{className:W(e,`${H}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:W(e,`${H}-prompts-header-text`),children:r})]})},l_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=tt(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return _.jsxs("button",{className:W(r,`${H}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(gp,{icon:a,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},E7="Ask me something else",y7=({label:e,disabled:t=!1})=>_.jsx(l_,{label:e||E7,disabled:t,onClick:()=>ti(!0)}),b7=({sendCopilotPrompt:e})=>{var N,S;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=o?(S=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(A=>A.displayText.trim()).filter(Boolean))!=null?S:[]:[],m=o?j0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=A=>()=>{const C=A.trim();C&&e(C)};return _.jsxs("div",{className:W(t,`${H}-prompts-button-group`),children:[T&&_.jsx(pc,{}),m.map(A=>_.jsx(l_,{label:A,disabled:r,onClick:v(A)},A)),w&&_.jsx(y7,{label:u,disabled:r})]})},T7=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:_.jsx("div",{className:W(e,`${H}-prompts-user-message-container`),children:_.jsx("p",{className:W(e,`${H}-prompts-user-message`),children:n})})},w7=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=tt(),{isInline:r,responseMessage:o,isResponseLoading:a}=ni();if(!r||!o&&!a)return null;if(a)return _.jsx(pc,{});if(!o)return null;const u=l=>Ep({event:l,openLinksInNewTab:t,onNavigate:n});return _.jsx("div",{className:W(e,`${H}-prompts-response-container`,`${H}-message-container`),children:_.jsx(Ap,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},_7=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:o}=Xo(),{status:{isOpen:a}}=rr(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:N,setIsResponseLoading:S}=Cf(),[A,C]=F.useState(null);F.useEffect(()=>{if(!d||A)return;const q=document.getElementById(d);q&&C(q)},[d,A]);const U=F.useCallback(q=>{if(!r||!f||!p)return;const R=ne=>{l?(N(null),v(q),w(ne.id),S(!0)):(a||ti(!0),o(ne))},Y={userPrompt:q,clientContext:B({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(Y,R);break;case"search":r.search(B({searchParams:p},Y),R);break;case"browse":r.browse(B({browseParams:p},Y),R);break;case"pdp":r.productView(B(B({},p),Y),R);break}},[r,l,f,p,a,w,N,v,S,o]);return!n||!u||!A||!f?null:Ko.createPortal(_.jsxs("div",{className:W(e,`${H}-prompts-extension-container`),style:t,children:[T&&_.jsx(m7,{onSubmit:U}),!T&&_.jsx(g7,{}),y&&_.jsx(b7,{sendCopilotPrompt:U}),_.jsxs("div",{className:W(e,`${H}-prompts-extension-messages-container`),children:[_.jsx(T7,{}),_.jsx(w7,{})]})]}),A)},x7=()=>_.jsxs(_.Fragment,{children:[_.jsx(p7,{}),_.jsx(_7,{})]}),c_=e=>_.jsxs(R1,pe(B({},e),{children:[_.jsx(f7,{}),_.jsx(x7,{})]}));var gc={},d_;function S7(){if(d_)return gc;d_=1;var e=B1();return gc.createRoot=e.createRoot,gc.hydrateRoot=e.hydrateRoot,gc}var v7=S7();const f_=new WeakMap,h_=(e,t)=>{let n=f_.get(e);n||(n=v7.createRoot(e),f_.set(e,n)),n.render(_.jsx(c_,B({},t)))},A7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=hn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(Go(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),h_(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),Go(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:s_,CopilotEmbed:i_,CopilotModal:a_,CopilotWidget:c_,CopilotWidgetProvider:R1,eventHandlers:{search:Dk,browse:Ek,pdp:{setPdpContext:y1,updatePdpProductId:bk,updatePdpLink:Tk},components:{setEntryType:ga,toggleWidgetOpen:ti,toggleWidgetMinimized:Ea,toggleModalFullscreen:xf,setWidgetType:pl,setWidgetDialogPosition:Sf,togglePromptsExtensionOpen:b1,togglePromptsExtensionInline:T1,loadPromptsComponent:kk,getAskCimPrompts:Sk,getSearchPrompts:vk,getBrowsePrompts:Ak,getProductViewPrompts:Ck},session:Nk},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=hn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Go(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Go(!0,"warn","Container element not found for id:",t),Go(!0,"warn","Beginning observation for element"),A7(B({elementId:t,timeout:e},n));return}h_(a,n)},state:()=>Object.freeze({search:Object.freeze(wt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));
46
+ `))}function d(y,w,v,N){const S=v.enter("tableCell"),A=v.enter("phrasing"),C=v.containerPhrasing(y,me(B({},N),{before:a,after:a}));return A(),S(),C}function f(y,w){return xF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const N=y.children;let S=-1;const A=[],C=w.enter("table");for(;++S<N.length;)A[S]=m(N[S],w,v);return C(),A}function m(y,w,v){const N=y.children;let S=-1;const A=[],C=w.enter("tableRow");for(;++S<N.length;)A[S]=d(N[S],y,w,v);return C(),A}function T(y,w,v){let N=$w.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function c9(){return{exit:{taskListCheckValueChecked:qw,taskListCheckValueUnchecked:qw,paragraph:f9}}}function d9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:h9}}}function qw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function f9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const l=o[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 h9(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=$w.listItem(e,t,n,B(B({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function p9(){return[YM(),hF(),EF(),r9(),c9()]}function m9(e){return{extensions:[WM(),pF(e),yF(),l9(e),d9()]}}const g9={tokenize:_9,partial:!0},Yw={tokenize:x9,partial:!0},Ww={tokenize:S9,partial:!0},Gw={tokenize:v9,partial:!0},E9={tokenize:A9,partial:!0},Xw={name:"wwwAutolink",tokenize:T9,previous:Qw},Kw={name:"protocolAutolink",tokenize:w9,previous:Jw},li={name:"emailAutolink",tokenize:b9,previous:Zw},jr={};function y9(){return{text:jr}}let vo=48;for(;vo<123;)jr[vo]=li,vo++,vo===58?vo=65:vo===91&&(vo=97);jr[43]=li,jr[45]=li,jr[46]=li,jr[95]=li,jr[72]=[li,Kw],jr[104]=[li,Kw],jr[87]=[li,Xw],jr[119]=[li,Xw];function b9(e,t,n){const r=this;let o,a;return u;function u(m){return!vp(m)||!Zw.call(r,r.previous)||Ap(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return vp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(E9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function T9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Qw.call(r,r.previous)||Ap(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(g9,e.attempt(Yw,e.attempt(Ww,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function w9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&Jw.call(r,r.previous)&&!Ap(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Nn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Tl(m)||pt(m)||uo(m)||wl(m)?n(m):e.attempt(Yw,e.attempt(Ww,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function _9(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function x9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(Gw,d,l)(f):f===null||pt(f)||uo(f)||f!==45&&wl(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function S9(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Gw,t,a)(u):u===null||pt(u)||uo(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function v9(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),o):l===60||l===null||pt(l)||uo(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||pt(l)||uo(l)?t(l):r(l)}function a(l){return Nn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),u):n(l)}}function A9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function Qw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function Jw(e){return!Nn(e)}function Zw(e){return!(e===47||vp(e))}function vp(e){return e===43||e===45||e===46||e===95||Tn(e)}function Ap(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 C9={tokenize:D9,partial:!0};function k9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:I9,continuation:{tokenize:R9},exit:L9}},text:{91:{name:"gfmFootnoteCall",tokenize:O9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N9,resolveTo:P9}}}}function N9(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=mr(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 P9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function O9(e,t,n){const r=this,o=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||pt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(mr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return pt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function I9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!l||w===null||w===91||pt(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=mr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return pt(w)||(l=!0),u++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function R9(e,t,n){return e.check(ka,t,e.attempt(C9,t,n))}function L9(e){e.exit("gfmFootnoteDefinition")}function D9(e,t,n){const r=this;return rt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function M9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Yn(T,T.length,0,_l(y,u.slice(f+1,d),l)),Yn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Yn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(w){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=ts(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const N=u.exit("strikethroughSequenceTemporary"),S=ts(w);return N._open=!S||S===2&&!!v,N._close=!v||v===2&&!!S,l(w)}}}class F9{constructor(){this.map=[]}add(t,n,r){B9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function B9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function U9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function H9(){return{flow:{null:{name:"table",tokenize:z9,resolveAll:j9}}}}function z9(e,t,n){const r=this;let o=0,a=0,u;return l;function l(Y){let ie=r.events.length-1;for(;ie>-1;){const ne=r.events[ie][1].type;if(ne==="lineEnding"||ne==="linePrefix")ie--;else break}const he=ie>-1?r.events[ie][1].type:null,ke=he==="tableHead"||he==="tableRow"?R:d;return ke===R&&r.parser.lazy[r.now().line]?n(Y):ke(Y)}function d(Y){return e.enter("tableHead"),e.enter("tableRow"),f(Y)}function f(Y){return Y===124||(u=!0,a+=1),p(Y)}function p(Y){return Y===null?n(Y):He(Y)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(Y),e.exit("lineEnding"),y):n(Y):Ze(Y)?rt(e,p,"whitespace")(Y):(a+=1,u&&(u=!1,o+=1),Y===124?(e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(Y)))}function m(Y){return Y===null||Y===124||pt(Y)?(e.exit("data"),p(Y)):(e.consume(Y),Y===92?T:m)}function T(Y){return Y===92||Y===124?(e.consume(Y),m):m(Y)}function y(Y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(Y):(e.enter("tableDelimiterRow"),u=!1,Ze(Y)?rt(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):w(Y))}function w(Y){return Y===45||Y===58?N(Y):Y===124?(u=!0,e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),v):V(Y)}function v(Y){return Ze(Y)?rt(e,N,"whitespace")(Y):N(Y)}function N(Y){return Y===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(Y),e.exit("tableDelimiterMarker"),S):Y===45?(a+=1,S(Y)):Y===null||He(Y)?U(Y):V(Y)}function S(Y){return Y===45?(e.enter("tableDelimiterFiller"),A(Y)):V(Y)}function A(Y){return Y===45?(e.consume(Y),A):Y===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(Y),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(Y))}function C(Y){return Ze(Y)?rt(e,U,"whitespace")(Y):U(Y)}function U(Y){return Y===124?w(Y):Y===null||He(Y)?!u||o!==a?V(Y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(Y)):V(Y)}function V(Y){return n(Y)}function R(Y){return e.enter("tableRow"),q(Y)}function q(Y){return Y===124?(e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),q):Y===null||He(Y)?(e.exit("tableRow"),t(Y)):Ze(Y)?rt(e,q,"whitespace")(Y):(e.enter("data"),re(Y))}function re(Y){return Y===null||Y===124||pt(Y)?(e.exit("data"),q(Y)):(e.consume(Y),Y===92?de:re)}function de(Y){return Y===92||Y===124?(e.consume(Y),re):re(Y)}}function j9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new F9;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(e_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=hc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=hc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(l=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=hc(T,t,a,o,n,m)):u[1]!==0&&(m=hc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&e_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=U9(t.events,n))}return e}function hc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},vs(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vs(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=vs(t.events,n[2]),p=vs(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},vs(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function e_(e,t,n,r,o){const a=[],u=vs(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $9={name:"tasklistCheck",tokenize:q9};function V9(){return{text:{91:$9}}}function q9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return pt(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):Ze(d)?e.check({tokenize:Y9},t,n)(d):n(d)}}function Y9(e,t,n){return rt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function W9(e){return AE([y9(),k9(),M9(e),H9(),V9()])}const G9={};function X9(e){const t=this,n=e||G9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(W9(n)),a.push(p9()),u.push(m9(n))}const pc=()=>_.jsx("span",{className:`${H}-blinking-cursor`,children:_.jsx("svg",{"aria-hidden":"true",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"})})});function K9(e){return/^tel:/i.test(e)?e:yy(e)}const Cp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>_.jsx("div",{className:W(e,`${H}-markdown`),children:_.jsx(Ey,{remarkPlugins:[X9],rehypePlugins:[bb],urlTransform:K9,components:{h1:({children:a})=>_.jsx("h1",{className:W(e,`${H}-header h1`),children:a}),h2:({children:a})=>_.jsx("h2",{className:W(e,`${H}-header h2`),children:a}),h3:({children:a})=>_.jsx("h3",{className:W(e,`${H}-header h3`),children:a}),ul:({children:a})=>_.jsx("ul",{className:W(e,`${H}-ul`),children:a}),ol:({children:a})=>_.jsx("ol",{className:W(e,`${H}-ol`),children:a}),li:({children:a})=>_.jsx("li",{className:W(e,`${H}-li`),children:a}),a:({href:a,children:u})=>_.jsx(Ab,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>_.jsx("div",{className:W(e,`${H}-table-container`),children:_.jsx("table",{className:W(e,`${H}-table`),children:a})}),thead:({children:a})=>_.jsx("thead",{className:W(e,`${H}-thead`),children:a}),tbody:({children:a})=>_.jsx("tbody",{className:W(e,`${H}-tbody`),children:a}),tr:({children:a})=>_.jsx("tr",{className:W(e,`${H}-tr`),children:a}),th:({children:a})=>_.jsx("th",{className:W(e,`${H}-th`),children:a}),td:({children:a})=>_.jsx("td",{className:W(e,`${H}-td`),children:a}),span:({className:a,children:u})=>a===`${H}-blinking-cursor`?_.jsx(pc,{}):_.jsx("span",{children:u})},children:r+(n?`<span className='${H}-blinking-cursor'></span>`:"")})}),Q9=({globalClassName:e,message:t})=>{const[n,r]=F.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return _.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${H}-progress-message`,"standalone"),children:[_.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","standalone"),children:_.jsx(q1,{})}),_.jsx("p",{className:W(e,`${H}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&_.jsxs(_.Fragment,{children:[_.jsx(El,{className:W(e,`${H}-thought-context-button`),onClick:l,children:n?_.jsxs(_.Fragment,{children:["Hide ",_.jsx(yN,{})]}):_.jsxs(_.Fragment,{children:["Context ",_.jsx(bN,{})]})}),n&&_.jsx("div",{className:W(e,`${H}-thought-container`),children:a&&_.jsx("p",{className:W(e,`${H}-progress-thought`),children:t.thought})})]})]})},J9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?_.jsx(Q9,{globalClassName:e,message:t}):_.jsxs("div",{className:W(e,`${H}-progress-message`,"embedded"),title:t.message,children:[_.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","embedded"),children:_.jsx(q1,{})}),_.jsx("i",{className:W(e,`${H}-progress-text`,"embedded"),children:t.message})]}),Z9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return _.jsxs("div",{className:W(e,`${H}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&_.jsxs("div",{className:W(e,`${H}-refined-event-query`,{embedded:!n,standalone:n}),children:[_.jsx("span",{className:W(e,`${H}-message-icon`,`${H}-refined-event-icon`,{embedded:!n,standalone:n}),children:_.jsx(Qo,{role:"img"})}),_.jsx("p",{className:W(e,`${H}-text`,`${H}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),_.jsx(Cp,{text:t.message})]})},t_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),l=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:l}},mc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>_.jsx("span",{className:W(t,`${H}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),n_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(l=>{var f;const d=((f=o[l])==null?void 0:f.join(", "))||"";return _.jsxs("div",{className:W(e,`${H}-facets`),children:[_.jsx("p",{className:W(e,`${H}-facet-category`),children:l}),_.jsx("p",{className:W(e,`${H}-facet-values`),children:d})]},l)})},ru=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>_.jsx("span",{className:W(e,`${H}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),e7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=t_(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?_.jsxs("div",{className:W(e,`${H}-user-message standalone`),children:[_.jsxs("div",{className:W(e,`${H}-user-message-row standalone`),children:[d?_.jsx("img",{className:W(e,`${H}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-message-icon standalone`),children:_.jsx(W1,{})}),_.jsx("p",{className:W(e,`${H}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&_.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),_.jsx(n_,{globalClassName:e,facetFiltersList:a,message:t}),_.jsx(ru,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):_.jsxs("div",{className:W(e,`${H}-user-message embedded`),children:[_.jsxs("div",{className:W(e,`${H}-user-message-row embedded`),children:[d?_.jsx("img",{className:W(e,`${H}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-message-icon embedded`),children:_.jsx(W1,{})}),_.jsx("p",{className:W(e,`${H}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&_.jsx(mc,{isWidgetStandalone:!1,filterCount:u})]}),_.jsx(ru,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},t7=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>_.jsxs("div",{className:W(e,`${H}-user-search standalone`),children:[_.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${H}-user-search-query standalone`),children:[d?_.jsx("img",{className:W(e,`${H}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-search-icon standalone`),children:_.jsx(Qo,{})}),_.jsx("p",{className:W(e,`${H}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&_.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),_.jsx(n_,{globalClassName:e,facetFiltersList:u,message:a})]}),_.jsx(ru,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),n7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=t_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=F.useMemo(()=>{var v,N,S;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(N=r==null?void 0:r.clientContext)==null?void 0:N.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(S=r==null?void 0:r.browseParams)==null?void 0:S.categoryId,queryLabel:w||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:w||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?_.jsx(t7,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):_.jsxs("div",{className:W(e,`${H}-user-search embedded`),children:[_.jsxs("div",{className:W(e,`${H}-user-search-query embedded`),children:[f?_.jsx("img",{className:W(e,`${H}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):_.jsx("span",{className:W(e,`${H}-message-icon user-search-icon embedded`),children:_.jsx(Qo,{})}),_.jsx("p",{className:W(e,`${H}-text bold embedded`),children:T||m}),u.length>0&&_.jsx(mc,{isWidgetStandalone:!1,filterCount:l})]}),_.jsx(ru,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},r_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Or(),{onNavigate:f}=tt(),p=v=>yp({event:v,openLinksInNewTab:n,onNavigate:f}),m=l&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const T=e.name,y=!!((w=e.request)!=null&&w.userPrompt);switch(T){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return y?_.jsx(e7,{globalClassName:t,isWidgetStandalone:a,message:e}):_.jsx(n7,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return _.jsx(Z9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return _.jsx(HM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return _.jsx(Cp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return _.jsx(UM,{message:e,isWidgetStandalone:a});case"display_products":return _.jsx(BM,{message:e,isWidgetStandalone:a});case"progress":return _.jsx(J9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:_.jsxs(_.Fragment,{children:[_.jsx("p",{className:W(t,`${H}-reset-message`),children:"This conversation has been reset."}),_.jsx("p",{className:W(t,`${H}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},r7=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=tt(),{groupedMessages:a}=Vn(),{entryType:u}=rr();return _.jsxs(_.Fragment,{children:[u==="ask_cim"&&_.jsx(LM,{isWidgetStandalone:e}),a.map(l=>{if(l.messages&&l.type==="group"){let d=new Date(l.createdAt).toLocaleString();const f=l.messages[l.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),_.jsxs("div",{className:W(n,`${H}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>_.jsx("div",{className:`${H}-message-group-child`,children:_.jsx(r_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),_.jsx(ru,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return _.jsx("div",{className:W(n,`${H}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:_.jsx(r_,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},i7=4e3,o7=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,i7),s7=({message:e,announcementKey:t})=>{const[n,r]=F.useState("");return F.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),_.jsx("span",{className:`${H}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},a7=()=>{const{groupedMessages:e}=Vn(),n=e.flatMap(r=>{var o;return r.type==="group"?(o=r.messages)!=null?o:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return _.jsx(s7,{message:n?o7(n.message):"",announcementKey:n==null?void 0:n.id})},u7=({isOpen:e}={})=>{const{messages:t}=Or(),{autoScroll:n}=tt(),r=F.useRef(null);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),F.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},l7={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},kp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=u7({isOpen:e});return _.jsxs(_.Fragment,{children:[_.jsx(r7,{isWidgetStandalone:t,handleSuggestionClick:r}),_.jsx(a7,{}),n&&_.jsx("div",{style:B(B({},l7),o),children:_.jsx(pc,{})}),_.jsx("div",{ref:a})]})},i_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{copilot:o,isLoading:a,handleUserInput:u,handleSuggestion:l,resetConversation:d}=Or();return gp()?o?_.jsxs("div",{className:W(t,`${H}-container`,`${H}-embedded-chat`,`${H}-layout-${e}`),style:n,children:[_.jsx("div",{className:W(t,`${H}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:_.jsx(kp,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:l})}),_.jsx(Ch,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u}),_.jsx("div",{className:W(`${H}-embedded-chat-menu`),children:_.jsxs(U8,{componentType:"chat",children:[_.jsx(Sw,{componentType:"chat"}),_.jsx(Nb,{componentType:"chat",onClearChat:d})]})})]}):_.jsx("div",{children:"Loading Copilot..."}):null},o_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(d7,()=>!1,()=>!0),{getRootNode:u}=lc();if(F.useEffect(()=>{o(()=>{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:c7(u);return _.jsx(_.Fragment,{children:F.Children.map(t,f=>Ko.createPortal(f,l))})},c7=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Eo(n)?n:Dr(t).body},d7=()=>()=>{},f7=["toggleDialogPosition","minimize","clearChat"],h7=["toggleFullscreen","minimize","clearChat"],s_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{mode:o,status:a,dialogPosition:u,isDialogFullHeight:l,dialogWidth:d}=rr(),{copilot:f,isLoading:p,handleUserInput:m,handleSuggestion:T,resetConversation:y}=Or(),w=gp(),{isOpen:v}=a||{},N=o==="standalone",S=()=>{ti(!1),If()};return f?_.jsx(bw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:w,initialFocusEl:Of,children:_.jsx(o_,{children:_.jsx(fp,{className:W(t,`${H}-dialog-positioner`),style:n,children:_.jsxs(cp,{className:W(t,`${H}-container`,`${H}-dialog`,`${H}-dialog-content`,`${H}-layout-${e}`,u,l&&"full-height",{standalone:N,embedded:!N}),style:d?{width:d}:void 0,children:[_.jsx(xw,{componentType:"dialog",overflowActions:f7,onClearChat:y,onClose:S}),_.jsx(dp,{className:W(t,`${H}-message-container`,`container-${r}`,{standalone:N,embedded:!N}),role:"region","aria-label":"Conversation",children:_.jsx(kp,{isWidgetStandalone:N,isLoading:p,isOpen:v,handleSuggestionClick:T})}),_.jsx(Ch,{componentType:"dialog",isLoading:p,onSubmit:m})]})})})}):_.jsx("div",{children:"Loading Copilot..."})},a_=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{mode:o,status:a,isModalFullscreen:u}=rr(),{copilot:l,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:m}=Or(),{isOpen:T}=a||{},y=o==="standalone",w=gp(),v=({open:S})=>{if(S){ti(!0);return}N()},N=()=>{ti(!1),If()};return w?l?_.jsx(bw,{lazyMount:!0,unmountOnExit:!0,open:w,onOpenChange:v,initialFocusEl:Of,children:_.jsx(o_,{children:_.jsxs("div",{className:W(t,`${H}-modal-container`),style:n,children:[_.jsx(pw,{className:W(t,`${H}-modal-backdrop`)}),_.jsx(fp,{className:W(t,`${H}-container`,`${H}-modal`,`${H}-layout-${e}`,{fullscreen:u,standalone:y,embedded:!y}),children:_.jsxs(cp,{className:W(t,`${H}-modal-content`,{standalone:y,embedded:!y}),children:[_.jsx(xw,{componentType:"modal",overflowActions:h7,onClearChat:m,onClose:N}),_.jsx(dp,{className:W(t,`${H}-message-container`,`container-${r}`,{standalone:y,embedded:!y}),role:"region","aria-label":"Conversation",children:_.jsx(kp,{isWidgetStandalone:y,isLoading:d,isOpen:T,handleSuggestionClick:p,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),_.jsx(Ch,{componentType:"modal",isLoading:d,onSubmit:f})]})})]})})}):_.jsx("div",{children:"Loading Copilot..."}):null},p7=()=>{const e=rr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(pN,{}):t==="dialog"?_.jsx(s_,{}):t==="modal"?_.jsx(a_,{}):_.jsx(i_,{})},m7=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Cf();F.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"&&o(d))};return _k(a),()=>{xk(a)}},[e,t,n,r,o])},g7=()=>{const{copilot:e}=Vn(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:l,setIsResponseLoading:d}=Cf(),{getCopilotSuggestions:f}=R1();m7();const p=F.useCallback(w=>{if(!t||!w)return;f(w,t,N=>{a(N.id)})},[t,f,a]);F.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=F.useCallback(w=>{w.eventSourceId===n&&(u(w),a(w.id),o(!0))},[n,u,a,o]),T=F.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(l(w),d(!1))},[n,l,d]),y=F.useCallback(()=>{o(!0),d(!1)},[o,d]);return F.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},u_={copilot:"Ask Copilot",messaging:"Ask a question"},E7=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:o,isResponseLoading:a}=ni(),u=o||u_[r],[l,d]=F.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:W(n,`${H}-prompts-input-container`),name:`${H}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${H}-prompts-input`,"aria-label":u,children:_.jsx(lp,{className:W(n,`${H}-prompts-input-icon`)})}),_.jsx("input",{id:`${H}-prompts-input`,className:W(n,`${H}-prompts-input`),name:`${H}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(ri,{className:W(n,`${H}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(Qo,{}),disabled:f})]})},y7=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ni(),r=n||u_[t];return _.jsxs("div",{className:W(e,`${H}-prompts-header`),children:[_.jsx(lp,{className:W(e,`${H}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:W(e,`${H}-prompts-header-text`),children:r})]})},l_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=tt(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return _.jsxs("button",{className:W(r,`${H}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Ep,{icon:a,className:`${H}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},b7="Ask me something else",T7=({label:e,disabled:t=!1})=>_.jsx(l_,{label:e||b7,disabled:t,onClick:()=>ti(!0)}),w7=({sendCopilotPrompt:e})=>{var N,S;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=o?(S=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(A=>A.displayText.trim()).filter(Boolean))!=null?S:[]:[],m=o?$0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=A=>()=>{const C=A.trim();C&&e(C)};return _.jsxs("div",{className:W(t,`${H}-prompts-button-group`),children:[T&&_.jsx(pc,{}),m.map(A=>_.jsx(l_,{label:A,disabled:r,onClick:v(A)},A)),w&&_.jsx(T7,{label:u,disabled:r})]})},_7=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:_.jsx("div",{className:W(e,`${H}-prompts-user-message-container`),children:_.jsx("p",{className:W(e,`${H}-prompts-user-message`),children:n})})},x7=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=tt(),{isInline:r,responseMessage:o,isResponseLoading:a}=ni();if(!r||!o&&!a)return null;if(a)return _.jsx(pc,{});if(!o)return null;const u=l=>yp({event:l,openLinksInNewTab:t,onNavigate:n});return _.jsx("div",{className:W(e,`${H}-prompts-response-container`,`${H}-message-container`),children:_.jsx(Cp,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},S7=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:o}=Xo(),{status:{isOpen:a}}=rr(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:N,setIsResponseLoading:S}=Cf(),[A,C]=F.useState(null);F.useEffect(()=>{if(!d||A)return;const V=document.getElementById(d);V&&C(V)},[d,A]);const U=F.useCallback(V=>{if(!r||!f||!p)return;const R=re=>{l?(N(null),v(V),w(re.id),S(!0)):(a||ti(!0),o(re))},q={userPrompt:V,clientContext:B({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,R);break;case"search":r.search(B({searchParams:p},q),R);break;case"browse":r.browse(B({browseParams:p},q),R);break;case"pdp":r.productView(B(B({},p),q),R);break}},[r,l,f,p,a,w,N,v,S,o]);return!n||!u||!A||!f?null:Ko.createPortal(_.jsxs("div",{className:W(e,`${H}-prompts-extension-container`),style:t,children:[T&&_.jsx(E7,{onSubmit:U}),!T&&_.jsx(y7,{}),y&&_.jsx(w7,{sendCopilotPrompt:U}),_.jsxs("div",{className:W(e,`${H}-prompts-extension-messages-container`),children:[_.jsx(_7,{}),_.jsx(x7,{})]})]}),A)},v7=()=>_.jsxs(_.Fragment,{children:[_.jsx(g7,{}),_.jsx(S7,{})]}),c_=e=>_.jsxs(L1,me(B({},e),{children:[_.jsx(p7,{}),_.jsx(v7,{})]}));var gc={},d_;function A7(){if(d_)return gc;d_=1;var e=U1();return gc.createRoot=e.createRoot,gc.hydrateRoot=e.hydrateRoot,gc}var C7=A7();const f_=new WeakMap,h_=(e,t)=>{let n=f_.get(e);n||(n=C7.createRoot(e),f_.set(e,n)),n.render(_.jsx(c_,B({},t)))},k7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=hn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(Go(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),h_(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),Go(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:s_,CopilotEmbed:i_,CopilotModal:a_,CopilotWidget:c_,CopilotWidgetProvider:L1,eventHandlers:{search:Dk,browse:Ek,pdp:{setPdpContext:b1,updatePdpProductId:bk,updatePdpLink:Tk},components:{setEntryType:ga,toggleWidgetOpen:ti,toggleWidgetMinimized:Ea,toggleModalFullscreen:xf,setWidgetType:pl,setWidgetDialogPosition:Sf,togglePromptsExtensionOpen:T1,togglePromptsExtensionInline:w1,loadPromptsComponent:kk,getAskCimPrompts:Sk,getSearchPrompts:vk,getBrowsePrompts:Ak,getProductViewPrompts:Ck},session:Nk},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=hn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Go(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Go(!0,"warn","Container element not found for id:",t),Go(!0,"warn","Beginning observation for element"),k7(B({elementId:t,timeout:e},n));return}h_(a,n)},state:()=>Object.freeze({search:Object.freeze(wt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));