@cimulate/copilot-widget 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.es.js +2 -2
- package/dist/cimulate-copilot-widget.umd.js +2 -2
- package/dist/copilot.css +1 -1
- package/dist/copilot.es.js +2 -2
- package/dist/copilot.umd.js +2 -2
- package/dist/messaging.css +1 -1
- package/dist/messaging.es.js +2 -2
- package/dist/messaging.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(qe,$e){typeof exports=="object"&&typeof module!="undefined"?module.exports=$e():typeof define=="function"&&define.amd?define($e):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=$e())})(this,(function(){"use strict";var w7=Object.defineProperty,C7=Object.defineProperties;var A7=Object.getOwnPropertyDescriptors;var vd=Object.getOwnPropertySymbols;var F2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable;var Zs=(qe,$e)=>($e=Symbol[qe])?$e:Symbol.for("Symbol."+qe),v7=qe=>{throw TypeError(qe)},ea=Math.pow,h0=(qe,$e,Qe)=>$e in qe?w7(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[$e]=Qe,D=(qe,$e)=>{for(var Qe in $e||($e={}))F2.call($e,Qe)&&h0(qe,Qe,$e[Qe]);if(vd)for(var Qe of vd($e))B2.call($e,Qe)&&h0(qe,Qe,$e[Qe]);return qe},pe=(qe,$e)=>C7(qe,A7($e));var cn=(qe,$e)=>{var Qe={};for(var st in qe)F2.call(qe,st)&&$e.indexOf(st)<0&&(Qe[st]=qe[st]);if(qe!=null&&vd)for(var st of vd(qe))$e.indexOf(st)<0&&B2.call(qe,st)&&(Qe[st]=qe[st]);return Qe};var Se=(qe,$e,Qe)=>h0(qe,typeof $e!="symbol"?$e+"":$e,Qe);var et=(qe,$e,Qe)=>new Promise((st,Mt)=>{var De=Pt=>{try{rn(Qe.next(Pt))}catch(_n){Mt(_n)}},$t=Pt=>{try{rn(Qe.throw(Pt))}catch(_n){Mt(_n)}},rn=Pt=>Pt.done?st(Pt.value):Promise.resolve(Pt.value).then(De,$t);rn((Qe=Qe.apply(qe,$e)).next())}),Jr=function(qe,$e){this[0]=qe,this[1]=$e},kd=(qe,$e,Qe)=>{var st=($t,rn,Pt,_n)=>{try{var ta=Qe[$t](rn),Hu=(rn=ta.value)instanceof Jr,zu=ta.done;Promise.resolve(Hu?rn[0]:rn).then(vr=>Hu?st($t==="return"?$t:"next",rn[1]?{done:vr.done,value:vr.value}:vr,Pt,_n):Pt({value:vr,done:zu})).catch(vr=>st("throw",vr,Pt,_n))}catch(vr){_n(vr)}},Mt=$t=>De[$t]=rn=>new Promise((Pt,_n)=>st($t,rn,Pt,_n)),De={};return Qe=Qe.apply(qe,$e),De[Zs("asyncIterator")]=()=>De,Mt("next"),Mt("throw"),Mt("return"),De},p0=qe=>{var $e=qe[Zs("asyncIterator")],Qe=!1,st,Mt={};return $e==null?($e=qe[Zs("iterator")](),st=De=>Mt[De]=$t=>$e[De]($t)):($e=$e.call(qe),st=De=>Mt[De]=$t=>{if(Qe){if(Qe=!1,De==="throw")throw $t;return $t}return Qe=!0,{done:!1,value:new Jr(new Promise(rn=>{var Pt=$e[De]($t);Pt instanceof Object||v7("Object expected"),rn(Pt)}),1)}}),Mt[Zs("iterator")]=()=>Mt,st("next"),"throw"in $e?st("throw"):Mt.throw=De=>{throw De},"return"in $e&&st("return"),Mt},U2=(qe,$e,Qe)=>($e=qe[Zs("asyncIterator")])?$e.call(qe):(qe=qe[Zs("iterator")](),$e={},Qe=(st,Mt)=>(Mt=qe[st])&&($e[st]=De=>new Promise(($t,rn,Pt)=>(De=Mt.call(qe,De),Pt=De.done,Promise.resolve(De.value).then(_n=>$t({value:_n,done:Pt}),rn)))),Qe("next"),Qe("return"),$e);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;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;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;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)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;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}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-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:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-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)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-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-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;font-size:var(--cim-widget-header-text-font-size)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;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;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.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)}.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-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
1
|
+
(function(qe,$e){typeof exports=="object"&&typeof module!="undefined"?module.exports=$e():typeof define=="function"&&define.amd?define($e):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=$e())})(this,(function(){"use strict";var w7=Object.defineProperty,C7=Object.defineProperties;var A7=Object.getOwnPropertyDescriptors;var vd=Object.getOwnPropertySymbols;var F2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable;var Zs=(qe,$e)=>($e=Symbol[qe])?$e:Symbol.for("Symbol."+qe),v7=qe=>{throw TypeError(qe)},ea=Math.pow,h0=(qe,$e,Qe)=>$e in qe?w7(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[$e]=Qe,D=(qe,$e)=>{for(var Qe in $e||($e={}))F2.call($e,Qe)&&h0(qe,Qe,$e[Qe]);if(vd)for(var Qe of vd($e))B2.call($e,Qe)&&h0(qe,Qe,$e[Qe]);return qe},pe=(qe,$e)=>C7(qe,A7($e));var cn=(qe,$e)=>{var Qe={};for(var st in qe)F2.call(qe,st)&&$e.indexOf(st)<0&&(Qe[st]=qe[st]);if(qe!=null&&vd)for(var st of vd(qe))$e.indexOf(st)<0&&B2.call(qe,st)&&(Qe[st]=qe[st]);return Qe};var Se=(qe,$e,Qe)=>h0(qe,typeof $e!="symbol"?$e+"":$e,Qe);var et=(qe,$e,Qe)=>new Promise((st,Mt)=>{var De=Pt=>{try{rn(Qe.next(Pt))}catch(_n){Mt(_n)}},$t=Pt=>{try{rn(Qe.throw(Pt))}catch(_n){Mt(_n)}},rn=Pt=>Pt.done?st(Pt.value):Promise.resolve(Pt.value).then(De,$t);rn((Qe=Qe.apply(qe,$e)).next())}),Jr=function(qe,$e){this[0]=qe,this[1]=$e},kd=(qe,$e,Qe)=>{var st=($t,rn,Pt,_n)=>{try{var ta=Qe[$t](rn),Hu=(rn=ta.value)instanceof Jr,zu=ta.done;Promise.resolve(Hu?rn[0]:rn).then(vr=>Hu?st($t==="return"?$t:"next",rn[1]?{done:vr.done,value:vr.value}:vr,Pt,_n):Pt({value:vr,done:zu})).catch(vr=>st("throw",vr,Pt,_n))}catch(vr){_n(vr)}},Mt=$t=>De[$t]=rn=>new Promise((Pt,_n)=>st($t,rn,Pt,_n)),De={};return Qe=Qe.apply(qe,$e),De[Zs("asyncIterator")]=()=>De,Mt("next"),Mt("throw"),Mt("return"),De},p0=qe=>{var $e=qe[Zs("asyncIterator")],Qe=!1,st,Mt={};return $e==null?($e=qe[Zs("iterator")](),st=De=>Mt[De]=$t=>$e[De]($t)):($e=$e.call(qe),st=De=>Mt[De]=$t=>{if(Qe){if(Qe=!1,De==="throw")throw $t;return $t}return Qe=!0,{done:!1,value:new Jr(new Promise(rn=>{var Pt=$e[De]($t);Pt instanceof Object||v7("Object expected"),rn(Pt)}),1)}}),Mt[Zs("iterator")]=()=>Mt,st("next"),"throw"in $e?st("throw"):Mt.throw=De=>{throw De},"return"in $e&&st("return"),Mt},U2=(qe,$e,Qe)=>($e=qe[Zs("asyncIterator")])?$e.call(qe):(qe=qe[Zs("iterator")](),$e={},Qe=(st,Mt)=>(Mt=qe[st])&&($e[st]=De=>new Promise(($t,rn,Pt)=>(De=Mt.call(qe,De),Pt=De.done,Promise.resolve(De.value).then(_n=>$t({value:_n,done:Pt}),rn)))),Qe("next"),Qe("return"),$e);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;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-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)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-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:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-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)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-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-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.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)}.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-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(qe);function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},st={},Mt={exports:{}},De={};var $t;function rn(){if($t)return De;$t=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function T(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function k(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}k.prototype.isReactComponent={},k.prototype.setState=function(M,te){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,te,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=k.prototype;function N(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}var C=N.prototype=new A;C.constructor=N,_(C,k.prototype),C.isPureReactComponent=!0;var U=Array.isArray,q=Object.prototype.hasOwnProperty,F={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function ie(M,te,O){var _e,Me={},ke=null,He=null;if(te!=null)for(_e in te.ref!==void 0&&(He=te.ref),te.key!==void 0&&(ke=""+te.key),te)q.call(te,_e)&&!Y.hasOwnProperty(_e)&&(Me[_e]=te[_e]);var xe=arguments.length-2;if(xe===1)Me.children=O;else if(1<xe){for(var Ye=Array(xe),ft=0;ft<xe;ft++)Ye[ft]=arguments[ft+2];Me.children=Ye}if(M&&M.defaultProps)for(_e in xe=M.defaultProps,xe)Me[_e]===void 0&&(Me[_e]=xe[_e]);return{$$typeof:e,type:M,key:ke,ref:He,props:Me,_owner:F.current}}function ge(M,te){return{$$typeof:e,type:M.type,key:te,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function oe(M){var te={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return te[O]})}var ce=/\/+/g;function de(M,te){return typeof M=="object"&&M!==null&&M.key!=null?oe(""+M.key):te.toString(36)}function ne(M,te,O,_e,Me){var ke=typeof M;(ke==="undefined"||ke==="boolean")&&(M=null);var He=!1;if(M===null)He=!0;else switch(ke){case"string":case"number":He=!0;break;case"object":switch(M.$$typeof){case e:case t:He=!0}}if(He)return He=M,Me=Me(He),M=_e===""?"."+de(He,0):_e,U(Me)?(O="",M!=null&&(O=M.replace(ce,"$&/")+"/"),ne(Me,te,O,"",function(ft){return ft})):Me!=null&&($(Me)&&(Me=ge(Me,O+(!Me.key||He&&He.key===Me.key?"":(""+Me.key).replace(ce,"$&/")+"/")+M)),te.push(Me)),1;if(He=0,_e=_e===""?".":_e+":",U(M))for(var xe=0;xe<M.length;xe++){ke=M[xe];var Ye=_e+de(ke,xe);He+=ne(ke,te,O,Ye,Me)}else if(Ye=T(M),typeof Ye=="function")for(M=Ye.call(M),xe=0;!(ke=M.next()).done;)ke=ke.value,Ye=_e+de(ke,xe++),He+=ne(ke,te,O,Ye,Me);else if(ke==="object")throw te=String(M),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.");return He}function Te(M,te,O){if(M==null)return M;var _e=[],Me=0;return ne(M,_e,"","",function(ke){return te.call(O,ke,Me++)}),_e}function Ie(M){if(M._status===-1){var te=M._result;te=te(),te.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=te)}if(M._status===1)return M._result.default;throw M._result}var ue={current:null},Q={transition:null},re={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:Q,ReactCurrentOwner:F};function v(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:Te,forEach:function(M,te,O){Te(M,function(){te.apply(this,arguments)},O)},count:function(M){var te=0;return Te(M,function(){te++}),te},toArray:function(M){return Te(M,function(te){return te})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},De.Component=k,De.Fragment=n,De.Profiler=o,De.PureComponent=N,De.StrictMode=r,De.Suspense=d,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,De.act=v,De.cloneElement=function(M,te,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=_({},M.props),Me=M.key,ke=M.ref,He=M._owner;if(te!=null){if(te.ref!==void 0&&(ke=te.ref,He=F.current),te.key!==void 0&&(Me=""+te.key),M.type&&M.type.defaultProps)var xe=M.type.defaultProps;for(Ye in te)q.call(te,Ye)&&!Y.hasOwnProperty(Ye)&&(_e[Ye]=te[Ye]===void 0&&xe!==void 0?xe[Ye]:te[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=O;else if(1<Ye){xe=Array(Ye);for(var ft=0;ft<Ye;ft++)xe[ft]=arguments[ft+2];_e.children=xe}return{$$typeof:e,type:M.type,key:Me,ref:ke,props:_e,_owner:He}},De.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},De.createElement=ie,De.createFactory=function(M){var te=ie.bind(null,M);return te.type=M,te},De.createRef=function(){return{current:null}},De.forwardRef=function(M){return{$$typeof:c,render:M}},De.isValidElement=$,De.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Ie}},De.memo=function(M,te){return{$$typeof:f,type:M,compare:te===void 0?null:te}},De.startTransition=function(M){var te=Q.transition;Q.transition={};try{M()}finally{Q.transition=te}},De.unstable_act=v,De.useCallback=function(M,te){return ue.current.useCallback(M,te)},De.useContext=function(M){return ue.current.useContext(M)},De.useDebugValue=function(){},De.useDeferredValue=function(M){return ue.current.useDeferredValue(M)},De.useEffect=function(M,te){return ue.current.useEffect(M,te)},De.useId=function(){return ue.current.useId()},De.useImperativeHandle=function(M,te,O){return ue.current.useImperativeHandle(M,te,O)},De.useInsertionEffect=function(M,te){return ue.current.useInsertionEffect(M,te)},De.useLayoutEffect=function(M,te){return ue.current.useLayoutEffect(M,te)},De.useMemo=function(M,te){return ue.current.useMemo(M,te)},De.useReducer=function(M,te,O){return ue.current.useReducer(M,te,O)},De.useRef=function(M){return ue.current.useRef(M)},De.useState=function(M){return ue.current.useState(M)},De.useSyncExternalStore=function(M,te,O){return ue.current.useSyncExternalStore(M,te,O)},De.useTransition=function(){return ue.current.useTransition()},De.version="18.3.1",De}var Pt;function _n(){return Pt||(Pt=1,Mt.exports=rn()),Mt.exports}var ta;function Hu(){if(ta)return st;ta=1;var e=_n(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,g={},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)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:g,_owner:o.current}}return st.Fragment=n,st.jsx=u,st.jsxs=u,st}var zu;function vr(){return zu||(zu=1,Qe.exports=Hu()),Qe.exports}var w=vr();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 ju=Object.create(null);Object.keys(kr).forEach(e=>{ju[kr[e]]=e});const Pd={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,Nd=({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 Od;function $2(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));Nd(e,!1,n=>{Od||(Od=new TextEncoder),t(Od.encode(n))})}const T0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<T0.length;e++)na[T0.charCodeAt(e)]=e;const V2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],c=na[e.charCodeAt(r+2)],d=na[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},q2=typeof ArrayBuffer=="function",Id=(e,t)=>{if(typeof e!="string")return{type:"message",data:_0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Y2(e.substring(1),t)}:ju[n]?e.length>1?{type:ju[n],data:e.substring(1)}:{type:ju[n]}:Pd},Y2=(e,t)=>{if(q2){const n=V2(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,S0="",G2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Nd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(S0))})})},W2=(e,t)=>{const n=e.split(S0),r=[];for(let o=0;o<n.length;o++){const a=Id(n[o],t);if(r.push(a),a.type==="error")break}return r};function X2(){return new TransformStream({transform(e,t){$2(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 Rd;function $u(e){return e.reduce((t,n)=>t+n.length,0)}function Vu(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 K2(e,t){Rd||(Rd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if($u(n)<1)break;const d=Vu(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($u(n)<2)break;const d=Vu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if($u(n)<8)break;const d=Vu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Pd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if($u(n)<o)break;const d=Vu(n,o);c.enqueue(Id(a?d:Rd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Pd);break}}}})}const x0=4;function Ft(e){if(e)return Q2(e)}function Q2(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),J2="arraybuffer";function k7(){}function w0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Z2=Kn.setTimeout,ew=Kn.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Z2.bind(Kn),e.clearTimeoutFn=ew.bind(Kn)):(e.setTimeoutFn=Kn.setTimeout.bind(Kn),e.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const tw=1.33;function nw(e){return typeof e=="string"?rw(e):Math.ceil((e.byteLength||e.size)*tw)}function rw(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 C0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function iw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ow(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 sw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ld extends Ft{constructor(t){super(),this.writable=!1,Yu(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 sw(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=Id(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=iw(t);return n.length?"?"+n:""}}class aw extends Ld{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)};W2(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,G2(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]=C0()),!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 uw=A0;function lw(){}class cw extends aw{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 Pr extends Ft{constructor(t,n,r){super(),this.createRequest=t,Yu(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=w0(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=Pr.requestsCount++,Pr.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=lw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.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(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",v0);else if(typeof addEventListener=="function"){const e="onpagehide"in Kn?"pagehide":"unload";addEventListener(e,v0,!1)}}function v0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const dw=(function(){const e=k0({xdomain:!1});return e&&e.responseType!==null})();class fw extends cw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=dw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(k0,this.uri(),t)}}function k0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||uw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const P0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hw extends Ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=P0?{}:w0(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;Nd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&qu(()=>{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]=C0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Dd=Kn.WebSocket||Kn.MozWebSocket;class pw extends hw{createSocket(t,n,r){return P0?new Dd(t,n,r):n?new Dd(t,n):new Dd(t)}doWrite(t,n){this.ws.send(n)}}class mw extends Ld{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=K2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=X2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const gw={websocket:pw,webtransport:mw,polling:fw},Ew=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,yw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Md(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=Ew.exec(e||""),a={},u=14;for(;u--;)a[yw[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=bw(a,a.path),a.queryKey=Tw(a,a.query),a}function bw(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 Tw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Gu=[];Fd&&addEventListener("offline",()=>{Gu.forEach(e=>e())},!1);class Ti extends Ft{constructor(t,n){if(super(),this.binaryType=J2,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=Md(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=Md(n.host).host);Yu(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=ow(this.opts.query)),Fd&&(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"})},Gu.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&&Ti.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ti.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=nw(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,qu(()=>{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(Ti.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Gu.indexOf(this._offlineEventListener);r!==-1&&Gu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ti.protocol=x0;class _w extends Ti{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ti.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const T=new Error("probe error: "+g);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Sw=class extends _w{constructor(t,n={}){const r=typeof t=="object",o=r?D({},t):D({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>gw[a]).filter(a=>!!a)),super(r?o:t,o)}};function xw(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=Md(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 ww=typeof ArrayBuffer=="function",Cw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,N0=Object.prototype.toString,Aw=typeof Blob=="function"||typeof Blob!="undefined"&&N0.call(Blob)==="[object BlobConstructor]",vw=typeof File=="function"||typeof File!="undefined"&&N0.call(File)==="[object FileConstructor]";function Bd(e){return ww&&(e instanceof ArrayBuffer||Cw(e))||Aw&&e instanceof Blob||vw&&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(Bd(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 kw(e){const t=[],n=e.data,r=e;return r.data=Ud(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ud(e,t){if(!e)return e;if(Bd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ud(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ud(e[r],t));return n}return e}function Pw(e,t){return e.data=Hd(e.data,t),delete e.attachments,e}function Hd(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]=Hd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hd(e[n],t));return e}const Nw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(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"})(tt||(tt={}));class Ow{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.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=kw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class zd extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Iw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Bd(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(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Rw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(zd.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 tt.CONNECT:return O0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||O0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Nw.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Iw{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=Pw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Rw=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 Lw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:Ow,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function dr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Dw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class I0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[dr(t,"open",this.onopen.bind(this)),dr(t,"packet",this.onpacket.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(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(Dw.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:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tt.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 tt.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 tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.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:tt.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:tt.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 Fo(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}Fo.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},Fo.prototype.reset=function(){this.attempts=0},Fo.prototype.setMin=function(e){this.ms=e},Fo.prototype.setMax=function(e){this.max=e},Fo.prototype.setJitter=function(e){this.jitter=e};class jd extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(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 Fo({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||Lw;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 Sw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=dr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=dr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(dr(t,"ping",this.onping.bind(this)),dr(t,"data",this.ondata.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(t,"close",this.onclose.bind(this)),dr(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){qu(()=>{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 ra={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=xw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new jd(r,t):(ra[o]||(ra[o]=new jd(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:jd,Socket:I0,io:Xu,connect:Xu});var Mw=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===Fw})(t)})(e)},Fw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Bo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Bw(e,t,n){return e.concat(t).map((function(r){return ia(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 Uw(e,t,n){var r={};return n.isMergeableObject(e)&&R0(e).forEach((function(o){r[o]=ia(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 Bo;var c=u.customMerge(a);return typeof c=="function"?c:Bo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Bo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Bw,n.isMergeableObject=n.isMergeableObject||Mw,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Uw(e,t,n):ia(t,n)}Bo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Bo(n,r,t)}),{})};var Hw=Bo;let zw=class{constructor(t){Object.assign(this,t)}};function Sn(e){if(e)return(function(t){for(var n in Sn.prototype)t[n]=Sn.prototype[n];return t})(e)}Sn.prototype.on=Sn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Sn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Sn.prototype.off=Sn.prototype.removeListener=Sn.prototype.removeAllListeners=Sn.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},Sn.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},Sn.prototype.emitReserved=Sn.prototype.emit,Sn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Sn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const jw=typeof ArrayBuffer=="function",D0=Object.prototype.toString,$w=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",Vw=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function $d(e){return jw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||$w&&e instanceof Blob||Vw&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if($d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function qw(e){const t=[],n=e.data,r=e;return r.data=Vd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vd(e,t){if(!e)return e;if($d(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]=Vd(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]=Vd(e[r],t));return n}return e}function Yw(e,t){return e.data=qd(e.data,t),delete e.attachments,e}function qd(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]=qd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qd(e[n],t));return e}const Gw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var At;(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"})(At||(At={}));class Ww{constructor(t){this.replacer=t}encode(t){return t.type!==At.EVENT&&t.type!==At.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===At.EVENT?At.BINARY_EVENT:At.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==At.BINARY_EVENT&&t.type!==At.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=qw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Yd extends Sn{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===At.BINARY_EVENT;r||n.type===At.BINARY_ACK?(n.type=r?At.EVENT:At.ACK,this.reconstructor=new Xw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!$d(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(At[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===At.BINARY_EVENT||r.type===At.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Kw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Yd.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 At.CONNECT:return M0(n);case At.DISCONNECT:return n===void 0;case At.CONNECT_ERROR:return typeof n=="string"||M0(n);case At.EVENT:case At.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Gw.indexOf(n[0])===-1);case At.ACK:case At.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Xw{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=Yw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Kw=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((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((c=>c[1])):Object.fromEntries(u)},U0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Qw=B0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),F0),H0=B0(U0,U0,F0),Jw={Encoder:class extends Ww{encode(e){var t,n;return super.encode(pe(D({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Qw(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 Yd{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))}}},Zw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class eC{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=g=>{console.log("[Copilot SDK] Connect Ack:",g),this.socket.auth={[this.sessionIdKey]:g.sessionId}},this.handleDisconnect=g=>{console.warn(`[Copilot SDK] Disconnected: ${g}`),g!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${g}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=g=>{console.error(`[Copilot SDK] Connect error: ${g.message}`);const T=g.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=[Zw,c,{parser:Jw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Xu(d,Hw.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*ea(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 kd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Jr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Jr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Jr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new zw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=_n();const eo=$e(B);var z0=Symbol.for("immer-nothing"),j0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Uo=Object.getPrototypeOf;function Ho(e){return!!e&&!!e[at]}function Zr(e){var t;return e?$0(e)||Array.isArray(e)||!!e[j0]||!!((t=e.constructor)!=null&&t[j0])||Ju(e)||Zu(e):!1}var tC=Object.prototype.constructor.toString();function $0(e){if(!e||typeof e!="object")return!1;const t=Uo(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)===tC}function oa(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:Ju(e)?2:Zu(e)?3:0}function Gd(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function nC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ju(e){return e instanceof Map}function Zu(e){return e instanceof Set}function Xt(e){return e.copy_||e.base_}function Wd(e,t){if(Ju(e))return new Map(e);if(Zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$0(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],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Uo(e),r)}else{const r=Uo(e);if(r!==null&&n)return D({},e);const o=Object.create(r);return Object.assign(o,e)}}function Xd(e,t=!1){return el(e)||Ho(e)||!Zr(e)||(Qu(e)>1&&(e.set=e.add=e.clear=e.delete=rC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xd(r,!0))),e}function rC(){Qn(2)}function el(e){return Object.isFrozen(e)}var Kd={};function to(e){const t=Kd[e];return t||Qn(0,e),t}function iC(e,t){Kd[e]||(Kd[e]=t)}var sa;function tl(){return sa}function oC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function q0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qd(e){Jd(e),e.drafts_.forEach(sC),e.drafts_=null}function Jd(e){e===sa&&(sa=e.parent_)}function Y0(e){return sa=oC(sa,e)}function sC(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function G0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Qd(t),Qn(4)),Zr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==z0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>W0(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),oa(a,(c,d)=>W0(e,r,o,c,d,n,u)),rl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function W0(e,t,n,r,o,a,u){if(Ho(o)){const c=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=nl(e,o,c);if(V0(n,r,d),Ho(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!el(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&rl(e,o)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xd(t,n)}function aC(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=Zd;n&&(o=[r],a=aa);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Zd={get(e,t){if(t===at)return e;const n=Xt(e);if(!Gd(n,t))return uC(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===ef(e.base_,t)?(tf(e),e.copy_[t]=ua(r,e)):r},has(e,t){return t in Xt(e)},ownKeys(e){return Reflect.ownKeys(Xt(e))},set(e,t,n){const r=X0(Xt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ef(Xt(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(nC(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;tf(e),ei(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 ef(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return Uo(e.base_)},setPrototypeOf(){Qn(12)}},aa={};oa(Zd,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)},aa.set=function(e,t,n){return Zd.set.call(this,e[0],t,n,e[0])};function ef(e,t){const n=e[at];return(n?Xt(n):e)[t]}function uC(e,t,n){var o;const r=X0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function X0(e,t){if(!(t in e))return;let n=Uo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Uo(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function tf(e){e.copy_||(e.copy_=Wd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lC=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"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Zr(t)){const a=Y0(this),u=ua(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Qd(a):Jd(a)}return q0(a,r),G0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===z0&&(o=void 0),this.autoFreeze_&&Xd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),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){Zr(e)||Qn(8),Ho(e)&&(e=cC(e));const t=Y0(this),n=ua(e,void 0);return n[at].isManual_=!0,Jd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return q0(r,t),G0(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=to("Patches").applyPatches_;return Ho(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ua(e,t){const n=Ju(e)?to("MapSet").proxyMap_(e,t):Zu(e)?to("MapSet").proxySet_(e,t):aC(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function cC(e){return Ho(e)||Qn(10,e),K0(e)}function K0(e){if(!Zr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Wd(e,!0);return oa(n,(r,o)=>{V0(n,r,K0(o))}),t&&(t.finalized_=!1),n}function dC(){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 Xt(this[at]).size}has(d){return Xt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Xt(p).has(d)||Xt(p).get(d)!==f)&&(n(p),ei(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),ei(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),Xt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Xt(p).forEach((g,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Xt(f).get(d);if(f.finalized_||!Zr(p)||p!==f.base_.get(d))return p;const g=ua(p,f);return n(f),f.copy_.set(d,g),g}keys(){return Xt(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(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.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 Xt(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),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ei(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Xt(d).size&&(a(d),ei(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 g=p.next();for(;!g.done;)d.call(f,g.value,g.value,this),g=p.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Zr(d)){const f=ua(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Qn(3,JSON.stringify(Xt(c)))}iC("MapSet",{proxyMap_:t,proxySet_:o})}var Un=new lC,fC=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function Q0(e,t,n){var r=B.useMemo(function(){return fC(e)},[e]);return B.useReducer(r,t,n)}const J0={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"},mt={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"},no={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},hC=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},zo="cimulate",nf=`${zo}:pdp-update`,rf=`${zo}:browse-update`,of=`${zo}:search-update`,sf=`${zo}:ui-state-update`,af=`${zo}:prompts-state-update`,uf=`${zo}:session-state`,Nr=D({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},J0),pC={"browse-context":Nr.CONTEXT_UPDATED,categoryId:Nr.CATEGORY_ID_CHANGED,categoryName:Nr.CATEGORY_NAME_CHANGED,page:Nr.PAGE_CHANGED,pageSize:Nr.PAGE_SIZE_CHANGED,includeFacets:Nr.FACET_FILTERS_CHANGED,facetFilters:Nr.FACET_FILTERS_CHANGED,rangeFilters:Nr.RANGE_FILTERS_CHANGED,catalogSegment:Nr.CATALOG_SEGMENT_CHANGED,pricebooks:Nr.PRICEBOOKS_CHANGED},ti=D({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},J0),mC={"search-context":ti.SEARCH_CONTEXT_UPDATED,query:ti.QUERY_CHANGED,page:ti.PAGE_CHANGED,pageSize:ti.PAGE_SIZE_CHANGED,includeFacets:ti.FACET_FILTERS_CHANGED,facetFilters:ti.FACET_FILTERS_CHANGED,rangeFilters:ti.RANGE_FILTERS_CHANGED,catalogSegment:ti.CATALOG_SEGMENT_CHANGED,pricebooks:ti.PRICEBOOKS_CHANGED},j="cim-widget",ni=`--${j}`,_i={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},gC=(e=_i)=>({[`${ni}-primary-color`]:e.primaryColor||_i.primaryColor,[`${ni}-secondary-color`]:e.secondaryColor||_i.secondaryColor,[`${ni}-font-color`]:e.fontColor||_i.fontColor,[`${ni}-font-family`]:e.fontFamily||_i.fontFamily,[`${ni}-background-color`]:e.backgroundColor||_i.backgroundColor,[`${ni}-border-color`]:e.borderColor||_i.borderColor,[`${ni}-border-radius`]:e.borderRadius||_i.borderRadius}),Si={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},Z0=B.createContext(null),eg=B.createContext(null);function tg(e,t){return function(){return e.apply(t,arguments)}}const{toString:EC}=Object.prototype,{getPrototypeOf:il}=Object,{iterator:ol,toStringTag:ng}=Symbol,sl=(e=>t=>{const n=EC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fr=e=>(e=e.toLowerCase(),t=>sl(t)===e),al=e=>t=>typeof t===e,{isArray:jo}=Array,$o=al("undefined");function la(e){return e!==null&&!$o(e)&&e.constructor!==null&&!$o(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rg=fr("ArrayBuffer");function yC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rg(e.buffer),t}const bC=al("string"),vn=al("function"),ig=al("number"),ca=e=>e!==null&&typeof e=="object",TC=e=>e===!0||e===!1,ul=e=>{if(sl(e)!=="object")return!1;const t=il(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ng in e)&&!(ol in e)},_C=e=>{if(!ca(e)||la(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},SC=fr("Date"),xC=fr("File"),wC=e=>!!(e&&typeof e.uri!="undefined"),CC=e=>e&&typeof e.getParts!="undefined",AC=fr("Blob"),vC=fr("FileList"),kC=e=>ca(e)&&vn(e.pipe);function PC(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const og=PC(),sg=typeof og.FormData!="undefined"?og.FormData:void 0,NC=e=>{if(!e)return!1;if(sg&&e instanceof sg)return!0;const t=il(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=sl(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},OC=fr("URLSearchParams"),[IC,RC,LC,DC]=["ReadableStream","Request","Response","Headers"].map(fr),MC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),jo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(la(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function ag(e,t){if(la(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 ro=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ug=e=>!$o(e)&&e!==ro;function lf(...e){const{caseless:t,skipUndefined:n}=ug(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&ag(r,u)||u,d=cf(r,c)?r[c]:void 0;ul(d)&&ul(a)?r[c]=lf(d,a):ul(a)?r[c]=lf({},a):jo(a)?r[c]=a.slice():(!n||!$o(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&da(e[a],o);return r}const FC=(e,t,n,{allOwnKeys:r}={})=>(da(t,(o,a)=>{n&&vn(o)?Object.defineProperty(e,a,{__proto__:null,value:tg(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),BC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),UC=(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)},HC=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&il(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zC=(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},jC=e=>{if(!e)return null;if(jo(e))return e;let t=e.length;if(!ig(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$C=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&il(Uint8Array)),VC=(e,t)=>{const r=(e&&e[ol]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},qC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},YC=fr("HTMLFormElement"),GC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),WC=fr("RegExp"),lg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};da(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},XC=e=>{lg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(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+"'")})}})},KC=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return jo(e)?r(e):r(String(e).split(t)),n},QC=()=>{},JC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ZC(e){return!!(e&&vn(e.append)&&e[ng]==="FormData"&&e[ol])}const eA=e=>{const t=new WeakSet,n=r=>{if(ca(r)){if(t.has(r))return;if(la(r))return r;if(!("toJSON"in r)){t.add(r);const o=jo(r)?[]:{};return da(r,(a,u)=>{const c=n(a);!$o(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},tA=fr("AsyncFunction"),nA=e=>e&&(ca(e)||vn(e))&&vn(e.then)&&vn(e.catch),cg=((e,t)=>e?setImmediate:t?((n,r)=>(ro.addEventListener("message",({source:o,data:a})=>{o===ro&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ro.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(ro.postMessage)),rA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ro):typeof process!="undefined"&&process.nextTick||cg,V={isArray:jo,isArrayBuffer:rg,isBuffer:la,isFormData:NC,isArrayBufferView:yC,isString:bC,isNumber:ig,isBoolean:TC,isObject:ca,isPlainObject:ul,isEmptyObject:_C,isReadableStream:IC,isRequest:RC,isResponse:LC,isHeaders:DC,isUndefined:$o,isDate:SC,isFile:xC,isReactNativeBlob:wC,isReactNative:CC,isBlob:AC,isRegExp:WC,isFunction:vn,isStream:kC,isURLSearchParams:OC,isTypedArray:$C,isFileList:vC,forEach:da,merge:lf,extend:FC,trim:MC,stripBOM:BC,inherits:UC,toFlatObject:HC,kindOf:sl,kindOfTest:fr,endsWith:zC,toArray:jC,forEachEntry:VC,matchAll:qC,isHTMLForm:YC,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:lg,freezeMethods:XC,toObjectSet:KC,toCamelCase:GC,noop:QC,toFiniteNumber:JC,findKey:ag,global:ro,isContextDefined:ug,isSpecCompliantForm:ZC,toJSONObject:eA,isAsyncFn:tA,isThenable:nA,setImmediate:cg,asap:rA,isIterable:e=>e!=null&&vn(e[ol])},iA=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oA=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
3
|
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&iA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function sA(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 aA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),uA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function df(e,t){return V.isArray(e)?e.map(n=>df(n,t)):sA(String(e).replace(t,""))}const lA=e=>df(e,aA),cA=e=>df(e,uA);function dg(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=cA(n)}),t}const fg=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function ll(e){return e===!1||e==null?e:V.isArray(e)?e.map(ll):lA(String(e))}function dA(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 fA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ff(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function hA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function pA(e,t){const n=V.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 xn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=fa(d);if(!p)throw new Error("header name must be a non-empty string");const g=V.findKey(o,p);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||d]=ll(c))}const u=(c,d)=>V.forEach(c,(f,p)=>a(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!fA(t))u(oA(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,f;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=fa(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return dA(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fa(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ff(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=fa(u),u){const c=V.findKey(r,u);c&&(!n||ff(r,r[c],c,n))&&(delete r[c],o=!0)}}return V.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||ff(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=ll(o),delete n[a];return}const c=t?hA(a):String(a).trim();c!==a&&delete n[a],n[c]=ll(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.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
4
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[fg]=this[fg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=fa(u);r[c]||(pA(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};xn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(xn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(xn);const mA="[REDACTED ****]";function gA(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function EA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof xn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&gA(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?mA:o(d);V.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Ne=class H2 extends Error{static from(t,n,r,o,a,u){const c=new H2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?EA(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yA=null;function hf(e){return V.isPlainObject(e)||V.isArray(e)}function hg(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=hg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function bA(e){return V.isArray(e)&&!e.some(hf)}const TA=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function cl(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,A){return!V.isUndefined(A[k])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!f&&V.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,k,A){let N=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(pf(A,k,a),p(S)),!1;if(S&&!A&&typeof S=="object"){if(V.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&bA(S)||(V.isFileList(S)||V.endsWith(k,"[]"))&&(N=V.toArray(S)))return k=hg(k),N.forEach(function(U,q){!(V.isUndefined(U)||U===null)&&t.append(u===!0?pf([k],q,a):u===null?k:k+"[]",p(U))}),!1}return hf(S)?!0:(t.append(pf(A,k,a),p(S)),!1)}const T=[],y=Object.assign(TA,{defaultVisitor:g,convertValue:p,isVisitable:hf});function _(S,k,A=0){if(!V.isUndefined(S)){if(A>d)throw new Ne("Object is too deeply nested ("+A+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(S)!==-1)throw Error("Circular reference detected in "+k.join("."));T.push(S),V.forEach(S,function(C,U){(!(V.isUndefined(C)||C===null)&&o.call(t,C,V.isString(U)?U.trim():U,k,y))===!0&&_(C,k?k.concat(U):[U],A+1)}),T.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function pg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function mf(e,t){this._pairs=[],e&&cl(e,this,t)}const mg=mf.prototype;mg.append=function(t,n){this._pairs.push([t,n])},mg.toString=function(t){const n=t?function(r){return t.call(this,r,pg)}:pg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function _A(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gg(e,t,n){if(!t)return e;const r=n&&n.encode||_A,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new mf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Eg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},SA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ef=typeof window!="undefined"&&typeof document!="undefined",yf=typeof navigator=="object"&&navigator||void 0,xA=Ef&&(!yf||["ReactNative","NativeScript","NS"].indexOf(yf.product)<0),wA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CA=Ef&&window.location.href||"http://localhost",dn=D(D({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:xA,hasStandardBrowserWebWorkerEnv:wA,navigator:yf,origin:CA},Symbol.toStringTag,{value:"Module"}))),SA);function AA(e,t){return cl(e,new dn.classes.URLSearchParams,D({visitor:function(n,r,o,a){return dn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function vA(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kA(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 yg(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=kA(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(vA(r),o,n,0)}),n}return null}const Vo=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function PA(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:gf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(yg(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Vo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return AA(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Vo(this,"env"),p=f&&f.FormData;return cl(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),PA(t)):t}],transformResponse:[function(t){const n=Vo(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,o=Vo(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Vo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Vo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dn.classes.FormData,Blob:dn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{ha.headers[e]={}});function bf(e,t){const n=this||ha,r=t||n,o=xn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function bg(e){return!!(e&&e.__CANCEL__)}let pa=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Tg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function NA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function OA(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 g=a,T=0;for(;g!==o;)T+=n[g++],g=g%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 IA(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),g=p-n;g>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const dl=(e,t,n=3)=>{let r=0;const o=OA(50,250);return IA(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},_g=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sg=e=>(...t)=>V.asap(()=>e(...t)),RA=dn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,dn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(dn.origin),dn.navigator&&/(msie|trident)/i.test(dn.navigator.userAgent)):()=>!0,LA=dn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function DA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function MA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xg(e,t,n){let r=!DA(t);return e&&(r||n===!1)?MA(e,t):t}const wg=e=>e instanceof xn?D({},e):e;function io(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,T){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:T},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(f,p,g,T){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,g,T)}else return r(f,p,g,T)}function a(f,p){if(!V.isUndefined(p))return r(void 0,p)}function u(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,g){if(V.hasOwnProp(t,g))return r(f,p);if(V.hasOwnProp(e,g))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>o(wg(f),wg(p),g,!0)};return V.forEach(Object.keys(D(D({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:o,T=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,_=g(T,y,p);V.isUndefined(_)&&g!==c||(n[p]=_)}),n}const FA=["content-type","content-length"];function BA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{FA.includes(r.toLowerCase())&&e.set(r,o)})}const UA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Cg=e=>{const t=io({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=xn.from(c),t.url=gg(xg(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?UA(d.password):""))),V.isFormData(r)&&(dn.hasStandardBrowserEnv||dn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&BA(c,r.getHeaders(),n("formDataHeaderPolicy"))),dn.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&RA(t.url))){const y=a&&u&&LA.read(u);y&&c.set(a,y)}return t},HA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=Cg(e);let a=o.data;const u=xn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,g,T,y,_;function S(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function A(){if(!k)return;const C=xn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:C,config:e,request:k};Tg(function(Y){n(Y),S()},function(Y){r(Y),S()},q),k=null}"onloadend"in k?k.onloadend=A:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.startsWith("file:"))||setTimeout(A)},k.onabort=function(){k&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,k)),S(),k=null)},k.onerror=function(U){const q=U&&U.message?U.message:"Network Error",F=new Ne(q,Ne.ERR_NETWORK,e,k);F.event=U||null,r(F),S(),k=null},k.ontimeout=function(){let U=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const q=o.transitional||gf;o.timeoutErrorMessage&&(U=o.timeoutErrorMessage),r(new Ne(U,q.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,k)),S(),k=null},a===void 0&&u.setContentType(null),"setRequestHeader"in k&&V.forEach(dg(u),function(U,q){k.setRequestHeader(q,U)}),V.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),c&&c!=="json"&&(k.responseType=o.responseType),f&&([T,_]=dl(f,!0),k.addEventListener("progress",T)),d&&k.upload&&([g,y]=dl(d),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=C=>{k&&(r(!C||C.type?new pa(null,e,k):C),k.abort(),S(),k=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const N=NA(o.url);if(N&&!dn.protocols.includes(N)){r(new Ne("Unsupported protocol "+N+":",Ne.ERR_BAD_REQUEST,e));return}k.send(a||null)})},zA=(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 Ne?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},jA=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},$A=function(e,t){return kd(this,null,function*(){try{for(var n=U2(VA(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*p0(jA(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},VA=function(e){return kd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*p0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Jr(t.read());if(n)break;yield r}}finally{yield new Jr(t.cancel())}})},Ag=(e,t,n,r)=>{const o=$A(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),f.close();return}let T=g.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})};function qA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Tf="1.16.1",vg=64*1024,{isFunction:fl}=V,kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},YA=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?fl(o):typeof fetch=="function",d=fl(a),f=fl(u);if(!c)return!1;const p=c&&fl(n),g=c&&(typeof r=="function"?(A=>N=>A.encode(N))(new r):A=>et(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&kg(()=>{let A=!1;const N=new a(dn.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),A&&!C}),y=f&&p&&kg(()=>V.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(N,C)=>{let U=N&&N[A];if(U)return U.call(N);throw new Ne(`Response type '${A}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const S=A=>et(null,null,function*(){if(A==null)return 0;if(V.isBlob(A))return A.size;if(V.isSpecCompliantForm(A))return(yield new a(dn.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(V.isArrayBufferView(A)||V.isArrayBuffer(A))return A.byteLength;if(V.isURLSearchParams(A)&&(A=A+""),V.isString(A))return(yield g(A)).byteLength}),k=(A,N)=>et(null,null,function*(){const C=V.toFiniteNumber(A.getContentLength());return C==null?S(N):C});return A=>et(null,null,function*(){let{url:N,method:C,data:U,signal:q,cancelToken:F,timeout:Y,onDownloadProgress:ie,onUploadProgress:ge,responseType:$,headers:oe,withCredentials:ce="same-origin",fetchOptions:de,maxContentLength:ne,maxBodyLength:Te}=Cg(A);const Ie=V.isNumber(ne)&&ne>-1,ue=V.isNumber(Te)&&Te>-1;let Q=o||fetch;$=$?($+"").toLowerCase():"text";let re=zA([q,F&&F.toAbortSignal()],Y),v=null;const M=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let te;try{if(Ie&&typeof N=="string"&&N.startsWith("data:")&&qA(N)>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,A,v);if(ue&&C!=="get"&&C!=="head"){const xe=yield k(oe,U);if(typeof xe=="number"&&isFinite(xe)&&xe>Te)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,A,v)}if(ge&&T&&C!=="get"&&C!=="head"&&(te=yield k(oe,U))!==0){let xe=new a(N,{method:"POST",body:U,duplex:"half"}),Ye;if(V.isFormData(U)&&(Ye=xe.headers.get("content-type"))&&oe.setContentType(Ye),xe.body){const[ft,on]=_g(te,dl(Sg(ge)));U=Ag(xe.body,vg,ft,on)}}V.isString(ce)||(ce=ce?"include":"omit");const O=d&&"credentials"in a.prototype;if(V.isFormData(U)){const xe=oe.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+Tf,!1);const _e=pe(D({},de),{signal:re,method:C.toUpperCase(),headers:dg(oe.normalize()),body:U,duplex:"half",credentials:O?ce:void 0});v=d&&new a(N,_e);let Me=yield d?Q(v,de):Q(N,_e);if(Ie){const xe=V.toFiniteNumber(Me.headers.get("content-length"));if(xe!=null&&xe>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,A,v)}const ke=y&&($==="stream"||$==="response");if(y&&Me.body&&(ie||Ie||ke&&M)){const xe={};["status","statusText","headers"].forEach(Rn=>{xe[Rn]=Me[Rn]});const Ye=V.toFiniteNumber(Me.headers.get("content-length")),[ft,on]=ie&&_g(Ye,dl(Sg(ie),!0))||[];let $r=0;const Vr=Rn=>{if(Ie&&($r=Rn,$r>ne))throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,A,v);ft&&ft(Rn)};Me=new u(Ag(Me.body,vg,Vr,()=>{on&&on(),M&&M()}),xe)}$=$||"text";let He=yield _[V.findKey(_,$)||"text"](Me,A);if(Ie&&!y&&!ke){let xe;if(He!=null&&(typeof He.byteLength=="number"?xe=He.byteLength:typeof He.size=="number"?xe=He.size:typeof He=="string"&&(xe=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof xe=="number"&&xe>ne)throw new Ne("maxContentLength size of "+ne+" exceeded",Ne.ERR_BAD_RESPONSE,A,v)}return!ke&&M&&M(),yield new Promise((xe,Ye)=>{Tg(xe,Ye,{data:He,headers:xn.from(Me.headers),status:Me.status,statusText:Me.statusText,config:A,request:v})})}catch(O){if(M&&M(),re&&re.aborted&&re.reason instanceof Ne){const _e=re.reason;throw _e.config=A,v&&(_e.request=v),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,A,v,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,A,v,O&&O.response)}})},GA=new Map,Pg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=GA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:YA(t)),p=f;return f};Pg();const _f={http:yA,xhr:HA,fetch:{get:Pg}};V.forEach(_f,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ng=e=>`- ${e}`,WA=e=>V.isFunction(e)||e===null||e===!1;function XA(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!WA(r)&&(o=_f[(c=String(r)).toLowerCase()],o===void 0))throw new Ne(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
@@ -28,7 +28,7 @@ Error generating stack: `+b.message+`
|
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
29
|
`}),n}function jE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $E(e,t){const n=sI(e,t),r=n.one(e,void 0),o=KO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
30
30
|
`},o),a}function dI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=$E(n,D({file:r},t));yield e.run(o,r)})}:function(n,r){return $E(n,D({file:r},e||t))}}function VE(e){if(e)throw e}var eh,qE;function fI(){if(qE)return eh;qE=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"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!g)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},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return eh=function d(){var f,p,g,T,y,_,S=arguments[0],k=1,A=arguments.length,N=!1;for(typeof S=="boolean"&&(N=S,S=arguments[1]||{},k=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});k<A;++k)if(f=arguments[k],f!=null)for(p in f)g=c(S,p),T=c(f,p),S!==T&&(N&&T&&(a(T)||(y=o(T)))?(y?(y=!1,_=g&&o(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(N,_,T)})):typeof T!="undefined"&&u(S,{name:p,newValue:T}));return S},eh}var hI=fI();const th=$e(hI);function nh(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 pI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<o.length;)(f[g]===null||f[g]===void 0)&&(f[g]=o[g]);o=f,p?mI(p,c)(...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 mI(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const Rr={basename:gI,dirname:EI,extname:yI,join:bI,sep:"/"};function gI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Na(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function EI(e){if(Na(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 yI(e){Na(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function bI(...e){let t=-1,n;for(;++t<e.length;)Na(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":TI(n)}function TI(e){Na(e);const t=e.codePointAt(0)===47;let n=_I(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _I(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Na(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const SI={cwd:xI};function xI(){return"/"}function rh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wI(e){if(typeof e=="string")e=new URL(e);else if(!rh(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 CI(e)}function CI(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 ih=["history","path","basename","stem","extname","dirname"];class YE{constructor(t){let n;t?rh(t)?n={path:t}:typeof t=="string"||AI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":SI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ih.length;){const a=ih[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)ih.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){sh(t,"basename"),oh(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){GE(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(oh(t,"extname"),GE(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){rh(t)&&(t=wI(t)),sh(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){sh(t,"stem"),oh(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 hn(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 oh(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function sh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function AI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),kI={}.hasOwnProperty;class ah extends vI{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=pI()}copy(){const t=new ah;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(th(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ch("data",this.frozen),this.namespace[t]=n,this):kI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("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=Ll(t),r=this.parser||this.Parser;return uh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),uh("process",this.parser||this.Parser),lh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Ll(t),d=r.parse(c);r.run(d,c,function(p,g,T){if(p||!g||!T)return f(p);const y=g,_=r.stringify(y,T);OI(_)?T.value=_:T.result=_,f(p,T)});function f(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),uh("processSync",this.parser||this.Parser),lh("processSync",this.compiler||this.Compiler),this.process(t,o),XE("processSync","process",n),r;function o(a,u){n=!0,VE(a),r=u}}run(t,n,r){WE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Ll(n);o.run(t,d,f);function f(p,g,T){const y=g||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),XE("runSync","run",r),o;function a(u,c){VE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Ll(n),o=this.compiler||this.Compiler;return lh("stringify",o),WE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...g]=f;d(p,g)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(o.settings=th(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const g=f[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let g=-1,T=-1;for(;++g<r.length;)if(r[g][0]===f){T=g;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const S=r[T][1];nh(S)&&nh(y)&&(y=th(!0,S,y)),r[T]=[f,y,..._]}}}}const PI=new ah().freeze();function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ch(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 WE(e){if(!nh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function XE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ll(e){return NI(e)?e:new YE(e)}function NI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function OI(e){return typeof e=="string"||II(e)}function II(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",KE=[],QE={allowDangerousHtml:!0},LI=/^(https?|ircs?|mailto|xmpp)$/i,DI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JE(e){const t=MI(e),n=FI(e);return BI(t.runSync(t.parse(n),n),e)}function MI(e){const t=e.rehypePlugins||KE,n=e.remarkPlugins||KE,r=e.remarkRehypeOptions?D(D({},e.remarkRehypeOptions),QE):QE;return PI().use(EO).use(n).use(dI,r).use(t)}function FI(e){const t=e.children||"",n=new YE;return typeof t=="string"&&(n.value=t),n}function BI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||UI;for(const p of DI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+RI+p.id,void 0);return Rl(e,f),lP(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,g,T){if(p.type==="raw"&&T&&typeof g=="number")return u?T.children.splice(g,1):T.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Hf)if(Object.hasOwn(Hf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=Hf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,T)),y&&T&&typeof g=="number")return c&&p.children?T.children.splice(g,1,...p.children):T.children.splice(g,1),g}}}function UI(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||LI.test(e.slice(0,t))?e:""}const ZE=/[#.]/g;function HI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ZE.lastIndex=o;const c=ZE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ey(e,t,n){const r=n?VI(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=HI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,zI(u))c.unshift(u);else for(const[g,T]of Object.entries(u))jI(e,d.properties,g,T)}for(const f of c)dh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function zI(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 jI(e,t,n,r){const o=Lf(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=V1(r):o.commaSeparated?a=O1(r):o.commaOrSpaceSeparated?a=V1(O1(r).join(" ")):a=ty(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?$I(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ty(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function dh(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)dh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?dh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ty(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ta(n)===Ta(t)))return!0}return n}function $I(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function VI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const qI=["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"],YI=ey(_l,"div"),GI=ey(Qo,"g",qI);function WI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ny(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ny(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ny(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 co={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/"},ry={}.hasOwnProperty,XI=Object.prototype;function KI(e,t){const n=t||{};return fh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Qo:_l,verbose:n.verbose||!1},e)}function fh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:iy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=WI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=QI(e,t),n}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=fh(e,t[n]);r.push(o)}return r}function QI(e,t){const n=e.schema;e.schema=t.namespaceURI===co.svg?Qo:_l;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ry.call(XI,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?GI:YI)(t.tagName,o,iy(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&ns(d.startTag),p=d&&d.endTag&&ns(d.endTag),g=fh(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=JI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function JI(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)ry.call(n.attrs,u)&&(a[Lf(e.schema,u).property]=ns(n.attrs[u]));n.startTag;const c=ns(n.startTag),d=n.endTag?ns(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ns(e){const t=oy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oy(e){return e.line&&e.column?e:void 0}class Oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oa.prototype.property={},Oa.prototype.normal={},Oa.prototype.space=null;function sy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Oa(n,r,t)}function hh(e){return e.toLowerCase()}class nr{constructor(t,n){this.property=t,this.attribute=n}}nr.prototype.space=null,nr.prototype.boolean=!1,nr.prototype.booleanish=!1,nr.prototype.overloadedBoolean=!1,nr.prototype.number=!1,nr.prototype.commaSeparated=!1,nr.prototype.spaceSeparated=!1,nr.prototype.commaOrSpaceSeparated=!1,nr.prototype.mustUseProperty=!1,nr.prototype.defined=!1;let ZI=0;const We=fo(),Ht=fo(),ay=fo(),ye=fo(),yt=fo(),rs=fo(),jn=fo();function fo(){return ea(2,++ZI)}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ht,commaOrSpaceSeparated:jn,commaSeparated:rs,number:ye,overloadedBoolean:ay,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(ph);class gh extends nr{constructor(t,n,r,o){let a=-1;if(super(t,n),uy(this,"space",o),typeof r=="number")for(;++a<mh.length;){const u=mh[a];uy(this,mh[a],(r&ph[u])===ph[u])}}}gh.prototype.defined=!0;function uy(e,t,n){n&&(e[t]=n)}const e3={}.hasOwnProperty;function is(e){const t={},n={};let r;for(r in e.properties)if(e3.call(e.properties,r)){const o=e.properties[r],a=new gh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hh(r)]=r,n[hh(a.attribute)]=r}return new Oa(t,n,e.space)}const ly=is({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),cy=is({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dy(e,t){return t in e?e[t]:t}function fy(e,t){return dy(e,t.toLowerCase())}const hy=is({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fy,properties:{xmlns:null,xmlnsXLink:null}}),py=is({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:yt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ye,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:yt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Ht,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}}),t3=is({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rs,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:yt,autoFocus:We,autoPlay:We,blocking:yt,capture:null,charSet:null,checked:We,cite:null,className:yt,cols:ye,colSpan:null,content:null,contentEditable:Ht,controls:We,controlsList:yt,coords:ye|rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:ay,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:yt,height:ye,hidden:We,high:ye,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:yt,itemRef:yt,itemScope:We,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:ye,pattern:null,ping:yt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:yt,required:We,reversed:We,rows:ye,rowSpan:ye,sandbox:yt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ht,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:ye,security:null,unselectable:null}}),n3=is({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:dy,properties:{about:jn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:rs,g2:rs,glyphName:rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),r3=/^data[-\w.:]+$/i,my=/-[a-z]/g,i3=/[A-Z]/g;function o3(e,t){const n=hh(t);let r=t,o=nr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&r3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(my,a3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!my.test(a)){let u=a.replace(i3,s3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=gh}return new o(r,t)}function s3(e){return"-"+e.toLowerCase()}function a3(e){return e.charAt(1).toUpperCase()}const u3=sy([cy,ly,hy,py,t3],"html"),gy=sy([cy,ly,hy,py,n3],"svg"),Ey={}.hasOwnProperty;function yy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Ey.call(o,e)){const d=String(o[e]);u=Ey.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const l3={},c3={}.hasOwnProperty,by=yy("type",{handlers:{root:f3,element:E3,text:m3,comment:g3,doctype:p3}});function d3(e,t){const r=(t||l3).space;return by(e,r==="svg"?gy:u3)}function f3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Eh(e.children,n,t),os(e,n),n}function h3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Eh(e.children,n,t),os(e,n),n}function p3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return os(e,t),t}function m3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return os(e,t),t}function g3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return os(e,t),t}function E3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=gy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&c3.call(e.properties,a)){const d=y3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:co[u],childNodes:[],parentNode:null};return c.childNodes=Eh(e.children,c,r),os(e,c),e.tagName==="template"&&e.content&&(c.content=h3(e.content,r)),c}function y3(e,t,n){const r=o3(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?I1(n):q1(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=co[r.space]}return o}function Eh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=by(e[r],n);a.parentNode=t,o.push(a)}return o}function os(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 b3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],T3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="�";var 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 On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ty(e){return e>=55296&&e<=57343}function _3(e){return e>=56320&&e<=57343}function S3(e,t){return(e-55296)*1024+9216+t}function _y(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Sy(e){return e>=64976&&e<=65007||T3.has(e)}var ee;(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"})(ee||(ee={}));const x3=65536;class w3{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=x3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(_3(n))return this.pos++,this._addGap(),S3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(ee.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,Ty(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){_y(t)?this._err(ee.controlCharacterInInputStream):Sy(t)&&this._err(ee.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 xy(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 C3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),A3=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 v3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=A3.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const k3=32;var vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vi||(vi={}));function yh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function P3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function N3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||yh(e)}function O3(e){return e===Kt.EQUALS||N3(e)}var Qt;(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"})(Qt||(Qt={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class I3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|k3)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.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(yh(o)||P3(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(yh(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(v3(this.result),this.consumed),this.errors&&(t!==Kt.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&vi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=R3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||O3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.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]&vi.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]&~vi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function R3(e,t,n,r){const o=(t&vi.BRANCH_LENGTH)>>7,a=t&vi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ae;(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/"})(ae||(ae={}));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 rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var W;(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"})(W||(W={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const L3=new Map([[W.A,m.A],[W.ADDRESS,m.ADDRESS],[W.ANNOTATION_XML,m.ANNOTATION_XML],[W.APPLET,m.APPLET],[W.AREA,m.AREA],[W.ARTICLE,m.ARTICLE],[W.ASIDE,m.ASIDE],[W.B,m.B],[W.BASE,m.BASE],[W.BASEFONT,m.BASEFONT],[W.BGSOUND,m.BGSOUND],[W.BIG,m.BIG],[W.BLOCKQUOTE,m.BLOCKQUOTE],[W.BODY,m.BODY],[W.BR,m.BR],[W.BUTTON,m.BUTTON],[W.CAPTION,m.CAPTION],[W.CENTER,m.CENTER],[W.CODE,m.CODE],[W.COL,m.COL],[W.COLGROUP,m.COLGROUP],[W.DD,m.DD],[W.DESC,m.DESC],[W.DETAILS,m.DETAILS],[W.DIALOG,m.DIALOG],[W.DIR,m.DIR],[W.DIV,m.DIV],[W.DL,m.DL],[W.DT,m.DT],[W.EM,m.EM],[W.EMBED,m.EMBED],[W.FIELDSET,m.FIELDSET],[W.FIGCAPTION,m.FIGCAPTION],[W.FIGURE,m.FIGURE],[W.FONT,m.FONT],[W.FOOTER,m.FOOTER],[W.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[W.FORM,m.FORM],[W.FRAME,m.FRAME],[W.FRAMESET,m.FRAMESET],[W.H1,m.H1],[W.H2,m.H2],[W.H3,m.H3],[W.H4,m.H4],[W.H5,m.H5],[W.H6,m.H6],[W.HEAD,m.HEAD],[W.HEADER,m.HEADER],[W.HGROUP,m.HGROUP],[W.HR,m.HR],[W.HTML,m.HTML],[W.I,m.I],[W.IMG,m.IMG],[W.IMAGE,m.IMAGE],[W.INPUT,m.INPUT],[W.IFRAME,m.IFRAME],[W.KEYGEN,m.KEYGEN],[W.LABEL,m.LABEL],[W.LI,m.LI],[W.LINK,m.LINK],[W.LISTING,m.LISTING],[W.MAIN,m.MAIN],[W.MALIGNMARK,m.MALIGNMARK],[W.MARQUEE,m.MARQUEE],[W.MATH,m.MATH],[W.MENU,m.MENU],[W.META,m.META],[W.MGLYPH,m.MGLYPH],[W.MI,m.MI],[W.MO,m.MO],[W.MN,m.MN],[W.MS,m.MS],[W.MTEXT,m.MTEXT],[W.NAV,m.NAV],[W.NOBR,m.NOBR],[W.NOFRAMES,m.NOFRAMES],[W.NOEMBED,m.NOEMBED],[W.NOSCRIPT,m.NOSCRIPT],[W.OBJECT,m.OBJECT],[W.OL,m.OL],[W.OPTGROUP,m.OPTGROUP],[W.OPTION,m.OPTION],[W.P,m.P],[W.PARAM,m.PARAM],[W.PLAINTEXT,m.PLAINTEXT],[W.PRE,m.PRE],[W.RB,m.RB],[W.RP,m.RP],[W.RT,m.RT],[W.RTC,m.RTC],[W.RUBY,m.RUBY],[W.S,m.S],[W.SCRIPT,m.SCRIPT],[W.SEARCH,m.SEARCH],[W.SECTION,m.SECTION],[W.SELECT,m.SELECT],[W.SOURCE,m.SOURCE],[W.SMALL,m.SMALL],[W.SPAN,m.SPAN],[W.STRIKE,m.STRIKE],[W.STRONG,m.STRONG],[W.STYLE,m.STYLE],[W.SUB,m.SUB],[W.SUMMARY,m.SUMMARY],[W.SUP,m.SUP],[W.TABLE,m.TABLE],[W.TBODY,m.TBODY],[W.TEMPLATE,m.TEMPLATE],[W.TEXTAREA,m.TEXTAREA],[W.TFOOT,m.TFOOT],[W.TD,m.TD],[W.TH,m.TH],[W.THEAD,m.THEAD],[W.TITLE,m.TITLE],[W.TR,m.TR],[W.TRACK,m.TRACK],[W.TT,m.TT],[W.U,m.U],[W.UL,m.UL],[W.SVG,m.SVG],[W.VAR,m.VAR],[W.WBR,m.WBR],[W.XMP,m.XMP]]);function ss(e){var t;return(t=L3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,D3={[ae.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]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},bh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);W.STYLE,W.SCRIPT,W.XMP,W.IFRAME,W.NOEMBED,W.NOFRAMES,W.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 Rt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function M3(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ia(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function F3(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return F3(e)||Ia(e)}function wy(e){return ki(e)||M3(e)}function Ml(e){return e+32}function Cy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Ay(e){return Cy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function B3(e){return e===P.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:Ty(e)?ee.surrogateCharacterReference:Sy(e)?ee.noncharacterCharacterReference:_y(e)||e===P.CARRIAGE_RETURN?ee.controlCharacterReference:null}class U3{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 w3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new I3(C3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=B3(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:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.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(xy(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(ee.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=ss(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.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=Cy(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(ee.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(ee.unexpectedNullCharacter),this._emitChars(xt);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(ee.unexpectedNullCharacter),this._emitChars(xt);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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(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(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.tagName+=xt;break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ml(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){ki(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){ki(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){ki(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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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:ki(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){ki(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(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.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(ee.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(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=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(ee.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(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.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(ee.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(ee.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.data+=xt;break}case P.EOF:{this._err(ee.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(ee.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(ee.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(ee.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(ee.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.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(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ml(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(ee.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.name+=xt;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.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(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.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(ee.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()&&wy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const vy=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),ky=new Set([...vy,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Fl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),H3=new Set([...Fl,m.OL,m.UL]),z3=new Set([...Fl,m.BUTTON]),Py=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Ny=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),j3=new Set([m.TR,m.TEMPLATE,m.HTML]),$3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),V3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),q3=new Set([m.TD,m.TH]);class Y3{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ae.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])!==ae.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(bh,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(q3,ae.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(V3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo($3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(j3,ae.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ae.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ae.SVG:{if(Ny.has(o))return!1;break}case ae.MATHML:{if(Py.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,H3)}hasInButtonScope(t){return this.hasInDynamicScope(t,z3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(bh.has(n))return!0;if(Fl.has(n))return!1;break}case ae.SVG:{if(Ny.has(n))return!1;break}case ae.MATHML:{if(Py.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ae.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&vy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ky.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ky.has(this.currentTagId);)this.pop()}}const Th=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Oy={type:Lr.Marker};class G3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===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:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Th)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Th)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Th&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Oy)}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(Oy);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 Pi={createDocument(){return{nodeName:"#document",mode:rr.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};Pi.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Pi.isTextNode(n)){n.value+=t;return}}Pi.appendChild(e,Pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Pi.isTextNode(r)?r.value+=t:Pi.insertBefore(e,Pi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=D(D({},e.sourceCodeLocation),t)}},Iy="html",W3="about:legacy-compat",X3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Ry=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],K3=[...Ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Q3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ly=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],J3=[...Ly,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Dy(e,t){return t.some(n=>e.startsWith(n))}function Z3(e){return e.name===Iy&&e.publicId===null&&(e.systemId===null||e.systemId===W3)}function eR(e){if(e.name!==Iy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===X3)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Q3.has(n))return rr.QUIRKS;let r=t===null?K3:Ry;if(Dy(n,r))return rr.QUIRKS;if(r=t===null?Ly:J3,Dy(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const My={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},tR="definitionurl",nR="definitionURL",rR=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])),iR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),oR=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])),sR=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function aR(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||sR.has(t)}function Fy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===tR){e.attrs[t].name=nR;break}}function By(e){for(let t=0;t<e.attrs.length;t++){const n=rR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function _h(e){for(let t=0;t<e.attrs.length;t++){const n=iR.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 uR(e){const t=oR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ss(e.tagName))}function lR(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function cR(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===My.TEXT_HTML||o===My.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function dR(e,t,n,r){return(!r||r===ae.HTML)&&cR(e,t,n)||(!r||r===ae.MATHML)&&lR(e,t)}const fR="hidden",hR=8,pR=3;var L;(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"})(L||(L={}));const mR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Uy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),Hy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Pi,onParseError:null};class zy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=D(D({},Hy),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 U3(this.options,this),this.activeFormattingElements=new G3(this.treeAdapter),this.fragmentContextID=r?ss(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new Y3(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=D(D({},Hy),n);t!=null||(t=r.treeAdapter.createElement(W.TEMPLATE,ae.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:mR,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Rt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===W.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(D({},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,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.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(W.HTML,ae.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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:D({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===W.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.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 dR(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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return Uy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ae.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return D3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{$y(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Qy(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){VL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{xh(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.AFTER_BODY:{SR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{xR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{wR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case L.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?YL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{CR(this,t);break}case L.BEFORE_HEAD:{vR(this,t);break}case L.IN_HEAD:{mr(this,t);break}case L.IN_HEAD_NO_SCRIPT:{NR(this,t);break}case L.AFTER_HEAD:{IR(this,t);break}case L.IN_BODY:{mn(this,t);break}case L.IN_TABLE:{as(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{kL(this,t);break}case L.IN_COLUMN_GROUP:{Ah(this,t);break}case L.IN_TABLE_BODY:{zl(this,t);break}case L.IN_ROW:{jl(this,t);break}case L.IN_CELL:{OL(this,t);break}case L.IN_SELECT:{eb(this,t);break}case L.IN_SELECT_IN_TABLE:{RL(this,t);break}case L.IN_TEMPLATE:{DL(this,t);break}case L.AFTER_BODY:{FL(this,t);break}case L.IN_FRAMESET:{BL(this,t);break}case L.AFTER_FRAMESET:{HL(this,t);break}case L.AFTER_AFTER_BODY:{jL(this,t);break}case L.AFTER_AFTER_FRAMESET:{$L(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?GL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{AR(this,t);break}case L.BEFORE_HEAD:{kR(this,t);break}case L.IN_HEAD:{PR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{OR(this,t);break}case L.AFTER_HEAD:{RR(this,t);break}case L.IN_BODY:{Ul(this,t);break}case L.TEXT:{yL(this,t);break}case L.IN_TABLE:{Ua(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{PL(this,t);break}case L.IN_COLUMN_GROUP:{NL(this,t);break}case L.IN_TABLE_BODY:{vh(this,t);break}case L.IN_ROW:{Zy(this,t);break}case L.IN_CELL:{IL(this,t);break}case L.IN_SELECT:{tb(this,t);break}case L.IN_SELECT_IN_TABLE:{LL(this,t);break}case L.IN_TEMPLATE:{ML(this,t);break}case L.AFTER_BODY:{rb(this,t);break}case L.IN_FRAMESET:{UL(this,t);break}case L.AFTER_FRAMESET:{zL(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Xy(this,t);break}case L.TEXT:{bL(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_TEMPLATE:{nb(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{wh(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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{jy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Ky(this,t);break}}}}function gR(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):Wy(e,t),n}function ER(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 yR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=pR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=bR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function bR(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 TR(e,t,n){const r=e.treeAdapter.getTagName(t),o=ss(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _R(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 Sh(e,t){for(let n=0;n<hR;n++){const r=gR(e,t);if(!r)break;const o=ER(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=yR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&TR(e,u,a),_R(e,o,r)}}function xh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function SR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function xR(e,t){e._appendCommentNode(t,e.document)}function wh(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 wR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:eR(t);Z3(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Ra(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function CR(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):La(e,t)}function AR(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function vR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Da(e,t)}}function kR(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Da(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(W.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function PR(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ma(e,t);break}case m.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function po(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function NR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{mr(e,t);break}case m.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:Fa(e,t)}}function OR(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Fa(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Ke.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function IR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),mr(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function RR(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ba(e,t);break}case m.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(W.BODY,m.BODY),e.insertionMode=L.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case Ke.CHARACTER:{$y(e,t);break}case Ke.WHITESPACE_CHARACTER:{jy(e,t);break}case Ke.COMMENT:{xh(e,t);break}case Ke.START_TAG:{mn(e,t);break}case Ke.END_TAG:{Ul(e,t);break}case Ke.EOF:{Xy(e,t);break}}}function jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function $y(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function LR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function DR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function MR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function FR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function BR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function UR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function HR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function zR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function jR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Rt.PLAINTEXT}function $R(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function VR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(W.A);n&&(Sh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function YR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Sh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function WR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Vy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qy(e){const t=xy(e,ho.TYPE);return t!=null&&t.toLowerCase()===fR}function XR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),qy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function KR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function QR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function JR(e,t){t.tagName=W.IMG,t.tagID=m.IMG,Vy(e,t)}function ZR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function eL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function tL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function Yy(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function nL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function rL(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function iL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function oL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function sL(e,t){e._reconstructActiveFormattingElements(),Fy(t),_h(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function aL(e,t){e._reconstructActiveFormattingElements(),By(t),_h(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Gy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function mn(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{qR(e,t);break}case m.A:{VR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{BR(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{FR(e,t);break}case m.LI:case m.DD:case m.DT:{zR(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Vy(e,t);break}case m.HR:{QR(e,t);break}case m.RB:case m.RTC:{iL(e,t);break}case m.RT:case m.RP:{oL(e,t);break}case m.PRE:case m.LISTING:{UR(e,t);break}case m.XMP:{eL(e,t);break}case m.SVG:{aL(e,t);break}case m.HTML:{LR(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{mr(e,t);break}case m.BODY:{DR(e,t);break}case m.FORM:{HR(e,t);break}case m.NOBR:{YR(e,t);break}case m.MATH:{sL(e,t);break}case m.TABLE:{WR(e,t);break}case m.INPUT:{XR(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{KR(e,t);break}case m.IMAGE:{JR(e,t);break}case m.BUTTON:{$R(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{GR(e,t);break}case m.IFRAME:{tL(e,t);break}case m.SELECT:{nL(e,t);break}case m.OPTION:case m.OPTGROUP:{rL(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Yy(e,t);break}case m.FRAMESET:{MR(e,t);break}case m.TEXTAREA:{ZR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Yy(e,t):Gy(e,t);break}case m.PLAINTEXT:{jR(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:Gy(e,t)}}function uL(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function lL(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,rb(e,t))}function cL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function dL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function fL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(W.P,m.P),e._closePElement()}function hL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function pL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function mL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function gL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function EL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(W.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Wy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Ul(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Sh(e,t);break}case m.P:{fL(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{cL(e,t);break}case m.LI:{hL(e);break}case m.DD:case m.DT:{pL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{mL(e);break}case m.BR:{EL(e);break}case m.BODY:{uL(e,t);break}case m.HTML:{lL(e,t);break}case m.FORM:{dL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{gL(e,t);break}case m.TEMPLATE:{po(e,t);break}default:Wy(e,t)}}function Xy(e,t){e.tmplInsertionModeStack.length>0?nb(e,t):wh(e,t)}function yL(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bL(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&Uy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Qy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Ky(e,t);break}}else Ha(e,t)}function TL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function _L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function SL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t)}function xL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function wL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,zl(e,t)}function CL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function AL(e,t){qy(t)?e._appendElement(t,ae.HTML):Ha(e,t),t.ackSelfClosing=!0}function vL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function as(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{wL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{mr(e,t);break}case m.COL:{SL(e,t);break}case m.FORM:{vL(e,t);break}case m.TABLE:{CL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{xL(e,t);break}case m.INPUT:{AL(e,t);break}case m.CAPTION:{TL(e,t);break}case m.COLGROUP:{_L(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{po(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function Ky(e,t){e.pendingCharacterTokens.push(t)}function Qy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Jy=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function kL(e,t){const n=t.tagID;Jy.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,as(e,t)):mn(e,t)}function PL(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===m.TABLE&&Ua(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ul(e,t)}}function Ah(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{mr(e,t);break}default:Hl(e,t)}}function NL(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{po(e,t);break}case m.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function zl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(W.TR,m.TR),e.insertionMode=L.IN_ROW,jl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,as(e,t));break}default:as(e,t)}}function vh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ua(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Ua(e,t)}}function jl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,zl(e,t));break}default:as(e,t)}}function Zy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Ua(e,t)}}function OL(e,t){const n=t.tagID;Jy.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),jl(e,t)):mn(e,t)}function IL(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Zy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Ul(e,t)}}function eb(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{mr(e,t);break}}}function tb(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{po(e,t);break}}}function RL(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):eb(e,t)}function LL(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):tb(e,t)}function DL(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{mr(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,as(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,zl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,jl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,mn(e,t)}}function ML(e,t){t.tagID===m.TEMPLATE&&po(e,t)}function nb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function FL(e,t){t.tagID===m.HTML?mn(e,t):$l(e,t)}function rb(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else $l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function BL(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{mr(e,t);break}}}function UL(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function HL(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.NOFRAMES:{mr(e,t);break}}}function zL(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function jL(e,t){t.tagID===m.HTML?mn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function $L(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.NOFRAMES:{mr(e,t);break}}}function VL(e,t){t.chars=xt,e._insertCharacters(t)}function qL(e,t){e._insertCharacters(t),e.framesetOk=!1}function ib(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function YL(e,t){if(aR(t))ib(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?Fy(t):r===ae.SVG&&(uR(t),By(t)),_h(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function GL(e,t){if(t.tagID===m.P||t.tagID===m.BR){ib(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)===ae.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}W.AREA,W.BASE,W.BASEFONT,W.BGSOUND,W.BR,W.COL,W.EMBED,W.FRAME,W.HR,W.IMG,W.INPUT,W.KEYGEN,W.LINK,W.META,W.PARAM,W.SOURCE,W.TRACK,W.WBR;const WL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,XL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ob={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sb(e,t){const n=o6(e),r=yy("type",{handlers:{root:KL,element:QL,text:JL,comment:ub,doctype:ZL,raw:t6},unknown:n6}),o={parser:n?new zy(ob):zy.getFragmentParser(void 0,ob),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),us(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=KI(a,{file:o.options.file});return o.stitches&&Rl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const g=f.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function ab(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function KL(e,t){ab(e.children,t)}function QL(e,t){r6(e,t),ab(e.children,t),i6(e,t)}function JL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:ja(e)};us(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ZL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};us(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e6(e,t){t.stitches=!0;const n=s6(e);if("children"in e&&"children"in n){const r=sb({type:"root",children:e.children},t.options);n.children=r.children}ub({type:"comment",value:{stitch:n}},t)}function ub(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:ja(e)};us(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function t6(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,lb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(WL,"<$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 n6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))e6(n,t);else{let r="";throw XL.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 us(e,t){lb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Rt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function lb(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 r6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;us(t,Ir(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:co.html;o===co.html&&n==="svg"&&(o=co.svg);const a=d3(pe(D({},e),{children:[]}),{space:o===co.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ss(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function i6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&b3.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;us(t,Sl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ss(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function o6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=Sl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function s6(e){return"children"in e?lo(pe(D({},e),{children:[]})):lo(e)}function cb(e){return function(t,n){return sb(t,pe(D({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],db={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"]},Ni={}.hasOwnProperty;function a6(e,t){let n={type:"root",children:[]};const r={schema:t?D(D({},db),t):db,stack:[]},o=fb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function fb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return u6(e,n);case"doctype":return l6(e,n);case"element":return c6(e,n);case"root":return d6(e,n);case"text":return f6(e,n)}}}function u6(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 $a(a,t),a}}function l6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function c6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=hb(e,t.children),o=h6(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&&Ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return $a(u,t),u}function d6(e,t){const r={type:"root",children:hb(e,t.children)};return $a(r,t),r}function f6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function hb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=fb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function h6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ni.call(r,n)?r[n]:void 0,u=r&&Ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ni.call(c,f)){const p=c[f];let g=pb(e,gb(a,f),f,p);g==null&&(g=pb(e,gb(u,f),f,p)),g!=null&&(d[f]=g)}if(o&&Ni.call(o,n)){const p=o[n];for(f in p)Ni.call(p,f)&&!Ni.call(d,f)&&(d[f]=p[f])}return d}function pb(e,t,n,r){return t?Array.isArray(r)?p6(e,t,n,r):mb(e,t,n,r):void 0}function p6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=mb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function mb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&m6(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 m6(e,t,n){const r=e.schema.protocols&&Ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let 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 $a(e,t){const n=Q1(t);t.data&&(e.data=lo(t.data)),n&&(e.position=n)}function gb(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 g6(e){return function(t){return a6(t,e)}}const Eb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",pe(D(D({className:X(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},E6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ut();return!e&&!t?null:w.jsx("div",{className:X(n,`${j}-disclaimer`),children:t?w.jsx(JE,{rehypePlugins:[cb,g6],components:{ul:({children:r})=>w.jsx("ul",{className:X(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:X(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:X(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(Eb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:X(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:X(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:X(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:X(n,`${j}-disclaimer-text`),children:e})})},kh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=er(),{setImageFile:u}=Yo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=ut(),g=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,k=S?"connected":"disconnected",A=t||!S,N=()=>a?new Promise((F,Y)=>{const ie=new FileReader;ie.readAsDataURL(a),ie.onload=()=>F(ie.result),ie.onerror=ge=>Y(ge)}):Promise.resolve(""),C=F=>et(null,null,function*(){var ge;if(A)return;const Y=10*1024*1024,ie=(ge=F.target.files)==null?void 0:ge[0];if(ie){if(ie.size>Y){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ie)}}),U=()=>{u(null),T.current&&(T.current.value="")},q=F=>et(null,null,function*(){var ge;F.preventDefault();const Y=(((ge=g.current)==null?void 0:ge.value)||"").trim();let ie="";try{ie=yield N()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}Y&&(U(),g.current.value="",r(Y,ie))});return w.jsxs("div",{className:X(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:X(d,`cim-${n}-component`,`${j}-image-file-preview`),children:[w.jsx("img",{className:X(d,`cim-${n}-component`,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:X(d,`cim-${n}-component`,`${j}-image-file-name`),title:_,children:_}),w.jsx(N1,{className:X(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:U})]}),w.jsxs("form",{className:X(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:q,children:[w.jsx("span",{role:"status",className:X(`${j}-connection-status-icon`,k)}),y&&w.jsxs("div",{role:"button",className:X(d,e,`cim-${n}-component`,A&&"disabled",`${j}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[w.jsx("label",{className:X(d,e,`cim-${n}-component`,A&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Rk,{})}),w.jsx("input",{className:X(d,e,`cim-${n}-component`,`${j}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:A,onInput:C})]}),w.jsx("input",{className:X(d,e,`cim-${n}-component`,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Uk,{isLoading:A}),w.jsx(Mk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),w.jsx(E6,{})]})};function y6(e){return It({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 yb=B.createContext({isOpen:!1}),Ph=B.createContext(null),bb=B.createContext(null),Va=()=>{var n,r;const e=B.useContext(Ph),t=B.useContext(bb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Tb=({onClearChat:e,componentType:t})=>{const n=Va(),r=()=>{e(),n()};return w.jsxs("button",{className:X(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(y6,{}),"Clear chat"]})};function b6(e){return e==null?[]:Array.isArray(e)?e:[e]}var T6=(e,...t)=>e.concat(t),_6=(e,...t)=>e.filter(n=>!t.includes(n)),S6=e=>Array.from(new Set(e));function _b(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function x6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return _b(e,t,{step:-r,loop:o})}var w6=e=>Array.isArray(e),Sb=e=>e!=null&&typeof e=="object",C6=e=>Sb(e)&&!w6(e),ql=e=>typeof e=="string",ls=e=>typeof e=="function",A6=e=>e==null,v6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),k6=e=>Object.prototype.toString.call(e),xb=Function.prototype.toString,P6=xb.call(Object),N6=e=>{if(!Sb(e)||k6(e)!="[object Object]"||R6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=v6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xb.call(n)==P6},O6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,I6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,R6=e=>O6(e)||I6(e),L6=e=>e(),D6=()=>{},Nh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function M6(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:F6,max:B6}=Math,U6=e=>Number.isNaN(e),H6=e=>U6(e)?0:e,wb=(e,t,n)=>F6(B6(H6(e),t),n);function Oh(e){if(!N6(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]=Oh(o))}return n}function Ih(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function z6(e,t){if(e==null)throw new Error(t())}function j6(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 $6=Object.defineProperty,V6=(e,t,n)=>t in e?$6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rh=(e,t,n)=>V6(e,typeof t!="symbol"?t+"":t,n),Cb=()=>{},Yl=e=>typeof e=="object"&&e!==null,cs=e=>e?"":void 0,Ab=e=>e?"true":void 0,q6=1,Y6=9,G6=11,Jt=e=>Yl(e)&&e.nodeType===q6&&typeof e.nodeName=="string",Gl=e=>Yl(e)&&e.nodeType===Y6,W6=e=>Yl(e)&&e===e.window,vb=e=>Jt(e)?e.localName||"":"#document";function X6(e){return["html","body","#document"].includes(vb(e))}var K6=e=>Yl(e)&&e.nodeType!==void 0,go=e=>K6(e)&&e.nodeType===G6&&"host"in e,Q6=e=>Jt(e)&&e.localName==="input",J6=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function qa(e){if(!e)return!1;const t=e.getRootNode();return hs(t)===e}var Z6=/(textarea|select)/;function e4(e){if(e==null||!Jt(e))return!1;try{return Q6(e)&&e.selectionStart!=null||Z6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ds(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&go(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Dr(e){var t;return Gl(e)?e:W6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function t4(e){return Dr(e).documentElement}function fs(e){var t,n,r;return go(e)?fs(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function hs(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 n4(e){if(vb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||t4(e);return go(t)?t.host:t}function Lh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||go(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Dh=new WeakMap;function ps(e){return Dh.has(e)||Dh.set(e,fs(e).getComputedStyle(e)),Dh.get(e)}var Mh=new Set(["menu","listbox","dialog","grid","tree","region"]),r4=e=>Mh.has(e),kb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Pb(e,t){const n=new Set,r=Lh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(g&&r4(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Nb(e,t){const n=Lh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";g&&Mh.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function i4(e){const t=new Set;return Nb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function o4(e){const t=e.getAttribute("role");return!!(t&&Mh.has(t))}function s4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function a4(e){var t;return s4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function u4(e){if(!e.id)return!1;const t=Lh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&o4(e))}var Fh=()=>typeof document!="undefined";function l4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Bh=e=>Fh()&&e.test(l4()),c4=e=>Fh()&&e.test(navigator.vendor),Ob=()=>Fh()&&!!navigator.maxTouchPoints,d4=()=>Bh(/^iPhone/i),f4=()=>Bh(/^iPad/i)||Uh()&&navigator.maxTouchPoints>1,Wl=()=>d4()||f4(),h4=()=>Uh()||Wl(),Uh=()=>Bh(/^Mac/i),p4=()=>h4()&&c4(/apple/i);function m4(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 gr(e){var n;const t=m4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ib=e=>e.button===0,g4=e=>e.button===2||Uh()&&e.ctrlKey&&e.button===0,E4=e=>"touches"in e&&e.touches.length>0,y4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Rb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function b4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=y4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Rb&&(o=Rb[o]),o}function Lb(e,t="client"){const n=E4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(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)}},Db=e=>Jt(e)&&e.tagName==="IFRAME",T4=/^(audio|video|details)$/;function Mb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var _4=e=>!Number.isNaN(Mb(e)),S4=e=>Mb(e)<0;function x4(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 Fb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=x4(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Xl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Bb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&o.length===0)&&Jt(e)&&Mr(e)&&o.unshift(e);const u=[];for(const c of o)if(Mr(c)){if(Db(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Bb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Fb(u,r,Mr):u};function Mr(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Xl)&&J6(e)}function ms(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));n&&Eo(e)&&o.unshift(e);const a=[];for(const u of o)if(Eo(u)){if(Db(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ms(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Fb(a,r,Eo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Eo(e){return Jt(e)&&e.tabIndex>0?!0:Mr(e)&&!S4(e)}function w4(e,t={}){const n=ms(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function C4(e,t={}){const{current:n,getShadowRoot:r}=t,o=ms(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:hs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ya(e){return e.tabIndex<0&&(T4.test(e.localName)||e4(e))&&!_4(e)?0:e.tabIndex}function Ub(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=ms(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var A4=class j2{constructor(){Rh(this,"id",null),Rh(this,"fn_cleanup"),Rh(this,"cleanup",()=>{this.cancel()})}static create(){return new j2}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 Vt(e){const t=A4.create();return t.request(e),t.cleanup}function Hb(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 Hh(e){const t=n4(e);return X6(t)?Dr(t).body:Jt(t)&&P4(t)?t:Hh(t)}var v4=/auto|scroll|overlay|hidden|clip/,k4=new Set(["inline","contents"]);function P4(e){const t=fs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return v4.test(n+o+r)&&!k4.has(a)}var gs="default",zh="",Kl=new WeakMap;function N4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(gs==="default"&&(zh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),gs="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>O4({target:t,doc:r})}function O4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Wl()){if(gs!=="disabled")return;gs="restoring",setTimeout(()=>{Hb(()=>{gs==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=zh||""),zh="",gs="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function I4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),o=t?Vt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(N4(pe(D({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function R4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Lb(c),f=Math.sqrt(ea(d.x,2)+ea(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Lb(c);r({point:d,event:c})},u=[Zt(e,"pointermove",o,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),I4({doc:e})];return()=>{u.forEach(c=>c())}}function L4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[g,T]=w4(e,{includeContainer:!0,getShadowRoot:a}),y=C4(c,{current:n,getShadowRoot:a}),_=!g&&!T;f.shiftKey&&qa(y)?(o==null||o(),p=T):f.shiftKey&&(qa(g)||_)?p=n:!f.shiftKey&&qa(n)?(o==null||o(),p=g):!f.shiftKey&&(qa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function D4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=cn(c,["defer","triggerElement"]),a=n?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(L4(d,D({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function M4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return Cb;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 F4(e,t,n){if(!e)return Cb;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 B4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function U4(e,t){const{timeout:n,rootNode:r}=t,o=fs(r),a=Dr(r),u=new o.AbortController;return B4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var H4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),z4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,zb=e=>{const t={};let n;for(;n=z4.exec(e);)t[n[1]]=n[2];return t},j4=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=zb(e)}else ql(t)&&(t=zb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function qt(...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]=H4(t[o],n[o]);continue}if(o==="style"){t[o]=j4(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 pU(e){return e}var Es=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Es||{}),jh="__init__";function $4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>hs(t()),a=u=>t().getElementById(u);return pe(D({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:qa,getById:a})}function V4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ys=()=>e=>Array.from(new Set(e)),jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Jl(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var k,A;const _=d.current,S=ls(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(A=(k=e()).onChange)==null||A.call(k,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Go.flushSync:L6)(()=>f(y))},invoke(y,_){var S,k;(k=(S=e()).onChange)==null||k.call(S,y,_)},hash(y){var _,S,k;return(k=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?k:String(y)}}}Jl.cleanup=e=>{B.useEffect(()=>e,[])},Jl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function q4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Y4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var oe,ce,de,ne,Te,Ie;const n=B.useMemo(()=>{const{id:ue,ids:Q,getRootNode:re}=t;return $4({id:ue,ids:Q,getRootNode:re})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Oh(t),scope:n}))!=null?ce:t,a=G4(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Jl,scope:n,flush:Vb,getContext(){return d},getComputed(){return q},getRefs(){return S},getEvent(){return y()}}),c=$b(u),d={get(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].ref.current},set(ue,Q){var re;(re=c.current)==null||re[ue].set(Q)},initial(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].initial},hash(ue){var re,v;const Q=(re=c.current)==null?void 0:re[ue].get();return(v=c.current)==null?void 0:v[ue].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),g=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(D({},T.current),{current(){return T.current},previous(){return g.current}}),_=()=>pe(D({},F),{matches(...ue){return ue.includes(F.ref.current)},hasTag(ue){var Q,re;return!!((re=(Q=e.states[F.ref.current])==null?void 0:Q.tags)!=null&&re.includes(ue))}}),S=q4((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),k=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:A,guard:N,track:Y4,refs:S,computed:q,flush:Vb,scope:n,choose:U}),A=ue=>{const Q=ls(ue)?ue(k()):ue;if(!Q)return;const re=Q.map(v=>{var te,O;const M=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[v];return M||Ih(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),M});for(const v of re)v==null||v(k())},N=ue=>{var Q,re;return ls(ue)?ue(k()):(re=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:re[ue](k())},C=ue=>{const Q=ls(ue)?ue(k()):ue;if(!Q)return;const re=Q.map(M=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return te||Ih(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),te}),v=[];for(const M of re){const te=M==null?void 0:M(k());te&&v.push(te)}return()=>v.forEach(M=>M==null?void 0:M())},U=ue=>b6(ue).find(Q=>{let re=!Q.guard;return ql(Q.guard)?re=!!N(Q.guard):ls(Q.guard)&&(re=Q.guard(k())),re}),q=ue=>{z6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ue];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:q})},F=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,Q){var v,M,te,O;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&A((v=e.states[Q])==null?void 0:v.exit),A((M=p.current)==null?void 0:M.actions);const re=C((te=e.states[ue])==null?void 0:te.effects);if(re&&f.current.set(ue,re),Q===jh){A(e.entry);const _e=C(e.effects);_e&&f.current.set(jh,_e)}A((O=e.states[ue])==null?void 0:O.entry)}})),Y=B.useRef(void 0),ie=B.useRef(Es.NotStarted);jb(()=>{queueMicrotask(()=>{var M;const re=ie.current===Es.Started;ie.current=Es.Started,r(re?"rehydrating...":"initializing...");const v=(M=Y.current)!=null?M:F.initial;F.invoke(v,re?F.get():jh)});const ue=f.current,Q=F.ref.current;return()=>{r("unmounting..."),Y.current=Q,ie.current=Es.Stopped,ue.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ge=()=>"ref"in F?F.ref.current:F.get(),$=ue=>{queueMicrotask(()=>{var O,_e,Me,ke,He;if(ie.current!==Es.Started)return;g.current=T.current,T.current=ue;let Q=ge();const re=(Me=(O=e.states[Q].on)==null?void 0:O[ue.type])!=null?Me:(_e=e.on)==null?void 0:_e[ue.type],v=U(re);if(!v)return;p.current=v;const M=(ke=v.target)!=null?ke:Q;r("transition",ue.type,v.target||Q,`(${v.actions})`);const te=M!==Q;te?Go.flushSync(()=>F.set(M)):v.reenter&&!te?F.invoke(Q,Q):A((He=v.actions)!=null?He:[])})};return(Ie=e.watch)==null||Ie.call(e,k()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:q,event:y(),getStatus:()=>ie.current}}function $b(e){const t=B.useRef(e);return t.current=e,t}function G4(e){const t=$b(e);return function(r){return t.current[r]}}function Vb(e){queueMicrotask(()=>{Go.flushSync(()=>e())})}var $h=V4(e=>e);function ec(...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 W4(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 Vh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=cn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(D({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=W4(c);return B.cloneElement(c,pe(D({},qt(u,c.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(Vh,{apply(t,n,r){return Vh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Vh(r)),e.get(r)}})})();function X4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function yo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const g=new Error(a!=null?a:X4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[K4,qh]=yo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[qb,Ga]=yo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Yb=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:ec(r.ref,t)}))});Yb.displayName="PopoverContent";const Gb=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:t}))});Gb.displayName="PopoverPositioner";const Wa=()=>(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]},[{},D({},e)]),Wb=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Q4(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 J4={props({props:e}){return pe(D({},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",ps(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"});Vt(()=>{var c,d;const u=tc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Vt(()=>{e.set("prevAnimationName",tc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(t.get("styles"));gr(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 c=Ql(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Hb(()=>c())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}ys()(["onExitComplete","present","immediate"]);function Z4(e,t={}){const{sync:n=!1}=t,r=eD(e);return B.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 eD(e){const t=B.useRef(e);return t.current=e,t}const Yh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=cn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(D({},a),{present:r,onExitComplete:Z4(e.onExitComplete)}),d=Zl(J4,c),f=Q4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,g=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:g,present:f.present,unmounted:p}};var bo=(e,t=[])=>({parts:(...n)=>{if(tD(t))return bo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>bo(e,[...t,...n]),omit:(...n)=>bo(e,t.filter(r=>!n.includes(r))),rename:n=>bo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bs(e)}"][data-part="${bs(r)}"]`,`& [data-scope="${bs(e)}"][data-part="${bs(r)}"]`].join(", "),attrs:{"data-scope":bs(e),"data-part":bs(r)}}}),{})}),bs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),tD=e=>e.length===0;const nD=["top","right","bottom","left"],Oi=Math.min,$n=Math.max,nc=Math.round,rc=Math.floor,Fr=e=>({x:e,y:e}),rD={left:"right",right:"left",bottom:"top",top:"bottom"},iD={start:"end",end:"start"};function Gh(e,t,n){return $n(e,Oi(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function si(e){return e.split("-")[0]}function Ts(e){return e.split("-")[1]}function Wh(e){return e==="x"?"y":"x"}function Xh(e){return e==="y"?"height":"width"}const oD=new Set(["top","bottom"]);function Br(e){return oD.has(si(e))?"y":"x"}function Kh(e){return Wh(Br(e))}function sD(e,t,n){n===void 0&&(n=!1);const r=Ts(e),o=Kh(e),a=Xh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function aD(e){const t=ic(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.replace(/start|end/g,t=>iD[t])}const Xb=["left","right"],Kb=["right","left"],uD=["top","bottom"],lD=["bottom","top"];function cD(e,t,n){switch(e){case"top":case"bottom":return n?t?Kb:Xb:t?Xb:Kb;case"left":case"right":return t?uD:lD;default:return[]}}function dD(e,t,n,r){const o=Ts(e);let a=cD(si(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Qh)))),a}function ic(e){return e.replace(/left|right|bottom|top/g,t=>rD[t])}function fD(e){return D({top:0,right:0,bottom:0,left:0},e)}function Qb(e){return typeof e!="number"?fD(e):{top:e,right:e,bottom:e,left:e}}function oc(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 Jb(e,t,n){let{reference:r,floating:o}=e;const a=Br(t),u=Kh(t),c=Xh(u),d=si(t),f=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Ts(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const hD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=Jb(f,r,d),T=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:k,fn:A}=c[S],{x:N,y:C,data:U,reset:q}=yield A({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=N!=null?N:p,g=C!=null?C:g,y=pe(D({},y),{[k]:D(D({},y[k]),U)}),q&&_<=50&&(_++,typeof q=="object"&&(q.placement&&(T=q.placement),q.rects&&(f=q.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):q.rects),{x:p,y:g}=Jb(f,T,d)),S=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function Xa(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:T=!1,padding:y=0}=oi(t,e),_=Qb(y),k=c[T?g==="floating"?"reference":"floating":g],A=oc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(k))==null||n?k:k.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(C))?(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},q=oc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(A.top-q.top+_.top)/U.y,bottom:(q.bottom-A.bottom+_.bottom)/U.y,left:(A.left-q.left+_.left)/U.x,right:(q.right-A.right+_.right)/U.x}})}const pD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=oi(e,n)||{};if(p==null)return{};const T=Qb(g),y={x:r,y:o},_=Kh(a),S=Xh(_),k=yield c.getDimensions(p),A=_==="y",N=A?"top":"left",C=A?"bottom":"right",U=A?"clientHeight":"clientWidth",q=u.reference[S]+u.reference[_]-y[_]-u.floating[S],F=y[_]-u.reference[_],Y=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=Y?Y[U]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(Y)))&&(ie=d.floating[U]||u.floating[S]);const ge=q/2-F/2,$=ie/2-k[S]/2-1,oe=Oi(T[N],$),ce=Oi(T[C],$),de=oe,ne=ie-k[S]-ce,Te=ie/2-k[S]/2+ge,Ie=Gh(de,Te,ne),ue=!f.arrow&&Ts(a)!=null&&Te!==Ie&&u.reference[S]/2-(Te<de?oe:ce)-k[S]/2<0,Q=ue?Te<de?Te-de:Te-ne:0;return{[_]:y[_]+Q,data:D({[_]:Ie,centerOffset:Te-Ie-Q},ue&&{alignmentOffset:Q}),reset:ue}})}}),mD=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:c,initialPlacement:d,platform:f,elements:p}=n,Te=oi(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0}=Te,A=cn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=si(a),C=Br(d),U=si(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),F=y||(U||!k?[ic(d)]:aD(d)),Y=S!=="none";!y&&Y&&F.push(...dD(d,k,S,q));const ie=[d,...F],ge=yield Xa(n,A),$=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&$.push(ge[N]),T){const Ie=sD(a,c,q);$.push(ge[Ie[0]],ge[Ie[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(Ie=>Ie<=0)){var ce,de;const Ie=(((ce=u.flip)==null?void 0:ce.index)||0)+1,ue=ie[Ie];if(ue&&(!(T==="alignment"?C!==Br(ue):!1)||oe.every(v=>Br(v.placement)===C?v.overflows[0]>0:!0)))return{data:{index:Ie,overflows:oe},reset:{placement:ue}};let Q=(de=oe.filter(re=>re.overflows[0]<=0).sort((re,v)=>re.overflows[1]-v.overflows[1])[0])==null?void 0:de.placement;if(!Q)switch(_){case"bestFit":{var ne;const re=(ne=oe.filter(v=>{if(Y){const M=Br(v.placement);return M===C||M==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(M=>M>0).reduce((M,te)=>M+te,0)]).sort((v,M)=>v[1]-M[1])[0])==null?void 0:ne[0];re&&(Q=re);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function Zb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eT(e){return nD.some(t=>e[t]>=0)}const gD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=oi(e,n),{strategy:o="referenceHidden"}=u,a=cn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Xa(n,pe(D({},a),{elementContext:"reference"})),d=Zb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:eT(d)}}}case"escaped":{const c=yield Xa(n,pe(D({},a),{altBoundary:!0})),d=Zb(c,r.floating);return{data:{escapedOffsets:d,escaped:eT(d)}}}default:return{}}})}}},tT=new Set(["left","top"]);function ED(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=si(n),c=Ts(n),d=Br(n)==="y",f=tT.has(u)?-1:1,p=a&&d?-1:1,g=oi(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const yD=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:c,middlewareData:d}=n,f=yield ED(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(D({},f),{placement:c})}})}}},bD=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}=n,A=oi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:N=>{let{x:C,y:U}=N;return{x:C,y:U}}}}=A,f=cn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield Xa(n,f),T=Br(si(a)),y=Wh(T);let _=p[y],S=p[T];if(u){const N=y==="y"?"top":"left",C=y==="y"?"bottom":"right",U=_+g[N],q=_-g[C];_=Gh(U,_,q)}if(c){const N=T==="y"?"top":"left",C=T==="y"?"bottom":"right",U=S+g[N],q=S-g[C];S=Gh(U,S,q)}const k=d.fn(pe(D({},n),{[y]:_,[T]:S}));return pe(D({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[y]:u,[T]:c}}})})}}},TD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=oi(e,t),p={x:n,y:r},g=Br(o),T=Wh(g);let y=p[T],_=p[g];const S=oi(c,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:D({mainAxis:0,crossAxis:0},S);if(d){const C=T==="y"?"height":"width",U=a.reference[T]-a.floating[C]+k.mainAxis,q=a.reference[T]+a.reference[C]-k.mainAxis;y<U?y=U:y>q&&(y=q)}if(f){var A,N;const C=T==="y"?"width":"height",U=tT.has(si(o)),q=a.reference[g]-a.floating[C]+(U&&((A=u.offset)==null?void 0:A[g])||0)+(U?0:k.crossAxis),F=a.reference[g]+a.reference[C]+(U?0:((N=u.offset)==null?void 0:N[g])||0)-(U?k.crossAxis:0);_<q?_=q:_>F&&(_=F)}return{[T]:y,[g]:_}}}},_D=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=oi(e,n),{apply:f=()=>{}}=oe,p=cn(oe,["apply"]),g=yield Xa(n,p),T=si(a),y=Ts(a),_=Br(a)==="y",{width:S,height:k}=u.floating;let A,N;T==="top"||T==="bottom"?(A=T,N=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(N=T,A=y==="end"?"top":"bottom");const C=k-g.top-g.bottom,U=S-g.left-g.right,q=Oi(k-g[A],C),F=Oi(S-g[N],U),Y=!n.middlewareData.shift;let ie=q,ge=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ge=U),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ie=C),Y&&!y){const ce=$n(g.left,0),de=$n(g.right,0),ne=$n(g.top,0),Te=$n(g.bottom,0);_?ge=S-2*(ce!==0||de!==0?ce+de:$n(g.left,g.right)):ie=k-2*(ne!==0||Te!==0?ne+Te:$n(g.top,g.bottom))}yield f(pe(D({},n),{availableWidth:ge,availableHeight:ie}));const $=yield c.getDimensions(d.floating);return S!==$.width||k!==$.height?{reset:{rects:!0}}:{}})}}};function sc(){return typeof window!="undefined"}function _s(e){return nT(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(nT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nT(e){return sc()?e instanceof Node||e instanceof Vn(e).Node:!1}function Er(e){return sc()?e instanceof Element||e instanceof Vn(e).Element:!1}function Hr(e){return sc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function rT(e){return!sc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const SD=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!SD.has(o)}const xD=new Set(["table","td","th"]);function wD(e){return xD.has(_s(e))}const CD=[":popover-open",":modal"];function ac(e){return CD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const AD=["transform","translate","scale","rotate","perspective"],vD=["transform","translate","scale","rotate","perspective","filter"],kD=["paint","layout","strict","content"];function Jh(e){const t=Zh(),n=Er(e)?yr(e):e;return AD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vD.some(r=>(n.willChange||"").includes(r))||kD.some(r=>(n.contain||"").includes(r))}function PD(e){let t=Ii(e);for(;Hr(t)&&!Ss(t);){if(Jh(t))return t;if(ac(t))return null;t=Ii(t)}return null}function Zh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ND=new Set(["html","body","#document"]);function Ss(e){return ND.has(_s(e))}function yr(e){return Vn(e).getComputedStyle(e)}function uc(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ii(e){if(_s(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rT(e)&&e.host||Ur(e);return rT(t)?t.host:t}function iT(e){const t=Ii(e);return Ss(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Ka(t)?t:iT(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=iT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(o);if(a){const c=ep(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],c&&n?Qa(c):[])}return t.concat(o,Qa(o,[],n))}function ep(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oT(e){const t=yr(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,c=nc(n)!==a||nc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function tp(e){return Er(e)?e:e.contextElement}function xs(e){const t=tp(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=oT(t);let u=(a?nc(n.width):n.width)/r,c=(a?nc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const OD=Fr(0);function sT(e){const t=Vn(e);return!Zh()||!t.visualViewport?OD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ID(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function To(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=tp(e);let u=Fr(1);t&&(r?Er(r)&&(u=xs(r)):u=xs(e));const c=ID(a,n,r)?sT(a):Fr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const T=Vn(a),y=r&&Er(r)?Vn(r):r;let _=T,S=ep(_);for(;S&&r&&y!==_;){const k=xs(S),A=S.getBoundingClientRect(),N=yr(S),C=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*k.x,U=A.top+(S.clientTop+parseFloat(N.paddingTop))*k.y;d*=k.x,f*=k.y,p*=k.x,g*=k.y,d+=C,f+=U,_=Vn(S),S=ep(_)}}return oc({width:p,height:g,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:To(Ur(e)).left+n}function aT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function RD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ur(r),c=t?ac(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),g=Hr(r);if((g||!g&&!a)&&((_s(r)!=="body"||Ka(u))&&(d=uc(r)),Hr(r))){const y=To(r);f=xs(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?aT(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 LD(e){return Array.from(e.getClientRects())}function DD(e){const t=Ur(e),n=uc(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const uT=25;function MD(e,t){const n=Vn(e),r=Ur(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Zh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=uT&&(a-=_)}else f<=uT&&(a+=f);return{width:a,height:u,x:c,y:d}}const FD=new Set(["absolute","fixed"]);function BD(e,t){const n=To(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Hr(e)?xs(e):Fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function lT(e,t,n){let r;if(t==="viewport")r=MD(e,n);else if(t==="document")r=DD(Ur(e));else if(Er(t))r=BD(t,n);else{const o=sT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return oc(r)}function cT(e,t){const n=Ii(e);return n===t||!Er(n)||Ss(n)?!1:yr(n).position==="fixed"||cT(n,t)}function UD(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(c=>Er(c)&&_s(c)!=="body"),o=null;const a=yr(e).position==="fixed";let u=a?Ii(e):e;for(;Er(u)&&!Ss(u);){const c=yr(u),d=Jh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&FD.has(o.position)||Ka(u)&&!d&&cT(e,u))?r=r.filter(p=>p!==u):o=c,u=Ii(u)}return t.set(e,r),r}function HD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:UD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=lT(t,p,o);return f.top=$n(g.top,f.top),f.right=Oi(g.right,f.right),f.bottom=Oi(g.bottom,f.bottom),f.left=$n(g.left,f.left),f},lT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function zD(e){const{width:t,height:n}=oT(e);return{width:t,height:n}}function jD(e,t,n){const r=Hr(t),o=Ur(t),a=n==="fixed",u=To(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=lc(o)}if(r||!r&&!a)if((_s(t)!=="body"||Ka(o))&&(c=uc(t)),r){const y=To(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?aT(o,c):Fr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function np(e){return yr(e).position==="static"}function dT(e,t){if(!Hr(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function fT(e,t){const n=Vn(e);if(ac(e))return n;if(!Hr(e)){let o=Ii(e);for(;o&&!Ss(o);){if(Er(o)&&!np(o))return o;o=Ii(o)}return n}let r=dT(e,t);for(;r&&wD(r)&&np(r);)r=dT(r,t);return r&&Ss(r)&&np(r)&&!Jh(r)?n:r||PD(e)||n}const $D=function(e){return et(this,null,function*(){const t=this.getOffsetParent||fT,n=this.getDimensions,r=yield n(e.floating);return{reference:jD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function VD(e){return yr(e).direction==="rtl"}const qD={convertOffsetParentRelativeRectToViewportRelativeRect:RD,getDocumentElement:Ur,getClippingRect:HD,getOffsetParent:fT,getElementRects:$D,getClientRects:LD,getDimensions:zD,getScale:xs,isElement:Er,isRTL:VD};function hT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YD(e,t){let n=null,r;const o=Ur(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:g,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=rc(g),S=rc(o.clientWidth-(p+T)),k=rc(o.clientHeight-(g+y)),A=rc(p),C={rootMargin:-_+"px "+-S+"px "+-k+"px "+-A+"px",threshold:$n(0,Oi(1,d))||1};let U=!0;function q(F){const Y=F[0].intersectionRatio;if(Y!==d){if(!U)return u();Y?u(!1,Y):r=setTimeout(()=>{u(!1,1e-7)},1e3)}Y===1&&!hT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(q,pe(D({},C),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(q,C)}n.observe(e)}return u(!0),a}function GD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=tp(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const g=f&&c?YD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[N]=A;N&&N.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 _,S=d?To(e):null;d&&k();function k(){const A=To(e);S&&!hT(S,A)&&n(),S=A,_=requestAnimationFrame(k)}return n(),()=>{var A;p.forEach(N=>{o&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),g==null||g(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const WD=yD,XD=bD,KD=mD,QD=_D,JD=gD,ZD=pD,e5=TD,t5=(e,t,n)=>{const r=new Map,o=D({platform:qD},n),a=pe(D({},o.platform),{_c:r});return hD(e,t,pe(D({},o),{platform:a}))};function pT(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(D({},o),{toJSON:()=>o})}function n5(e){if(!e)return pT();const{x:t,y:n,width:r,height:o}=e;return pT(t,n,r,o)}function r5(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?n5(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")},i5=e=>e==="top"||e==="bottom"?"y":"x";function o5(e,t){return{name:"transformOrigin",fn(n){var ge,$,oe,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=i5(d),p=((ge=o.arrow)==null?void 0:ge.x)||0,g=(($=o.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,S=g+y/2,k=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),A=u.reference.height/2,N=y/2,C=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,U=typeof C=="number"?C+N:C!=null?C:N,q=k>U,F={top:`${_}px calc(100% + ${U}px)`,bottom:`${_}px ${-U}px`,left:`calc(100% + ${U}px) ${S}px`,right:`${-U}px ${S}px`}[d],Y=`${_}px ${u.reference.y+A-c}px`,ie=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(ai.transformOrigin.variable,ie?Y:F),{data:{transformOrigin:ie?Y:F}}}}}var s5={name:"rects",fn({rects:e}){return{data:e}}},a5=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 u5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var l5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function mT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function rp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function c5(e,t,n){const r=e||t.createElement("div");return ZD({element:r,padding:n.arrowPadding})}function d5(e,t){var n;if(!A6((n=t.offset)!=null?n:t.gutter))return WD(({placement:r})=>{var p,g,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=u5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Oh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function f5(e){if(!e.flip)return;const t=rp(e.boundary);return KD(pe(D({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function h5(e){if(!e.slide&&!e.overlap)return;const t=rp(e.boundary);return XD(pe(D({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:e5()}))}function p5(e){return QD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function m5(e){var t;if(e.hideWhenDetached)return JD({strategy:"referenceHidden",boundary:(t=rp(e.boundary))!=null?t:"clippingAncestors"})}function g5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function E5(e,t,n={}){const r=r5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},l5,n),a=t.querySelector("[data-part=arrow]"),u=[d5(a,o),f5(o),h5(o),c5(a,t.ownerDocument,o),a5(a),o5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),p5(o),m5(o),s5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,g=()=>et(null,null,function*(){var U;if(!r||!t)return;const S=yield t5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const k=fs(t),A=mT(k,S.x),N=mT(k,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${N}px`),o.hideWhenDetached&&(((U=S.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=ps(C);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=g5(o.listeners),_=o.listeners?GD(r,t,T,y):D6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function gT(e,t,n={}){const c=n,{defer:r}=c,o=cn(c,["defer"]),a=r?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(E5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var y5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function b5(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?y5[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 ws=new WeakMap,cc=new WeakMap,dc={},ip=0,ET=e=>e&&(e.host||ET(e.parentNode)),T5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ET(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),_5=new Set(["script","output","status","next-route-announcer"]),S5=e=>_5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),x5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=T5(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const c=dc[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Jt(y)&&Nb(y,_=>{g(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(S5(_))return;const k=_.getAttribute(o)==="true",A=(ws.get(_)||0)+1,N=(c.get(_)||0)+1;ws.set(_,A),c.set(_,N),d.push(_),A===1&&k&&cc.set(_,!0),N===1&&_.setAttribute(r,""),k||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return T(n),f.clear(),ip++,()=>{d.forEach(y=>{const _=ws.get(y)-1,S=c.get(y)-1;ws.set(y,_),c.set(y,S),_||(cc.has(y)||y.removeAttribute(o),cc.delete(y)),S||y.removeAttribute(r)}),ip--,ip||(ws=new WeakMap,ws=new WeakMap,cc=new WeakMap,dc={})}},w5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,C5=(e,t=w5(e),n="data-aria-hidden",r=!0)=>{if(t)return x5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},A5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function yT(e,t={}){const{defer:n=!0}=t,r=n?A5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(C5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function v5(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 k5(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 bT="pointerdown.outside",TT="focus.outside";function P5(e){for(const t of e)if(Jt(t)&&Mr(t))return!0;return!1}var _T=e=>"clientY"in e;function N5(e,t){if(!_T(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 O5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ST(e,t){if(!t||!_T(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return O5(u,c)?r||a:!1}function I5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=fs(e),p=v5(f),g=k5(f);function T(C,U){if(!Jt(U)||!U.isConnected||ds(e,U)||N5(e,C)||c&&Pb(e,U))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const Y=Hh(q);if(ST(C,Y))return!1}const F=Hh(e);return ST(C,F)?!1:!(n!=null&&n(U))}const y=new Set,_=go(e==null?void 0:e.getRootNode());function S(C){function U(q){var ge,$;const F=u&&!Ob()?Vt:oe=>oe(),Y=q!=null?q:C,ie=($=(ge=Y==null?void 0:Y.composedPath)==null?void 0:ge.call(Y))!=null?$:[Y==null?void 0:Y.target];F(()=>{const oe=_?ie[0]:gr(C);if(!(!e||!T(C,oe))){if(o||a){const ce=Nh(o,a);e.addEventListener(bT,ce,{once:!0})}xT(e,bT,{bubbles:!1,cancelable:!0,detail:{originalEvent:Y,contextmenu:g4(Y),focusable:P5(ie),target:oe}})}})}C.pointerType==="touch"?(y.forEach(q=>q()),y.add(Zt(d,"click",U,{once:!0})),y.add(g.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const k=new Set,A=setTimeout(()=>{k.add(Zt(d,"pointerdown",S,!0)),k.add(g.addEventListener("pointerdown",S,!0)),k.add(p.addEventListener("pointerdown",S,!0))},0);function N(C){(u?Vt:q=>q())(()=>{var Y,ie;const q=(ie=(Y=C==null?void 0:C.composedPath)==null?void 0:Y.call(C))!=null?ie:[C==null?void 0:C.target],F=_?q[0]:gr(C);if(!(!e||!T(C,F))){if(r||a){const ge=Nh(r,a);e.addEventListener(TT,ge,{once:!0})}xT(e,TT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(F),target:F}})}})}return Ob()||(k.add(Zt(d,"focusin",N,!0)),k.add(g.addEventListener("focusin",N,!0)),k.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(A),y.forEach(C=>C()),k.forEach(C=>C())}}function R5(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(I5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function xT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function L5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Dr(e),"keydown",n,{capture:!0})}var wT="layer:request-dismiss",ir={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=>ds(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ds(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=>ir.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];M5(e,wT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),D5(e,wT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function D5(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 M5(e,t,n){e.addEventListener(t,n,{once:!0})}var CT;function AT(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function F5(e){e.style.pointerEvents=""}function B5(e,t){const n=Dr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(CT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=U4(()=>{const c=o();return Jt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=CT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function U5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ih("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ir.add(f),AT();function p(S){var A,N;const k=gr(S.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(k)||((A=t.onPointerDownOutside)==null||A.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var A,N;const k=gr(S.detail.originalEvent);ir.isInBranch(k)||((A=t.onFocusOutside)==null||A.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var k;ir.isTopMost(e)&&((k=t.onEscapeKeyDown)==null||k.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var C;if(!e)return!1;const k=typeof u=="function"?u():u,A=Array.isArray(k)?k:[k],N=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(Jt);return N&&A.push(...N),A.some(U=>ds(U,S))||ir.isInNestedLayer(e,S)}const _=[a?B5(e,t.persistentElements):void 0,L5(e,T),R5(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),AT(),F5(e),_.forEach(S=>S==null?void 0:S())}}function vT(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=ls(e)?e():e;o.push(U5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var H5=Object.defineProperty,z5=(e,t,n)=>t in e?H5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>z5(e,typeof t!="symbol"?t+"":t,n),kT={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()}},j5=[],$5=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const o=gr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ya(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(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ya(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),wt(this,"handlePointerDown",r=>{const o=gr(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()}}),wt(this,"handleClick",r=>{const o=gr(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(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)}}),wt(this,"handleEscapeKey",r=>{V5(r)&&eu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return a4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?u4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(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)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const o=hs(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}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==hs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,q5(r)&&r.select()}}),wt(this,"deactivate",r=>{if(!this.state.active)return this;const o=D({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(),kT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{PT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),wt(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}),wt(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}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),wt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),wt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),wt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||gr(o);this.updateTabbableNodes();let c=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?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!Eo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=Ya(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!Eo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=Ya(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||j5;const n=D({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=>{i4(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?Pb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ms(e,{getShadowRoot:this.config.getShadowRoot}),n=Bb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ya(t[f])>0){c=!0;break}function d(f,p=!0){const g=t.indexOf(f);if(g>=0)return t[g+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Eo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Eo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return kT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?PT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=hs(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,V5=e=>!e.isComposing&&e.key==="Escape",PT=e=>setTimeout(e,0),q5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function NT(e,t={}){let n;const r=Vt(()=>{const o=typeof e=="function"?e():e;if(o){n=new $5(o,pe(D({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 op="data-scroll-lock";function Y5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function OT(e){const t=ps(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function IT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(op))return;const u=OT(r)||OT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(op,"");const d=()=>F4(r,"--scrollbar-width",`${c}px`),f=Y5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ql(o,_)},g=()=>{var q,F;const{scrollX:_,scrollY:S,visualViewport:k}=n,A=(q=k==null?void 0:k.offsetLeft)!=null?q:0,N=(F=k==null?void 0:k.offsetTop)!=null?F:0,C={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(N))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const U=Ql(o,C);return()=>{U==null||U(),n.scrollTo({left:_,top:S,behavior:"instant"})}},T=[d(),Wl()?g():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(op)}}var G5=bo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=G5.build(),RT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},LT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},DT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},W5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},MT=e=>e.getById(RT(e)),Cs=e=>e.getById(LT(e)),As=e=>e.getById(sp(e)),FT=e=>e.getById(DT(e)),K5=e=>e.getById(ap(e)),Q5=e=>e.getById(up(e));function J5(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),T=b5(pe(D({},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(D({id:W5(c)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(D({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(D({},zr.anchor.attrs),{dir:u("dir"),id:RT(c)}))},getTriggerProps(){return t.button(pe(D({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:LT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":sp(c),onPointerDown(y){Ib(y)&&p4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(D({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(D({id:DT(c)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(D({},zr.content.attrs),{dir:u("dir"),id:sp(c),tabIndex:-1,role:"dialog","aria-modal":Ab(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":cs(d),"aria-labelledby":g.title?ap(c):void 0,"aria-describedby":g.description?up(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(D({},zr.title.attrs),{id:ap(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(D({},zr.description.attrs),{id:up(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(D({},zr.closeTrigger.attrs),{dir:u("dir"),id:X5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var Z5={props({props:e}){return pe(D({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:D({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=MT(n))!=null?a:Cs(n);return gT(r,()=>FT(n),pe(D({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>As(n);let o=!0;return vT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Cs(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:D4(()=>As(t),{triggerElement:Cs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?yT(()=>[As(t),Cs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return IT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?NT(()=>As(t),{initialFocus:()=>Ub({root:As(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=MT(n))!=null?u:Cs(n);gT(o,()=>FT(n),pe(D(D({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Vt(()=>{Object.assign(e.get("renderedElements"),{title:!!K5(t),description:!!Q5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Vt(()=>{const n=Ub({root:As(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||Vt(()=>{const a=Cs(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})}}}};ys()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[gU,fc]=yo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[EU,lp]=yo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),eM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,dir:r,getRootNode:n},e),a=Zl(Z5,o);return J5(a,$h)},tM=e=>{const[t,u]=Wb(e),c=u,{children:n}=c,r=cn(c,["children"]),o=eM(r),a=Yh(qt({present:o.open},t));return w.jsx(K4,{value:o,children:w.jsx(qb,{value:a,children:n})})},BT=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(pe(D({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,pe(D({},o),{ref:t}))});BT.displayName="PopoverTrigger";function nM(e){return It({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 rM(e){return It({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 iM(e){return It({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 oM(e){return It({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 sM(e){return It({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 UT(e){return It({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 aM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=ut(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(tM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(BT,{"aria-label":`Overflow menu for ${t}`,className:X(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(UT,{})}),w.jsx(Gb,{children:w.jsx(Yb,{className:X(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(bb.Provider,{value:d,children:n})})})]})};function HT(e){return It({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 zT(e){return It({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[uM,_o]=yo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),jT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getControlProps(),e);return w.jsx(gn.div,pe(D(D({},r),e),{ref:t}))});jT.displayName="CarouselControl";const $T=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),o=_o(),a=qt(o.getIndicatorProps(n),r);return w.jsx(gn.button,pe(D({},a),{ref:t}))});$T.displayName="CarouselIndicator";const VT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});VT.displayName="CarouselIndicatorGroup";const qT=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),o=_o(),a=qt(o.getItemProps(n),r);return w.jsx(gn.div,pe(D({},a),{ref:t}))});qT.displayName="CarouselItem";const YT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getItemGroupProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});YT.displayName="CarouselItemGroup";const GT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getNextTriggerProps(),e);return w.jsx(gn.button,pe(D({},r),{ref:t}))});GT.displayName="CarouselNextTrigger";const WT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,pe(D({},r),{ref:t}))});WT.displayName="CarouselPrevTrigger";function lM(e){const t=ps(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:g}}}function cM(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 XT(e){let t=[];for(const n of e.children)t=t.concat(n,XT(n));return t}function KT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?XT(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!cM(n,g,u))continue;const T=ps(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,k=g[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:k});break;case"center":r[a].center.push({node:p,position:k+g[d]/2});break;case"end":r[a].end.push({node:p,position:k+g[d]});break}}}return r}function QT(e){const t=e.getBoundingClientRect(),n=lM(e),r=KT(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:JT([...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(ZT(0,o.x))),y:JT([...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(ZT(0,o.y)))}}function dM(e,t,n){const r=KT(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var JT=e=>[...new Set(e)],ZT=(e,t)=>n=>Math.max(e,Math.min(t,n)),fM=bo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=fM.build(),hM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},pM=(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}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},mM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},gM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},e_=(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}`},In=e=>e.getById(hc(e)),t_=e=>M4(In(e),"[data-part=item]"),yM=(e,t)=>e.getById(e_(e,t)),n_=e=>{const t=In(e);if(!t)return;const n=ms(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function bM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),k=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(D({},ui.root.attrs),{id:hM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(D({},ui.itemGroup.attrs),{id:hc(u),"data-orientation":c("orientation"),"data-dragging":cs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){ds(N.currentTarget,gr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){ds(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Ib(N))return;const C=gr(N);Mr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:M6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!o("canScrollPrev")||N[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",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:k,[T?"paddingInline":"paddingBlock"]:k,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(pe(D({},ui.item.attrs),{id:pM(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":cs(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(N.index,c("slideCount")),"aria-hidden":Ab(!C),style:{scrollSnapAlign:(()=>{var ie;const U=(ie=N.snapAlign)!=null?ie:"start",q=c("slidesPerMove"),F=q==="auto"?Math.floor(c("slidesPerPage")):q;return(N.index+F)%F===0?U:void 0})()}}))},getControlProps(){return t.element(pe(D({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(D({},ui.prevTrigger.attrs),{id:gM(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(D({},ui.nextTrigger.attrs),{dir:c("dir"),id:mM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(D({},ui.indicatorGroup.attrs),{dir:c("dir"),id:EM(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.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=b4(N,{dir:c("dir"),orientation:c("orientation")}),F=U[q];F==null||F(N)}}))},getIndicatorProps(N){return t.button(pe(D({},ui.indicator.attrs),{dir:c("dir"),id:e_(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":cs(N.readOnly),"data-current":cs(N.index===_),"aria-label":A.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(D({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":cs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var TM={props({props:e}){return j6(e,["slideCount"],"carousel"),pe(D({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:D({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:_M(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 C6(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(In(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=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),n_(e)});return n_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Vt(()=>{o(),Vt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:f.isIntersecting?T6(d,g):_6(d,g)},n.get("slidesInView"));n.set("slidesInView",S6(c))},{root:r,threshold:t("inViewThreshold")});return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return R4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=wb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(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=_b(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=x6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=dM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=wb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=QT(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(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=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=QT(r),c=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]);Vt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=yM(n,e.get("page"));r&&Vt(()=>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 _M(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}ys()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ys()(["index","readOnly"]),ys()(["index","snapAlign"]);const SM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,dir:r,getRootNode:n},e),a=Zl(TM,o);return bM(a,$h)},r_=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=SM(n),a=qt(o.getRootProps(),r);return w.jsx(uM,{value:o,children:w.jsx(gn.div,pe(D({},a),{ref:t}))})});r_.displayName="CarouselRoot";const xM=180,wM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},CM=({globalClassName:e,className:t,itemMinWidth:n=xM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const g=Array.from(p),T=g.length,y=B.useRef(null),[_,S]=B.useState(0),{width:k}=_v();B.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[k,T]);const A=wM(r),N=n+A,C=_>0?(_+A)/N:1,U=Math.max(1,Math.floor(C));if(T===0)return null;const q=T>U,F=Math.ceil(T/U),Y=q?Math.max(1,C):U;return w.jsxs(r_,{ref:y,className:X(e,t,`${j}-carousel`),slidesPerPage:Y,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(YT,{className:X(e,`${j}-carousel__item-group`,{"carousel-row-container":!q}),children:g.map((ie,ge)=>w.jsx(qT,{index:ge,className:X(e,`${j}-carousel__item`),children:ie},ge))}),c&&q&&w.jsxs(jT,{className:X(e,`${j}-carousel__control`),children:[w.jsx(WT,{className:X(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(iM,{})}),w.jsx(GT,{className:X(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(oM,{})})]}),u&&q&&w.jsx(VT,{className:X(e,`${j}-carousel__indicator-group`),children:Array.from({length:F},(ie,ge)=>w.jsx($T,{index:ge,className:X(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${ge+1}`},ge))})]})},[AM,vM]=yo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),kM=e=>Wa()(e,["lazyMount","unmountOnExit"]),[PM,tu]=yo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),i_=B.forwardRef((e,t)=>{const n=tu(),r=vM(),o=Yh(pe(D({},r),{present:n.open})),a=qt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(gn.div,pe(D({},a),{ref:ec(o.ref,t)}))});i_.displayName="DialogBackdrop";const cp=B.forwardRef((e,t)=>{const n=tu(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:ec(r.ref,t)}))});cp.displayName="DialogContent";const dp=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getDescriptionProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});dp.displayName="DialogDescription";const fp=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(gn.div,pe(D({},r),{ref:t}))});fp.displayName="DialogPositioner";var NM=bo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=NM.build(),o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},s_=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`},a_=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`},u_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},pc=e=>e.getById(hp(e)),OM=e=>e.getById(o_(e)),IM=e=>e.getById(s_(e)),RM=e=>e.getById(a_(e)),LM=e=>e.getById(pp(e)),DM=e=>e.getById(mp(e)),MM=e=>e.getById(u_(e));function FM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(D({},So.trigger.attrs),{dir:a("dir"),id:a_(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(pe(D({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:s_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(D({},So.positioner.attrs),{dir:a("dir"),id:o_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(D({},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":c||void 0,"aria-labelledby":c||!f.title?void 0:pp(u),"aria-describedby":f.description?mp(u):void 0}))},getTitleProps(){return t.element(pe(D({},So.title.attrs),{dir:a("dir"),id:pp(u)}))},getDescriptionProps(){return t.element(pe(D({},So.description.attrs),{dir:a("dir"),id:mp(u)}))},getCloseTriggerProps(){return t.button(pe(D({},So.closeTrigger.attrs),{dir:a("dir"),id:u_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var BM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>MM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return D({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 vT(()=>pc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[RM(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 IT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?NT(()=>pc(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")?yT(()=>[pc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Vt(()=>{e.set("rendered",{title:!!LM(t),description:!!DM(t)})})},syncZIndex({scope:e}){Vt(()=>{const t=pc(e);if(!t)return;const n=ps(t);[OM(e),IM(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})}}}};ys()(["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 UM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,getRootNode:n,dir:r},e),a=Zl(BM,o);return FM(a,$h)},l_=e=>{const[t,c]=Wb(e),d=c,{children:n}=d,r=cn(d,["children"]),[o]=kM(t),a=UM(r),u=Yh(qt({present:a.open},t));return w.jsx(PM,{value:a,children:w.jsx(AM,{value:o,children:w.jsx(qb,{value:u,children:n})})})},c_=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getTitleProps(),e);return w.jsx(gn.h2,pe(D({},r),{ref:t}))});c_.displayName="DialogTitle";const HM=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Ph.Provider,{value:r,children:w.jsx(yb.Provider,{value:o,children:e})})},d_=()=>B.useContext(yb),f_=()=>{const e=B.useContext(Ph);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},zM=`${j}-overflow-menu-button-trigger`,jM=({componentType:e,children:t})=>{const{isOpen:n}=d_(),{closeMenu:r}=f_(),{globalClassName:o}=ut(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${zM}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:X(`${j}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},$M=({componentType:e,className:t})=>{const{toggleMenu:n}=f_(),{isOpen:r}=d_(),{globalClassName:o}=ut();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:X(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:w.jsx(UT,{})})},gp=()=>{const{status:e,entryType:t}=Zn(),{messages:n}=er(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},VM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{previousComponentType:r}=Zn(),o=Va(),a=()=>{gl(r||"dialog"),o()};return t?w.jsx(ri,{className:X(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(HT,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(HT,{}),"Show ",r||"dialog"]})},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{isModalFullscreen:r}=Zn(),o=Va(),a=()=>{wf(!r),o()},u=r?Ok:Ik,c="Toggle Fullscreen";return t?w.jsx(ri,{ariaLabel:c,title:c,className:X(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},YM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{dialogPosition:r}=Zn(),o=Va(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?rM:nM,d=a?"Move right":"Move left";return t?w.jsx(ri,{className:X(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},h_=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=ut(),{mode:a}=Zn(),u=a==="standalone",c=e==="modal",d=c?VM:p_,f=c?qM:YM,p=B.useMemo(()=>r?Lk(r):{},[r]);return w.jsx(HM,{children:w.jsxs("div",{className:X(o,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:X(o,`${j}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:X(o,`${j}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),w.jsx(c_,{className:X(o,`${j}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),w.jsxs("div",{className:X(o,`${j}-${e}-controls`),children:[w.jsx(d,{componentType:e,isIcon:!0}),w.jsx($M,{componentType:e}),w.jsx(N1,{className:X(o,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(jM,{componentType:e,children:[w.jsx(f,{componentType:e}),w.jsx(WM,{componentType:e}),w.jsx(Tb,{componentType:e,onClearChat:t})]})]})})},GM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:X(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsx(Tl,{disabled:r,className:X(t,`${j}-suggestion-button standalone`),onClick:c(d),children:d},d):w.jsx("button",{disabled:r,className:X(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},WM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ut();if(!r)return null;const o=()=>{xi(!1),ml(!0)};return t?w.jsx(ri,{className:X(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(k1,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(k1,{}),"Minimize"]})},p_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),r=Va(),o=()=>{gl("modal"),r()};return t?w.jsx(ri,{className:X(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:w.jsx(zT,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(zT,{}),"Show modal"]})},XM=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=ut(),{askCimPrompts:o,messages:a}=er(),{isLoading:u,handleSuggestion:c}=Or(),d=B.useMemo(()=>{const T=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 a.some(_=>_.name==="conversation_reset")&&r||T},[a,n,r]),f=((g=o.message)==null?void 0:g.suggestions)||[],p=(T,y)=>()=>{c(T,y)};return w.jsxs("div",{className:X(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:X(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:X(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(T=>{var y;return w.jsx(Tl,{disabled:u,className:X(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(T,((y=o.message)==null?void 0:y.eventSourceId)||""),children:T.displayText},T.displayText)})})]})},KM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=ut();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:X(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:X(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:X(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:X(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:X(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:X(r,`${j}-product-tile-pdp`),href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:X(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:X(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:X(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:X(r,`${j}-product-tile-price`),children:c})})]})]})},QM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ut(),o=t;return n?w.jsxs("div",{className:X(r,`${j}-display-products`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(CM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(KM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},JM=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:X(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:X(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(kk,{})," ",t.message||"An error occurred while processing your request."]})}),ZM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Or(),{messages:u}=er(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?hC(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const k=n.suggestions.find(A=>A.displayText===S);k&&o(k,n.eventSourceId||n.id)};return w.jsxs("div",{className:X(e,`${j}-follow-up`),children:[w.jsx("p",{className:X(e,`${j}-text`),children:n.message}),w.jsx(GM,{suggestions:n.suggestions.map(S=>S.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function m_(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 e8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function t8(e,t,n){const o=Ol((n||{}).ignore||[]),a=n8(t);let u=-1;for(;++u<a.length;)zE(e,"text",c);function c(f,p){let g=-1,T;for(;++g<p.length;){const y=p[g],_=T?T.children:void 0;if(o(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const k=g.children.indexOf(f);let A=!1,N=[];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 F=y(...C,q);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=U+1:(_!==U&&N.push({type:"text",value:f.value.slice(_,U)}),Array.isArray(F)?N.push(...F):F&&N.push(F),_=U+C[0].length,A=!0),!T.global)break;C=T.exec(f.value)}return A?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),g.children.splice(k,1,...N)):N=[f],k+N.length}}function n8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([r8(o[0]),i8(o[1])])}return t}function r8(e){return typeof e=="string"?new RegExp(e8(e),"g"):e}function i8(e){return typeof e=="function"?e:function(){return e}}const Ep="phrasing",yp=["autolink","link","image","label"];function o8(){return{transforms:[f8],enter:{literalAutolink:a8,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:d8,literalAutolinkEmail:c8,literalAutolinkHttp:u8,literalAutolinkWww:l8}}}function s8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:":",before:"[ps]",after:"\\/",inConstruct:Ep,notInConstruct:yp}]}}function a8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function u8(e){this.config.exit.autolinkProtocol.call(this,e)}function l8(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 c8(e){this.config.exit.autolinkEmail.call(this,e)}function d8(e){this.exit(e)}function f8(e){t8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,h8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),p8]],{ignore:["link","linkReference"]})}function h8(e,t,n,r,o){let a="";if(!g_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!m8(n)))return!1;const u=g8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function p8(e,t,n,r){return!g_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function m8(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 g8(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=m_(e,"(");let a=m_(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 g_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||wl(n))&&(!t||n!==47)}E_.peek=C8;function E8(){this.buffer()}function y8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function b8(){this.buffer()}function T8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function S8(e){this.exit(e)}function x8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function w8(e){this.exit(e)}function C8(){return"["}function E_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function A8(){return{enter:{gfmFootnoteCallString:E8,gfmFootnoteCall:y8,gfmFootnoteDefinitionLabelString:b8,gfmFootnoteDefinition:T8},exit:{gfmFootnoteCallString:_8,gfmFootnoteCall:S8,gfmFootnoteDefinitionLabelString:x8,gfmFootnoteDefinition:w8}}}function v8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:E_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const co={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/"},ry={}.hasOwnProperty,XI=Object.prototype;function KI(e,t){const n=t||{};return fh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Qo:_l,verbose:n.verbose||!1},e)}function fh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:iy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=WI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=QI(e,t),n}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=fh(e,t[n]);r.push(o)}return r}function QI(e,t){const n=e.schema;e.schema=t.namespaceURI===co.svg?Qo:_l;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ry.call(XI,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?GI:YI)(t.tagName,o,iy(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&ns(d.startTag),p=d&&d.endTag&&ns(d.endTag),g=fh(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=JI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function JI(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)ry.call(n.attrs,u)&&(a[Lf(e.schema,u).property]=ns(n.attrs[u]));n.startTag;const c=ns(n.startTag),d=n.endTag?ns(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ns(e){const t=oy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oy(e){return e.line&&e.column?e:void 0}class Oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oa.prototype.property={},Oa.prototype.normal={},Oa.prototype.space=null;function sy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Oa(n,r,t)}function hh(e){return e.toLowerCase()}class nr{constructor(t,n){this.property=t,this.attribute=n}}nr.prototype.space=null,nr.prototype.boolean=!1,nr.prototype.booleanish=!1,nr.prototype.overloadedBoolean=!1,nr.prototype.number=!1,nr.prototype.commaSeparated=!1,nr.prototype.spaceSeparated=!1,nr.prototype.commaOrSpaceSeparated=!1,nr.prototype.mustUseProperty=!1,nr.prototype.defined=!1;let ZI=0;const We=fo(),Ht=fo(),ay=fo(),ye=fo(),yt=fo(),rs=fo(),jn=fo();function fo(){return ea(2,++ZI)}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ht,commaOrSpaceSeparated:jn,commaSeparated:rs,number:ye,overloadedBoolean:ay,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(ph);class gh extends nr{constructor(t,n,r,o){let a=-1;if(super(t,n),uy(this,"space",o),typeof r=="number")for(;++a<mh.length;){const u=mh[a];uy(this,mh[a],(r&ph[u])===ph[u])}}}gh.prototype.defined=!0;function uy(e,t,n){n&&(e[t]=n)}const e3={}.hasOwnProperty;function is(e){const t={},n={};let r;for(r in e.properties)if(e3.call(e.properties,r)){const o=e.properties[r],a=new gh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hh(r)]=r,n[hh(a.attribute)]=r}return new Oa(t,n,e.space)}const ly=is({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),cy=is({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dy(e,t){return t in e?e[t]:t}function fy(e,t){return dy(e,t.toLowerCase())}const hy=is({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fy,properties:{xmlns:null,xmlnsXLink:null}}),py=is({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:yt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ye,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:yt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Ht,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}}),t3=is({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rs,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:yt,autoFocus:We,autoPlay:We,blocking:yt,capture:null,charSet:null,checked:We,cite:null,className:yt,cols:ye,colSpan:null,content:null,contentEditable:Ht,controls:We,controlsList:yt,coords:ye|rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:ay,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:yt,height:ye,hidden:We,high:ye,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:yt,itemRef:yt,itemScope:We,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:ye,pattern:null,ping:yt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:yt,required:We,reversed:We,rows:ye,rowSpan:ye,sandbox:yt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ht,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:ye,security:null,unselectable:null}}),n3=is({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:dy,properties:{about:jn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:rs,g2:rs,glyphName:rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),r3=/^data[-\w.:]+$/i,my=/-[a-z]/g,i3=/[A-Z]/g;function o3(e,t){const n=hh(t);let r=t,o=nr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&r3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(my,a3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!my.test(a)){let u=a.replace(i3,s3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=gh}return new o(r,t)}function s3(e){return"-"+e.toLowerCase()}function a3(e){return e.charAt(1).toUpperCase()}const u3=sy([cy,ly,hy,py,t3],"html"),gy=sy([cy,ly,hy,py,n3],"svg"),Ey={}.hasOwnProperty;function yy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Ey.call(o,e)){const d=String(o[e]);u=Ey.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const l3={},c3={}.hasOwnProperty,by=yy("type",{handlers:{root:f3,element:E3,text:m3,comment:g3,doctype:p3}});function d3(e,t){const r=(t||l3).space;return by(e,r==="svg"?gy:u3)}function f3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Eh(e.children,n,t),os(e,n),n}function h3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Eh(e.children,n,t),os(e,n),n}function p3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return os(e,t),t}function m3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return os(e,t),t}function g3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return os(e,t),t}function E3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=gy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&c3.call(e.properties,a)){const d=y3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:co[u],childNodes:[],parentNode:null};return c.childNodes=Eh(e.children,c,r),os(e,c),e.tagName==="template"&&e.content&&(c.content=h3(e.content,r)),c}function y3(e,t,n){const r=o3(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?I1(n):q1(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=co[r.space]}return o}function Eh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=by(e[r],n);a.parentNode=t,o.push(a)}return o}function os(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 b3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],T3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="�";var 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 On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ty(e){return e>=55296&&e<=57343}function _3(e){return e>=56320&&e<=57343}function S3(e,t){return(e-55296)*1024+9216+t}function _y(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Sy(e){return e>=64976&&e<=65007||T3.has(e)}var ee;(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"})(ee||(ee={}));const x3=65536;class w3{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=x3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(_3(n))return this.pos++,this._addGap(),S3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(ee.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,Ty(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){_y(t)?this._err(ee.controlCharacterInInputStream):Sy(t)&&this._err(ee.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 xy(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 C3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),A3=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 v3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=A3.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const k3=32;var vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vi||(vi={}));function yh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function P3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function N3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||yh(e)}function O3(e){return e===Kt.EQUALS||N3(e)}var Qt;(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"})(Qt||(Qt={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class I3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|k3)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.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(yh(o)||P3(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(yh(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(v3(this.result),this.consumed),this.errors&&(t!==Kt.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&vi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=R3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||O3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&vi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.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]&vi.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]&~vi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function R3(e,t,n,r){const o=(t&vi.BRANCH_LENGTH)>>7,a=t&vi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ae;(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/"})(ae||(ae={}));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 rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var W;(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"})(W||(W={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const L3=new Map([[W.A,m.A],[W.ADDRESS,m.ADDRESS],[W.ANNOTATION_XML,m.ANNOTATION_XML],[W.APPLET,m.APPLET],[W.AREA,m.AREA],[W.ARTICLE,m.ARTICLE],[W.ASIDE,m.ASIDE],[W.B,m.B],[W.BASE,m.BASE],[W.BASEFONT,m.BASEFONT],[W.BGSOUND,m.BGSOUND],[W.BIG,m.BIG],[W.BLOCKQUOTE,m.BLOCKQUOTE],[W.BODY,m.BODY],[W.BR,m.BR],[W.BUTTON,m.BUTTON],[W.CAPTION,m.CAPTION],[W.CENTER,m.CENTER],[W.CODE,m.CODE],[W.COL,m.COL],[W.COLGROUP,m.COLGROUP],[W.DD,m.DD],[W.DESC,m.DESC],[W.DETAILS,m.DETAILS],[W.DIALOG,m.DIALOG],[W.DIR,m.DIR],[W.DIV,m.DIV],[W.DL,m.DL],[W.DT,m.DT],[W.EM,m.EM],[W.EMBED,m.EMBED],[W.FIELDSET,m.FIELDSET],[W.FIGCAPTION,m.FIGCAPTION],[W.FIGURE,m.FIGURE],[W.FONT,m.FONT],[W.FOOTER,m.FOOTER],[W.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[W.FORM,m.FORM],[W.FRAME,m.FRAME],[W.FRAMESET,m.FRAMESET],[W.H1,m.H1],[W.H2,m.H2],[W.H3,m.H3],[W.H4,m.H4],[W.H5,m.H5],[W.H6,m.H6],[W.HEAD,m.HEAD],[W.HEADER,m.HEADER],[W.HGROUP,m.HGROUP],[W.HR,m.HR],[W.HTML,m.HTML],[W.I,m.I],[W.IMG,m.IMG],[W.IMAGE,m.IMAGE],[W.INPUT,m.INPUT],[W.IFRAME,m.IFRAME],[W.KEYGEN,m.KEYGEN],[W.LABEL,m.LABEL],[W.LI,m.LI],[W.LINK,m.LINK],[W.LISTING,m.LISTING],[W.MAIN,m.MAIN],[W.MALIGNMARK,m.MALIGNMARK],[W.MARQUEE,m.MARQUEE],[W.MATH,m.MATH],[W.MENU,m.MENU],[W.META,m.META],[W.MGLYPH,m.MGLYPH],[W.MI,m.MI],[W.MO,m.MO],[W.MN,m.MN],[W.MS,m.MS],[W.MTEXT,m.MTEXT],[W.NAV,m.NAV],[W.NOBR,m.NOBR],[W.NOFRAMES,m.NOFRAMES],[W.NOEMBED,m.NOEMBED],[W.NOSCRIPT,m.NOSCRIPT],[W.OBJECT,m.OBJECT],[W.OL,m.OL],[W.OPTGROUP,m.OPTGROUP],[W.OPTION,m.OPTION],[W.P,m.P],[W.PARAM,m.PARAM],[W.PLAINTEXT,m.PLAINTEXT],[W.PRE,m.PRE],[W.RB,m.RB],[W.RP,m.RP],[W.RT,m.RT],[W.RTC,m.RTC],[W.RUBY,m.RUBY],[W.S,m.S],[W.SCRIPT,m.SCRIPT],[W.SEARCH,m.SEARCH],[W.SECTION,m.SECTION],[W.SELECT,m.SELECT],[W.SOURCE,m.SOURCE],[W.SMALL,m.SMALL],[W.SPAN,m.SPAN],[W.STRIKE,m.STRIKE],[W.STRONG,m.STRONG],[W.STYLE,m.STYLE],[W.SUB,m.SUB],[W.SUMMARY,m.SUMMARY],[W.SUP,m.SUP],[W.TABLE,m.TABLE],[W.TBODY,m.TBODY],[W.TEMPLATE,m.TEMPLATE],[W.TEXTAREA,m.TEXTAREA],[W.TFOOT,m.TFOOT],[W.TD,m.TD],[W.TH,m.TH],[W.THEAD,m.THEAD],[W.TITLE,m.TITLE],[W.TR,m.TR],[W.TRACK,m.TRACK],[W.TT,m.TT],[W.U,m.U],[W.UL,m.UL],[W.SVG,m.SVG],[W.VAR,m.VAR],[W.WBR,m.WBR],[W.XMP,m.XMP]]);function ss(e){var t;return(t=L3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,D3={[ae.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]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},bh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);W.STYLE,W.SCRIPT,W.XMP,W.IFRAME,W.NOEMBED,W.NOFRAMES,W.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 Rt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function M3(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ia(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function F3(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return F3(e)||Ia(e)}function wy(e){return ki(e)||M3(e)}function Ml(e){return e+32}function Cy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Ay(e){return Cy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function B3(e){return e===P.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:Ty(e)?ee.surrogateCharacterReference:Sy(e)?ee.noncharacterCharacterReference:_y(e)||e===P.CARRIAGE_RETURN?ee.controlCharacterReference:null}class U3{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 w3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new I3(C3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=B3(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:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.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(xy(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(ee.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=ss(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.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=Cy(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(ee.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(ee.unexpectedNullCharacter),this._emitChars(xt);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(ee.unexpectedNullCharacter),this._emitChars(xt);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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(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(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.tagName+=xt;break}case P.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ml(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){ki(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){ki(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){ki(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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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:ki(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){ki(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(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.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(ee.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(ee.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(On.SCRIPT,!1)&&Ay(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.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(ee.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(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=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(ee.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(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.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(ee.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(ee.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.data+=xt;break}case P.EOF:{this._err(ee.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(ee.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(ee.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(ee.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(ee.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ee.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(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ml(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(ee.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.name+=xt;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.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(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(ee.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(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.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(ee.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(ee.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()&&wy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const vy=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),ky=new Set([...vy,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Fl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),H3=new Set([...Fl,m.OL,m.UL]),z3=new Set([...Fl,m.BUTTON]),Py=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Ny=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),j3=new Set([m.TR,m.TEMPLATE,m.HTML]),$3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),V3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),q3=new Set([m.TD,m.TH]);class Y3{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ae.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])!==ae.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(bh,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(q3,ae.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(V3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo($3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(j3,ae.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ae.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ae.SVG:{if(Ny.has(o))return!1;break}case ae.MATHML:{if(Py.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,H3)}hasInButtonScope(t){return this.hasInDynamicScope(t,z3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(bh.has(n))return!0;if(Fl.has(n))return!1;break}case ae.SVG:{if(Ny.has(n))return!1;break}case ae.MATHML:{if(Py.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ae.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&vy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ky.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ky.has(this.currentTagId);)this.pop()}}const Th=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Oy={type:Lr.Marker};class G3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===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:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Th)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Th)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Th&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Oy)}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(Oy);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 Pi={createDocument(){return{nodeName:"#document",mode:rr.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};Pi.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Pi.isTextNode(n)){n.value+=t;return}}Pi.appendChild(e,Pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Pi.isTextNode(r)?r.value+=t:Pi.insertBefore(e,Pi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=D(D({},e.sourceCodeLocation),t)}},Iy="html",W3="about:legacy-compat",X3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Ry=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],K3=[...Ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Q3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ly=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],J3=[...Ly,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Dy(e,t){return t.some(n=>e.startsWith(n))}function Z3(e){return e.name===Iy&&e.publicId===null&&(e.systemId===null||e.systemId===W3)}function eR(e){if(e.name!==Iy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===X3)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Q3.has(n))return rr.QUIRKS;let r=t===null?K3:Ry;if(Dy(n,r))return rr.QUIRKS;if(r=t===null?Ly:J3,Dy(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const My={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},tR="definitionurl",nR="definitionURL",rR=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])),iR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),oR=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])),sR=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function aR(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ho.COLOR||r===ho.SIZE||r===ho.FACE)||sR.has(t)}function Fy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===tR){e.attrs[t].name=nR;break}}function By(e){for(let t=0;t<e.attrs.length;t++){const n=rR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function _h(e){for(let t=0;t<e.attrs.length;t++){const n=iR.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 uR(e){const t=oR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ss(e.tagName))}function lR(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function cR(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ho.ENCODING){const o=n[r].value.toLowerCase();return o===My.TEXT_HTML||o===My.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function dR(e,t,n,r){return(!r||r===ae.HTML)&&cR(e,t,n)||(!r||r===ae.MATHML)&&lR(e,t)}const fR="hidden",hR=8,pR=3;var L;(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"})(L||(L={}));const mR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Uy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),Hy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Pi,onParseError:null};class zy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=D(D({},Hy),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 U3(this.options,this),this.activeFormattingElements=new G3(this.treeAdapter),this.fragmentContextID=r?ss(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new Y3(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=D(D({},Hy),n);t!=null||(t=r.treeAdapter.createElement(W.TEMPLATE,ae.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:mR,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Rt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===W.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(D({},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,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.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(W.HTML,ae.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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:D({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===W.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.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 dR(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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return Uy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ae.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return D3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{$y(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Qy(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){VL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{xh(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.AFTER_BODY:{SR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{xR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{wR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case L.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?YL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{CR(this,t);break}case L.BEFORE_HEAD:{vR(this,t);break}case L.IN_HEAD:{mr(this,t);break}case L.IN_HEAD_NO_SCRIPT:{NR(this,t);break}case L.AFTER_HEAD:{IR(this,t);break}case L.IN_BODY:{mn(this,t);break}case L.IN_TABLE:{as(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{kL(this,t);break}case L.IN_COLUMN_GROUP:{Ah(this,t);break}case L.IN_TABLE_BODY:{zl(this,t);break}case L.IN_ROW:{jl(this,t);break}case L.IN_CELL:{OL(this,t);break}case L.IN_SELECT:{eb(this,t);break}case L.IN_SELECT_IN_TABLE:{RL(this,t);break}case L.IN_TEMPLATE:{DL(this,t);break}case L.AFTER_BODY:{FL(this,t);break}case L.IN_FRAMESET:{BL(this,t);break}case L.AFTER_FRAMESET:{HL(this,t);break}case L.AFTER_AFTER_BODY:{jL(this,t);break}case L.AFTER_AFTER_FRAMESET:{$L(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?GL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{AR(this,t);break}case L.BEFORE_HEAD:{kR(this,t);break}case L.IN_HEAD:{PR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{OR(this,t);break}case L.AFTER_HEAD:{RR(this,t);break}case L.IN_BODY:{Ul(this,t);break}case L.TEXT:{yL(this,t);break}case L.IN_TABLE:{Ua(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{PL(this,t);break}case L.IN_COLUMN_GROUP:{NL(this,t);break}case L.IN_TABLE_BODY:{vh(this,t);break}case L.IN_ROW:{Zy(this,t);break}case L.IN_CELL:{IL(this,t);break}case L.IN_SELECT:{tb(this,t);break}case L.IN_SELECT_IN_TABLE:{LL(this,t);break}case L.IN_TEMPLATE:{ML(this,t);break}case L.AFTER_BODY:{rb(this,t);break}case L.IN_FRAMESET:{UL(this,t);break}case L.AFTER_FRAMESET:{zL(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Xy(this,t);break}case L.TEXT:{bL(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_TEMPLATE:{nb(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{wh(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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{jy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Ky(this,t);break}}}}function gR(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):Wy(e,t),n}function ER(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 yR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=pR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=bR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function bR(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 TR(e,t,n){const r=e.treeAdapter.getTagName(t),o=ss(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _R(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 Sh(e,t){for(let n=0;n<hR;n++){const r=gR(e,t);if(!r)break;const o=ER(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=yR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&TR(e,u,a),_R(e,o,r)}}function xh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function SR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function xR(e,t){e._appendCommentNode(t,e.document)}function wh(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 wR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:eR(t);Z3(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Ra(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function CR(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):La(e,t)}function AR(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function vR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Da(e,t)}}function kR(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Da(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(W.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function PR(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ma(e,t);break}case m.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function po(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function NR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{mr(e,t);break}case m.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:Fa(e,t)}}function OR(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Fa(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Ke.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function IR(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),mr(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function RR(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ba(e,t);break}case m.TEMPLATE:{po(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(W.BODY,m.BODY),e.insertionMode=L.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case Ke.CHARACTER:{$y(e,t);break}case Ke.WHITESPACE_CHARACTER:{jy(e,t);break}case Ke.COMMENT:{xh(e,t);break}case Ke.START_TAG:{mn(e,t);break}case Ke.END_TAG:{Ul(e,t);break}case Ke.EOF:{Xy(e,t);break}}}function jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function $y(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function LR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function DR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function MR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function FR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function BR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function UR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function HR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function zR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function jR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Rt.PLAINTEXT}function $R(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function VR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(W.A);n&&(Sh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function YR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Sh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function WR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Vy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qy(e){const t=xy(e,ho.TYPE);return t!=null&&t.toLowerCase()===fR}function XR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),qy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function KR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function QR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function JR(e,t){t.tagName=W.IMG,t.tagID=m.IMG,Vy(e,t)}function ZR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function eL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function tL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function Yy(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function nL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function rL(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function iL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function oL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function sL(e,t){e._reconstructActiveFormattingElements(),Fy(t),_h(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function aL(e,t){e._reconstructActiveFormattingElements(),By(t),_h(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Gy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function mn(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{qR(e,t);break}case m.A:{VR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{BR(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{FR(e,t);break}case m.LI:case m.DD:case m.DT:{zR(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Vy(e,t);break}case m.HR:{QR(e,t);break}case m.RB:case m.RTC:{iL(e,t);break}case m.RT:case m.RP:{oL(e,t);break}case m.PRE:case m.LISTING:{UR(e,t);break}case m.XMP:{eL(e,t);break}case m.SVG:{aL(e,t);break}case m.HTML:{LR(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{mr(e,t);break}case m.BODY:{DR(e,t);break}case m.FORM:{HR(e,t);break}case m.NOBR:{YR(e,t);break}case m.MATH:{sL(e,t);break}case m.TABLE:{WR(e,t);break}case m.INPUT:{XR(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{KR(e,t);break}case m.IMAGE:{JR(e,t);break}case m.BUTTON:{$R(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{GR(e,t);break}case m.IFRAME:{tL(e,t);break}case m.SELECT:{nL(e,t);break}case m.OPTION:case m.OPTGROUP:{rL(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Yy(e,t);break}case m.FRAMESET:{MR(e,t);break}case m.TEXTAREA:{ZR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Yy(e,t):Gy(e,t);break}case m.PLAINTEXT:{jR(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:Gy(e,t)}}function uL(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function lL(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,rb(e,t))}function cL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function dL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function fL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(W.P,m.P),e._closePElement()}function hL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function pL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function mL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function gL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function EL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(W.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Wy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Ul(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Sh(e,t);break}case m.P:{fL(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{cL(e,t);break}case m.LI:{hL(e);break}case m.DD:case m.DT:{pL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{mL(e);break}case m.BR:{EL(e);break}case m.BODY:{uL(e,t);break}case m.HTML:{lL(e,t);break}case m.FORM:{dL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{gL(e,t);break}case m.TEMPLATE:{po(e,t);break}default:Wy(e,t)}}function Xy(e,t){e.tmplInsertionModeStack.length>0?nb(e,t):wh(e,t)}function yL(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bL(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&Uy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Qy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Ky(e,t);break}}else Ha(e,t)}function TL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function _L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function SL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t)}function xL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function wL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,zl(e,t)}function CL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function AL(e,t){qy(t)?e._appendElement(t,ae.HTML):Ha(e,t),t.ackSelfClosing=!0}function vL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function as(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{wL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{mr(e,t);break}case m.COL:{SL(e,t);break}case m.FORM:{vL(e,t);break}case m.TABLE:{CL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{xL(e,t);break}case m.INPUT:{AL(e,t);break}case m.CAPTION:{TL(e,t);break}case m.COLGROUP:{_L(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{po(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function Ky(e,t){e.pendingCharacterTokens.push(t)}function Qy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Jy=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function kL(e,t){const n=t.tagID;Jy.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,as(e,t)):mn(e,t)}function PL(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===m.TABLE&&Ua(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ul(e,t)}}function Ah(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{mr(e,t);break}default:Hl(e,t)}}function NL(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{po(e,t);break}case m.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function zl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(W.TR,m.TR),e.insertionMode=L.IN_ROW,jl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,as(e,t));break}default:as(e,t)}}function vh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ua(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Ua(e,t)}}function jl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,zl(e,t));break}default:as(e,t)}}function Zy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Ua(e,t)}}function OL(e,t){const n=t.tagID;Jy.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),jl(e,t)):mn(e,t)}function IL(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Zy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Ul(e,t)}}function eb(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{mr(e,t);break}}}function tb(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{po(e,t);break}}}function RL(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):eb(e,t)}function LL(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):tb(e,t)}function DL(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{mr(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,as(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,zl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,jl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,mn(e,t)}}function ML(e,t){t.tagID===m.TEMPLATE&&po(e,t)}function nb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function FL(e,t){t.tagID===m.HTML?mn(e,t):$l(e,t)}function rb(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else $l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function BL(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{mr(e,t);break}}}function UL(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function HL(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.NOFRAMES:{mr(e,t);break}}}function zL(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function jL(e,t){t.tagID===m.HTML?mn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function $L(e,t){switch(t.tagID){case m.HTML:{mn(e,t);break}case m.NOFRAMES:{mr(e,t);break}}}function VL(e,t){t.chars=xt,e._insertCharacters(t)}function qL(e,t){e._insertCharacters(t),e.framesetOk=!1}function ib(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function YL(e,t){if(aR(t))ib(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?Fy(t):r===ae.SVG&&(uR(t),By(t)),_h(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function GL(e,t){if(t.tagID===m.P||t.tagID===m.BR){ib(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)===ae.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}W.AREA,W.BASE,W.BASEFONT,W.BGSOUND,W.BR,W.COL,W.EMBED,W.FRAME,W.HR,W.IMG,W.INPUT,W.KEYGEN,W.LINK,W.META,W.PARAM,W.SOURCE,W.TRACK,W.WBR;const WL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,XL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ob={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sb(e,t){const n=o6(e),r=yy("type",{handlers:{root:KL,element:QL,text:JL,comment:ub,doctype:ZL,raw:t6},unknown:n6}),o={parser:n?new zy(ob):zy.getFragmentParser(void 0,ob),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),us(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=KI(a,{file:o.options.file});return o.stitches&&Rl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const g=f.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function ab(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function KL(e,t){ab(e.children,t)}function QL(e,t){r6(e,t),ab(e.children,t),i6(e,t)}function JL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:ja(e)};us(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ZL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};us(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e6(e,t){t.stitches=!0;const n=s6(e);if("children"in e&&"children"in n){const r=sb({type:"root",children:e.children},t.options);n.children=r.children}ub({type:"comment",value:{stitch:n}},t)}function ub(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:ja(e)};us(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function t6(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,lb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(WL,"<$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 n6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))e6(n,t);else{let r="";throw XL.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 us(e,t){lb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Rt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function lb(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 r6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;us(t,Ir(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:co.html;o===co.html&&n==="svg"&&(o=co.svg);const a=d3(pe(D({},e),{children:[]}),{space:o===co.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ss(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function i6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&b3.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;us(t,Sl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ss(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function o6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=Sl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function s6(e){return"children"in e?lo(pe(D({},e),{children:[]})):lo(e)}function cb(e){return function(t,n){return sb(t,pe(D({},e),{file:n}))}}const mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],db={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"]},Ni={}.hasOwnProperty;function a6(e,t){let n={type:"root",children:[]};const r={schema:t?D(D({},db),t):db,stack:[]},o=fb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function fb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return u6(e,n);case"doctype":return l6(e,n);case"element":return c6(e,n);case"root":return d6(e,n);case"text":return f6(e,n)}}}function u6(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 $a(a,t),a}}function l6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function c6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=hb(e,t.children),o=h6(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&&Ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return $a(u,t),u}function d6(e,t){const r={type:"root",children:hb(e,t.children)};return $a(r,t),r}function f6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function hb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=fb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function h6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ni.call(r,n)?r[n]:void 0,u=r&&Ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ni.call(c,f)){const p=c[f];let g=pb(e,gb(a,f),f,p);g==null&&(g=pb(e,gb(u,f),f,p)),g!=null&&(d[f]=g)}if(o&&Ni.call(o,n)){const p=o[n];for(f in p)Ni.call(p,f)&&!Ni.call(d,f)&&(d[f]=p[f])}return d}function pb(e,t,n,r){return t?Array.isArray(r)?p6(e,t,n,r):mb(e,t,n,r):void 0}function p6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=mb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function mb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&m6(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 m6(e,t,n){const r=e.schema.protocols&&Ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let 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 $a(e,t){const n=Q1(t);t.data&&(e.data=lo(t.data)),n&&(e.position=n)}function gb(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 g6(e){return function(t){return a6(t,e)}}const Eb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",pe(D(D({className:X(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},E6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ut();return!e&&!t?null:w.jsx("div",{className:X(n,`${j}-disclaimer`),children:t?w.jsx(JE,{rehypePlugins:[cb,g6],components:{ul:({children:r})=>w.jsx("ul",{className:X(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:X(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:X(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(Eb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:X(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:X(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:X(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:X(n,`${j}-disclaimer-text`),children:e})})},kh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=er(),{setImageFile:u}=Yo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=ut(),g=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,k=S?"connected":"disconnected",A=t||!S,N=()=>a?new Promise((F,Y)=>{const ie=new FileReader;ie.readAsDataURL(a),ie.onload=()=>F(ie.result),ie.onerror=ge=>Y(ge)}):Promise.resolve(""),C=F=>et(null,null,function*(){var ge;if(A)return;const Y=10*1024*1024,ie=(ge=F.target.files)==null?void 0:ge[0];if(ie){if(ie.size>Y){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ie)}}),U=()=>{u(null),T.current&&(T.current.value="")},q=F=>et(null,null,function*(){var ge;F.preventDefault();const Y=(((ge=g.current)==null?void 0:ge.value)||"").trim();let ie="";try{ie=yield N()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}Y&&(U(),g.current.value="",r(Y,ie))});return w.jsxs("div",{className:X(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:X(d,`cim-${n}-component`,`${j}-image-file-preview`),children:[w.jsx("img",{className:X(d,`cim-${n}-component`,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:X(d,`cim-${n}-component`,`${j}-image-file-name`),title:_,children:_}),w.jsx(N1,{className:X(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:U})]}),w.jsxs("form",{className:X(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:q,children:[w.jsx("span",{role:"status",className:X(`${j}-connection-status-icon`,k)}),y&&w.jsxs("div",{role:"button",className:X(d,e,`cim-${n}-component`,A&&"disabled",`${j}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[w.jsx("label",{className:X(d,e,`cim-${n}-component`,A&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Rk,{})}),w.jsx("input",{className:X(d,e,`cim-${n}-component`,`${j}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:A,onInput:C})]}),w.jsx("input",{className:X(d,e,`cim-${n}-component`,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Uk,{isLoading:A}),w.jsx(Mk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),w.jsx(E6,{})]})};function y6(e){return It({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 yb=B.createContext({isOpen:!1}),Ph=B.createContext(null),bb=B.createContext(null),Va=()=>{var n,r;const e=B.useContext(Ph),t=B.useContext(bb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Tb=({onClearChat:e,componentType:t})=>{const n=Va(),r=()=>{e(),n()};return w.jsxs("button",{className:X(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(y6,{}),"Clear chat"]})};function b6(e){return e==null?[]:Array.isArray(e)?e:[e]}var T6=(e,...t)=>e.concat(t),_6=(e,...t)=>e.filter(n=>!t.includes(n)),S6=e=>Array.from(new Set(e));function _b(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function x6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return _b(e,t,{step:-r,loop:o})}var w6=e=>Array.isArray(e),Sb=e=>e!=null&&typeof e=="object",C6=e=>Sb(e)&&!w6(e),ql=e=>typeof e=="string",ls=e=>typeof e=="function",A6=e=>e==null,v6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),k6=e=>Object.prototype.toString.call(e),xb=Function.prototype.toString,P6=xb.call(Object),N6=e=>{if(!Sb(e)||k6(e)!="[object Object]"||R6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=v6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xb.call(n)==P6},O6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,I6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,R6=e=>O6(e)||I6(e),L6=e=>e(),D6=()=>{},Nh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function M6(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:F6,max:B6}=Math,U6=e=>Number.isNaN(e),H6=e=>U6(e)?0:e,wb=(e,t,n)=>F6(B6(H6(e),t),n);function Oh(e){if(!N6(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]=Oh(o))}return n}function Ih(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function z6(e,t){if(e==null)throw new Error(t())}function j6(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 $6=Object.defineProperty,V6=(e,t,n)=>t in e?$6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rh=(e,t,n)=>V6(e,typeof t!="symbol"?t+"":t,n),Cb=()=>{},Yl=e=>typeof e=="object"&&e!==null,cs=e=>e?"":void 0,Ab=e=>e?"true":void 0,q6=1,Y6=9,G6=11,Jt=e=>Yl(e)&&e.nodeType===q6&&typeof e.nodeName=="string",Gl=e=>Yl(e)&&e.nodeType===Y6,W6=e=>Yl(e)&&e===e.window,vb=e=>Jt(e)?e.localName||"":"#document";function X6(e){return["html","body","#document"].includes(vb(e))}var K6=e=>Yl(e)&&e.nodeType!==void 0,go=e=>K6(e)&&e.nodeType===G6&&"host"in e,Q6=e=>Jt(e)&&e.localName==="input",J6=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function qa(e){if(!e)return!1;const t=e.getRootNode();return hs(t)===e}var Z6=/(textarea|select)/;function e4(e){if(e==null||!Jt(e))return!1;try{return Q6(e)&&e.selectionStart!=null||Z6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ds(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&go(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Dr(e){var t;return Gl(e)?e:W6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function t4(e){return Dr(e).documentElement}function fs(e){var t,n,r;return go(e)?fs(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function hs(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 n4(e){if(vb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||t4(e);return go(t)?t.host:t}function Lh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||go(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Dh=new WeakMap;function ps(e){return Dh.has(e)||Dh.set(e,fs(e).getComputedStyle(e)),Dh.get(e)}var Mh=new Set(["menu","listbox","dialog","grid","tree","region"]),r4=e=>Mh.has(e),kb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Pb(e,t){const n=new Set,r=Lh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(g&&r4(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Nb(e,t){const n=Lh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";g&&Mh.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function i4(e){const t=new Set;return Nb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function o4(e){const t=e.getAttribute("role");return!!(t&&Mh.has(t))}function s4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function a4(e){var t;return s4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function u4(e){if(!e.id)return!1;const t=Lh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&o4(e))}var Fh=()=>typeof document!="undefined";function l4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Bh=e=>Fh()&&e.test(l4()),c4=e=>Fh()&&e.test(navigator.vendor),Ob=()=>Fh()&&!!navigator.maxTouchPoints,d4=()=>Bh(/^iPhone/i),f4=()=>Bh(/^iPad/i)||Uh()&&navigator.maxTouchPoints>1,Wl=()=>d4()||f4(),h4=()=>Uh()||Wl(),Uh=()=>Bh(/^Mac/i),p4=()=>h4()&&c4(/apple/i);function m4(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 gr(e){var n;const t=m4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ib=e=>e.button===0,g4=e=>e.button===2||Uh()&&e.ctrlKey&&e.button===0,E4=e=>"touches"in e&&e.touches.length>0,y4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Rb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function b4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=y4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Rb&&(o=Rb[o]),o}function Lb(e,t="client"){const n=E4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(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)}},Db=e=>Jt(e)&&e.tagName==="IFRAME",T4=/^(audio|video|details)$/;function Mb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var _4=e=>!Number.isNaN(Mb(e)),S4=e=>Mb(e)<0;function x4(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 Fb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=x4(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}o.push(...p)}}return r}var Xl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Bb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&o.length===0)&&Jt(e)&&Mr(e)&&o.unshift(e);const u=[];for(const c of o)if(Mr(c)){if(Db(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Bb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Fb(u,r,Mr):u};function Mr(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Xl)&&J6(e)}function ms(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));n&&Eo(e)&&o.unshift(e);const a=[];for(const u of o)if(Eo(u)){if(Db(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ms(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Fb(a,r,Eo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Eo(e){return Jt(e)&&e.tabIndex>0?!0:Mr(e)&&!S4(e)}function w4(e,t={}){const n=ms(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function C4(e,t={}){const{current:n,getShadowRoot:r}=t,o=ms(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:hs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ya(e){return e.tabIndex<0&&(T4.test(e.localName)||e4(e))&&!_4(e)?0:e.tabIndex}function Ub(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=ms(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var A4=class j2{constructor(){Rh(this,"id",null),Rh(this,"fn_cleanup"),Rh(this,"cleanup",()=>{this.cancel()})}static create(){return new j2}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 Vt(e){const t=A4.create();return t.request(e),t.cleanup}function Hb(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 Hh(e){const t=n4(e);return X6(t)?Dr(t).body:Jt(t)&&P4(t)?t:Hh(t)}var v4=/auto|scroll|overlay|hidden|clip/,k4=new Set(["inline","contents"]);function P4(e){const t=fs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return v4.test(n+o+r)&&!k4.has(a)}var gs="default",zh="",Kl=new WeakMap;function N4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(gs==="default"&&(zh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),gs="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>O4({target:t,doc:r})}function O4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Wl()){if(gs!=="disabled")return;gs="restoring",setTimeout(()=>{Hb(()=>{gs==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=zh||""),zh="",gs="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function I4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),o=t?Vt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(N4(pe(D({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function R4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Lb(c),f=Math.sqrt(ea(d.x,2)+ea(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Lb(c);r({point:d,event:c})},u=[Zt(e,"pointermove",o,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),I4({doc:e})];return()=>{u.forEach(c=>c())}}function L4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[g,T]=w4(e,{includeContainer:!0,getShadowRoot:a}),y=C4(c,{current:n,getShadowRoot:a}),_=!g&&!T;f.shiftKey&&qa(y)?(o==null||o(),p=T):f.shiftKey&&(qa(g)||_)?p=n:!f.shiftKey&&qa(n)?(o==null||o(),p=g):!f.shiftKey&&(qa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function D4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=cn(c,["defer","triggerElement"]),a=n?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(L4(d,D({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function M4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return Cb;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 F4(e,t,n){if(!e)return Cb;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 B4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function U4(e,t){const{timeout:n,rootNode:r}=t,o=fs(r),a=Dr(r),u=new o.AbortController;return B4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var H4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),z4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,zb=e=>{const t={};let n;for(;n=z4.exec(e);)t[n[1]]=n[2];return t},j4=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=zb(e)}else ql(t)&&(t=zb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function qt(...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]=H4(t[o],n[o]);continue}if(o==="style"){t[o]=j4(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 pU(e){return e}var Es=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Es||{}),jh="__init__";function $4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>hs(t()),a=u=>t().getElementById(u);return pe(D({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:qa,getById:a})}function V4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ys=()=>e=>Array.from(new Set(e)),jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Jl(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var k,A;const _=d.current,S=ls(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(A=(k=e()).onChange)==null||A.call(k,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Go.flushSync:L6)(()=>f(y))},invoke(y,_){var S,k;(k=(S=e()).onChange)==null||k.call(S,y,_)},hash(y){var _,S,k;return(k=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?k:String(y)}}}Jl.cleanup=e=>{B.useEffect(()=>e,[])},Jl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function q4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Y4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var oe,ce,de,ne,Te,Ie;const n=B.useMemo(()=>{const{id:ue,ids:Q,getRootNode:re}=t;return $4({id:ue,ids:Q,getRootNode:re})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Oh(t),scope:n}))!=null?ce:t,a=G4(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Jl,scope:n,flush:Vb,getContext(){return d},getComputed(){return q},getRefs(){return S},getEvent(){return y()}}),c=$b(u),d={get(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].ref.current},set(ue,Q){var re;(re=c.current)==null||re[ue].set(Q)},initial(ue){var Q;return(Q=c.current)==null?void 0:Q[ue].initial},hash(ue){var re,v;const Q=(re=c.current)==null?void 0:re[ue].get();return(v=c.current)==null?void 0:v[ue].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),g=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(D({},T.current),{current(){return T.current},previous(){return g.current}}),_=()=>pe(D({},F),{matches(...ue){return ue.includes(F.ref.current)},hasTag(ue){var Q,re;return!!((re=(Q=e.states[F.ref.current])==null?void 0:Q.tags)!=null&&re.includes(ue))}}),S=q4((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),k=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:A,guard:N,track:Y4,refs:S,computed:q,flush:Vb,scope:n,choose:U}),A=ue=>{const Q=ls(ue)?ue(k()):ue;if(!Q)return;const re=Q.map(v=>{var te,O;const M=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[v];return M||Ih(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),M});for(const v of re)v==null||v(k())},N=ue=>{var Q,re;return ls(ue)?ue(k()):(re=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:re[ue](k())},C=ue=>{const Q=ls(ue)?ue(k()):ue;if(!Q)return;const re=Q.map(M=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return te||Ih(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),te}),v=[];for(const M of re){const te=M==null?void 0:M(k());te&&v.push(te)}return()=>v.forEach(M=>M==null?void 0:M())},U=ue=>b6(ue).find(Q=>{let re=!Q.guard;return ql(Q.guard)?re=!!N(Q.guard):ls(Q.guard)&&(re=Q.guard(k())),re}),q=ue=>{z6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ue];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:q})},F=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,Q){var v,M,te,O;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&A((v=e.states[Q])==null?void 0:v.exit),A((M=p.current)==null?void 0:M.actions);const re=C((te=e.states[ue])==null?void 0:te.effects);if(re&&f.current.set(ue,re),Q===jh){A(e.entry);const _e=C(e.effects);_e&&f.current.set(jh,_e)}A((O=e.states[ue])==null?void 0:O.entry)}})),Y=B.useRef(void 0),ie=B.useRef(Es.NotStarted);jb(()=>{queueMicrotask(()=>{var M;const re=ie.current===Es.Started;ie.current=Es.Started,r(re?"rehydrating...":"initializing...");const v=(M=Y.current)!=null?M:F.initial;F.invoke(v,re?F.get():jh)});const ue=f.current,Q=F.ref.current;return()=>{r("unmounting..."),Y.current=Q,ie.current=Es.Stopped,ue.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ge=()=>"ref"in F?F.ref.current:F.get(),$=ue=>{queueMicrotask(()=>{var O,_e,Me,ke,He;if(ie.current!==Es.Started)return;g.current=T.current,T.current=ue;let Q=ge();const re=(Me=(O=e.states[Q].on)==null?void 0:O[ue.type])!=null?Me:(_e=e.on)==null?void 0:_e[ue.type],v=U(re);if(!v)return;p.current=v;const M=(ke=v.target)!=null?ke:Q;r("transition",ue.type,v.target||Q,`(${v.actions})`);const te=M!==Q;te?Go.flushSync(()=>F.set(M)):v.reenter&&!te?F.invoke(Q,Q):A((He=v.actions)!=null?He:[])})};return(Ie=e.watch)==null||Ie.call(e,k()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:q,event:y(),getStatus:()=>ie.current}}function $b(e){const t=B.useRef(e);return t.current=e,t}function G4(e){const t=$b(e);return function(r){return t.current[r]}}function Vb(e){queueMicrotask(()=>{Go.flushSync(()=>e())})}var $h=V4(e=>e);function ec(...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 W4(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 Vh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=cn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(D({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=W4(c);return B.cloneElement(c,pe(D({},qt(u,c.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gn=(()=>{const e=new Map;return new Proxy(Vh,{apply(t,n,r){return Vh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Vh(r)),e.get(r)}})})();function X4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function yo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const g=new Error(a!=null?a:X4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[K4,qh]=yo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[qb,Ga]=yo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Yb=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:ec(r.ref,t)}))});Yb.displayName="PopoverContent";const Gb=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:t}))});Gb.displayName="PopoverPositioner";const Wa=()=>(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]},[{},D({},e)]),Wb=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Q4(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 J4={props({props:e}){return pe(D({},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",ps(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"});Vt(()=>{var c,d;const u=tc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Vt(()=>{e.set("prevAnimationName",tc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(t.get("styles"));gr(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 c=Ql(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Hb(()=>c())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}ys()(["onExitComplete","present","immediate"]);function Z4(e,t={}){const{sync:n=!1}=t,r=eD(e);return B.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 eD(e){const t=B.useRef(e);return t.current=e,t}const Yh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=cn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(D({},a),{present:r,onExitComplete:Z4(e.onExitComplete)}),d=Zl(J4,c),f=Q4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,g=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:g,present:f.present,unmounted:p}};var bo=(e,t=[])=>({parts:(...n)=>{if(tD(t))return bo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>bo(e,[...t,...n]),omit:(...n)=>bo(e,t.filter(r=>!n.includes(r))),rename:n=>bo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bs(e)}"][data-part="${bs(r)}"]`,`& [data-scope="${bs(e)}"][data-part="${bs(r)}"]`].join(", "),attrs:{"data-scope":bs(e),"data-part":bs(r)}}}),{})}),bs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),tD=e=>e.length===0;const nD=["top","right","bottom","left"],Oi=Math.min,$n=Math.max,nc=Math.round,rc=Math.floor,Fr=e=>({x:e,y:e}),rD={left:"right",right:"left",bottom:"top",top:"bottom"},iD={start:"end",end:"start"};function Gh(e,t,n){return $n(e,Oi(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function si(e){return e.split("-")[0]}function Ts(e){return e.split("-")[1]}function Wh(e){return e==="x"?"y":"x"}function Xh(e){return e==="y"?"height":"width"}const oD=new Set(["top","bottom"]);function Br(e){return oD.has(si(e))?"y":"x"}function Kh(e){return Wh(Br(e))}function sD(e,t,n){n===void 0&&(n=!1);const r=Ts(e),o=Kh(e),a=Xh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function aD(e){const t=ic(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.replace(/start|end/g,t=>iD[t])}const Xb=["left","right"],Kb=["right","left"],uD=["top","bottom"],lD=["bottom","top"];function cD(e,t,n){switch(e){case"top":case"bottom":return n?t?Kb:Xb:t?Xb:Kb;case"left":case"right":return t?uD:lD;default:return[]}}function dD(e,t,n,r){const o=Ts(e);let a=cD(si(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Qh)))),a}function ic(e){return e.replace(/left|right|bottom|top/g,t=>rD[t])}function fD(e){return D({top:0,right:0,bottom:0,left:0},e)}function Qb(e){return typeof e!="number"?fD(e):{top:e,right:e,bottom:e,left:e}}function oc(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 Jb(e,t,n){let{reference:r,floating:o}=e;const a=Br(t),u=Kh(t),c=Xh(u),d=si(t),f=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Ts(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const hD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=Jb(f,r,d),T=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:k,fn:A}=c[S],{x:N,y:C,data:U,reset:q}=yield A({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=N!=null?N:p,g=C!=null?C:g,y=pe(D({},y),{[k]:D(D({},y[k]),U)}),q&&_<=50&&(_++,typeof q=="object"&&(q.placement&&(T=q.placement),q.rects&&(f=q.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):q.rects),{x:p,y:g}=Jb(f,T,d)),S=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function Xa(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:T=!1,padding:y=0}=oi(t,e),_=Qb(y),k=c[T?g==="floating"?"reference":"floating":g],A=oc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(k))==null||n?k:k.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(C))?(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},q=oc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(A.top-q.top+_.top)/U.y,bottom:(q.bottom-A.bottom+_.bottom)/U.y,left:(A.left-q.left+_.left)/U.x,right:(q.right-A.right+_.right)/U.x}})}const pD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=oi(e,n)||{};if(p==null)return{};const T=Qb(g),y={x:r,y:o},_=Kh(a),S=Xh(_),k=yield c.getDimensions(p),A=_==="y",N=A?"top":"left",C=A?"bottom":"right",U=A?"clientHeight":"clientWidth",q=u.reference[S]+u.reference[_]-y[_]-u.floating[S],F=y[_]-u.reference[_],Y=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=Y?Y[U]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(Y)))&&(ie=d.floating[U]||u.floating[S]);const ge=q/2-F/2,$=ie/2-k[S]/2-1,oe=Oi(T[N],$),ce=Oi(T[C],$),de=oe,ne=ie-k[S]-ce,Te=ie/2-k[S]/2+ge,Ie=Gh(de,Te,ne),ue=!f.arrow&&Ts(a)!=null&&Te!==Ie&&u.reference[S]/2-(Te<de?oe:ce)-k[S]/2<0,Q=ue?Te<de?Te-de:Te-ne:0;return{[_]:y[_]+Q,data:D({[_]:Ie,centerOffset:Te-Ie-Q},ue&&{alignmentOffset:Q}),reset:ue}})}}),mD=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:c,initialPlacement:d,platform:f,elements:p}=n,Te=oi(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0}=Te,A=cn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=si(a),C=Br(d),U=si(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),F=y||(U||!k?[ic(d)]:aD(d)),Y=S!=="none";!y&&Y&&F.push(...dD(d,k,S,q));const ie=[d,...F],ge=yield Xa(n,A),$=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&$.push(ge[N]),T){const Ie=sD(a,c,q);$.push(ge[Ie[0]],ge[Ie[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(Ie=>Ie<=0)){var ce,de;const Ie=(((ce=u.flip)==null?void 0:ce.index)||0)+1,ue=ie[Ie];if(ue&&(!(T==="alignment"?C!==Br(ue):!1)||oe.every(v=>Br(v.placement)===C?v.overflows[0]>0:!0)))return{data:{index:Ie,overflows:oe},reset:{placement:ue}};let Q=(de=oe.filter(re=>re.overflows[0]<=0).sort((re,v)=>re.overflows[1]-v.overflows[1])[0])==null?void 0:de.placement;if(!Q)switch(_){case"bestFit":{var ne;const re=(ne=oe.filter(v=>{if(Y){const M=Br(v.placement);return M===C||M==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(M=>M>0).reduce((M,te)=>M+te,0)]).sort((v,M)=>v[1]-M[1])[0])==null?void 0:ne[0];re&&(Q=re);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function Zb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eT(e){return nD.some(t=>e[t]>=0)}const gD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=oi(e,n),{strategy:o="referenceHidden"}=u,a=cn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Xa(n,pe(D({},a),{elementContext:"reference"})),d=Zb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:eT(d)}}}case"escaped":{const c=yield Xa(n,pe(D({},a),{altBoundary:!0})),d=Zb(c,r.floating);return{data:{escapedOffsets:d,escaped:eT(d)}}}default:return{}}})}}},tT=new Set(["left","top"]);function ED(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=si(n),c=Ts(n),d=Br(n)==="y",f=tT.has(u)?-1:1,p=a&&d?-1:1,g=oi(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const yD=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:c,middlewareData:d}=n,f=yield ED(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(D({},f),{placement:c})}})}}},bD=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}=n,A=oi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:N=>{let{x:C,y:U}=N;return{x:C,y:U}}}}=A,f=cn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield Xa(n,f),T=Br(si(a)),y=Wh(T);let _=p[y],S=p[T];if(u){const N=y==="y"?"top":"left",C=y==="y"?"bottom":"right",U=_+g[N],q=_-g[C];_=Gh(U,_,q)}if(c){const N=T==="y"?"top":"left",C=T==="y"?"bottom":"right",U=S+g[N],q=S-g[C];S=Gh(U,S,q)}const k=d.fn(pe(D({},n),{[y]:_,[T]:S}));return pe(D({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[y]:u,[T]:c}}})})}}},TD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=oi(e,t),p={x:n,y:r},g=Br(o),T=Wh(g);let y=p[T],_=p[g];const S=oi(c,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:D({mainAxis:0,crossAxis:0},S);if(d){const C=T==="y"?"height":"width",U=a.reference[T]-a.floating[C]+k.mainAxis,q=a.reference[T]+a.reference[C]-k.mainAxis;y<U?y=U:y>q&&(y=q)}if(f){var A,N;const C=T==="y"?"width":"height",U=tT.has(si(o)),q=a.reference[g]-a.floating[C]+(U&&((A=u.offset)==null?void 0:A[g])||0)+(U?0:k.crossAxis),F=a.reference[g]+a.reference[C]+(U?0:((N=u.offset)==null?void 0:N[g])||0)-(U?k.crossAxis:0);_<q?_=q:_>F&&(_=F)}return{[T]:y,[g]:_}}}},_D=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=oi(e,n),{apply:f=()=>{}}=oe,p=cn(oe,["apply"]),g=yield Xa(n,p),T=si(a),y=Ts(a),_=Br(a)==="y",{width:S,height:k}=u.floating;let A,N;T==="top"||T==="bottom"?(A=T,N=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(N=T,A=y==="end"?"top":"bottom");const C=k-g.top-g.bottom,U=S-g.left-g.right,q=Oi(k-g[A],C),F=Oi(S-g[N],U),Y=!n.middlewareData.shift;let ie=q,ge=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ge=U),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ie=C),Y&&!y){const ce=$n(g.left,0),de=$n(g.right,0),ne=$n(g.top,0),Te=$n(g.bottom,0);_?ge=S-2*(ce!==0||de!==0?ce+de:$n(g.left,g.right)):ie=k-2*(ne!==0||Te!==0?ne+Te:$n(g.top,g.bottom))}yield f(pe(D({},n),{availableWidth:ge,availableHeight:ie}));const $=yield c.getDimensions(d.floating);return S!==$.width||k!==$.height?{reset:{rects:!0}}:{}})}}};function sc(){return typeof window!="undefined"}function _s(e){return nT(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(nT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nT(e){return sc()?e instanceof Node||e instanceof Vn(e).Node:!1}function Er(e){return sc()?e instanceof Element||e instanceof Vn(e).Element:!1}function Hr(e){return sc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function rT(e){return!sc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const SD=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!SD.has(o)}const xD=new Set(["table","td","th"]);function wD(e){return xD.has(_s(e))}const CD=[":popover-open",":modal"];function ac(e){return CD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const AD=["transform","translate","scale","rotate","perspective"],vD=["transform","translate","scale","rotate","perspective","filter"],kD=["paint","layout","strict","content"];function Jh(e){const t=Zh(),n=Er(e)?yr(e):e;return AD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vD.some(r=>(n.willChange||"").includes(r))||kD.some(r=>(n.contain||"").includes(r))}function PD(e){let t=Ii(e);for(;Hr(t)&&!Ss(t);){if(Jh(t))return t;if(ac(t))return null;t=Ii(t)}return null}function Zh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ND=new Set(["html","body","#document"]);function Ss(e){return ND.has(_s(e))}function yr(e){return Vn(e).getComputedStyle(e)}function uc(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ii(e){if(_s(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rT(e)&&e.host||Ur(e);return rT(t)?t.host:t}function iT(e){const t=Ii(e);return Ss(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Ka(t)?t:iT(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=iT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(o);if(a){const c=ep(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],c&&n?Qa(c):[])}return t.concat(o,Qa(o,[],n))}function ep(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oT(e){const t=yr(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,c=nc(n)!==a||nc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function tp(e){return Er(e)?e:e.contextElement}function xs(e){const t=tp(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=oT(t);let u=(a?nc(n.width):n.width)/r,c=(a?nc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const OD=Fr(0);function sT(e){const t=Vn(e);return!Zh()||!t.visualViewport?OD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ID(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function To(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=tp(e);let u=Fr(1);t&&(r?Er(r)&&(u=xs(r)):u=xs(e));const c=ID(a,n,r)?sT(a):Fr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const T=Vn(a),y=r&&Er(r)?Vn(r):r;let _=T,S=ep(_);for(;S&&r&&y!==_;){const k=xs(S),A=S.getBoundingClientRect(),N=yr(S),C=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*k.x,U=A.top+(S.clientTop+parseFloat(N.paddingTop))*k.y;d*=k.x,f*=k.y,p*=k.x,g*=k.y,d+=C,f+=U,_=Vn(S),S=ep(_)}}return oc({width:p,height:g,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:To(Ur(e)).left+n}function aT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function RD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ur(r),c=t?ac(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),g=Hr(r);if((g||!g&&!a)&&((_s(r)!=="body"||Ka(u))&&(d=uc(r)),Hr(r))){const y=To(r);f=xs(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?aT(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 LD(e){return Array.from(e.getClientRects())}function DD(e){const t=Ur(e),n=uc(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const uT=25;function MD(e,t){const n=Vn(e),r=Ur(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Zh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=uT&&(a-=_)}else f<=uT&&(a+=f);return{width:a,height:u,x:c,y:d}}const FD=new Set(["absolute","fixed"]);function BD(e,t){const n=To(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Hr(e)?xs(e):Fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function lT(e,t,n){let r;if(t==="viewport")r=MD(e,n);else if(t==="document")r=DD(Ur(e));else if(Er(t))r=BD(t,n);else{const o=sT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return oc(r)}function cT(e,t){const n=Ii(e);return n===t||!Er(n)||Ss(n)?!1:yr(n).position==="fixed"||cT(n,t)}function UD(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(c=>Er(c)&&_s(c)!=="body"),o=null;const a=yr(e).position==="fixed";let u=a?Ii(e):e;for(;Er(u)&&!Ss(u);){const c=yr(u),d=Jh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&FD.has(o.position)||Ka(u)&&!d&&cT(e,u))?r=r.filter(p=>p!==u):o=c,u=Ii(u)}return t.set(e,r),r}function HD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:UD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=lT(t,p,o);return f.top=$n(g.top,f.top),f.right=Oi(g.right,f.right),f.bottom=Oi(g.bottom,f.bottom),f.left=$n(g.left,f.left),f},lT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function zD(e){const{width:t,height:n}=oT(e);return{width:t,height:n}}function jD(e,t,n){const r=Hr(t),o=Ur(t),a=n==="fixed",u=To(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=lc(o)}if(r||!r&&!a)if((_s(t)!=="body"||Ka(o))&&(c=uc(t)),r){const y=To(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?aT(o,c):Fr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function np(e){return yr(e).position==="static"}function dT(e,t){if(!Hr(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function fT(e,t){const n=Vn(e);if(ac(e))return n;if(!Hr(e)){let o=Ii(e);for(;o&&!Ss(o);){if(Er(o)&&!np(o))return o;o=Ii(o)}return n}let r=dT(e,t);for(;r&&wD(r)&&np(r);)r=dT(r,t);return r&&Ss(r)&&np(r)&&!Jh(r)?n:r||PD(e)||n}const $D=function(e){return et(this,null,function*(){const t=this.getOffsetParent||fT,n=this.getDimensions,r=yield n(e.floating);return{reference:jD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function VD(e){return yr(e).direction==="rtl"}const qD={convertOffsetParentRelativeRectToViewportRelativeRect:RD,getDocumentElement:Ur,getClippingRect:HD,getOffsetParent:fT,getElementRects:$D,getClientRects:LD,getDimensions:zD,getScale:xs,isElement:Er,isRTL:VD};function hT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YD(e,t){let n=null,r;const o=Ur(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:g,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=rc(g),S=rc(o.clientWidth-(p+T)),k=rc(o.clientHeight-(g+y)),A=rc(p),C={rootMargin:-_+"px "+-S+"px "+-k+"px "+-A+"px",threshold:$n(0,Oi(1,d))||1};let U=!0;function q(F){const Y=F[0].intersectionRatio;if(Y!==d){if(!U)return u();Y?u(!1,Y):r=setTimeout(()=>{u(!1,1e-7)},1e3)}Y===1&&!hT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(q,pe(D({},C),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(q,C)}n.observe(e)}return u(!0),a}function GD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=tp(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const g=f&&c?YD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[N]=A;N&&N.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 _,S=d?To(e):null;d&&k();function k(){const A=To(e);S&&!hT(S,A)&&n(),S=A,_=requestAnimationFrame(k)}return n(),()=>{var A;p.forEach(N=>{o&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),g==null||g(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const WD=yD,XD=bD,KD=mD,QD=_D,JD=gD,ZD=pD,e5=TD,t5=(e,t,n)=>{const r=new Map,o=D({platform:qD},n),a=pe(D({},o.platform),{_c:r});return hD(e,t,pe(D({},o),{platform:a}))};function pT(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(D({},o),{toJSON:()=>o})}function n5(e){if(!e)return pT();const{x:t,y:n,width:r,height:o}=e;return pT(t,n,r,o)}function r5(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?n5(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")},i5=e=>e==="top"||e==="bottom"?"y":"x";function o5(e,t){return{name:"transformOrigin",fn(n){var ge,$,oe,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=i5(d),p=((ge=o.arrow)==null?void 0:ge.x)||0,g=(($=o.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,S=g+y/2,k=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),A=u.reference.height/2,N=y/2,C=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,U=typeof C=="number"?C+N:C!=null?C:N,q=k>U,F={top:`${_}px calc(100% + ${U}px)`,bottom:`${_}px ${-U}px`,left:`calc(100% + ${U}px) ${S}px`,right:`${-U}px ${S}px`}[d],Y=`${_}px ${u.reference.y+A-c}px`,ie=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(ai.transformOrigin.variable,ie?Y:F),{data:{transformOrigin:ie?Y:F}}}}}var s5={name:"rects",fn({rects:e}){return{data:e}}},a5=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 u5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var l5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function mT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function rp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function c5(e,t,n){const r=e||t.createElement("div");return ZD({element:r,padding:n.arrowPadding})}function d5(e,t){var n;if(!A6((n=t.offset)!=null?n:t.gutter))return WD(({placement:r})=>{var p,g,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=u5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Oh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function f5(e){if(!e.flip)return;const t=rp(e.boundary);return KD(pe(D({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function h5(e){if(!e.slide&&!e.overlap)return;const t=rp(e.boundary);return XD(pe(D({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:e5()}))}function p5(e){return QD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function m5(e){var t;if(e.hideWhenDetached)return JD({strategy:"referenceHidden",boundary:(t=rp(e.boundary))!=null?t:"clippingAncestors"})}function g5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function E5(e,t,n={}){const r=r5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},l5,n),a=t.querySelector("[data-part=arrow]"),u=[d5(a,o),f5(o),h5(o),c5(a,t.ownerDocument,o),a5(a),o5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),p5(o),m5(o),s5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,g=()=>et(null,null,function*(){var U;if(!r||!t)return;const S=yield t5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const k=fs(t),A=mT(k,S.x),N=mT(k,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${N}px`),o.hideWhenDetached&&(((U=S.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=ps(C);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=g5(o.listeners),_=o.listeners?GD(r,t,T,y):D6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function gT(e,t,n={}){const c=n,{defer:r}=c,o=cn(c,["defer"]),a=r?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(E5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var y5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function b5(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?y5[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 ws=new WeakMap,cc=new WeakMap,dc={},ip=0,ET=e=>e&&(e.host||ET(e.parentNode)),T5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ET(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),_5=new Set(["script","output","status","next-route-announcer"]),S5=e=>_5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),x5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=T5(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const c=dc[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Jt(y)&&Nb(y,_=>{g(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(S5(_))return;const k=_.getAttribute(o)==="true",A=(ws.get(_)||0)+1,N=(c.get(_)||0)+1;ws.set(_,A),c.set(_,N),d.push(_),A===1&&k&&cc.set(_,!0),N===1&&_.setAttribute(r,""),k||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return T(n),f.clear(),ip++,()=>{d.forEach(y=>{const _=ws.get(y)-1,S=c.get(y)-1;ws.set(y,_),c.set(y,S),_||(cc.has(y)||y.removeAttribute(o),cc.delete(y)),S||y.removeAttribute(r)}),ip--,ip||(ws=new WeakMap,ws=new WeakMap,cc=new WeakMap,dc={})}},w5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,C5=(e,t=w5(e),n="data-aria-hidden",r=!0)=>{if(t)return x5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},A5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function yT(e,t={}){const{defer:n=!0}=t,r=n?A5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(C5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function v5(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 k5(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 bT="pointerdown.outside",TT="focus.outside";function P5(e){for(const t of e)if(Jt(t)&&Mr(t))return!0;return!1}var _T=e=>"clientY"in e;function N5(e,t){if(!_T(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 O5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ST(e,t){if(!t||!_T(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return O5(u,c)?r||a:!1}function I5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=fs(e),p=v5(f),g=k5(f);function T(C,U){if(!Jt(U)||!U.isConnected||ds(e,U)||N5(e,C)||c&&Pb(e,U))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const Y=Hh(q);if(ST(C,Y))return!1}const F=Hh(e);return ST(C,F)?!1:!(n!=null&&n(U))}const y=new Set,_=go(e==null?void 0:e.getRootNode());function S(C){function U(q){var ge,$;const F=u&&!Ob()?Vt:oe=>oe(),Y=q!=null?q:C,ie=($=(ge=Y==null?void 0:Y.composedPath)==null?void 0:ge.call(Y))!=null?$:[Y==null?void 0:Y.target];F(()=>{const oe=_?ie[0]:gr(C);if(!(!e||!T(C,oe))){if(o||a){const ce=Nh(o,a);e.addEventListener(bT,ce,{once:!0})}xT(e,bT,{bubbles:!1,cancelable:!0,detail:{originalEvent:Y,contextmenu:g4(Y),focusable:P5(ie),target:oe}})}})}C.pointerType==="touch"?(y.forEach(q=>q()),y.add(Zt(d,"click",U,{once:!0})),y.add(g.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const k=new Set,A=setTimeout(()=>{k.add(Zt(d,"pointerdown",S,!0)),k.add(g.addEventListener("pointerdown",S,!0)),k.add(p.addEventListener("pointerdown",S,!0))},0);function N(C){(u?Vt:q=>q())(()=>{var Y,ie;const q=(ie=(Y=C==null?void 0:C.composedPath)==null?void 0:Y.call(C))!=null?ie:[C==null?void 0:C.target],F=_?q[0]:gr(C);if(!(!e||!T(C,F))){if(r||a){const ge=Nh(r,a);e.addEventListener(TT,ge,{once:!0})}xT(e,TT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(F),target:F}})}})}return Ob()||(k.add(Zt(d,"focusin",N,!0)),k.add(g.addEventListener("focusin",N,!0)),k.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(A),y.forEach(C=>C()),k.forEach(C=>C())}}function R5(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(I5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function xT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function L5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Dr(e),"keydown",n,{capture:!0})}var wT="layer:request-dismiss",ir={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=>ds(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ds(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=>ir.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];M5(e,wT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),D5(e,wT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function D5(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 M5(e,t,n){e.addEventListener(t,n,{once:!0})}var CT;function AT(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function F5(e){e.style.pointerEvents=""}function B5(e,t){const n=Dr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(CT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=U4(()=>{const c=o();return Jt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=CT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function U5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ih("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ir.add(f),AT();function p(S){var A,N;const k=gr(S.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(k)||((A=t.onPointerDownOutside)==null||A.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var A,N;const k=gr(S.detail.originalEvent);ir.isInBranch(k)||((A=t.onFocusOutside)==null||A.call(t,S),(N=t.onInteractOutside)==null||N.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var k;ir.isTopMost(e)&&((k=t.onEscapeKeyDown)==null||k.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var C;if(!e)return!1;const k=typeof u=="function"?u():u,A=Array.isArray(k)?k:[k],N=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(Jt);return N&&A.push(...N),A.some(U=>ds(U,S))||ir.isInNestedLayer(e,S)}const _=[a?B5(e,t.persistentElements):void 0,L5(e,T),R5(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),AT(),F5(e),_.forEach(S=>S==null?void 0:S())}}function vT(e,t){const{defer:n}=t,r=n?Vt:a=>a(),o=[];return o.push(r(()=>{const a=ls(e)?e():e;o.push(U5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var H5=Object.defineProperty,z5=(e,t,n)=>t in e?H5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>z5(e,typeof t!="symbol"?t+"":t,n),kT={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()}},j5=[],$5=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const o=gr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ya(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(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ya(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),wt(this,"handlePointerDown",r=>{const o=gr(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()}}),wt(this,"handleClick",r=>{const o=gr(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(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)}}),wt(this,"handleEscapeKey",r=>{V5(r)&&eu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return a4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?u4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(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)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const o=hs(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}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==hs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,q5(r)&&r.select()}}),wt(this,"deactivate",r=>{if(!this.state.active)return this;const o=D({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(),kT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{PT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),wt(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}),wt(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}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),wt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),wt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),wt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||gr(o);this.updateTabbableNodes();let c=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?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!Eo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=Ya(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!Eo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=Ya(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||j5;const n=D({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=>{i4(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?Pb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ms(e,{getShadowRoot:this.config.getShadowRoot}),n=Bb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ya(t[f])>0){c=!0;break}function d(f,p=!0){const g=t.indexOf(f);if(g>=0)return t[g+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Eo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Eo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return kT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?PT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=hs(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,V5=e=>!e.isComposing&&e.key==="Escape",PT=e=>setTimeout(e,0),q5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function NT(e,t={}){let n;const r=Vt(()=>{const o=typeof e=="function"?e():e;if(o){n=new $5(o,pe(D({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 op="data-scroll-lock";function Y5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function OT(e){const t=ps(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function IT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(op))return;const u=OT(r)||OT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(op,"");const d=()=>F4(r,"--scrollbar-width",`${c}px`),f=Y5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ql(o,_)},g=()=>{var q,F;const{scrollX:_,scrollY:S,visualViewport:k}=n,A=(q=k==null?void 0:k.offsetLeft)!=null?q:0,N=(F=k==null?void 0:k.offsetTop)!=null?F:0,C={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(N))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const U=Ql(o,C);return()=>{U==null||U(),n.scrollTo({left:_,top:S,behavior:"instant"})}},T=[d(),Wl()?g():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(op)}}var G5=bo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=G5.build(),RT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},LT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},DT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},W5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},MT=e=>e.getById(RT(e)),Cs=e=>e.getById(LT(e)),As=e=>e.getById(sp(e)),FT=e=>e.getById(DT(e)),K5=e=>e.getById(ap(e)),Q5=e=>e.getById(up(e));function J5(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),T=b5(pe(D({},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(D({id:W5(c)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(D({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(D({},zr.anchor.attrs),{dir:u("dir"),id:RT(c)}))},getTriggerProps(){return t.button(pe(D({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:LT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":sp(c),onPointerDown(y){Ib(y)&&p4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(D({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(D({id:DT(c)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(D({},zr.content.attrs),{dir:u("dir"),id:sp(c),tabIndex:-1,role:"dialog","aria-modal":Ab(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":cs(d),"aria-labelledby":g.title?ap(c):void 0,"aria-describedby":g.description?up(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(D({},zr.title.attrs),{id:ap(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(D({},zr.description.attrs),{id:up(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(D({},zr.closeTrigger.attrs),{dir:u("dir"),id:X5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var Z5={props({props:e}){return pe(D({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:D({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=MT(n))!=null?a:Cs(n);return gT(r,()=>FT(n),pe(D({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>As(n);let o=!0;return vT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Cs(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:D4(()=>As(t),{triggerElement:Cs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?yT(()=>[As(t),Cs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return IT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?NT(()=>As(t),{initialFocus:()=>Ub({root:As(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=MT(n))!=null?u:Cs(n);gT(o,()=>FT(n),pe(D(D({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Vt(()=>{Object.assign(e.get("renderedElements"),{title:!!K5(t),description:!!Q5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Vt(()=>{const n=Ub({root:As(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||Vt(()=>{const a=Cs(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})}}}};ys()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[gU,fc]=yo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[EU,lp]=yo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),eM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,dir:r,getRootNode:n},e),a=Zl(Z5,o);return J5(a,$h)},tM=e=>{const[t,u]=Wb(e),c=u,{children:n}=c,r=cn(c,["children"]),o=eM(r),a=Yh(qt({present:o.open},t));return w.jsx(K4,{value:o,children:w.jsx(qb,{value:a,children:n})})},BT=B.forwardRef((e,t)=>{const n=qh(),r=Ga(),o=qt(pe(D({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(gn.button,pe(D({},o),{ref:t}))});BT.displayName="PopoverTrigger";function nM(e){return It({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 rM(e){return It({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 iM(e){return It({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 oM(e){return It({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 sM(e){return It({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 UT(e){return It({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 aM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=ut(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(tM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(BT,{"aria-label":`Overflow menu for ${t}`,className:X(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(UT,{})}),w.jsx(Gb,{children:w.jsx(Yb,{className:X(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(bb.Provider,{value:d,children:n})})})]})};function HT(e){return It({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 zT(e){return It({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[uM,_o]=yo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),jT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getControlProps(),e);return w.jsx(gn.div,pe(D(D({},r),e),{ref:t}))});jT.displayName="CarouselControl";const $T=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),o=_o(),a=qt(o.getIndicatorProps(n),r);return w.jsx(gn.button,pe(D({},a),{ref:t}))});$T.displayName="CarouselIndicator";const VT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getIndicatorGroupProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});VT.displayName="CarouselIndicatorGroup";const qT=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),o=_o(),a=qt(o.getItemProps(n),r);return w.jsx(gn.div,pe(D({},a),{ref:t}))});qT.displayName="CarouselItem";const YT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getItemGroupProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});YT.displayName="CarouselItemGroup";const GT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getNextTriggerProps(),e);return w.jsx(gn.button,pe(D({},r),{ref:t}))});GT.displayName="CarouselNextTrigger";const WT=B.forwardRef((e,t)=>{const n=_o(),r=qt(n.getPrevTriggerProps(),e);return w.jsx(gn.button,pe(D({},r),{ref:t}))});WT.displayName="CarouselPrevTrigger";function lM(e){const t=ps(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:g}}}function cM(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 XT(e){let t=[];for(const n of e.children)t=t.concat(n,XT(n));return t}function KT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?XT(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!cM(n,g,u))continue;const T=ps(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,k=g[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:k});break;case"center":r[a].center.push({node:p,position:k+g[d]/2});break;case"end":r[a].end.push({node:p,position:k+g[d]});break}}}return r}function QT(e){const t=e.getBoundingClientRect(),n=lM(e),r=KT(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:JT([...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(ZT(0,o.x))),y:JT([...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(ZT(0,o.y)))}}function dM(e,t,n){const r=KT(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var JT=e=>[...new Set(e)],ZT=(e,t)=>n=>Math.max(e,Math.min(t,n)),fM=bo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=fM.build(),hM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},pM=(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}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},mM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},gM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},e_=(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}`},In=e=>e.getById(hc(e)),t_=e=>M4(In(e),"[data-part=item]"),yM=(e,t)=>e.getById(e_(e,t)),n_=e=>{const t=In(e);if(!t)return;const n=ms(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function bM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),k=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(D({},ui.root.attrs),{id:hM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(pe(D({},ui.itemGroup.attrs),{id:hc(u),"data-orientation":c("orientation"),"data-dragging":cs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){ds(N.currentTarget,gr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){ds(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Ib(N))return;const C=gr(N);Mr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:M6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!o("canScrollPrev")||N[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",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:k,[T?"paddingInline":"paddingBlock"]:k,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(pe(D({},ui.item.attrs),{id:pM(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":cs(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(N.index,c("slideCount")),"aria-hidden":Ab(!C),style:{scrollSnapAlign:(()=>{var ie;const U=(ie=N.snapAlign)!=null?ie:"start",q=c("slidesPerMove"),F=q==="auto"?Math.floor(c("slidesPerPage")):q;return(N.index+F)%F===0?U:void 0})()}}))},getControlProps(){return t.element(pe(D({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(D({},ui.prevTrigger.attrs),{id:gM(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(D({},ui.nextTrigger.attrs),{dir:c("dir"),id:mM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(D({},ui.indicatorGroup.attrs),{dir:c("dir"),id:EM(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.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=b4(N,{dir:c("dir"),orientation:c("orientation")}),F=U[q];F==null||F(N)}}))},getIndicatorProps(N){return t.button(pe(D({},ui.indicator.attrs),{dir:c("dir"),id:e_(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":cs(N.readOnly),"data-current":cs(N.index===_),"aria-label":A.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(D({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":cs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var TM={props({props:e}){return j6(e,["slideCount"],"carousel"),pe(D({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:D({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:_M(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 C6(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(In(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=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),n_(e)});return n_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Vt(()=>{o(),Vt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:f.isIntersecting?T6(d,g):_6(d,g)},n.get("slidesInView"));n.set("slidesInView",S6(c))},{root:r,threshold:t("inViewThreshold")});return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return R4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=wb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(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=_b(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=x6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=dM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=wb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=QT(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(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=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=QT(r),c=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]);Vt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=yM(n,e.get("page"));r&&Vt(()=>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 _M(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}ys()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ys()(["index","readOnly"]),ys()(["index","snapAlign"]);const SM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,dir:r,getRootNode:n},e),a=Zl(TM,o);return bM(a,$h)},r_=B.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=SM(n),a=qt(o.getRootProps(),r);return w.jsx(uM,{value:o,children:w.jsx(gn.div,pe(D({},a),{ref:t}))})});r_.displayName="CarouselRoot";const xM=180,wM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},CM=({globalClassName:e,className:t,itemMinWidth:n=xM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const g=Array.from(p),T=g.length,y=B.useRef(null),[_,S]=B.useState(0),{width:k}=_v();B.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[k,T]);const A=wM(r),N=n+A,C=_>0?(_+A)/N:1,U=Math.max(1,Math.floor(C));if(T===0)return null;const q=T>U,F=Math.ceil(T/U),Y=q?Math.max(1,C):U;return w.jsxs(r_,{ref:y,className:X(e,t,`${j}-carousel`),slidesPerPage:Y,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(YT,{className:X(e,`${j}-carousel__item-group`,{"carousel-row-container":!q}),children:g.map((ie,ge)=>w.jsx(qT,{index:ge,className:X(e,`${j}-carousel__item`),children:ie},ge))}),c&&q&&w.jsxs(jT,{className:X(e,`${j}-carousel__control`),children:[w.jsx(WT,{className:X(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(iM,{size:"16px"})}),w.jsx(GT,{className:X(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(oM,{size:"16px"})})]}),u&&q&&w.jsx(VT,{className:X(e,`${j}-carousel__indicator-group`),children:Array.from({length:F},(ie,ge)=>w.jsx($T,{index:ge,className:X(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${ge+1}`},ge))})]})},[AM,vM]=yo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),kM=e=>Wa()(e,["lazyMount","unmountOnExit"]),[PM,tu]=yo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),i_=B.forwardRef((e,t)=>{const n=tu(),r=vM(),o=Yh(pe(D({},r),{present:n.open})),a=qt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(gn.div,pe(D({},a),{ref:ec(o.ref,t)}))});i_.displayName="DialogBackdrop";const cp=B.forwardRef((e,t)=>{const n=tu(),r=Ga(),o=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(gn.div,pe(D({},o),{ref:ec(r.ref,t)}))});cp.displayName="DialogContent";const dp=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getDescriptionProps(),e);return w.jsx(gn.div,pe(D({},r),{ref:t}))});dp.displayName="DialogDescription";const fp=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(gn.div,pe(D({},r),{ref:t}))});fp.displayName="DialogPositioner";var NM=bo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=NM.build(),o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},s_=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`},a_=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`},u_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},pc=e=>e.getById(hp(e)),OM=e=>e.getById(o_(e)),IM=e=>e.getById(s_(e)),RM=e=>e.getById(a_(e)),LM=e=>e.getById(pp(e)),DM=e=>e.getById(mp(e)),MM=e=>e.getById(u_(e));function FM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(D({},So.trigger.attrs),{dir:a("dir"),id:a_(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(pe(D({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:s_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(D({},So.positioner.attrs),{dir:a("dir"),id:o_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(D({},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":c||void 0,"aria-labelledby":c||!f.title?void 0:pp(u),"aria-describedby":f.description?mp(u):void 0}))},getTitleProps(){return t.element(pe(D({},So.title.attrs),{dir:a("dir"),id:pp(u)}))},getDescriptionProps(){return t.element(pe(D({},So.description.attrs),{dir:a("dir"),id:mp(u)}))},getCloseTriggerProps(){return t.button(pe(D({},So.closeTrigger.attrs),{dir:a("dir"),id:u_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var BM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>MM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return D({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 vT(()=>pc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[RM(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 IT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?NT(()=>pc(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")?yT(()=>[pc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Vt(()=>{e.set("rendered",{title:!!LM(t),description:!!DM(t)})})},syncZIndex({scope:e}){Vt(()=>{const t=pc(e);if(!t)return;const n=ps(t);[OM(e),IM(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})}}}};ys()(["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 UM=e=>{const t=B.useId(),{getRootNode:n}=fc(),{dir:r}=lp(),o=D({id:t,getRootNode:n,dir:r},e),a=Zl(BM,o);return FM(a,$h)},l_=e=>{const[t,c]=Wb(e),d=c,{children:n}=d,r=cn(d,["children"]),[o]=kM(t),a=UM(r),u=Yh(qt({present:a.open},t));return w.jsx(PM,{value:a,children:w.jsx(AM,{value:o,children:w.jsx(qb,{value:u,children:n})})})},c_=B.forwardRef((e,t)=>{const n=tu(),r=qt(n.getTitleProps(),e);return w.jsx(gn.h2,pe(D({},r),{ref:t}))});c_.displayName="DialogTitle";const HM=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Ph.Provider,{value:r,children:w.jsx(yb.Provider,{value:o,children:e})})},d_=()=>B.useContext(yb),f_=()=>{const e=B.useContext(Ph);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},zM=`${j}-overflow-menu-button-trigger`,jM=({componentType:e,children:t})=>{const{isOpen:n}=d_(),{closeMenu:r}=f_(),{globalClassName:o}=ut(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${zM}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:X(`${j}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},$M=({componentType:e,className:t})=>{const{toggleMenu:n}=f_(),{isOpen:r}=d_(),{globalClassName:o}=ut();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:X(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:w.jsx(UT,{})})},gp=()=>{const{status:e,entryType:t}=Zn(),{messages:n}=er(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},VM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{previousComponentType:r}=Zn(),o=Va(),a=()=>{gl(r||"dialog"),o()};return t?w.jsx(ri,{className:X(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(HT,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(HT,{}),"Show ",r||"dialog"]})},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{isModalFullscreen:r}=Zn(),o=Va(),a=()=>{wf(!r),o()},u=r?Ok:Ik,c="Toggle Fullscreen";return t?w.jsx(ri,{ariaLabel:c,title:c,className:X(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},YM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{dialogPosition:r}=Zn(),o=Va(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?rM:nM,d=a?"Move right":"Move left";return t?w.jsx(ri,{className:X(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},h_=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=ut(),{mode:a}=Zn(),u=a==="standalone",c=e==="modal",d=c?VM:p_,f=c?qM:YM,p=B.useMemo(()=>r?Lk(r):{},[r]);return w.jsx(HM,{children:w.jsxs("div",{className:X(o,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:X(o,`${j}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:X(o,`${j}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),w.jsx(c_,{className:X(o,`${j}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),w.jsxs("div",{className:X(o,`${j}-${e}-controls`),children:[w.jsx(d,{componentType:e,isIcon:!0}),w.jsx($M,{componentType:e}),w.jsx(N1,{className:X(o,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(jM,{componentType:e,children:[w.jsx(f,{componentType:e}),w.jsx(WM,{componentType:e}),w.jsx(Tb,{componentType:e,onClearChat:t})]})]})})},GM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:X(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsx(Tl,{disabled:r,className:X(t,`${j}-suggestion-button standalone`),onClick:c(d),children:d},d):w.jsx("button",{disabled:r,className:X(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},WM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ut();if(!r)return null;const o=()=>{xi(!1),ml(!0)};return t?w.jsx(ri,{className:X(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(k1,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(k1,{}),"Minimize"]})},p_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),r=Va(),o=()=>{gl("modal"),r()};return t?w.jsx(ri,{className:X(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:w.jsx(zT,{})}):w.jsxs("button",{className:X(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(zT,{}),"Show modal"]})},XM=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=ut(),{askCimPrompts:o,messages:a}=er(),{isLoading:u,handleSuggestion:c}=Or(),d=B.useMemo(()=>{const T=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 a.some(_=>_.name==="conversation_reset")&&r||T},[a,n,r]),f=((g=o.message)==null?void 0:g.suggestions)||[],p=(T,y)=>()=>{c(T,y)};return w.jsxs("div",{className:X(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:X(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:X(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(T=>{var y;return w.jsx(Tl,{disabled:u,className:X(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(T,((y=o.message)==null?void 0:y.eventSourceId)||""),children:T.displayText},T.displayText)})})]})},KM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=ut();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:X(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:X(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:X(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:X(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:X(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:X(r,`${j}-product-tile-pdp`),href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:X(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:X(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:X(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:X(r,`${j}-product-tile-price`),children:c})})]})]})},QM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ut(),o=t;return n?w.jsxs("div",{className:X(r,`${j}-display-products`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(CM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(KM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},JM=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:X(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:X(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(kk,{})," ",t.message||"An error occurred while processing your request."]})}),ZM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Or(),{messages:u}=er(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?hC(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const k=n.suggestions.find(A=>A.displayText===S);k&&o(k,n.eventSourceId||n.id)};return w.jsxs("div",{className:X(e,`${j}-follow-up`),children:[w.jsx("p",{className:X(e,`${j}-text`),children:n.message}),w.jsx(GM,{suggestions:n.suggestions.map(S=>S.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function m_(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 e8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function t8(e,t,n){const o=Ol((n||{}).ignore||[]),a=n8(t);let u=-1;for(;++u<a.length;)zE(e,"text",c);function c(f,p){let g=-1,T;for(;++g<p.length;){const y=p[g],_=T?T.children:void 0;if(o(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const k=g.children.indexOf(f);let A=!1,N=[];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 F=y(...C,q);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=U+1:(_!==U&&N.push({type:"text",value:f.value.slice(_,U)}),Array.isArray(F)?N.push(...F):F&&N.push(F),_=U+C[0].length,A=!0),!T.global)break;C=T.exec(f.value)}return A?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),g.children.splice(k,1,...N)):N=[f],k+N.length}}function n8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([r8(o[0]),i8(o[1])])}return t}function r8(e){return typeof e=="string"?new RegExp(e8(e),"g"):e}function i8(e){return typeof e=="function"?e:function(){return e}}const Ep="phrasing",yp=["autolink","link","image","label"];function o8(){return{transforms:[f8],enter:{literalAutolink:a8,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:d8,literalAutolinkEmail:c8,literalAutolinkHttp:u8,literalAutolinkWww:l8}}}function s8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:":",before:"[ps]",after:"\\/",inConstruct:Ep,notInConstruct:yp}]}}function a8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function u8(e){this.config.exit.autolinkProtocol.call(this,e)}function l8(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 c8(e){this.config.exit.autolinkEmail.call(this,e)}function d8(e){this.exit(e)}function f8(e){t8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,h8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),p8]],{ignore:["link","linkReference"]})}function h8(e,t,n,r,o){let a="";if(!g_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!m8(n)))return!1;const u=g8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function p8(e,t,n,r){return!g_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function m8(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 g8(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=m_(e,"(");let a=m_(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 g_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||uo(n)||wl(n))&&(!t||n!==47)}E_.peek=C8;function E8(){this.buffer()}function y8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function b8(){this.buffer()}function T8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function S8(e){this.exit(e)}function x8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function w8(e){this.exit(e)}function C8(){return"["}function E_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function A8(){return{enter:{gfmFootnoteCallString:E8,gfmFootnoteCall:y8,gfmFootnoteDefinitionLabelString:b8,gfmFootnoteDefinition:T8},exit:{gfmFootnoteCallString:_8,gfmFootnoteCall:S8,gfmFootnoteDefinitionLabelString:x8,gfmFootnoteDefinition:w8}}}function v8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:E_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
32
|
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?y_:k8))),f(),d}}function k8(e,t,n){return t===0?e:y_(e,t,n)}function y_(e,t,n){return(n?"":" ")+e}const P8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];b_.peek=L8;function N8(){return{canContainEols:["delete"],enter:{strikethrough:I8},exit:{strikethrough:R8}}}function O8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:P8}],handlers:{delete:b_}}}function I8(e){this.enter({type:"delete",children:[]},e)}function R8(e){this.exit(e)}function b_(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(D({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function L8(){return"~"}function D8(e){return e.length}function M8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||D8,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],k=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const N=F8(e[p][A]);if(n.alignDelimiters!==!1){const C=o(N);k[A]=C,(d[A]===void 0||C>d[A])&&(d[A]=C)}S.push(N)}u[p]=S,c[p]=k}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)a[g]=T_(r[g]);else{const S=T_(r);for(;++g<f;)a[g]=S}g=-1;const T=[],y=[];for(;++g<f;){const S=a[g];let k="",A="";S===99?(k=":",A=":"):S===108?k=":":S===114&&(A=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[g]-k.length-A.length);const C=k+"-".repeat(N)+A;n.alignDelimiters!==!1&&(N=k.length+N+A.length,N>d[g]&&(d[g]=N),y[g]=N),T[g]=C}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],k=c[p];g=-1;const A=[];for(;++g<f;){const N=S[g]||"";let C="",U="";if(n.alignDelimiters!==!1){const q=d[g]-(k[g]||0),F=a[g];F===114?C=" ".repeat(q):F===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&&!g&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||g)&&A.push(" "),n.alignDelimiters!==!1&&A.push(C),A.push(N),n.alignDelimiters!==!1&&A.push(U),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
|
|
33
33
|
`)}function F8(e){return e==null?"":String(e)}function T_(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 B8(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()),U8);return o(),u}function U8(e,t,n){return">"+(n?"":" ")+e}function H8(e,t){return __(e,t.inConstruct,!0)&&!__(e,t.notInConstruct,!1)}function __(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 S_(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
34
|
`&&H8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|