@cimulate/copilot-widget 1.5.0 → 1.5.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.
@@ -1,43 +1,46 @@
1
- (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie["cimulate-copilot-widget"]={}))})(this,(function(Ie){"use strict";var ZF=Object.defineProperty,eB=Object.defineProperties;var tB=Object.getOwnPropertyDescriptors;var id=Object.getOwnPropertySymbols;var Fx=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable;var Fo=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),nB=Ie=>{throw TypeError(Ie)},sd=Math.pow,$m=(Ie,Fe,Ke)=>Fe in Ie?ZF(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[Fe]=Ke,H=(Ie,Fe)=>{for(var Ke in Fe||(Fe={}))Fx.call(Fe,Ke)&&$m(Ie,Ke,Fe[Ke]);if(id)for(var Ke of id(Fe))Bx.call(Fe,Ke)&&$m(Ie,Ke,Fe[Ke]);return Ie},Te=(Ie,Fe)=>eB(Ie,tB(Fe));var nn=(Ie,Fe)=>{var Ke={};for(var ct in Ie)Fx.call(Ie,ct)&&Fe.indexOf(ct)<0&&(Ke[ct]=Ie[ct]);if(Ie!=null&&id)for(var ct of id(Ie))Fe.indexOf(ct)<0&&Bx.call(Ie,ct)&&(Ke[ct]=Ie[ct]);return Ke};var ve=(Ie,Fe,Ke)=>$m(Ie,typeof Fe!="symbol"?Fe+"":Fe,Ke);var rt=(Ie,Fe,Ke)=>new Promise((ct,kt)=>{var bt=It=>{try{$t(Ke.next(It))}catch(yn){kt(yn)}},Pe=It=>{try{$t(Ke.throw(It))}catch(yn){kt(yn)}},$t=It=>It.done?ct(It.value):Promise.resolve(It.value).then(bt,Pe);$t((Ke=Ke.apply(Ie,Fe)).next())}),Hr=function(Ie,Fe){this[0]=Ie,this[1]=Fe},od=(Ie,Fe,Ke)=>{var ct=(Pe,$t,It,yn)=>{try{var As=Ke[Pe]($t),Bo=($t=As.value)instanceof Hr,ad=As.done;Promise.resolve(Bo?$t[0]:$t).then(rr=>Bo?ct(Pe==="return"?Pe:"next",$t[1]?{done:rr.done,value:rr.value}:rr,It,yn):It({value:rr,done:ad})).catch(rr=>ct("throw",rr,It,yn))}catch(rr){yn(rr)}},kt=Pe=>bt[Pe]=$t=>new Promise((It,yn)=>ct(Pe,$t,It,yn)),bt={};return Ke=Ke.apply(Ie,Fe),bt[Fo("asyncIterator")]=()=>bt,kt("next"),kt("throw"),kt("return"),bt},Vm=Ie=>{var Fe=Ie[Fo("asyncIterator")],Ke=!1,ct,kt={};return Fe==null?(Fe=Ie[Fo("iterator")](),ct=bt=>kt[bt]=Pe=>Fe[bt](Pe)):(Fe=Fe.call(Ie),ct=bt=>kt[bt]=Pe=>{if(Ke){if(Ke=!1,bt==="throw")throw Pe;return Pe}return Ke=!0,{done:!1,value:new Hr(new Promise($t=>{var It=Fe[bt](Pe);It instanceof Object||nB("Object expected"),$t(It)}),1)}}),kt[Fo("iterator")]=()=>kt,ct("next"),"throw"in Fe?ct("throw"):kt.throw=bt=>{throw bt},"return"in Fe&&ct("return"),kt},Ux=(Ie,Fe,Ke)=>(Fe=Ie[Fo("asyncIterator")])?Fe.call(Ie):(Ie=Ie[Fo("iterator")](),Fe={},Ke=(ct,kt)=>(kt=Ie[ct])&&(Fe[ct]=bt=>new Promise((Pe,$t,It)=>(bt=kt.call(Ie,bt),It=bt.done,Promise.resolve(bt.value).then(yn=>Pe({value:yn,done:It}),$t)))),Ke("next"),Ke("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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:4px;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-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:4px;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-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;&.modal{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}.cim-widget-search-input{width:100%;height:-webkit-fill-available;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.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:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;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);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-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{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;border-radius:8px;padding:.5rem 1rem;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;border-radius:8px;padding:.5rem 1rem;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:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;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.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.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}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;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:1rem 1rem 0;margin-bottom:1rem;gap:8px}.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}.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-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:.5rem;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-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;overflow-y:auto;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)}
2
- /*$vite$:1*/`,document.head.appendChild(Fe);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},kt={},bt={exports:{}},Pe={};var $t;function It(){if($t)return Pe;$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"),E=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=E&&L[E]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function k(L,K,O){this.props=L,this.context=K,this.refs=w,this.updater=O||b}k.prototype.isReactComponent={},k.prototype.setState=function(L,K){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,K,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function v(){}v.prototype=k.prototype;function F(L,K,O){this.props=L,this.context=K,this.refs=w,this.updater=O||b}var R=F.prototype=new v;R.constructor=F,_(R,k.prototype),R.isPureReactComponent=!0;var W=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(L,K,O){var _e,Re={},Oe=null,Ge=null;if(K!=null)for(_e in K.ref!==void 0&&(Ge=K.ref),K.key!==void 0&&(Oe=""+K.key),K)X.call(K,_e)&&!te.hasOwnProperty(_e)&&(Re[_e]=K[_e]);var Ye=arguments.length-2;if(Ye===1)Re.children=O;else if(1<Ye){for(var et=Array(Ye),Nt=0;Nt<Ye;Nt++)et[Nt]=arguments[Nt+2];Re.children=et}if(L&&L.defaultProps)for(_e in Ye=L.defaultProps,Ye)Re[_e]===void 0&&(Re[_e]=Ye[_e]);return{$$typeof:e,type:L,key:Oe,ref:Ge,props:Re,_owner:B.current}}function ye(L,K){return{$$typeof:e,type:L.type,key:K,ref:L.ref,props:L.props,_owner:L._owner}}function M(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function ae(L){var K={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return K[O]})}var he=/\/+/g;function ue(L,K){return typeof L=="object"&&L!==null&&L.key!=null?ae(""+L.key):K.toString(36)}function de(L,K,O,_e,Re){var Oe=typeof L;(Oe==="undefined"||Oe==="boolean")&&(L=null);var Ge=!1;if(L===null)Ge=!0;else switch(Oe){case"string":case"number":Ge=!0;break;case"object":switch(L.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=L,Re=Re(Ge),L=_e===""?"."+ue(Ge,0):_e,W(Re)?(O="",L!=null&&(O=L.replace(he,"$&/")+"/"),de(Re,K,O,"",function(Nt){return Nt})):Re!=null&&(M(Re)&&(Re=ye(Re,O+(!Re.key||Ge&&Ge.key===Re.key?"":(""+Re.key).replace(he,"$&/")+"/")+L)),K.push(Re)),1;if(Ge=0,_e=_e===""?".":_e+":",W(L))for(var Ye=0;Ye<L.length;Ye++){Oe=L[Ye];var et=_e+ue(Oe,Ye);Ge+=de(Oe,K,O,et,Re)}else if(et=T(L),typeof et=="function")for(L=et.call(L),Ye=0;!(Oe=L.next()).done;)Oe=Oe.value,et=_e+ue(Oe,Ye++),Ge+=de(Oe,K,O,et,Re);else if(Oe==="object")throw K=String(L),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return Ge}function be(L,K,O){if(L==null)return L;var _e=[],Re=0;return de(L,_e,"","",function(Oe){return K.call(O,Oe,Re++)}),_e}function Ce(L){if(L._status===-1){var K=L._result;K=K(),K.then(function(O){(L._status===0||L._status===-1)&&(L._status=1,L._result=O)},function(O){(L._status===0||L._status===-1)&&(L._status=2,L._result=O)}),L._status===-1&&(L._status=0,L._result=K)}if(L._status===1)return L._result.default;throw L._result}var oe={current:null},q={transition:null},ne={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:be,forEach:function(L,K,O){be(L,function(){K.apply(this,arguments)},O)},count:function(L){var K=0;return be(L,function(){K++}),K},toArray:function(L){return be(L,function(K){return K})||[]},only:function(L){if(!M(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Pe.Component=k,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=F,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Pe.act=S,Pe.cloneElement=function(L,K,O){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var _e=_({},L.props),Re=L.key,Oe=L.ref,Ge=L._owner;if(K!=null){if(K.ref!==void 0&&(Oe=K.ref,Ge=B.current),K.key!==void 0&&(Re=""+K.key),L.type&&L.type.defaultProps)var Ye=L.type.defaultProps;for(et in K)X.call(K,et)&&!te.hasOwnProperty(et)&&(_e[et]=K[et]===void 0&&Ye!==void 0?Ye[et]:K[et])}var et=arguments.length-2;if(et===1)_e.children=O;else if(1<et){Ye=Array(et);for(var Nt=0;Nt<et;Nt++)Ye[Nt]=arguments[Nt+2];_e.children=Ye}return{$$typeof:e,type:L.type,key:Re,ref:Oe,props:_e,_owner:Ge}},Pe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Pe.createElement=ge,Pe.createFactory=function(L){var K=ge.bind(null,L);return K.type=L,K},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(L){return{$$typeof:c,render:L}},Pe.isValidElement=M,Pe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Ce}},Pe.memo=function(L,K){return{$$typeof:f,type:L,compare:K===void 0?null:K}},Pe.startTransition=function(L){var K=q.transition;q.transition={};try{L()}finally{q.transition=K}},Pe.unstable_act=S,Pe.useCallback=function(L,K){return oe.current.useCallback(L,K)},Pe.useContext=function(L){return oe.current.useContext(L)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(L){return oe.current.useDeferredValue(L)},Pe.useEffect=function(L,K){return oe.current.useEffect(L,K)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(L,K,O){return oe.current.useImperativeHandle(L,K,O)},Pe.useInsertionEffect=function(L,K){return oe.current.useInsertionEffect(L,K)},Pe.useLayoutEffect=function(L,K){return oe.current.useLayoutEffect(L,K)},Pe.useMemo=function(L,K){return oe.current.useMemo(L,K)},Pe.useReducer=function(L,K,O){return oe.current.useReducer(L,K,O)},Pe.useRef=function(L){return oe.current.useRef(L)},Pe.useState=function(L){return oe.current.useState(L)},Pe.useSyncExternalStore=function(L,K,O){return oe.current.useSyncExternalStore(L,K,O)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function As(){return yn||(yn=1,bt.exports=It()),bt.exports}var Bo;function ad(){if(Bo)return kt;Bo=1;var e=As(),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,E={},T=null,b=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(b=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(E[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)E[p]===void 0&&(E[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:b,props:E,_owner:o.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var rr;function $x(){return rr||(rr=1,ct.exports=ad()),ct.exports}var C=$x();const Tr=Object.create(null);Tr.open="0",Tr.close="1",Tr.ping="2",Tr.pong="3",Tr.message="4",Tr.upgrade="5",Tr.noop="6";const Su=Object.create(null);Object.keys(Tr).forEach(e=>{Su[Tr[e]]=e});const ud={type:"error",data:"parser error"},qm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ym=typeof ArrayBuffer=="function",Wm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ld=({type:e,data:t},n,r)=>qm&&t instanceof Blob?n?r(t):Gm(t,r):Ym&&(t instanceof ArrayBuffer||Wm(t))?n?r(t):Gm(new Blob([t]),r):r(Tr[e]+(t||"")),Gm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Km(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cd;function Vx(e,t){if(qm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Km).then(t);if(Ym&&(e.data instanceof ArrayBuffer||Wm(e.data)))return t(Km(e.data));ld(e,!1,n=>{cd||(cd=new TextEncoder),t(cd.encode(n))})}const Qm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Qm.length;e++)Uo[Qm.charCodeAt(e)]=e;const qx=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=Uo[e.charCodeAt(r)],u=Uo[e.charCodeAt(r+1)],c=Uo[e.charCodeAt(r+2)],d=Uo[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},Yx=typeof ArrayBuffer=="function",dd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Xm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Wx(e.substring(1),t)}:Su[n]?e.length>1?{type:Su[n],data:e.substring(1)}:{type:Su[n]}:ud},Wx=(e,t)=>{if(Yx){const n=qx(e);return Xm(n,t)}else return{base64:!0,data:e}},Xm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Jm="",Gx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{ld(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Jm))})})},Kx=(e,t)=>{const n=e.split(Jm),r=[];for(let o=0;o<n.length;o++){const a=dd(n[o],t);if(r.push(a),a.type==="error")break}return r};function Qx(){return new TransformStream({transform(e,t){Vx(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 fd;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function Au(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 Xx(e,t){fd||(fd=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(Cu(n)<1)break;const d=Au(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(Cu(n)<2)break;const d=Au(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=Au(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ud);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<o)break;const d=Au(n,o);c.enqueue(dd(a?d:fd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ud);break}}}})}const Zm=4;function Ft(e){if(e)return Jx(e)}function Jx(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 vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Zx="arraybuffer";function rB(){}function e0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ew=jn.setTimeout,tw=jn.clearTimeout;function ku(e,t){t.useNativeTimers?(e.setTimeoutFn=ew.bind(jn),e.clearTimeoutFn=tw.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const nw=1.33;function rw(e){return typeof e=="string"?iw(e):Math.ceil((e.byteLength||e.size)*nw)}function iw(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 t0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sw(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 aw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hd extends Ft{constructor(t){super(),this.writable=!1,ku(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 aw(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=dd(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=sw(t);return n.length?"?"+n:""}}class uw extends hd{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)};Kx(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,Gx(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=t0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let n0=!1;try{n0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const lw=n0;function cw(){}class dw extends uw{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 _r extends Ft{constructor(t,n,r){super(),this.createRequest=t,ku(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=e0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let 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=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=cw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",r0);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,r0,!1)}}function r0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const fw=(function(){const e=i0({xdomain:!1});return e&&e.responseType!==null})();class hw extends dw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=fw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(i0,this.uri(),t)}}function i0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||lw))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const s0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pw extends hd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=s0?{}:e0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(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;ld(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=t0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pd=jn.WebSocket||jn.MozWebSocket;class mw extends pw{createSocket(t,n,r){return s0?new pd(t,n,r):n?new pd(t,n):new pd(t)}doWrite(t,n){this.ws.send(n)}}class gw extends hd{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=Xx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Qx();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&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ew={websocket:mw,webtransport:gw,polling:hw},yw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bw=["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=yw.exec(e||""),a={},u=14;for(;u--;)a[bw[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=Tw(a,a.path),a.queryKey=_w(a,a.query),a}function Tw(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 _w(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const gd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nu=[];gd&&addEventListener("offline",()=>{Nu.forEach(e=>e())},!1);class li extends Ft{constructor(t,n){if(super(),this.binaryType=Zx,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);ku(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)),gd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Zm,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&&li.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",li.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+=rw(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(li.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(),gd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nu.indexOf(this._offlineEventListener);r!==-1&&Nu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}li.protocol=Zm;class xw extends li{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;li.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;li.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=E=>{const T=new Error("probe error: "+E);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(E){n&&E.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 ww=class extends xw{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Ew[o]).filter(o=>!!o)),super(t,r)}};function Sw(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 Cw=typeof ArrayBuffer=="function",Aw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,o0=Object.prototype.toString,vw=typeof Blob=="function"||typeof Blob!="undefined"&&o0.call(Blob)==="[object BlobConstructor]",kw=typeof File=="function"||typeof File!="undefined"&&o0.call(File)==="[object FileConstructor]";function Ed(e){return Cw&&(e instanceof ArrayBuffer||Aw(e))||vw&&e instanceof Blob||kw&&e instanceof File}function Ou(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ou(e[n]))return!0;return!1}if(Ed(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ou(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ou(e[n]))return!0;return!1}function Nw(e){const t=[],n=e.data,r=e;return r.data=yd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yd(e,t){if(!e)return e;if(Ed(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]=yd(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]=yd(e[r],t));return n}return e}function Ow(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const Iw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Je;(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"})(Je||(Je={}));class Pw{constructor(t){this.replacer=t}encode(t){return(t.type===Je.EVENT||t.type===Je.ACK)&&Ou(t)?this.encodeAsBinary({type:t.type===Je.EVENT?Je.BINARY_EVENT:Je.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Je.BINARY_EVENT||t.type===Je.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=Nw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Td 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===Je.BINARY_EVENT;r||n.type===Je.BINARY_ACK?(n.type=r?Je.EVENT:Je.ACK,this.reconstructor=new Rw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ed(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(Je[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Je.BINARY_EVENT||r.type===Je.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(!Lw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Td.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Je.CONNECT:return a0(n);case Je.DISCONNECT:return n===void 0;case Je.CONNECT_ERROR:return typeof n=="string"||a0(n);case Je.EVENT:case Je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Iw.indexOf(n[0])===-1);case Je.ACK:case Je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Rw{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=Ow(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Lw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function a0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Dw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Td,Encoder:Pw,get PacketType(){return Je}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Mw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Mw.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:Je.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,E=n.pop();this._registerAckCallback(p,E),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)=>r!==this._queue[0]?void 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:Je.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 Je.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 Je.EVENT:case Je.BINARY_EVENT:this.onevent(t);break;case Je.ACK:case Je.BINARY_ACK:this.onack(t);break;case Je.DISCONNECT:this.ondisconnect();break;case Je.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:Je.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.emitReserved("connect"),this._drainQueue(!0)}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:Je.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 vs(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}vs.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},vs.prototype.reset=function(){this.attempts=0},vs.prototype.setMin=function(e){this.ms=e},vs.prototype.setMax=function(e){this.max=e},vs.prototype.setJitter=function(e){this.jitter=e};class _d 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,ku(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 vs({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||Dw;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 ww(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(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(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new u0(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 Ho={};function Iu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Sw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ho[o]&&a in Ho[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):(Ho[o]||(Ho[o]=new _d(r,t)),d=Ho[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Iu,{Manager:_d,Socket:u0,io:Iu,connect:Iu});var Fw=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===Bw})(t)})(e)},Bw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function zo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ks((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Uw(e,t,n){return e.concat(t).map((function(r){return zo(r,n)}))}function l0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function c0(e,t){try{return t in e}catch(n){return!1}}function Hw(e,t,n){var r={};return n.isMergeableObject(e)&&l0(e).forEach((function(o){r[o]=zo(e[o],n)})),l0(t).forEach((function(o){(function(a,u){return c0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(c0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return ks;var c=u.customMerge(a);return typeof c=="function"?c:ks})(o,n)(e[o],t[o],n):r[o]=zo(t[o],n))})),r}function ks(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Uw,n.isMergeableObject=n.isMergeableObject||Fw,n.cloneUnlessOtherwiseSpecified=zo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Hw(e,t,n):zo(t,n)}ks.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return ks(n,r,t)}),{})};var zw=ks;class jw{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return(function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t})(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $w=typeof ArrayBuffer=="function",d0=Object.prototype.toString,Vw=typeof Blob=="function"||typeof Blob!="undefined"&&d0.call(Blob)==="[object BlobConstructor]",qw=typeof File=="function"||typeof File!="undefined"&&d0.call(File)==="[object FileConstructor]";function xd(e){return $w&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Vw&&e instanceof Blob||qw&&e instanceof File}function Pu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Pu(e[n]))return!0;return!1}if(xd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pu(e[n]))return!0;return!1}function Yw(e){const t=[],n=e.data,r=e;return r.data=wd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function wd(e,t){if(!e)return e;if(xd(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]=wd(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]=wd(e[r],t));return n}return e}function Ww(e,t){return e.data=Sd(e.data,t),delete e.attachments,e}function Sd(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]=Sd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sd(e[n],t));return e}const Gw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ct||(Ct={}));class Kw{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Pu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Yw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function f0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Cd extends hn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new Qw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!xd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}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(!Cd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return f0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||f0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Gw.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qw{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=Ww(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const h0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],p0=(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)},m0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Xw=p0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),h0),g0=p0(m0,m0,h0),Jw={Encoder:class extends Kw{encode(e){var t,n;return super.encode(Te(H({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Xw(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 Cd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?g0(r):r)):n instanceof Object?g0(n):n)):t))}}},Zw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class eS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=f=>{console.log("[Copilot SDK] Connect Ack:",f),this.socket.auth={[this.sessionIdKey]:f.sessionId}},this.handleDisconnect=f=>{console.warn(`[Copilot SDK] Disconnected: ${f}`),f!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${f}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=f=>{console.error(`[Copilot SDK] Connect error: ${f.message}`);const p=f.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=p==null?void 0:p[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[Zw,a,{parser:Jw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Iu(u,zw.all(d))}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*sd(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 rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(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 rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return rt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return rt(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 rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return od(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Hr(u({emit:E=>{c.push(E),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Hr(new Promise((E=>{f=E})));for(;c.length>0;)yield c.shift()}finally{yield new Hr(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),()=>rt(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 jw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var $=As();const $i=Ke($);function E0(e,t){return function(){return e.apply(t,arguments)}}const{toString:tS}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:Ru,toStringTag:y0}=Symbol,Lu=(e=>t=>{const n=tS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Lu(t)===e),Du=e=>t=>typeof t===e,{isArray:Ns}=Array,Os=Du("undefined");function jo(e){return e!==null&&!Os(e)&&e.constructor!==null&&!Os(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const b0=sr("ArrayBuffer");function nS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&b0(e.buffer),t}const rS=Du("string"),bn=Du("function"),T0=Du("number"),$o=e=>e!==null&&typeof e=="object",iS=e=>e===!0||e===!1,Mu=e=>{if(Lu(e)!=="object")return!1;const t=Ad(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(y0 in e)&&!(Ru in e)},sS=e=>{if(!$o(e)||jo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},oS=sr("Date"),aS=sr("File"),uS=sr("Blob"),lS=sr("FileList"),cS=e=>$o(e)&&bn(e.pipe),dS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=Lu(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},fS=sr("URLSearchParams"),[hS,pS,mS,gS]=["ReadableStream","Request","Response","Headers"].map(sr),ES=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ns(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(jo(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 _0(e,t){if(jo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Vi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,x0=e=>!Os(e)&&e!==Vi;function vd(){const{caseless:e,skipUndefined:t}=x0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&_0(n,a)||a;Mu(n[u])&&Mu(o)?n[u]=vd(n[u],o):Mu(o)?n[u]=vd({},o):Ns(o)?n[u]=o.slice():(!t||!Os(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Vo(arguments[o],r);return n}const yS=(e,t,n,{allOwnKeys:r}={})=>(Vo(t,(o,a)=>{n&&bn(o)?Object.defineProperty(e,a,{value:E0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),bS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_S=(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&&Ad(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xS=(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},wS=e=>{if(!e)return null;if(Ns(e))return e;let t=e.length;if(!T0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},SS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ad(Uint8Array)),CS=(e,t)=>{const r=(e&&e[Ru]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},AS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},vS=sr("HTMLFormElement"),kS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),w0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),NS=sr("RegExp"),S0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},OS=e=>{S0(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},IS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ns(e)?r(e):r(String(e).split(t)),n},PS=()=>{},RS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function LS(e){return!!(e&&bn(e.append)&&e[y0]==="FormData"&&e[Ru])}const DS=e=>{const t=new Array(10),n=(r,o)=>{if($o(r)){if(t.indexOf(r)>=0)return;if(jo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ns(r)?[]:{};return Vo(r,(u,c)=>{const d=n(u,o+1);!Os(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},MS=sr("AsyncFunction"),FS=e=>e&&($o(e)||bn(e))&&bn(e.then)&&bn(e.catch),C0=((e,t)=>e?setImmediate:t?((n,r)=>(Vi.addEventListener("message",({source:o,data:a})=>{o===Vi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Vi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(Vi.postMessage)),BS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Vi):typeof process!="undefined"&&process.nextTick||C0,Q={isArray:Ns,isArrayBuffer:b0,isBuffer:jo,isFormData:dS,isArrayBufferView:nS,isString:rS,isNumber:T0,isBoolean:iS,isObject:$o,isPlainObject:Mu,isEmptyObject:sS,isReadableStream:hS,isRequest:pS,isResponse:mS,isHeaders:gS,isUndefined:Os,isDate:oS,isFile:aS,isBlob:uS,isRegExp:NS,isFunction:bn,isStream:cS,isURLSearchParams:fS,isTypedArray:SS,isFileList:lS,forEach:Vo,merge:vd,extend:yS,trim:ES,stripBOM:bS,inherits:TS,toFlatObject:_S,kindOf:Lu,kindOfTest:sr,endsWith:xS,toArray:wS,forEachEntry:CS,matchAll:AS,isHTMLForm:vS,hasOwnProperty:w0,hasOwnProp:w0,reduceDescriptors:S0,freezeMethods:OS,toObjectSet:IS,toCamelCase:kS,noop:PS,toFiniteNumber:RS,findKey:_0,global:Vi,isContextDefined:x0,isSpecCompliantForm:LS,toJSONObject:DS,isAsyncFn:MS,isThenable:FS,setImmediate:C0,asap:BS,isIterable:e=>e!=null&&bn(e[Ru])};let He=class Hx extends Error{static from(t,n,r,o,a,u){const c=new Hx(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),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(){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:Q.toJSONObject(this.config),code:this.code,status:this.status}}};He.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",He.ERR_BAD_OPTION="ERR_BAD_OPTION",He.ECONNABORTED="ECONNABORTED",He.ETIMEDOUT="ETIMEDOUT",He.ERR_NETWORK="ERR_NETWORK",He.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",He.ERR_DEPRECATED="ERR_DEPRECATED",He.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",He.ERR_BAD_REQUEST="ERR_BAD_REQUEST",He.ERR_CANCELED="ERR_CANCELED",He.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",He.ERR_INVALID_URL="ERR_INVALID_URL";const US=null;function kd(e){return Q.isPlainObject(e)||Q.isArray(e)}function A0(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function v0(e,t,n){return e?e.concat(t).map(function(o,a){return o=A0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function HS(e){return Q.isArray(e)&&!e.some(kd)}const zS=Q.toFlatObject(Q,{},null,function(t){return/^is[A-Z]/.test(t)});function Fu(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,k){return!Q.isUndefined(k[w])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Q.isDate(_))return _.toISOString();if(Q.isBoolean(_))return _.toString();if(!d&&Q.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(_)||Q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,w,k){let v=_;if(_&&!k&&typeof _=="object"){if(Q.endsWith(w,"{}"))w=r?w:w.slice(0,-2),_=JSON.stringify(_);else if(Q.isArray(_)&&HS(_)||(Q.isFileList(_)||Q.endsWith(w,"[]"))&&(v=Q.toArray(_)))return w=A0(w),v.forEach(function(R,W){!(Q.isUndefined(R)||R===null)&&t.append(u===!0?v0([w],W,a):u===null?w:w+"[]",f(R))}),!1}return kd(_)?!0:(t.append(v0(k,w,a),f(_)),!1)}const E=[],T=Object.assign(zS,{defaultVisitor:p,convertValue:f,isVisitable:kd});function b(_,w){if(!Q.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+w.join("."));E.push(_),Q.forEach(_,function(v,F){(!(Q.isUndefined(v)||v===null)&&o.call(t,v,Q.isString(F)?F.trim():F,w,T))===!0&&b(v,w?w.concat(F):[F])}),E.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return b(e),t}function k0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nd(e,t){this._pairs=[],e&&Fu(e,this,t)}const N0=Nd.prototype;N0.append=function(t,n){this._pairs.push([t,n])},N0.toString=function(t){const n=t?function(r){return t.call(this,r,k0)}:k0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function jS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function O0(e,t,n){if(!t)return e;const r=n&&n.encode||jS,o=Q.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Q.isURLSearchParams(t)?t.toString():new Nd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class I0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$S={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Id=typeof window!="undefined"&&typeof document!="undefined",Pd=typeof navigator=="object"&&navigator||void 0,VS=Id&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),qS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",YS=Id&&window.location.href||"http://localhost",rn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Id,hasStandardBrowserEnv:VS,hasStandardBrowserWebWorkerEnv:qS,navigator:Pd,origin:YS},Symbol.toStringTag,{value:"Module"}))),$S);function WS(e,t){return Fu(e,new rn.classes.URLSearchParams,H({visitor:function(n,r,o,a){return rn.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function GS(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function KS(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 P0(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&&Q.isArray(o)?o.length:u,d?(Q.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!Q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Q.isArray(o[u])&&(o[u]=KS(o[u])),!c)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(GS(r),o,n,0)}),n}return null}function QS(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qo={transitional:Od,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Q.isObject(t);if(a&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(P0(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return WS(t,this.formSerializer).toString();if((c=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Fu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),QS(t)):t}],transformResponse:[function(t){const n=this.transitional||qo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{qo.headers[e]={}});const XS=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),JS=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&XS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},R0=Symbol("internals");function Yo(e){return e&&String(e).trim().toLowerCase()}function Bu(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Bu):String(e)}function ZS(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 eC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rd(e,t,n,r,o){if(Q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function tC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nC(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=Yo(d);if(!p)throw new Error("header name must be a non-empty string");const E=Q.findKey(o,p);(!E||o[E]===void 0||f===!0||f===void 0&&o[E]!==!1)&&(o[E||d]=Bu(c))}const u=(c,d)=>Q.forEach(c,(f,p)=>a(f,p,d));if(Q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Q.isString(t)&&(t=t.trim())&&!eC(t))u(JS(t),n);else if(Q.isObject(t)&&Q.isIterable(t)){let c={},d,f;for(const p of t){if(!Q.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?Q.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=Yo(t),t){const r=Q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return ZS(o);if(Q.isFunction(n))return n.call(this,o,r);if(Q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yo(t),t){const r=Q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Rd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Yo(u),u){const c=Q.findKey(r,u);c&&(!n||Rd(r,r[c],c,n))&&(delete r[c],o=!0)}}return Q.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||Rd(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Q.forEach(this,(o,a)=>{const u=Q.findKey(r,a);if(u){n[u]=Bu(o),delete n[a];return}const c=t?tC(a):String(a).trim();c!==a&&delete n[a],n[c]=Bu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
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[R0]=this[R0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Yo(u);r[c]||(nC(o,u),r[c]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Q.freezeMethods(Tn);function Ld(e,t){const n=this||qo,r=t||n,o=Tn.from(r.headers);let a=r.data;return Q.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function L0(e){return!!(e&&e.__CANCEL__)}let Wo=class extends He{constructor(t,n,r){super(t==null?"canceled":t,He.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function D0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function iC(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 E=a,T=0;for(;E!==o;)T+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const b=p&&f-p;return b?Math.round(T*1e3/b):void 0}}function sC(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(),E=p-n;E>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Uu=(e,t,n=3)=>{let r=0;const o=iC(50,250);return sC(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,f=o(d),p=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-u)/f:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},M0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},F0=e=>(...t)=>Q.asap(()=>e(...t)),oC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,aC=rn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&c.push(`path=${r}`),Q.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Q.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function uC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function B0(e,t,n){let r=!uC(t);return e&&(r||n==!1)?lC(e,t):t}const U0=e=>e instanceof Tn?H({},e):e;function qi(e,t){t=t||{};const n={};function r(f,p,E,T){return Q.isPlainObject(f)&&Q.isPlainObject(p)?Q.merge.call({caseless:T},f,p):Q.isPlainObject(p)?Q.merge({},p):Q.isArray(p)?p.slice():p}function o(f,p,E,T){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f,E,T)}else return r(f,p,E,T)}function a(f,p){if(!Q.isUndefined(p))return r(void 0,p)}function u(f,p){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,E){if(E in t)return r(f,p);if(E in e)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,responseEncoding:u,validateStatus:c,headers:(f,p,E)=>o(U0(f),U0(p),E,!0)};return Q.forEach(Object.keys(H(H({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const E=Q.hasOwnProp(d,p)?d[p]:o,T=E(e[p],t[p],p);Q.isUndefined(T)&&E!==c||(n[p]=T)}),n}const H0=e=>{const t=qi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=Tn.from(u),t.url=O0(B0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,E])=>{f.includes(p.toLowerCase())&&u.set(p,E)})}}if(rn.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&oC(t.url))){const d=o&&a&&aC.read(a);d&&u.set(o,d)}return t},cC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=H0(e);let a=o.data;const u=Tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,E,T,b,_;function w(){b&&b(),_&&_(),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 v(){if(!k)return;const R=Tn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:R,config:e,request:k};D0(function(te){n(te),w()},function(te){r(te),w()},X),k=null}"onloadend"in k?k.onloadend=v:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(v)},k.onabort=function(){k&&(r(new He("Request aborted",He.ECONNABORTED,e,k)),k=null)},k.onerror=function(W){const X=W&&W.message?W.message:"Network Error",B=new He(X,He.ERR_NETWORK,e,k);B.event=W||null,r(B),k=null},k.ontimeout=function(){let W=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||Od;o.timeoutErrorMessage&&(W=o.timeoutErrorMessage),r(new He(W,X.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,k)),k=null},a===void 0&&u.setContentType(null),"setRequestHeader"in k&&Q.forEach(u.toJSON(),function(W,X){k.setRequestHeader(X,W)}),Q.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),c&&c!=="json"&&(k.responseType=o.responseType),f&&([T,_]=Uu(f,!0),k.addEventListener("progress",T)),d&&k.upload&&([E,b]=Uu(d),k.upload.addEventListener("progress",E),k.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=R=>{k&&(r(!R||R.type?new Wo(null,e,k):R),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const F=rC(o.url);if(F&&rn.protocols.indexOf(F)===-1){r(new He("Unsupported protocol "+F+":",He.ERR_BAD_REQUEST,e));return}k.send(a||null)})},dC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(f){if(!o){o=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof He?p:new Wo(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new He(`timeout of ${t}ms exceeded`,He.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>Q.asap(c),d}},fC=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},hC=function(e,t){return od(this,null,function*(){try{for(var n=Ux(pC(e)),r,o,a;r=!(o=yield new Hr(n.next())).done;r=!1){const u=o.value;yield*Vm(fC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Hr(o.call(n)))}finally{if(a)throw a[0]}}})},pC=function(e){return od(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Vm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Hr(t.read());if(n)break;yield r}}finally{yield new Hr(t.cancel())}})},z0=(e,t,n,r)=>{const o=hC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return rt(this,null,function*(){try{const{done:p,value:E}=yield o.next();if(p){c(),f.close();return}let T=E.byteLength;if(n){let b=a+=T;n(b)}f.enqueue(new Uint8Array(E))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})},j0=64*1024,{isFunction:Hu}=Q,mC=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:$0,TextEncoder:V0}=Q.global,q0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},gC=e=>{e=Q.merge.call({skipUndefined:!0},mC,e);const{fetch:t,Request:n,Response:r}=e,o=t?Hu(t):typeof fetch=="function",a=Hu(n),u=Hu(r);if(!o)return!1;const c=o&&Hu($0),d=o&&(typeof V0=="function"?(_=>w=>_.encode(w))(new V0):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&q0(()=>{let _=!1;const w=new n(rn.origin,{body:new $0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!w}),p=u&&c&&q0(()=>Q.isReadableStream(new r("").body)),E={stream:p&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(w,k)=>{let v=w&&w[_];if(v)return v.call(w);throw new He(`Response type '${_}' is not supported`,He.ERR_NOT_SUPPORT,k)})});const T=_=>rt(null,null,function*(){if(_==null)return 0;if(Q.isBlob(_))return _.size;if(Q.isSpecCompliantForm(_))return(yield new n(rn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(_)||Q.isArrayBuffer(_))return _.byteLength;if(Q.isURLSearchParams(_)&&(_=_+""),Q.isString(_))return(yield d(_)).byteLength}),b=(_,w)=>rt(null,null,function*(){const k=Q.toFiniteNumber(_.getContentLength());return k==null?T(w):k});return _=>rt(null,null,function*(){let{url:w,method:k,data:v,signal:F,cancelToken:R,timeout:W,onDownloadProgress:X,onUploadProgress:B,responseType:te,headers:ge,withCredentials:ye="same-origin",fetchOptions:M}=H0(_),ae=t||fetch;te=te?(te+"").toLowerCase():"text";let he=dC([F,R&&R.toAbortSignal()],W),ue=null;const de=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let be;try{if(B&&f&&k!=="get"&&k!=="head"&&(be=yield b(ge,v))!==0){let L=new n(w,{method:"POST",body:v,duplex:"half"}),K;if(Q.isFormData(v)&&(K=L.headers.get("content-type"))&&ge.setContentType(K),L.body){const[O,_e]=M0(be,Uu(F0(B)));v=z0(L.body,j0,O,_e)}}Q.isString(ye)||(ye=ye?"include":"omit");const Ce=a&&"credentials"in n.prototype,oe=Te(H({},M),{signal:he,method:k.toUpperCase(),headers:ge.normalize().toJSON(),body:v,duplex:"half",credentials:Ce?ye:void 0});ue=a&&new n(w,oe);let q=yield a?ae(ue,M):ae(w,oe);const ne=p&&(te==="stream"||te==="response");if(p&&(X||ne&&de)){const L={};["status","statusText","headers"].forEach(Re=>{L[Re]=q[Re]});const K=Q.toFiniteNumber(q.headers.get("content-length")),[O,_e]=X&&M0(K,Uu(F0(X),!0))||[];q=new r(z0(q.body,j0,O,()=>{_e&&_e(),de&&de()}),L)}te=te||"text";let S=yield E[Q.findKey(E,te)||"text"](q,_);return!ne&&de&&de(),yield new Promise((L,K)=>{D0(L,K,{data:S,headers:Tn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:ue})})}catch(Ce){throw de&&de(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,_,ue,Ce&&Ce.response),{cause:Ce.cause||Ce}):He.from(Ce,Ce&&Ce.code,_,ue,Ce&&Ce.response)}})},EC=new Map,Y0=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=EC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:gC(t)),p=f;return f};Y0();const Dd={http:US,xhr:cC,fetch:{get:Y0}};Q.forEach(Dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const W0=e=>`- ${e}`,yC=e=>Q.isFunction(e)||e===null||e===!1;function bC(e,t){e=Q.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,!yC(r)&&(o=Dd[(c=String(r)).toLowerCase()],o===void 0))throw new He(`Unknown adapter '${c}'`);if(o&&(Q.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 :
5
- `+u.map(W0).join(`
6
- `):" "+W0(u[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const G0={getAdapter:bC,adapters:Dd};function Md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wo(null,e)}function K0(e){return Md(e),e.headers=Tn.from(e.headers),e.data=Ld.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),G0.getAdapter(e.adapter||qo.adapter,e)(e).then(function(r){return Md(e),r.data=Ld.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return L0(r)||(Md(e),r&&r.response&&(r.response.data=Ld.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const Q0="1.13.5",zu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const X0={};zu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Q0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new He(o(u," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!X0[u]&&(X0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},zu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function TC(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new He("option "+a+" must be "+d,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const ju={assertOptions:TC,validators:zu},$n=ju.validators;let Yi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new I0,response:new I0}}request(t,n){return rt(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
- `+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ju.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:ju.assertOptions(o,{encode:$n.function,serialize:$n.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ju.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[n.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const k=n.transitional||Od;k&&k.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let p,E=0,T;if(!d){const _=[K0.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);E<T;)p=p.then(_[E++],_[E++]);return p}T=c.length;let b=n;for(;E<T;){const _=c[E++],w=c[E++];try{b=_(b)}catch(k){w.call(this,k);break}}try{p=K0.call(this,b)}catch(_){return Promise.reject(_)}for(E=0,T=f.length;E<T;)p=p.then(f[E++],f[E++]);return p}getUri(t){t=qi(this.defaults,t);const n=B0(t.baseURL,t.url,t.allowAbsoluteUrls);return O0(n,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){Yi.prototype[t]=function(n,r){return this.request(qi(r||{},{method:t,url:n,data:(r||{}).data}))}}),Q.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(qi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Yi.prototype[t]=n(),Yi.prototype[t+"Form"]=n(!0)});let _C=class zx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Wo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new zx(function(o){t=o}),cancel:t}}};function xC(e){return function(n){return e.apply(null,n)}}function wC(e){return Q.isObject(e)&&e.isAxiosError===!0}const Fd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fd).forEach(([e,t])=>{Fd[t]=e});function J0(e){const t=new Yi(e),n=E0(Yi.prototype.request,t);return Q.extend(n,Yi.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return J0(qi(e,o))},n}const Pt=J0(qo);Pt.Axios=Yi,Pt.CanceledError=Wo,Pt.CancelToken=_C,Pt.isCancel=L0,Pt.VERSION=Q0,Pt.toFormData=Fu,Pt.AxiosError=He,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=xC,Pt.isAxiosError=wC,Pt.mergeConfig=qi,Pt.AxiosHeaders=Tn,Pt.formToJSON=e=>P0(Q.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=G0.getAdapter,Pt.HttpStatusCode=Fd,Pt.default=Pt;const{Axios:cB,AxiosError:dB,CanceledError:fB,isCancel:hB,CancelToken:pB,VERSION:mB,all:gB,Cancel:EB,isAxiosError:yB,spread:bB,toFormData:TB,AxiosHeaders:_B,HttpStatusCode:xB,formToJSON:wB,getAdapter:SB,mergeConfig:CB}=Pt;class Z0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Pt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const SC=$.createContext(void 0),CC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=$.useMemo(()=>new Z0(e,t,n),[e,t,n]);return C.jsx(SC.Provider,{value:o,children:r})};var eg=Symbol.for("immer-nothing"),tg=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Is=Object.getPrototypeOf;function Ps(e){return!!e&&!!e[ot]}function zr(e){var t;return e?ng(e)||Array.isArray(e)||!!e[tg]||!!((t=e.constructor)!=null&&t[tg])||Vu(e)||qu(e):!1}var AC=Object.prototype.constructor.toString();function ng(e){if(!e||typeof e!="object")return!1;const t=Is(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)===AC}function Go(e,t){$u(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function $u(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:Vu(e)?2:qu(e)?3:0}function Bd(e,t){return $u(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rg(e,t,n){const r=$u(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function vC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vu(e){return e instanceof Map}function qu(e){return e instanceof Set}function Vt(e){return e.copy_||e.base_}function Ud(e,t){if(Vu(e))return new Map(e);if(qu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ng(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];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(Is(e),r)}else{const r=Is(e);if(r!==null&&n)return H({},e);const o=Object.create(r);return Object.assign(o,e)}}function Hd(e,t=!1){return Yu(e)||Ps(e)||!zr(e)||($u(e)>1&&(e.set=e.add=e.clear=e.delete=kC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Hd(r,!0))),e}function kC(){Vn(2)}function Yu(e){return Object.isFrozen(e)}var zd={};function Wi(e){const t=zd[e];return t||Vn(0,e),t}function NC(e,t){zd[e]||(zd[e]=t)}var Ko;function Wu(){return Ko}function OC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ig(e,t){t&&(Wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jd(e){$d(e),e.drafts_.forEach(IC),e.drafts_=null}function $d(e){e===Ko&&(Ko=e.parent_)}function sg(e){return Ko=OC(Ko,e)}function IC(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(jd(t),Vn(4)),zr(e)&&(e=Gu(t,e),t.parent_||Ku(t,e)),t.patches_&&Wi("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=Gu(t,n,[]),jd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==eg?e:void 0}function Gu(e,t,n){if(Yu(t))return t;const r=t[ot];if(!r)return Go(t,(o,a)=>ag(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ku(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),Go(a,(c,d)=>ag(e,r,o,c,d,n,u)),Ku(e,o,!1),n&&e.patches_&&Wi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ag(e,t,n,r,o,a,u){if(Ps(o)){const c=a&&t&&t.type_!==3&&!Bd(t.assigned_,r)?a.concat(r):void 0,d=Gu(e,o,c);if(rg(n,r,d),Ps(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(zr(o)&&!Yu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ku(e,o)}}function Ku(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hd(t,n)}function PC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Vd;n&&(o=[r],a=Qo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Vd={get(e,t){if(t===ot)return e;const n=Vt(e);if(!Bd(n,t))return RC(e,n,t);const r=n[t];return e.finalized_||!zr(r)?r:r===qd(e.base_,t)?(Yd(e),e.copy_[t]=Xo(r,e)):r},has(e,t){return t in Vt(e)},ownKeys(e){return Reflect.ownKeys(Vt(e))},set(e,t,n){const r=ug(Vt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=qd(Vt(e),t),a=o==null?void 0:o[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(vC(n,o)&&(n!==void 0||Bd(e.base_,t)))return!0;Yd(e),jr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return qd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yd(e),jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){Vn(12)}},Qo={};Go(Vd,(e,t)=>{Qo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qo.deleteProperty=function(e,t){return Qo.set.call(this,e,t,void 0)},Qo.set=function(e,t,n){return Vd.set.call(this,e[0],t,n,e[0])};function qd(e,t){const n=e[ot];return(n?Vt(n):e)[t]}function RC(e,t,n){var o;const r=ug(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ug(e,t){if(!(t in e))return;let n=Is(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Is(n)}}function jr(e){e.modified_||(e.modified_=!0,e.parent_&&jr(e.parent_))}function Yd(e){e.copy_||(e.copy_=Ud(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"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(zr(t)){const a=sg(this),u=Xo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?jd(a):$d(a)}return ig(a,r),og(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===eg&&(o=void 0),this.autoFreeze_&&Hd(o,!0),r){const a=[],u=[];Wi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(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)||Vn(8),Ps(e)&&(e=DC(e));const t=sg(this),n=Xo(e,void 0);return n[ot].isManual_=!0,$d(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return ig(r,t),og(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=Wi("Patches").applyPatches_;return Ps(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Xo(e,t){const n=Vu(e)?Wi("MapSet").proxyMap_(e,t):qu(e)?Wi("MapSet").proxySet_(e,t):PC(e,t);return(t?t.scope_:Wu()).drafts_.push(n),n}function DC(e){return Ps(e)||Vn(10,e),lg(e)}function lg(e){if(!zr(e)||Yu(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ud(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ud(e,!0);return Go(n,(r,o)=>{rg(n,r,lg(o))}),t&&(t.finalized_=!1),n}function MC(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Vt(this[ot]).size}has(d){return Vt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Vt(p).has(d)||Vt(p).get(d)!==f)&&(n(p),jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Vt(d).size&&(n(d),jr(d),d.assigned_=new Map,Go(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Vt(p).forEach((E,T,b)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ot];u(f);const p=Vt(f).get(d);if(f.finalized_||!zr(p)||p!==f.base_.get(d))return p;const E=Xo(p,f);return n(f),f.copy_.set(d,E),E}keys(){return Vt(this[ot]).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[ot]={type_:3,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Vt(this[ot]).size}has(d){const f=this[ot];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[ot];return u(f),this.has(d)||(a(f),jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Vt(d).size&&(a(d),jr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];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 E=p.next();for(;!E.done;)d.call(f,E.value,E.value,this),E=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=Xo(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify(Vt(c)))}NC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new LC,FC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function BC(e,t,n){var r=$.useMemo(function(){return FC(e)},[e]);return $.useReducer(r,t,n)}const cg={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"},Tt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",SET_ENTRY_TYPE:"SET_ENTRY_TYPE",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_IMAGE_FILE:"SET_IMAGE_FILE"},Rs={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},UC=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(o=>t.some(a=>o.name.includes(a)))||null},HC=e=>{switch(!0){case e.includes("search"):return"search";case e.includes("browse"):return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return"search"}},Jo="cimulate",Wd=`${Jo}:pdp-update`,Gd=`${Jo}:browse-update`,Kd=`${Jo}:search-update`,Qd=`${Jo}:ui-state-update`,Xd=`${Jo}:session-state`,xr=H({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},cg),zC={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},$r=H({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},cg),jC={"search-context":$r.SEARCH_CONTEXT_UPDATED,query:$r.QUERY_CHANGED,page:$r.PAGE_CHANGED,pageSize:$r.PAGE_SIZE_CHANGED,includeFacets:$r.FACET_FILTERS_CHANGED,facetFilters:$r.FACET_FILTERS_CHANGED,rangeFilters:$r.RANGE_FILTERS_CHANGED,catalogSegment:$r.CATALOG_SEGMENT_CHANGED,pricebooks:$r.PRICEBOOKS_CHANGED},Y="cim-widget",Ls=`--${Y}`,Gi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},$C=(e=Gi)=>({[`${Ls}-primary-color`]:e.primaryColor||Gi.primaryColor,[`${Ls}-secondary-color`]:e.secondaryColor||Gi.secondaryColor,[`${Ls}-font-color`]:e.fontColor||Gi.fontColor,[`${Ls}-font-family`]:e.fontFamily||Gi.fontFamily,[`${Ls}-background-color`]:e.backgroundColor||Gi.backgroundColor,[`${Ls}-border-color`]:e.borderColor||Gi.borderColor}),ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},dg=$.createContext(null),fg=$.createContext(null);class VC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>rt(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Z0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ds=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class qC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Ds(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const hg=$.createContext(null),YC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:o=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,componentConfig:p,conversationHistory:E,resetConversationMessage:T="What products would you like to explore today?",apiKey:b,apiToken:_,theme:w,isDevelopment:k,__features:v,children:F})=>{const R=$.useMemo(()=>new VC(b,_,k),[b,_,k]),W=$.useMemo(()=>new qC(k),[k]);$.useEffect(()=>{R.config||R.getConfig()},[R]);const X=$.useMemo(()=>$C(w),[w]),B=$.useMemo(()=>{const ge=(f==null?void 0:f.placeholder)||c,ye=(f==null?void 0:f.buttonLabel)||d;let M="icon";return f!=null&&f.buttonType?M=f.buttonType:d&&(M="text"),Te(H({},f||{}),{placeholder:ge,buttonLabel:ye,buttonType:M})},[f,c,d]),te=$.useMemo(()=>({configModule:R,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:o,disclaimerText:a,disclaimerMarkdown:u,themeVariables:X,logger:W,searchConfig:B,enableMinimize:!!(p!=null&&p.enableMinimize),resetConversationMessage:T,conversationHistory:{sinceHours:typeof(E==null?void 0:E.sinceHours)=="number"?E.sinceHours:1,limit:E==null?void 0:E.limit},features:v}),[R,e,t,r,n,a,u,o,B,p,T,W,X,E,v]);return C.jsx(hg.Provider,{value:te,children:F})},Rt=()=>{const e=$.useContext(hg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class WC{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"entryTypeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return QC(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const at=new WC,Ki=()=>at.connected,Zo=()=>at.isOpen,GC=e=>{window.addEventListener(Qd,e)},KC=e=>{window.removeEventListener(Qd,e)},QC=(e,t)=>{const n=new CustomEvent(Qd,{detail:{property:e,value:t}});window.dispatchEvent(n)},XC=e=>{at.connectedProxy.connected=e},ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);at.entryTypeProxy.entryType=e},Qi=e=>{const t=at.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;at.statusProxy.isOpen=n,n&&(at.statusProxy.isMinimized=!1)},Jd=e=>{const t=at.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;at.statusProxy.isMinimized=n,n&&(at.statusProxy.isOpen=!1)},Zd=e=>{at.modalProxy.isFullscreen=e},Qu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);at.statusProxy.type=e,e==="dialog"||e==="chat"?at.modeProxy.mode="embedded":at.modeProxy.mode="standalone"},ef=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);at.dialogProxy.position=e},JC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Rt(),o=$.useCallback(v=>{n({type:Tt.SET_COPILOT,payload:v})},[n]),a=$.useCallback(v=>{XC(v),n({type:Tt.SET_CONNECTED,payload:v})},[n]),u=$.useCallback(v=>{n({type:Tt.SET_ENTRY_TYPE,payload:v})},[n]),c=$.useCallback(()=>{n({type:Tt.RESET_COPILOT,payload:{}})},[n]),d=$.useCallback(()=>{n({type:Tt.RESET_STATE,payload:{}})},[n]),f=$.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:Tt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),p=$.useCallback(v=>{n({type:Tt.ADD_LOADING_MESSAGE,payload:v})},[n]),E=$.useCallback(v=>{n({type:Tt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),T=$.useCallback(v=>{n({type:Tt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),b=$.useCallback(v=>{n({type:Tt.ADD_CONVERSATION_ID,payload:v})},[n]),_=$.useCallback(v=>{n({type:Tt.SET_CONVERSATION_IDS,payload:v})},[n]),w=$.useCallback(v=>{n({type:Tt.SET_IMAGE_FILE,payload:v})},[n]),k=$.useMemo(()=>({setCopilot:o,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:E,setActiveConversationId:T,addConversationId:b,setConversationIds:_,setImageFile:w}),[o,a,u,c,d,f,p,E,T,b,_,w]);return C.jsx(fg.Provider,{value:k,children:t})};MC();const ZC=(e,t)=>{const{type:n,payload:r}=t;if(n===Tt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Tt.RESET_STATE:e.messages=Rs.messages,e.groupedMessages=Rs.groupedMessages,e.loadingMessages=Rs.loadingMessages,e.entryType=Rs.entryType;break;case Tt.RESET_COPILOT:e.copilot=null;break;case Tt.SET_COPILOT:e.copilot=r;break;case Tt.SET_CONNECTED:e.connected=r;break;case Tt.SET_ENTRY_TYPE:e.entryType=r;break;case Tt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Tt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Tt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Tt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Tt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Tt.SET_IMAGE_FILE:e.imageFile=r;break}},eA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?Te(H({},Rs),{entryType:e}):Rs,[o,a]=BC(ZC,r);return C.jsx(dg.Provider,{value:o,children:C.jsx(JC,{onCopilotEvent:t,dispatch:a,children:n})})};function tA(){var e=$.useRef(!0);return e.current?(e.current=!1,!0):e.current}var Xu=function(e){$.useEffect(e,[])},nA=function(e,t){return e===t};function rA(e,t){t===void 0&&(t=nA);var n=$.useRef(),r=$.useRef(e),o=tA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class iA{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(sn.size).fill(1).forEach(()=>{const r=sn.first();r&&(t(r),sn.remove())})})}get size(){return this.items.length}}const sn=new iA,pg=e=>{window.addEventListener(Kd,e)},mg=e=>{window.removeEventListener(Kd,e)},sA=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},gg=e=>{window.addEventListener(Gd,e)},Eg=e=>{window.removeEventListener(Gd,e)},oA=(e,t,n)=>{const r=new CustomEvent(Gd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},yg=e=>{window.addEventListener(Wd,e)},bg=e=>{window.removeEventListener(Wd,e)},Tg=(e,t,n)=>{const r=new CustomEvent(Wd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},aA=e=>{window.addEventListener(Xd,e)},uA=e=>{window.removeEventListener(Xd,e)},Ju=(e,t,n)=>{const r=new CustomEvent(Xd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class lA{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=zC[n];return oA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new lA,_g=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},xg=(e,t,n)=>{var u,c;const r=H({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},wg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Sg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Cg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Ag=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},cA=e=>{if(!Ki()||!Zo()){Ki()&&sn.clear(),sn.add({context:"browse",payload:Te(H({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},vg=e=>{_g(e,ut)},dA=(e,t)=>{xg(e,t,ut)},kg=e=>{wg(e,ut)},fA=({field:e,value:t})=>{Sg({field:e,value:t},ut)},hA=e=>{Cg(e,ut)},Ng=e=>{Ag(e,ut)},Og=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"browse",payload:H({},e)});return}"facetFilters"in e&&vg(e.facetFilters||{}),"rangeFilters"in e&&kg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Ng(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},pA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Og,updateBrowseCategoryId:cA,updateCatalogSegment:hA,updateFacetFilter:dA,updateFacetFilters:vg,updatePricebooks:Ng,updateRangeFilter:fA,updateRangeFilters:kg},Symbol.toStringTag,{value:"Module"}));class mA{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>(Tg(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const or=new mA,Ig=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"pdp",payload:H({},e)});return}or.updateProxy(e),Tg("pdp-context",e)},gA=e=>{or.proxy.productId=e,Ki()||sn.add({context:"pdp",payload:H({},or.state)})},EA=e=>{or.proxy.pdpLink=e},yA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Ju("getConversationMessages",{payload:e,callback:t},ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ju("getSessionInformation",{callback:e},ci.GET_SESSION_INFORMATION)},loadConversation:e=>{Ju("loadConversation",e,ci.LOAD_CONVERSATION)},resetConversation:()=>{Ju("resetConversation",!0,ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class bA{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=jC[n];return sA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const gt=new bA,TA=e=>{const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:Te(H({},gt.state),{query:e})});return}gt.queryProxy.query=e},Pg=e=>{_g(e,gt)},_A=(e,t)=>{xg(e,t,gt)},Rg=e=>{wg(e,gt)},xA=({field:e,value:t})=>{Sg({field:e,value:t},gt)},wA=e=>{Cg(e,gt)},Lg=e=>{Ag(e,gt)},Dg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:H({},e)});return}"facetFilters"in e&&Pg(e.facetFilters||{}),"rangeFilters"in e&&Rg(e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Lg(e.pricebooks||[]),gt.queryProxy.query=e.query},SA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Dg,updateCatalogSegment:wA,updateFacetFilter:_A,updateFacetFilters:Pg,updatePricebooks:Lg,updateRangeFilter:xA,updateRangeFilters:Rg,updateSearchQuery:TA},Symbol.toStringTag,{value:"Module"})),CA={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},Mg=$.createContext(CA),AA=({children:e})=>{const[t,n]=$.useState(ut.categoryId),[r,o]=$.useState(ut.categoryIdProxy.categoryName||""),[a,u]=$.useState(ut.facetFilters||{}),[c,d]=$.useState(ut.rangeFilters||[]),[f,p]=$.useState(ut.catalogSegment||null),[E,T]=$.useState(ut.pricebooks||null);$.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&o(w.value),(w==null?void 0:w.property)==="facetFilters"&&u(w.value),(w==null?void 0:w.property)==="rangeFilters"&&d(w.value),(w==null?void 0:w.property)==="catalogSegment"&&p(w.value),(w==null?void 0:w.property)==="pricebooks"&&T(w.value)};return gg(_),()=>{Eg(_)}},[]);const b=$.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:E}),[t,r,a,c,f,E]);return C.jsx(Mg.Provider,{value:b,children:e})},vA=()=>{const e=$.useContext(Mg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},kA={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},Fg=$.createContext(kA),NA=({children:e})=>{const[t,n]=$.useState(gt.query),[r,o]=$.useState(gt.facetFilters),[a,u]=$.useState(gt.rangeFilters),[c,d]=$.useState(gt.catalogSegment),[f,p]=$.useState(gt.pricebooks);$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&n(b.value),(b==null?void 0:b.property)==="facetFilters"&&o(b.value),(b==null?void 0:b.property)==="rangeFilters"&&u(b.value),(b==null?void 0:b.property)==="catalogSegment"&&d(b.value),(b==null?void 0:b.property)==="pricebooks"&&p(b.value)};return pg(T),()=>{mg(T)}},[]);const E=$.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return C.jsx(Fg.Provider,{value:E,children:e})},OA=()=>{const e=$.useContext(Fg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},IA={productId:or.productId,pdpLink:or.pdpLink},Bg=$.createContext(IA),PA=({children:e})=>{const[t,n]=$.useState(or.productId),[r,o]=$.useState(or.pdpLink);$.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return yg(u),()=>{bg(u)}},[]);const a=$.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return C.jsx(Bg.Provider,{value:a,children:e})},RA=()=>{const e=$.useContext(Bg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},ta=()=>{const e=$.useContext(fg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Ms=()=>{const e=$.useContext(dg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},wr=()=>{const e=$.useContext(Hg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},tf=()=>{const{status:e}=di(),{entryType:t,messages:n}=Ms(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},Ug=$.createContext({mode:at.modeProxy.mode,status:at.statusProxy,dialogPosition:at.dialogProxy.position,isModalFullscreen:at.modalProxy.isFullscreen,previousComponentType:at.statusProxy.type}),LA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:o}=ta(),[a,u]=$.useState(at.modeProxy.mode),[c,d]=$.useState({type:n||at.statusProxy.type,isOpen:at.statusProxy.isOpen,isMinimized:at.statusProxy.isMinimized}),[f,p]=$.useState(at.dialogProxy.position),[E,T]=$.useState(at.modalProxy.isFullscreen),b=rA(c.type);$.useEffect(()=>{const w=k=>{const{property:v,value:F}=k.detail||{};if(!(!v||F===void 0)){if(v==="mode"){u(F);return}if(v==="entryType"){o(F);return}if(v==="isMinimized"){d(R=>Te(H({},R),{isMinimized:F}));return}if(v==="isOpen"){d(R=>Te(H({},R),{isOpen:F}));return}if(v==="type"){d(R=>Te(H({},R),{type:F}));return}if(v==="position"){p(F);return}if(v==="isFullscreen"){T(F);return}}};return GC(w),()=>{KC(w)}},[o]),Xu(()=>{e&&ea(e)}),Xu(()=>{const w=n||(t==null?void 0:t.type);w&&Qu(w),t&&"isOpen"in t&&Qi(!!t.isOpen),t&&"isMinimized"in t&&Jd(!!t.isMinimized)}),Xu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:w}=t.options;w&&ef(w),"isModalFullscreen"in t.options&&Zd(!!t.options.isModalFullscreen)});const _=$.useMemo(()=>({mode:a,status:c,previousComponentType:b||"dialog",dialogPosition:f,isModalFullscreen:E}),[a,c,b,f,E]);return C.jsx(Ug.Provider,{value:_,children:r})},di=()=>{const e=$.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},DA=({copilot:e})=>{const{logger:t,conversationHistory:n}=Rt(),{addCopilotEvent:r,setEntryType:o}=ta(),{activeConversationId:a}=Ms(),u=$.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=$.useCallback((d,f)=>{e&&d.conversationId&&e.getConversationEvents(d,p=>{t==null||t.log("Retrieved conversation messages: ",p),f==null||f(p)})},[e,t]);return $.useEffect(()=>{if(!a||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const d=3600*1e3*n.sinceHours,f=new Date(Date.now()-d).toISOString(),p={conversationId:a,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(p.limit=n.limit),c(p,E=>{E.forEach(b=>{b.bypassHandlers=!0,r(b)});const T=UC(E);if(T!=null&&T.name){const b=HC(T.name);o(b)}})},[t,a,c,r,o,n]),{getSessionInformation:u,getConversationMessages:c}},Hg=$.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),MA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=Rt(),xi=OA(),{searchQuery:f}=xi,p=nn(xi,["searchQuery"]),Zr=vA(),{categoryId:E}=Zr,T=nn(Zr,["categoryId"]),{productId:b,pdpLink:_}=RA(),{setCopilot:w,setConnected:k,resetCopilot:v,resetCopilotState:F,addCopilotEvent:R,addLoadingMessage:W,removeLoadingMessage:X,setActiveConversationId:B,setConversationIds:te}=ta(),{connected:ge,entryType:ye,copilot:M,messages:ae,groupedMessages:he,loadingMessages:ue}=Ms(),{status:de}=di(),be=$.useRef(!1),Ce=$.useRef(!1),{getConversationMessages:oe,getSessionInformation:q}=DA({copilot:M}),ne=$.useMemo(()=>ue.size>0,[ue]),S=$.useCallback(we=>ue.has(we),[ue]),L=$.useCallback(we=>{R(we),W(we.id)},[R,W]),K=$.useCallback(({query:we,facetFilters:Ue,rangeFilters:je,catalogSegment:Xe,pricebooks:dt,userPrompt:wt,imageFile:mn})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const st={searchParams:{query:we}};wt&&(st.userPrompt=wt),mn&&(st.attachments={image:mn}),Ue&&Object.keys(Ue).length>0&&(st.searchParams.facetFilters=Ue),je&&je.length>0&&(st.searchParams.rangeFilters=je),Xe&&(st.searchParams.catalogSegment=Xe),dt&&(st.searchParams.pricebooks=dt),ea("search"),M.search(st,ee=>{const fe=H({},ee);be.current=!0,L(fe)})},[d,L,M]),O=$.useCallback(({categoryId:we,categoryName:Ue,facetFilters:je,rangeFilters:Xe,catalogSegment:dt,pricebooks:wt,userPrompt:mn,imageFile:st})=>{if(!M){d==null||d.error("Copilot is not initialized");return}const ee=je&&Object.keys(je).length>0;if(we===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const fe={browseParams:{categoryId:we||""}};mn&&(fe.userPrompt=mn),st&&(fe.attachments={image:st}),ee&&(fe.browseParams.facetFilters=je),Xe&&Xe.length>0&&(fe.browseParams.rangeFilters=Xe),dt&&(fe.browseParams.catalogSegment=dt),Array.isArray(wt)&&wt.length>0&&(fe.browseParams.pricebooks=wt),ea("browse"),M.browse(fe,Be=>{const Ve=H({},Be);Ue&&Ve.request&&(Ve.request.label=Ue),Ce.current=!0,L(Ve)})},[d,L,M]),_e=$.useCallback(({productId:we,productName:Ue,pdpLink:je,userPrompt:Xe,imageFile:dt})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const wt={productId:we};Xe&&(wt.userPrompt=Xe),je&&(wt.pdpLink=je),dt&&(wt.attachments={image:dt}),ea("pdp"),M.productView(wt,mn=>{const st=H({},mn);Ue&&st.request&&(st.request.label=Ue),L(st)})},[d,M,L]),Re=$.useCallback(({userPrompt:we,imageFile:Ue})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Ue&&(je.attachments={image:Ue}),M.askCim(je,Xe=>{const dt=H({},Xe);L(dt)})},[d,M,L]),Oe=$.useCallback(we=>{const Ue=Te(H({},we),{id:we.inquiryLinkId||we.id});R(Ue)},[R]),Ge=$.useCallback(we=>{R(we),a==null||a(we)},[R,a]),Ye=$.useCallback(we=>{R(we),u==null||u(we)},[R,u]),et=$.useCallback(we=>{o==null||o(we),k(!0)},[o,k]);$.useEffect(()=>{!M||!ge||!de.isOpen||sn.size>0&&sn.processQueue(we=>{if(we.context==="search"){const Ue=H({},we.payload);Dg(Ue)}if(we.context==="browse"){const Ue=H({},we.payload);Og(Ue)}if(we.context==="pdp"){const Ue=H({},we.payload);Ig(Ue)}})},[de.isOpen,M,ge]);const Nt=$.useCallback(we=>{we.on("connect_ack",et),we.on("follow_up",R),we.on("inquiry",Oe),we.on("partial_inquiry",Oe),we.on("display_products",R),we.on("progress",R),we.on("refined_search",Ge),we.on("refined_browse",Ye),we.on("done",Ue=>{X(Ue.eventSourceId)}),we.on("error",Ue=>{R(Ue),X(Ue.eventSourceId)}),we.onDisconnect(Ue=>{const je=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Ue),!je.includes(Ue)){k(!1);return}d==null||d.log("De-registering event listeners");const Xe=new Date().toISOString();R({name:"error",message:"Connection was lost. Please try again.",createdAt:Xe,id:`error-${Xe}`,sessionId:"session"}),we.off()})},[d,k,X,Oe,Ge,Ye,R,et]);Xu(()=>{let we;n?we=n:we=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ue={baseUrl:we};e?Ue.apiKey=e:t&&(Ue.apiToken=t);const je=new eS(Ue);return w(je),Nt(je),je.connect(),je.requestSessionInformation(Xe=>{d==null||d.log("Session Information: ",Xe);const{activeConversationId:dt,conversationIds:wt}=Xe.data||{};dt&&B(dt),wt!=null&&wt.length&&te(wt)}),()=>{je.disconnect(),je.off(),v()}});const Kn=$.useCallback(we=>{if(!M)return;const Ue={eventId:we,reason:"User cancelled the request"};M.cancelRequest(Ue,je=>{R(je),X(we)})},[R,X,M]),cs=$.useCallback(()=>{M&&M.conversationReset({},we=>{F(),R(we),M.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Xe}=Ue.data||{};je&&B(je),Xe!=null&&Xe.length&&te(Xe)})})},[M,d,R,F,B,te]),Jr=$.useCallback((we,Ue)=>{if(!we)return;const je={userPrompt:we};switch(Ue&&(je.imageFile=Ue),ye){case"ask_cim":Re(je);return;case"search":K(H(H({query:f},p),je));return;case"browse":O(H(H({categoryId:E},T),je));return;case"pdp":_e(H({productId:b,pdpLink:_||""},je));return}},[ye,f,p,K,Re,E,T,O,_e,b,_]),_i=$.useCallback((we,Ue)=>{var wt,mn;const Xe=we.params.userPrompt||"";if(!Xe)return;const dt=ae.find(st=>st.id===Ue);if(dt){if(dt.name==="ask_cim"){Re({userPrompt:Xe});return}if(dt.name==="copilot_search"){const{query:st}=((wt=dt.request)==null?void 0:wt.searchParams)||{};st&&K(Te(H({query:st||f},p),{userPrompt:Xe}));return}if(dt.name==="copilot_browse"){const{categoryId:st}=((mn=dt.request)==null?void 0:mn.browseParams)||{};O(Te(H({categoryId:st||E||""},T),{userPrompt:Xe}));return}if(dt.name==="product_view"){const st=dt.request;st!=null&&st.productId&&_e(Te(H({},st),{userPrompt:Xe}))}}},[f,p,E,T,ae,K,Re,O,_e]),ds=$.useMemo(()=>({copilot:M,messages:ae,groupedMessages:he,isLoading:ne,isResponseLoading:S,handleAskCim:Re,handleSearch:K,handleBrowse:O,handlePdp:_e,handleUserInput:Jr,handleSuggestion:_i,handleCancel:Kn,resetConversation:cs,getSessionInformation:q,getConversationMessages:oe}),[M,ae,he,ne,S,Re,K,O,_e,Jr,_i,Kn,cs,q,oe]);return C.jsx(Hg.Provider,{value:ds,children:c})},FA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=ta(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=wr(),f=$.useCallback(({query:T})=>{if(!n||!T)return;const{facetFilters:b}=gt.facetFiltersProxy,{rangeFilters:_}=gt.rangeFiltersProxy,{catalogSegment:w}=gt.catalogSegmentProxy,{pricebooks:k}=gt.pricebooksProxy,v={query:T};v.facetFilters=b||{},v.rangeFilters=_||[],v.catalogSegment=w||"",v.pricebooks=k||[],r(H({},v))},[n,r]),p=$.useCallback(({categoryId:T})=>{if(!n)return;const b=ut.categoryIdProxy.categoryName,{facetFilters:_}=ut.facetFiltersProxy,{rangeFilters:w}=ut.rangeFiltersProxy,{catalogSegment:k}=ut.catalogSegmentProxy,{pricebooks:v}=ut.pricebooksProxy,F={categoryId:T};F.categoryName=b||"",F.facetFilters=_||{},F.rangeFilters=w||[],F.catalogSegment=k||"",F.pricebooks=v||[],o(H({},F))},[n,o]),E=$.useCallback(({productId:T})=>{if(!n||!T)return;const b={productId:T,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(b)},[n,a]);return $.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&f({query:b.value})};return pg(T),()=>{mg(T)}},[f]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.property)==="pdp-context"){const _=b.value;E({productId:_.productId});return}(b==null?void 0:b.property)==="productId"&&E({productId:b.value})};return yg(T),()=>{bg(T)}},[E]),$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="categoryId"&&p({categoryId:b.value})};return gg(T),()=>{Eg(T)}},[p]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.event)==ci.RESET_CONVERSATION&&u(),(b==null?void 0:b.event)==ci.GET_SESSION_INFORMATION){const _=b.value.callback;c(_)}if((b==null?void 0:b.event)==ci.GET_CONVERSATION_MESSAGES){const{payload:_,callback:w}=b.value;if(!_.conversationId||typeof w!="function")return;d(_,w)}if((b==null?void 0:b.event)==ci.LOAD_CONVERSATION){const _=b.value;if(!_.conversationId)return;d(_,k=>{e(),k.forEach(v=>{t(v)})})}};return aA(T),()=>{uA(T)}},[u,c,d,e,t]),null},BA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>C.jsxs(MA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[C.jsx(FA,{}),c]}),zg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,componentConfig:p,entryType:E,entryMessage:T,disclaimerText:b,disclaimerMarkdown:_,searchPlaceholder:w,searchButtonLabel:k,searchConfig:v,resetConversationMessage:F,conversationHistory:R,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,__features:ge,children:ye})=>C.jsx(YC,{apiKey:e,logoUrl:r,headerText:o,entryMessage:T,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:w,searchButtonLabel:k,searchConfig:v,componentConfig:p,disclaimerMarkdown:_,disclaimerText:b,resetConversationMessage:F,conversationHistory:R,isDevelopment:d,__features:ge,children:C.jsx(CC,{apiKey:e,apiToken:t,isDevelopment:d,children:C.jsx(eA,{entryType:E,onCopilotEvent:X,children:C.jsx(PA,{children:C.jsx(AA,{children:C.jsx(NA,{children:C.jsx(LA,{entryType:E,componentConfig:p,componentType:f,children:C.jsx(BA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:E,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,children:ye})})})})})})})});function jg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=jg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jg(e))&&(r&&(r+=" "),r+=t);return r}var $g={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Vg=$i.createContext&&$i.createContext($g),UA=["attr","size","title"];function HA(e,t){if(e==null)return{};var n=zA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function qg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function el(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qg(Object(n),!0).forEach(function(r){jA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jA(e,t,n){return t=$A(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $A(e){var t=VA(e,"string");return typeof t=="symbol"?t:t+""}function VA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yg(e){return e&&e.map((t,n)=>$i.createElement(t.tag,el({key:n},t.attr),Yg(t.child)))}function qt(e){return t=>$i.createElement(qA,Zu({attr:el({},e.attr)},t),Yg(e.child))}function qA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=HA(e,UA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",Zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:el(el({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return Vg!==void 0?$i.createElement(Vg.Consumer,null,n=>t(n)):t($g)}function Wg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function Gg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function na(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function YA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function Kg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function WA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function GA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function KA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function QA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function XA(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const nf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>C.jsx("button",{"aria-label":t,className:J(e,`${Y}-close-button`),disabled:r,onClick:n,children:C.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:C.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),rf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>C.jsx("button",{className:J(`${Y}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Vr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:C.jsx("button",{className:J(e,`${Y}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?C.jsx("img",{className:J(`${Y}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),JA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?C.jsx("img",{className:J(`${Y}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):C.jsx(na,{size:"1rem"})},ZA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return C.jsx(Vr,{className:J(e,n,r,`${Y}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:C.jsx(na,{size:"1rem"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return C.jsxs(rf,{className:J(e,n,r,`${Y}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&C.jsx(JA,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function ev(e){return qt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const tv=()=>{const{messages:e}=Ms(),{handleCancel:t}=wr();return{cancelRequest:$.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},nv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Rt(),{cancelRequest:r}=tv();return n!=null&&n.enableCancelSearch?C.jsx(Vr,{className:J(t,`${Y}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:C.jsx(ev,{}),disabled:!e,onClick:r}):null};function OB(){}function IB(){}function Qg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function Xg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sv={};function Jg(e,t){return(sv.jsx?iv:rv).test(e)}const ov=/[ \t\n\f\r]/g;function av(e){return typeof e=="object"?e.type==="text"?Zg(e.value):!1:Zg(e)}function Zg(e){return e.replace(ov,"")===""}let ra=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ra.prototype.normal={},ra.prototype.property={},ra.prototype.space=void 0;function e1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ra(n,r,t)}function ia(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let uv=0;const qe=Xi(),Bt=Xi(),sf=Xi(),pe=Xi(),ht=Xi(),Fs=Xi(),Pn=Xi();function Xi(){return sd(2,++uv)}const of=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Bt,commaOrSpaceSeparated:Pn,commaSeparated:Fs,number:pe,overloadedBoolean:sf,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),af=Object.keys(of);let uf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),t1(this,"space",o),typeof r=="number")for(;++a<af.length;){const u=af[a];t1(this,af[a],(r&of[u])===of[u])}}};uf.prototype.defined=!0;function t1(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new uf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ia(r)]=r,n[ia(a.attribute)]=r}return new ra(t,n,e.space)}const n1=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ht,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ht,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function r1(e,t){return t in e?e[t]:t}function i1(e,t){return r1(e,t.toLowerCase())}const lv=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ht,autoFocus:qe,autoPlay:qe,blocking:ht,capture:null,charSet:null,checked:qe,cite:null,className:ht,cols:pe,colSpan:null,content:null,contentEditable:Bt,controls:qe,controlsList:ht,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:sf,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ht,height:pe,hidden:sf,high:pe,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ht,itemRef:ht,itemScope:qe,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:pe,pattern:null,ping:ht,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ht,required:qe,reversed:qe,rows:pe,rowSpan:pe,sandbox:ht,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:i1}),cv=Bs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r1}),s1=Bs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),o1=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:i1}),a1=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dv={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},fv=/[A-Z]/g,u1=/-[a-z]/g,hv=/^data[-\w.:]+$/i;function lf(e,t){const n=ia(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(u1,mv);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!u1.test(a)){let u=a.replace(fv,pv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=uf}return new o(r,t)}function pv(e){return"-"+e.toLowerCase()}function mv(e){return e.charAt(1).toUpperCase()}const tl=e1([n1,lv,s1,o1,a1],"html"),Us=e1([n1,cv,s1,o1,a1],"svg");function l1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function c1(e){return e.join(" ").trim()}var Hs={},cf,d1;function gv(){if(d1)return cf;d1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
8
- `,f="/",p="*",E="",T="comment",b="declaration";cf=function(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var v=1,F=1;function R(ue){var de=ue.match(t);de&&(v+=de.length);var be=ue.lastIndexOf(d);F=~be?ue.length-be:F+ue.length}function W(){var ue={line:v,column:F};return function(de){return de.position=new X(ue),ge(),de}}function X(ue){this.start=ue,this.end={line:v,column:F},this.source=k.source}X.prototype.content=w;function B(ue){var de=new Error(k.source+":"+v+":"+F+": "+ue);if(de.reason=ue,de.filename=k.source,de.line=v,de.column=F,de.source=w,!k.silent)throw de}function te(ue){var de=ue.exec(w);if(de){var be=de[0];return R(be),w=w.slice(be.length),de}}function ge(){te(n)}function ye(ue){var de;for(ue=ue||[];de=M();)de!==!1&&ue.push(de);return ue}function M(){var ue=W();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var de=2;E!=w.charAt(de)&&(p!=w.charAt(de)||f!=w.charAt(de+1));)++de;if(de+=2,E===w.charAt(de-1))return B("End of comment missing");var be=w.slice(2,de-2);return F+=2,R(be),w=w.slice(de),F+=2,ue({type:T,comment:be})}}function ae(){var ue=W(),de=te(r);if(de){if(M(),!te(o))return B("property missing ':'");var be=te(a),Ce=ue({type:b,property:_(de[0].replace(e,E)),value:be?_(be[0].replace(e,E)):E});return te(u),Ce}}function he(){var ue=[];ye(ue);for(var de;de=ae();)de!==!1&&(ue.push(de),ye(ue));return ue}return ge(),he()};function _(w){return w?w.replace(c,E):E}return cf}var f1;function Ev(){if(f1)return Hs;f1=1;var e=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=n;var t=e(gv());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return Hs}var sa={},h1;function yv(){if(h1)return sa;h1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,c):f=f.replace(r,c),f.replace(t,u))};return sa.camelCase=d,sa}var oa,p1;function bv(){if(p1)return oa;p1=1;var e=oa&&oa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Ev()),n=yv();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,oa=r,oa}var Tv=bv();const _v=Ke(Tv),nl=m1("end"),Sr=m1("start");function m1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function g1(e){const t=Sr(e),n=nl(e);if(t&&n)return{start:t,end:n}}function aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?E1(e.position):"start"in e||"end"in e?E1(e):"line"in e||"column"in e?df(e):""}function df(e){return y1(e&&e.line)+":"+y1(e&&e.column)}function E1(e){return df(e&&e.start)+"-"+df(e&&e.end)}function y1(e){return e&&typeof e=="number"?e:1}class on extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=H({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=aa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const ff={}.hasOwnProperty,xv=new Map,wv=/[A-Z]/g,Sv=new Set(["table","tbody","thead","tfoot","tr"]),Cv=new Set(["td","th"]),b1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Av(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Lv(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Rv(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Us:tl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=T1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function T1(e,t,n){if(t.type==="element")return vv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ov(e,t,n);if(t.type==="mdxjsEsm")return Nv(e,t);if(t.type==="root")return Iv(e,t,n);if(t.type==="text")return Pv(e,t)}function vv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=x1(e,t.tagName,!1),u=Dv(e,t);let c=pf(e,t);return Sv.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!av(d):!0})),_1(e,u,a,t),hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function kv(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ua(e,t.position)}function Nv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function Ov(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:x1(e,t.name,!0),u=Mv(e,t),c=pf(e,t);return _1(e,u,a,t),hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Iv(e,t,n){const r={};return hf(r,pf(e,t)),e.create(t,e.Fragment,r,n)}function Pv(e,t){return t.value}function _1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rv(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function Lv(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Sr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Dv(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ff.call(t.properties,o)){const a=Fv(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Cv.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Mv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ua(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ua(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function pf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:xv;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=T1(e,a,u);c!==void 0&&n.push(c)}return n}function Fv(e,t,n){const r=lf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xg(n):c1(n)),r.property==="style"){let o=typeof n=="object"?n:Bv(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Uv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?dv[r.property]||r.property:r.attribute,n]}}function Bv(e,t){try{return _v(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=b1+"#cannot-parse-style-attribute",o}}function x1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=Jg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=Jg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ff.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ua(e)}function ua(e,t){const n=new on("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=b1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Uv(e){const t={};let n;for(n in e)ff.call(e,n)&&(t[Hv(n)]=e[n]);return t}function Hv(e){let t=e.replace(wv,zv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zv(e){return"-"+e.toLowerCase()}const mf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},jv={};function gf(e,t){const n=jv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return w1(e,r,o)}function w1(e,t,n){if($v(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return S1(e.children,t,n)}return Array.isArray(e)?S1(e,t,n):""}function S1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=w1(e[o],t,n);return r.join("")}function $v(e){return!!(e&&typeof e=="object")}const C1=document.createElement("i");function Ef(e){const t="&"+e+";";C1.innerHTML=t;const n=C1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const A1={}.hasOwnProperty;function v1(e){const t={};let n=-1;for(;++n<e.length;)Vv(t,e[n]);return t}function Vv(e,t){let n;for(n in t){const o=(A1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){A1.call(o,u)||(o[u]=[]);const c=a[u];qv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function qv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function k1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=fi(/[A-Za-z]/),an=fi(/[\dA-Za-z]/),Yv=fi(/[#-'*+\--9=?A-Z^-~]/);function rl(e){return e!==null&&(e<32||e===127)}const yf=fi(/\d/),Wv=fi(/[\dA-Fa-f]/),Gv=fi(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const il=fi(new RegExp("\\p{P}|\\p{S}","u")),Ji=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ze(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Qe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const Kv={tokenize:Qv};function Qv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Xv={tokenize:Jv},N1={tokenize:Zv};function Jv(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const W=n[r];return t.containerState=W[1],e.attempt(W[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const W=t.events.length;let X=W,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}v(r);let te=W;for(;te<t.events.length;)t.events[te][1].end=H({},B),te++;return Rn(t.events,X+1,0,t.events.slice(W)),t.events.length=te,f(R)}return c(R)}function f(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return _(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(N1,p,E)(R)}function p(R){return o&&F(),v(r),T(R)}function E(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(R)}function T(R){return t.containerState={},e.attempt(N1,b,_)(R)}function b(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function _(R){if(R===null){o&&F(),v(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(R)}function w(R){if(R===null){k(e.exit("chunkFlow"),!0),v(0),e.consume(R);return}return Le(R)?(e.consume(R),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),w)}function k(R,W){const X=t.sliceStream(R);if(W&&X.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(X),t.parser.lazy[R.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let ge=te,ye,M;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(ye){M=t.events[ge][1].end;break}ye=!0}for(v(r),B=te;B<t.events.length;)t.events[B][1].end=H({},M),B++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=B}}function v(R){let W=n.length;for(;W-- >R;){const X=n[W];t.containerState=X[1],X[0].exit.call(t,e)}n.length=R}function F(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Zv(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function js(e){if(e===null||ft(e)||Ji(e))return 1;if(il(e))return 2}function sl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const bf={name:"attention",resolveAll:ek,tokenize:tk};function ek(e,t){let n=-1,r,o,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=H({},e[r][1].end),T=H({},e[n][1].start);O1(E,-d),O1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=qn(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=qn(f,sl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=qn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Rn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=js(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=js(d),E=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?E:E&&(o||!T)),f._close=!!(a===42?T:T&&(p||!E)),t(d)}}function O1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nk={name:"autolink",tokenize:rk};function rk(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return pn(b)?(e.consume(b),u):b===64?n(b):f(b)}function u(b){return b===43||b===45||b===46||an(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||an(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||rl(b)?n(b):(e.consume(b),d)}function f(b){return b===64?(e.consume(b),p):Yv(b)?(e.consume(b),f):n(b)}function p(b){return an(b)?E(b):n(b)}function E(b){return b===46?(e.consume(b),r=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):T(b)}function T(b){if((b===45||an(b))&&r++<63){const _=b===45?T:E;return e.consume(b),_}return n(b)}}const la={partial:!0,tokenize:ik};function ik(e,t,n){return r;function r(a){return Qe(a)?Ze(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const I1={continuation:{tokenize:ok},exit:ak,name:"blockQuote",tokenize:sk};function sk(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function ok(e,t,n){const r=this;return o;function o(u){return Qe(u)?Ze(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(I1,t,n)(u)}}function ak(e){e.exit("blockQuote")}const P1={name:"characterEscape",tokenize:uk};function uk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return Gv(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const R1={name:"characterReference",tokenize:lk};function lk(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,p(E))}function f(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Wv,p):(e.enter("characterReferenceValue"),a=7,u=yf,p(E))}function p(E){if(E===59&&o){const T=e.exit("characterReferenceValue");return u===an&&!Ef(r.sliceSerialize(T))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),p):n(E)}}const L1={partial:!0,tokenize:dk},D1={concrete:!0,name:"codeFenced",tokenize:ck};function ck(e,t,n){const r=this,o={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(B)}function p(B){return B===c?(u++,e.consume(B),p):u<3?n(B):(e.exit("codeFencedFenceSequence"),Qe(B)?Ze(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(L1,w,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(B))}function T(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Qe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),T)}function b(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function w(B){return e.attempt(o,W,k)(B)}function k(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),v}function v(B){return a>0&&Qe(B)?Ze(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Le(B)?e.check(L1,w,W)(B):(e.enter("codeFlowValue"),R(B))}function R(B){return B===null||Le(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),R)}function W(B){return e.exit("codeFenced"),t(B)}function X(B,te,ge){let ye=0;return M;function M(be){return B.enter("lineEnding"),B.consume(be),B.exit("lineEnding"),ae}function ae(be){return B.enter("codeFencedFence"),Qe(be)?Ze(B,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):he(be)}function he(be){return be===c?(B.enter("codeFencedFenceSequence"),ue(be)):ge(be)}function ue(be){return be===c?(ye++,B.consume(be),ue):ye>=u?(B.exit("codeFencedFenceSequence"),Qe(be)?Ze(B,de,"whitespace")(be):de(be)):ge(be)}function de(be){return be===null||Le(be)?(B.exit("codeFencedFence"),te(be)):ge(be)}}}function dk(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Tf={name:"codeIndented",tokenize:hk},fk={partial:!0,tokenize:pk};function hk(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Ze(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Le(f)?e.attempt(fk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Le(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function pk(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ze(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const mk={name:"codeText",previous:Ek,resolve:gk,tokenize:yk};function gk(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Ek(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yk(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,p(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(E))}function f(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),f)}function p(E){return E===96?(e.consume(E),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",f(E))}}class bk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ca(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,n.reverse())}}}function ca(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function M1(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new bk(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Tk(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=H({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function Tk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,E,T=-1,b=n,_=0,w=0;const k=[w];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(p=r.sliceStream(b),b.next||p.push(null),E&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=b,b=b.next}for(b=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(w=T+1,k.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):k.pop(),T=k.length;T--;){const v=c.slice(k[T],k[T+1]),F=a.pop();d.push([F,F+v.length-1]),e.splice(F,2,v)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const _k={resolve:wk,tokenize:Sk},xk={partial:!0,tokenize:Ck};function wk(e){return M1(e),e}function Sk(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(xk,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Ck(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function F1(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return E;function E(v){return v===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(v),e.exit(a),T):v===null||v===32||v===41||rl(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(v))}function T(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===62?(e.exit("chunkString"),e.exit(c),T(v)):v===null||v===60||Le(v)?n(v):(e.consume(v),v===92?_:b)}function _(v){return v===60||v===62||v===92?(e.consume(v),b):b(v)}function w(v){return!p&&(v===null||v===41||ft(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,w):v===41?(e.consume(v),p--,w):v===null||v===32||v===40||rl(v)?n(v):(e.consume(v),v===92?k:w)}function k(v){return v===40||v===41||v===92?(e.consume(v),w):w(v)}}function B1(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),p}function p(b){return c>999||b===null||b===91||b===93&&!d||b===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),E(b))}function E(b){return b===null||b===91||b===93||Le(b)||c++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Qe(b)),b===92?T:E)}function T(b){return b===91||b===92||b===93?(e.consume(b),c++,E):E(b)}}function U1(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?E:p)}function E(T){return T===u||T===92?(e.consume(T),p):p(T)}}function da(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Qe(o)?Ze(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Ak={name:"definition",tokenize:kk},vk={partial:!0,tokenize:Nk};function kk(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),u(b)}function u(b){return B1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ft(b)?da(e,f)(b):f(b)}function f(b){return F1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(vk,E,E)(b)}function E(b){return Qe(b)?Ze(e,T,"whitespace")(b):T(b)}function T(b){return b===null||Le(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Nk(e,t,n){return r;function r(c){return ft(c)?da(e,o)(c):n(c)}function o(c){return U1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Qe(c)?Ze(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const Ok={name:"hardBreakEscape",tokenize:Ik};function Ik(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Pk={name:"headingAtx",resolve:Rk,tokenize:Lk};function Rk(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Lk(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Qe(p)?Ze(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const Dk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],H1=["pre","script","style","textarea"],Mk={concrete:!0,name:"htmlFlow",resolveTo:Uk,tokenize:Hk},Fk={partial:!0,tokenize:jk},Bk={partial:!0,tokenize:zk};function Uk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Hk(e,t,n){const r=this;let o,a,u,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),E}function E(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,w):O===63?(e.consume(O),o=3,r.interrupt?t:S):pn(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function T(O){return O===45?(e.consume(O),o=2,b):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function b(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:he:_):n(O)}function w(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function k(O){if(O===null||O===47||O===62||ft(O)){const _e=O===47,Re=u.toLowerCase();return!_e&&!a&&H1.includes(Re)?(o=1,r.interrupt?t(O):he(O)):Dk.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),v):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?F(O):R(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),k):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function F(O){return Qe(O)?(e.consume(O),F):M(O)}function R(O){return O===47?(e.consume(O),M):O===58||O===95||pn(O)?(e.consume(O),W):Qe(O)?(e.consume(O),R):M(O)}function W(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),W):X(O)}function X(O){return O===61?(e.consume(O),B):Qe(O)?(e.consume(O),X):R(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Qe(O)?(e.consume(O),B):ge(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||Le(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?X(O):(e.consume(O),ge)}function ye(O){return O===47||O===62||Qe(O)?R(O):n(O)}function M(O){return O===62?(e.consume(O),ae):n(O)}function ae(O){return O===null||Le(O)?he(O):Qe(O)?(e.consume(O),ae):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),oe):O===62&&o===4?(e.consume(O),L):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),ne):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Fk,K,ue)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ue(O)):(e.consume(O),he)}function ue(O){return e.check(Bk,de,K)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Le(O)?ue(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),S):he(O)}function oe(O){return O===47?(e.consume(O),u="",q):he(O)}function q(O){if(O===62){const _e=u.toLowerCase();return H1.includes(_e)?(e.consume(O),L):he(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):he(O)}function ne(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),L):O===45&&o===2?(e.consume(O),S):he(O)}function L(O){return O===null||Le(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),L)}function K(O){return e.exit("htmlFlow"),t(O)}}function zk(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function jk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(la,t,n)}}const $k={name:"htmlText",tokenize:Vk};function Vk(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),X):S===63?(e.consume(S),R):pn(S)?(e.consume(S),ge):n(S)}function f(S){return S===45?(e.consume(S),p):S===91?(e.consume(S),a=0,_):pn(S)?(e.consume(S),F):n(S)}function p(S){return S===45?(e.consume(S),b):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),T):Le(S)?(u=E,oe(S)):(e.consume(S),E)}function T(S){return S===45?(e.consume(S),b):E(S)}function b(S){return S===62?Ce(S):S===45?T(S):E(S)}function _(S){const L="CDATA[";return S===L.charCodeAt(a++)?(e.consume(S),a===L.length?w:_):n(S)}function w(S){return S===null?n(S):S===93?(e.consume(S),k):Le(S)?(u=w,oe(S)):(e.consume(S),w)}function k(S){return S===93?(e.consume(S),v):w(S)}function v(S){return S===62?Ce(S):S===93?(e.consume(S),v):w(S)}function F(S){return S===null||S===62?Ce(S):Le(S)?(u=F,oe(S)):(e.consume(S),F)}function R(S){return S===null?n(S):S===63?(e.consume(S),W):Le(S)?(u=R,oe(S)):(e.consume(S),R)}function W(S){return S===62?Ce(S):R(S)}function X(S){return pn(S)?(e.consume(S),B):n(S)}function B(S){return S===45||an(S)?(e.consume(S),B):te(S)}function te(S){return Le(S)?(u=te,oe(S)):Qe(S)?(e.consume(S),te):Ce(S)}function ge(S){return S===45||an(S)?(e.consume(S),ge):S===47||S===62||ft(S)?ye(S):n(S)}function ye(S){return S===47?(e.consume(S),Ce):S===58||S===95||pn(S)?(e.consume(S),M):Le(S)?(u=ye,oe(S)):Qe(S)?(e.consume(S),ye):Ce(S)}function M(S){return S===45||S===46||S===58||S===95||an(S)?(e.consume(S),M):ae(S)}function ae(S){return S===61?(e.consume(S),he):Le(S)?(u=ae,oe(S)):Qe(S)?(e.consume(S),ae):ye(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ue):Le(S)?(u=he,oe(S)):Qe(S)?(e.consume(S),he):(e.consume(S),de)}function ue(S){return S===o?(e.consume(S),o=void 0,be):S===null?n(S):Le(S)?(u=ue,oe(S)):(e.consume(S),ue)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ft(S)?ye(S):(e.consume(S),de)}function be(S){return S===47||S===62||ft(S)?ye(S):n(S)}function Ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function oe(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return Qe(S)?Ze(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return e.enter("htmlTextData"),u(S)}}const _f={name:"labelEnd",resolveAll:Gk,resolveTo:Kk,tokenize:Qk},qk={tokenize:Xk},Yk={tokenize:Jk},Wk={tokenize:Zk};function Gk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Rn(e,0,e.length,n),e}function Kk(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",p,t]]),c=qn(c,sl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function Qk(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?E(T):(u=r.parser.defined.includes(ar(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(qk,p,u?p:E)(T):T===91?e.attempt(Yk,p,u?f:E)(T):u?p(T):E(T)}function f(T){return e.attempt(Wk,p,E)(T)}function p(T){return t(T)}function E(T){return a._balanced=!0,n(T)}}function Xk(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ft(E)?da(e,a)(E):a(E)}function a(E){return E===41?p(E):F1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return ft(E)?da(e,d)(E):p(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?U1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):p(E)}function f(E){return ft(E)?da(e,p)(E):p(E)}function p(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function Jk(e,t,n){const r=this;return o;function o(c){return B1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function Zk(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const eN={name:"labelStartImage",resolveAll:_f.resolveAll,tokenize:tN};function tN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const nN={name:"labelStartLink",resolveAll:_f.resolveAll,tokenize:rN};function rN(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const xf={name:"lineEnding",tokenize:iN};function iN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const ol={name:"thematicBreak",tokenize:sN};function sN(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Le(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Qe(f)?Ze(e,c,"whitespace")(f):c(f))}}const xn={continuation:{tokenize:lN},exit:dN,name:"list",tokenize:uN},oN={partial:!0,tokenize:fN},aN={partial:!0,tokenize:cN};function uN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(b){const _=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:yf(b)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ol,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return yf(b)&&++u<10?(e.consume(b),d):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(la,r.interrupt?n:p,e.attempt(oN,T,E))}function p(b){return r.containerState.initialBlankLine=!0,a++,T(b)}function E(b){return Qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),T):n(b)}function T(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function lN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Qe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function cN(e,t,n){const r=this;return Ze(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function dN(e){e.exit(this.containerState.type)}function fN(e,t,n){const r=this;return Ze(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Qe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const z1={name:"setextUnderline",resolveTo:hN,tokenize:pN};function hN(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:H({},e[r][1].start),end:H({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function pN(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,E;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){E=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Qe(f)?Ze(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Le(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const mN={tokenize:gN};function gN(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(_k,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const EN={resolveAll:$1()},yN=j1("string"),bN=j1("text");function j1(e){return{resolveAll:$1(e==="text"?TN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const E=o[p];let T=-1;if(E)for(;++T<E.length;){const b=E[T];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function $1(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function TN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:H({},r.end)};r.end=H({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const _N=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Ak},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:I1},flow:{35:Pk,42:ol,45:[z1,ol],60:Mk,61:z1,95:ol,96:D1,126:D1},flowInitial:{[-2]:Tf,[-1]:Tf,32:Tf},insideSpan:{null:[bf,EN]},string:{38:R1,92:P1},text:{[-5]:xf,[-4]:xf,[-3]:xf,33:eN,38:R1,42:bf,60:[nk,$k],91:nN,92:[Ok,P1],93:_f,95:bf,96:mk}},Symbol.toStringTag,{value:"Module"}));function xN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(X),check:te(B),consume:F,enter:R,exit:W,interrupt:te(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:b,write:E};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function E(ae){return u=qn(u,ae),k(),u[u.length-1]!==null?[]:(ge(t,0),f.events=sl(a,f.events,f),f.events)}function T(ae,he){return SN(b(ae),he)}function b(ae){return wN(u,ae)}function _(){const{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}=r;return{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}}function w(ae){o[ae.line]=ae.column,M()}function k(){let ae;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<he.length;)v(he.charCodeAt(r._bufferIndex));else v(he)}}function v(ae){p=p(ae)}function F(ae){Le(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,M()):ae!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ae}function R(ae,he){const ue=he||{};return ue.type=ae,ue.start=_(),f.events.push(["enter",ue,f]),c.push(ue),ue}function W(ae){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function X(ae,he){ge(ae,he.from)}function B(ae,he){he.restore()}function te(ae,he){return ue;function ue(de,be,Ce){let oe,q,ne,S;return Array.isArray(de)?K(de):"tokenize"in de?K([de]):L(de);function L(Oe){return Ge;function Ge(Ye){const et=Ye!==null&&Oe[Ye],Nt=Ye!==null&&Oe.null,Kn=[...Array.isArray(et)?et:et?[et]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return K(Kn)(Ye)}}function K(Oe){return oe=Oe,q=0,Oe.length===0?Ce:O(Oe[q])}function O(Oe){return Ge;function Ge(Ye){return S=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Re)(Ye)}}function _e(Oe){return ae(ne,S),be}function Re(Oe){return S.restore(),++q<oe.length?O(oe[q]):Ce}}}function ge(ae,he){ae.resolveAll&&!a.includes(ae)&&a.push(ae),ae.resolve&&Rn(f.events,he,f.events.length-he,ae.resolve(f.events.slice(he),f)),ae.resolveTo&&(f.events=ae.resolveTo(f.events,f))}function ye(){const ae=_(),he=f.previous,ue=f.currentConstruct,de=f.events.length,be=Array.from(c);return{from:de,restore:Ce};function Ce(){r=ae,f.previous=he,f.currentConstruct=ue,f.events.length=de,c=be,M()}}function M(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function wN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function SN(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
1
+ (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie["cimulate-copilot-widget"]={}))})(this,(function(Ie){"use strict";var aB=Object.defineProperty,uB=Object.defineProperties;var lB=Object.getOwnPropertyDescriptors;var id=Object.getOwnPropertySymbols;var Hx=Object.prototype.hasOwnProperty,zx=Object.prototype.propertyIsEnumerable;var Fo=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),cB=Ie=>{throw TypeError(Ie)},sd=Math.pow,Vm=(Ie,Fe,Ke)=>Fe in Ie?aB(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[Fe]=Ke,H=(Ie,Fe)=>{for(var Ke in Fe||(Fe={}))Hx.call(Fe,Ke)&&Vm(Ie,Ke,Fe[Ke]);if(id)for(var Ke of id(Fe))zx.call(Fe,Ke)&&Vm(Ie,Ke,Fe[Ke]);return Ie},Te=(Ie,Fe)=>uB(Ie,lB(Fe));var nn=(Ie,Fe)=>{var Ke={};for(var ct in Ie)Hx.call(Ie,ct)&&Fe.indexOf(ct)<0&&(Ke[ct]=Ie[ct]);if(Ie!=null&&id)for(var ct of id(Ie))Fe.indexOf(ct)<0&&zx.call(Ie,ct)&&(Ke[ct]=Ie[ct]);return Ke};var ve=(Ie,Fe,Ke)=>Vm(Ie,typeof Fe!="symbol"?Fe+"":Fe,Ke);var rt=(Ie,Fe,Ke)=>new Promise((ct,kt)=>{var bt=It=>{try{$t(Ke.next(It))}catch(yn){kt(yn)}},Pe=It=>{try{$t(Ke.throw(It))}catch(yn){kt(yn)}},$t=It=>It.done?ct(It.value):Promise.resolve(It.value).then(bt,Pe);$t((Ke=Ke.apply(Ie,Fe)).next())}),Hr=function(Ie,Fe){this[0]=Ie,this[1]=Fe},od=(Ie,Fe,Ke)=>{var ct=(Pe,$t,It,yn)=>{try{var As=Ke[Pe]($t),Bo=($t=As.value)instanceof Hr,ad=As.done;Promise.resolve(Bo?$t[0]:$t).then(rr=>Bo?ct(Pe==="return"?Pe:"next",$t[1]?{done:rr.done,value:rr.value}:rr,It,yn):It({value:rr,done:ad})).catch(rr=>ct("throw",rr,It,yn))}catch(rr){yn(rr)}},kt=Pe=>bt[Pe]=$t=>new Promise((It,yn)=>ct(Pe,$t,It,yn)),bt={};return Ke=Ke.apply(Ie,Fe),bt[Fo("asyncIterator")]=()=>bt,kt("next"),kt("throw"),kt("return"),bt},qm=Ie=>{var Fe=Ie[Fo("asyncIterator")],Ke=!1,ct,kt={};return Fe==null?(Fe=Ie[Fo("iterator")](),ct=bt=>kt[bt]=Pe=>Fe[bt](Pe)):(Fe=Fe.call(Ie),ct=bt=>kt[bt]=Pe=>{if(Ke){if(Ke=!1,bt==="throw")throw Pe;return Pe}return Ke=!0,{done:!1,value:new Hr(new Promise($t=>{var It=Fe[bt](Pe);It instanceof Object||cB("Object expected"),$t(It)}),1)}}),kt[Fo("iterator")]=()=>kt,ct("next"),"throw"in Fe?ct("throw"):kt.throw=bt=>{throw bt},"return"in Fe&&ct("return"),kt},jx=(Ie,Fe,Ke)=>(Fe=Ie[Fo("asyncIterator")])?Fe.call(Ie):(Ie=Ie[Fo("iterator")](),Fe={},Ke=(ct,kt)=>(kt=Ie[ct])&&(Fe[ct]=bt=>new Promise((Pe,$t,It)=>(bt=kt.call(Ie,bt),It=bt.done,Promise.resolve(bt.value).then(yn=>Pe({value:yn,done:It}),$t)))),Ke("next"),Ke("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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:4px;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-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:4px;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-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;&.modal{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}.cim-widget-search-input{width:100%;height:100%;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.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:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;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);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-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{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;border-radius:8px;padding:.5rem 1rem;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;border-radius:8px;padding:.5rem 1rem;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:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;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.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.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}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;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:1rem 1rem 0;margin-bottom:1rem;gap:8px}.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}.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-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:.5rem;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-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;overflow-y:auto;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)}
2
+ /*$vite$:1*/`,document.head.appendChild(Fe);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},kt={},bt={exports:{}},Pe={};var $t;function It(){if($t)return Pe;$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"),E=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=E&&L[E]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function A(L,Q,O){this.props=L,this.context=Q,this.refs=w,this.updater=O||b}A.prototype.isReactComponent={},A.prototype.setState=function(L,Q){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Q,"setState")},A.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function k(){}k.prototype=A.prototype;function F(L,Q,O){this.props=L,this.context=Q,this.refs=w,this.updater=O||b}var R=F.prototype=new k;R.constructor=F,_(R,A.prototype),R.isPureReactComponent=!0;var W=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(L,Q,O){var _e,Re={},Oe=null,Ge=null;if(Q!=null)for(_e in Q.ref!==void 0&&(Ge=Q.ref),Q.key!==void 0&&(Oe=""+Q.key),Q)X.call(Q,_e)&&!te.hasOwnProperty(_e)&&(Re[_e]=Q[_e]);var Ye=arguments.length-2;if(Ye===1)Re.children=O;else if(1<Ye){for(var et=Array(Ye),Nt=0;Nt<Ye;Nt++)et[Nt]=arguments[Nt+2];Re.children=et}if(L&&L.defaultProps)for(_e in Ye=L.defaultProps,Ye)Re[_e]===void 0&&(Re[_e]=Ye[_e]);return{$$typeof:e,type:L,key:Oe,ref:Ge,props:Re,_owner:B.current}}function ye(L,Q){return{$$typeof:e,type:L.type,key:Q,ref:L.ref,props:L.props,_owner:L._owner}}function M(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function ae(L){var Q={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return Q[O]})}var he=/\/+/g;function ue(L,Q){return typeof L=="object"&&L!==null&&L.key!=null?ae(""+L.key):Q.toString(36)}function de(L,Q,O,_e,Re){var Oe=typeof L;(Oe==="undefined"||Oe==="boolean")&&(L=null);var Ge=!1;if(L===null)Ge=!0;else switch(Oe){case"string":case"number":Ge=!0;break;case"object":switch(L.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=L,Re=Re(Ge),L=_e===""?"."+ue(Ge,0):_e,W(Re)?(O="",L!=null&&(O=L.replace(he,"$&/")+"/"),de(Re,Q,O,"",function(Nt){return Nt})):Re!=null&&(M(Re)&&(Re=ye(Re,O+(!Re.key||Ge&&Ge.key===Re.key?"":(""+Re.key).replace(he,"$&/")+"/")+L)),Q.push(Re)),1;if(Ge=0,_e=_e===""?".":_e+":",W(L))for(var Ye=0;Ye<L.length;Ye++){Oe=L[Ye];var et=_e+ue(Oe,Ye);Ge+=de(Oe,Q,O,et,Re)}else if(et=T(L),typeof et=="function")for(L=et.call(L),Ye=0;!(Oe=L.next()).done;)Oe=Oe.value,et=_e+ue(Oe,Ye++),Ge+=de(Oe,Q,O,et,Re);else if(Oe==="object")throw Q=String(L),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ge}function be(L,Q,O){if(L==null)return L;var _e=[],Re=0;return de(L,_e,"","",function(Oe){return Q.call(O,Oe,Re++)}),_e}function Ce(L){if(L._status===-1){var Q=L._result;Q=Q(),Q.then(function(O){(L._status===0||L._status===-1)&&(L._status=1,L._result=O)},function(O){(L._status===0||L._status===-1)&&(L._status=2,L._result=O)}),L._status===-1&&(L._status=0,L._result=Q)}if(L._status===1)return L._result.default;throw L._result}var oe={current:null},q={transition:null},ne={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:be,forEach:function(L,Q,O){be(L,function(){Q.apply(this,arguments)},O)},count:function(L){var Q=0;return be(L,function(){Q++}),Q},toArray:function(L){return be(L,function(Q){return Q})||[]},only:function(L){if(!M(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Pe.Component=A,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=F,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Pe.act=S,Pe.cloneElement=function(L,Q,O){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var _e=_({},L.props),Re=L.key,Oe=L.ref,Ge=L._owner;if(Q!=null){if(Q.ref!==void 0&&(Oe=Q.ref,Ge=B.current),Q.key!==void 0&&(Re=""+Q.key),L.type&&L.type.defaultProps)var Ye=L.type.defaultProps;for(et in Q)X.call(Q,et)&&!te.hasOwnProperty(et)&&(_e[et]=Q[et]===void 0&&Ye!==void 0?Ye[et]:Q[et])}var et=arguments.length-2;if(et===1)_e.children=O;else if(1<et){Ye=Array(et);for(var Nt=0;Nt<et;Nt++)Ye[Nt]=arguments[Nt+2];_e.children=Ye}return{$$typeof:e,type:L.type,key:Re,ref:Oe,props:_e,_owner:Ge}},Pe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Pe.createElement=ge,Pe.createFactory=function(L){var Q=ge.bind(null,L);return Q.type=L,Q},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(L){return{$$typeof:c,render:L}},Pe.isValidElement=M,Pe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Ce}},Pe.memo=function(L,Q){return{$$typeof:f,type:L,compare:Q===void 0?null:Q}},Pe.startTransition=function(L){var Q=q.transition;q.transition={};try{L()}finally{q.transition=Q}},Pe.unstable_act=S,Pe.useCallback=function(L,Q){return oe.current.useCallback(L,Q)},Pe.useContext=function(L){return oe.current.useContext(L)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(L){return oe.current.useDeferredValue(L)},Pe.useEffect=function(L,Q){return oe.current.useEffect(L,Q)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(L,Q,O){return oe.current.useImperativeHandle(L,Q,O)},Pe.useInsertionEffect=function(L,Q){return oe.current.useInsertionEffect(L,Q)},Pe.useLayoutEffect=function(L,Q){return oe.current.useLayoutEffect(L,Q)},Pe.useMemo=function(L,Q){return oe.current.useMemo(L,Q)},Pe.useReducer=function(L,Q,O){return oe.current.useReducer(L,Q,O)},Pe.useRef=function(L){return oe.current.useRef(L)},Pe.useState=function(L){return oe.current.useState(L)},Pe.useSyncExternalStore=function(L,Q,O){return oe.current.useSyncExternalStore(L,Q,O)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function As(){return yn||(yn=1,bt.exports=It()),bt.exports}var Bo;function ad(){if(Bo)return kt;Bo=1;var e=As(),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,E={},T=null,b=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(b=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(E[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)E[p]===void 0&&(E[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:b,props:E,_owner:o.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var rr;function Yx(){return rr||(rr=1,ct.exports=ad()),ct.exports}var C=Yx();const Tr=Object.create(null);Tr.open="0",Tr.close="1",Tr.ping="2",Tr.pong="3",Tr.message="4",Tr.upgrade="5",Tr.noop="6";const Su=Object.create(null);Object.keys(Tr).forEach(e=>{Su[Tr[e]]=e});const ud={type:"error",data:"parser error"},Ym=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Wm=typeof ArrayBuffer=="function",Gm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ld=({type:e,data:t},n,r)=>Ym&&t instanceof Blob?n?r(t):Km(t,r):Wm&&(t instanceof ArrayBuffer||Gm(t))?n?r(t):Km(new Blob([t]),r):r(Tr[e]+(t||"")),Km=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Qm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cd;function Wx(e,t){if(Ym&&e.data instanceof Blob)return e.data.arrayBuffer().then(Qm).then(t);if(Wm&&(e.data instanceof ArrayBuffer||Gm(e.data)))return t(Qm(e.data));ld(e,!1,n=>{cd||(cd=new TextEncoder),t(cd.encode(n))})}const Xm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Xm.length;e++)Uo[Xm.charCodeAt(e)]=e;const Gx=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=Uo[e.charCodeAt(r)],u=Uo[e.charCodeAt(r+1)],c=Uo[e.charCodeAt(r+2)],d=Uo[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},Kx=typeof ArrayBuffer=="function",dd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Jm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Qx(e.substring(1),t)}:Su[n]?e.length>1?{type:Su[n],data:e.substring(1)}:{type:Su[n]}:ud},Qx=(e,t)=>{if(Kx){const n=Gx(e);return Jm(n,t)}else return{base64:!0,data:e}},Jm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Zm="",Xx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{ld(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Zm))})})},Jx=(e,t)=>{const n=e.split(Zm),r=[];for(let o=0;o<n.length;o++){const a=dd(n[o],t);if(r.push(a),a.type==="error")break}return r};function Zx(){return new TransformStream({transform(e,t){Wx(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 fd;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function Au(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 ew(e,t){fd||(fd=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(Cu(n)<1)break;const d=Au(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(Cu(n)<2)break;const d=Au(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=Au(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ud);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<o)break;const d=Au(n,o);c.enqueue(dd(a?d:fd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ud);break}}}})}const e0=4;function Ft(e){if(e)return tw(e)}function tw(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 vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),nw="arraybuffer";function dB(){}function t0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const rw=jn.setTimeout,iw=jn.clearTimeout;function ku(e,t){t.useNativeTimers?(e.setTimeoutFn=rw.bind(jn),e.clearTimeoutFn=iw.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const sw=1.33;function ow(e){return typeof e=="string"?aw(e):Math.ceil((e.byteLength||e.size)*sw)}function aw(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 n0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function uw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function lw(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 cw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hd extends Ft{constructor(t){super(),this.writable=!1,ku(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 cw(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=dd(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=uw(t);return n.length?"?"+n:""}}class dw extends hd{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)};Jx(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,Xx(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]=n0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let r0=!1;try{r0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const fw=r0;function hw(){}class pw extends dw{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 _r extends Ft{constructor(t,n,r){super(),this.createRequest=t,ku(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=t0(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=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=hw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",i0);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,i0,!1)}}function i0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const mw=(function(){const e=s0({xdomain:!1});return e&&e.responseType!==null})();class gw extends pw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=mw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(s0,this.uri(),t)}}function s0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||fw))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const o0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ew extends hd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=o0?{}:t0(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;ld(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=n0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pd=jn.WebSocket||jn.MozWebSocket;class yw extends Ew{createSocket(t,n,r){return o0?new pd(t,n,r):n?new pd(t,n):new pd(t)}doWrite(t,n){this.ws.send(n)}}class bw extends hd{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=ew(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Zx();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&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Tw={websocket:yw,webtransport:bw,polling:gw},_w=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xw=["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=_w.exec(e||""),a={},u=14;for(;u--;)a[xw[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=ww(a,a.path),a.queryKey=Sw(a,a.query),a}function ww(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 Sw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const gd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nu=[];gd&&addEventListener("offline",()=>{Nu.forEach(e=>e())},!1);class li extends Ft{constructor(t,n){if(super(),this.binaryType=nw,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);ku(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=lw(this.opts.query)),gd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=e0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&li.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",li.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+=ow(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(li.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(),gd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nu.indexOf(this._offlineEventListener);r!==-1&&Nu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}li.protocol=e0;class Cw extends li{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;li.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;li.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=E=>{const T=new Error("probe error: "+E);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(E){n&&E.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 Aw=class extends Cw{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Tw[o]).filter(o=>!!o)),super(t,r)}};function vw(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 kw=typeof ArrayBuffer=="function",Nw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,a0=Object.prototype.toString,Ow=typeof Blob=="function"||typeof Blob!="undefined"&&a0.call(Blob)==="[object BlobConstructor]",Iw=typeof File=="function"||typeof File!="undefined"&&a0.call(File)==="[object FileConstructor]";function Ed(e){return kw&&(e instanceof ArrayBuffer||Nw(e))||Ow&&e instanceof Blob||Iw&&e instanceof File}function Ou(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ou(e[n]))return!0;return!1}if(Ed(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ou(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ou(e[n]))return!0;return!1}function Pw(e){const t=[],n=e.data,r=e;return r.data=yd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yd(e,t){if(!e)return e;if(Ed(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]=yd(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]=yd(e[r],t));return n}return e}function Rw(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const Lw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Je;(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"})(Je||(Je={}));class Dw{constructor(t){this.replacer=t}encode(t){return(t.type===Je.EVENT||t.type===Je.ACK)&&Ou(t)?this.encodeAsBinary({type:t.type===Je.EVENT?Je.BINARY_EVENT:Je.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Je.BINARY_EVENT||t.type===Je.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=Pw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Td 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===Je.BINARY_EVENT;r||n.type===Je.BINARY_ACK?(n.type=r?Je.EVENT:Je.ACK,this.reconstructor=new Mw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ed(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(Je[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Je.BINARY_EVENT||r.type===Je.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(!Fw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Td.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Je.CONNECT:return u0(n);case Je.DISCONNECT:return n===void 0;case Je.CONNECT_ERROR:return typeof n=="string"||u0(n);case Je.EVENT:case Je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Lw.indexOf(n[0])===-1);case Je.ACK:case Je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Mw{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=Rw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Fw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function u0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Bw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Td,Encoder:Dw,get PacketType(){return Je}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class l0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Uw.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:Je.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,E=n.pop();this._registerAckCallback(p,E),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)=>r!==this._queue[0]?void 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:Je.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 Je.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 Je.EVENT:case Je.BINARY_EVENT:this.onevent(t);break;case Je.ACK:case Je.BINARY_ACK:this.onack(t);break;case Je.DISCONNECT:this.ondisconnect();break;case Je.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:Je.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.emitReserved("connect"),this._drainQueue(!0)}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:Je.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 vs(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}vs.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},vs.prototype.reset=function(){this.attempts=0},vs.prototype.setMin=function(e){this.ms=e},vs.prototype.setMax=function(e){this.max=e},vs.prototype.setJitter=function(e){this.jitter=e};class _d 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,ku(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 vs({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||Bw;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 Aw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(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(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new l0(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 Ho={};function Iu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=vw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ho[o]&&a in Ho[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):(Ho[o]||(Ho[o]=new _d(r,t)),d=Ho[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Iu,{Manager:_d,Socket:l0,io:Iu,connect:Iu});var Hw=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===zw})(t)})(e)},zw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function zo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ks((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function jw(e,t,n){return e.concat(t).map((function(r){return zo(r,n)}))}function c0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function d0(e,t){try{return t in e}catch(n){return!1}}function $w(e,t,n){var r={};return n.isMergeableObject(e)&&c0(e).forEach((function(o){r[o]=zo(e[o],n)})),c0(t).forEach((function(o){(function(a,u){return d0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(d0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return ks;var c=u.customMerge(a);return typeof c=="function"?c:ks})(o,n)(e[o],t[o],n):r[o]=zo(t[o],n))})),r}function ks(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||jw,n.isMergeableObject=n.isMergeableObject||Hw,n.cloneUnlessOtherwiseSpecified=zo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):$w(e,t,n):zo(t,n)}ks.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return ks(n,r,t)}),{})};var Vw=ks;class qw{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return(function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t})(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Yw=typeof ArrayBuffer=="function",f0=Object.prototype.toString,Ww=typeof Blob=="function"||typeof Blob!="undefined"&&f0.call(Blob)==="[object BlobConstructor]",Gw=typeof File=="function"||typeof File!="undefined"&&f0.call(File)==="[object FileConstructor]";function xd(e){return Yw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Ww&&e instanceof Blob||Gw&&e instanceof File}function Pu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Pu(e[n]))return!0;return!1}if(xd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pu(e[n]))return!0;return!1}function Kw(e){const t=[],n=e.data,r=e;return r.data=wd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function wd(e,t){if(!e)return e;if(xd(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]=wd(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]=wd(e[r],t));return n}return e}function Qw(e,t){return e.data=Sd(e.data,t),delete e.attachments,e}function Sd(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]=Sd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sd(e[n],t));return e}const Xw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ct||(Ct={}));class Jw{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Pu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Kw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function h0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Cd extends hn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new Zw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!xd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}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(!Cd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return h0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||h0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Xw.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Zw{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=Qw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const p0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],m0=(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)},g0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),eS=m0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),p0),E0=m0(g0,g0,p0),tS={Encoder:class extends Jw{encode(e){var t,n;return super.encode(Te(H({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],eS(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 Cd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?E0(r):r)):n instanceof Object?E0(n):n)):t))}}},nS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class rS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=f=>{console.log("[Copilot SDK] Connect Ack:",f),this.socket.auth={[this.sessionIdKey]:f.sessionId}},this.handleDisconnect=f=>{console.warn(`[Copilot SDK] Disconnected: ${f}`),f!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${f}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=f=>{console.error(`[Copilot SDK] Connect error: ${f.message}`);const p=f.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=p==null?void 0:p[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[nS,a,{parser:tS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Iu(u,Vw.all(d))}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*sd(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 rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(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 rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return rt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return rt(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 rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return od(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Hr(u({emit:E=>{c.push(E),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Hr(new Promise((E=>{f=E})));for(;c.length>0;)yield c.shift()}finally{yield new Hr(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),()=>rt(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 qw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var $=As();const $i=Ke($);function y0(e,t){return function(){return e.apply(t,arguments)}}const{toString:iS}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:Ru,toStringTag:b0}=Symbol,Lu=(e=>t=>{const n=iS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Lu(t)===e),Du=e=>t=>typeof t===e,{isArray:Ns}=Array,Os=Du("undefined");function jo(e){return e!==null&&!Os(e)&&e.constructor!==null&&!Os(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const T0=sr("ArrayBuffer");function sS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&T0(e.buffer),t}const oS=Du("string"),bn=Du("function"),_0=Du("number"),$o=e=>e!==null&&typeof e=="object",aS=e=>e===!0||e===!1,Mu=e=>{if(Lu(e)!=="object")return!1;const t=Ad(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(b0 in e)&&!(Ru in e)},uS=e=>{if(!$o(e)||jo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},lS=sr("Date"),cS=sr("File"),dS=e=>!!(e&&typeof e.uri!="undefined"),fS=e=>e&&typeof e.getParts!="undefined",hS=sr("Blob"),pS=sr("FileList"),mS=e=>$o(e)&&bn(e.pipe);function gS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const x0=gS(),w0=typeof x0.FormData!="undefined"?x0.FormData:void 0,ES=e=>{let t;return e&&(w0&&e instanceof w0||bn(e.append)&&((t=Lu(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},yS=sr("URLSearchParams"),[bS,TS,_S,xS]=["ReadableStream","Request","Response","Headers"].map(sr),wS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ns(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(jo(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 S0(e,t){if(jo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Vi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,C0=e=>!Os(e)&&e!==Vi;function vd(){const{caseless:e,skipUndefined:t}=C0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&S0(n,a)||a;Mu(n[u])&&Mu(o)?n[u]=vd(n[u],o):Mu(o)?n[u]=vd({},o):Ns(o)?n[u]=o.slice():(!t||!Os(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Vo(arguments[o],r);return n}const SS=(e,t,n,{allOwnKeys:r}={})=>(Vo(t,(o,a)=>{n&&bn(o)?Object.defineProperty(e,a,{value:y0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),CS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),AS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},vS=(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&&Ad(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kS=(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},NS=e=>{if(!e)return null;if(Ns(e))return e;let t=e.length;if(!_0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},OS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ad(Uint8Array)),IS=(e,t)=>{const r=(e&&e[Ru]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},PS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},RS=sr("HTMLFormElement"),LS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),A0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),DS=sr("RegExp"),v0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},MS=e=>{v0(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},FS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ns(e)?r(e):r(String(e).split(t)),n},BS=()=>{},US=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function HS(e){return!!(e&&bn(e.append)&&e[b0]==="FormData"&&e[Ru])}const zS=e=>{const t=new Array(10),n=(r,o)=>{if($o(r)){if(t.indexOf(r)>=0)return;if(jo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ns(r)?[]:{};return Vo(r,(u,c)=>{const d=n(u,o+1);!Os(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},jS=sr("AsyncFunction"),$S=e=>e&&($o(e)||bn(e))&&bn(e.then)&&bn(e.catch),k0=((e,t)=>e?setImmediate:t?((n,r)=>(Vi.addEventListener("message",({source:o,data:a})=>{o===Vi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Vi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(Vi.postMessage)),VS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Vi):typeof process!="undefined"&&process.nextTick||k0,K={isArray:Ns,isArrayBuffer:T0,isBuffer:jo,isFormData:ES,isArrayBufferView:sS,isString:oS,isNumber:_0,isBoolean:aS,isObject:$o,isPlainObject:Mu,isEmptyObject:uS,isReadableStream:bS,isRequest:TS,isResponse:_S,isHeaders:xS,isUndefined:Os,isDate:lS,isFile:cS,isReactNativeBlob:dS,isReactNative:fS,isBlob:hS,isRegExp:DS,isFunction:bn,isStream:mS,isURLSearchParams:yS,isTypedArray:OS,isFileList:pS,forEach:Vo,merge:vd,extend:SS,trim:wS,stripBOM:CS,inherits:AS,toFlatObject:vS,kindOf:Lu,kindOfTest:sr,endsWith:kS,toArray:NS,forEachEntry:IS,matchAll:PS,isHTMLForm:RS,hasOwnProperty:A0,hasOwnProp:A0,reduceDescriptors:v0,freezeMethods:MS,toObjectSet:FS,toCamelCase:LS,noop:BS,toFiniteNumber:US,findKey:S0,global:Vi,isContextDefined:C0,isSpecCompliantForm:HS,toJSONObject:zS,isAsyncFn:jS,isThenable:$S,setImmediate:k0,asap:VS,isIterable:e=>e!=null&&bn(e[Ru])};let He=class $x extends Error{static from(t,n,r,o,a,u){const c=new $x(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",{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(){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:K.toJSONObject(this.config),code:this.code,status:this.status}}};He.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",He.ERR_BAD_OPTION="ERR_BAD_OPTION",He.ECONNABORTED="ECONNABORTED",He.ETIMEDOUT="ETIMEDOUT",He.ERR_NETWORK="ERR_NETWORK",He.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",He.ERR_DEPRECATED="ERR_DEPRECATED",He.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",He.ERR_BAD_REQUEST="ERR_BAD_REQUEST",He.ERR_CANCELED="ERR_CANCELED",He.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",He.ERR_INVALID_URL="ERR_INVALID_URL";const qS=null;function kd(e){return K.isPlainObject(e)||K.isArray(e)}function N0(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Nd(e,t,n){return e?e.concat(t).map(function(o,a){return o=N0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function YS(e){return K.isArray(e)&&!e.some(kd)}const WS=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Fu(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,A){return!K.isUndefined(A[w])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(K.isBoolean(_))return _.toString();if(!d&&K.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,w,A){let k=_;if(K.isReactNative(t)&&K.isReactNativeBlob(_))return t.append(Nd(A,w,a),f(_)),!1;if(_&&!A&&typeof _=="object"){if(K.endsWith(w,"{}"))w=r?w:w.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&YS(_)||(K.isFileList(_)||K.endsWith(w,"[]"))&&(k=K.toArray(_)))return w=N0(w),k.forEach(function(R,W){!(K.isUndefined(R)||R===null)&&t.append(u===!0?Nd([w],W,a):u===null?w:w+"[]",f(R))}),!1}return kd(_)?!0:(t.append(Nd(A,w,a),f(_)),!1)}const E=[],T=Object.assign(WS,{defaultVisitor:p,convertValue:f,isVisitable:kd});function b(_,w){if(!K.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+w.join("."));E.push(_),K.forEach(_,function(k,F){(!(K.isUndefined(k)||k===null)&&o.call(t,k,K.isString(F)?F.trim():F,w,T))===!0&&b(k,w?w.concat(F):[F])}),E.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return b(e),t}function O0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Od(e,t){this._pairs=[],e&&Fu(e,this,t)}const I0=Od.prototype;I0.append=function(t,n){this._pairs.push([t,n])},I0.toString=function(t){const n=t?function(r){return t.call(this,r,O0)}:O0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function GS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function P0(e,t,n){if(!t)return e;const r=n&&n.encode||GS,o=K.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=K.isURLSearchParams(t)?t.toString():new Od(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class R0{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){K.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},KS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Od,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pd=typeof window!="undefined"&&typeof document!="undefined",Rd=typeof navigator=="object"&&navigator||void 0,QS=Pd&&(!Rd||["ReactNative","NativeScript","NS"].indexOf(Rd.product)<0),XS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",JS=Pd&&window.location.href||"http://localhost",rn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pd,hasStandardBrowserEnv:QS,hasStandardBrowserWebWorkerEnv:XS,navigator:Rd,origin:JS},Symbol.toStringTag,{value:"Module"}))),KS);function ZS(e,t){return Fu(e,new rn.classes.URLSearchParams,H({visitor:function(n,r,o,a){return rn.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function eC(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tC(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 L0(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&&K.isArray(o)?o.length:u,d?(K.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!K.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&K.isArray(o[u])&&(o[u]=tC(o[u])),!c)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(r,o)=>{t(eC(r),o,n,0)}),n}return null}function nC(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qo={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=K.isObject(t);if(a&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return o?JSON.stringify(L0(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ZS(t,this.formSerializer).toString();if((c=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Fu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),nC(t)):t}],transformResponse:[function(t){const n=this.transitional||qo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{qo.headers[e]={}});const rC=K.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"]),iC=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&rC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},D0=Symbol("internals"),sC=e=>!/[\r\n]/.test(e);function M0(e,t){if(!(e===!1||e==null)){if(K.isArray(e)){e.forEach(n=>M0(n,t));return}if(!sC(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function Yo(e){return e&&String(e).trim().toLowerCase()}function oC(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(n!==10&&n!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function Bu(e){return e===!1||e==null?e:K.isArray(e)?e.map(Bu):oC(String(e))}function aC(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 uC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ld(e,t,n,r,o){if(K.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function lC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cC(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=Yo(d);if(!p)throw new Error("header name must be a non-empty string");const E=K.findKey(o,p);(!E||o[E]===void 0||f===!0||f===void 0&&o[E]!==!1)&&(M0(c,d),o[E||d]=Bu(c))}const u=(c,d)=>K.forEach(c,(f,p)=>a(f,p,d));if(K.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(K.isString(t)&&(t=t.trim())&&!uC(t))u(iC(t),n);else if(K.isObject(t)&&K.isIterable(t)){let c={},d,f;for(const p of t){if(!K.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?K.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=Yo(t),t){const r=K.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return aC(o);if(K.isFunction(n))return n.call(this,o,r);if(K.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yo(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ld(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Yo(u),u){const c=K.findKey(r,u);c&&(!n||Ld(r,r[c],c,n))&&(delete r[c],o=!0)}}return K.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||Ld(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return K.forEach(this,(o,a)=>{const u=K.findKey(r,a);if(u){n[u]=Bu(o),delete n[a];return}const c=t?lC(a):String(a).trim();c!==a&&delete n[a],n[c]=Bu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){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[D0]=this[D0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Yo(u);r[c]||(cC(o,u),r[c]=!0)}return K.isArray(t)?t.forEach(a):a(t),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),K.freezeMethods(Tn);function Dd(e,t){const n=this||qo,r=t||n,o=Tn.from(r.headers);let a=r.data;return K.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function F0(e){return!!(e&&e.__CANCEL__)}let Wo=class extends He{constructor(t,n,r){super(t==null?"canceled":t,He.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function B0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fC(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 E=a,T=0;for(;E!==o;)T+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const b=p&&f-p;return b?Math.round(T*1e3/b):void 0}}function hC(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(),E=p-n;E>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Uu=(e,t,n=3)=>{let r=0;const o=fC(50,250);return hC(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,f=o(d),p=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-u)/f:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},U0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},H0=e=>(...t)=>K.asap(()=>e(...t)),pC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,mC=rn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),K.isString(r)&&c.push(`path=${r}`),K.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),K.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function EC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function z0(e,t,n){let r=!gC(t);return e&&(r||n==!1)?EC(e,t):t}const j0=e=>e instanceof Tn?H({},e):e;function qi(e,t){t=t||{};const n={};function r(f,p,E,T){return K.isPlainObject(f)&&K.isPlainObject(p)?K.merge.call({caseless:T},f,p):K.isPlainObject(p)?K.merge({},p):K.isArray(p)?p.slice():p}function o(f,p,E,T){if(K.isUndefined(p)){if(!K.isUndefined(f))return r(void 0,f,E,T)}else return r(f,p,E,T)}function a(f,p){if(!K.isUndefined(p))return r(void 0,p)}function u(f,p){if(K.isUndefined(p)){if(!K.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,E){if(E in t)return r(f,p);if(E in e)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,responseEncoding:u,validateStatus:c,headers:(f,p,E)=>o(j0(f),j0(p),E,!0)};return K.forEach(Object.keys(H(H({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const E=K.hasOwnProp(d,p)?d[p]:o,T=E(e[p],t[p],p);K.isUndefined(T)&&E!==c||(n[p]=T)}),n}const $0=e=>{const t=qi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=Tn.from(u),t.url=P0(z0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,E])=>{f.includes(p.toLowerCase())&&u.set(p,E)})}}if(rn.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&pC(t.url))){const d=o&&a&&mC.read(a);d&&u.set(o,d)}return t},yC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=$0(e);let a=o.data;const u=Tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,E,T,b,_;function w(){b&&b(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function k(){if(!A)return;const R=Tn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};B0(function(te){n(te),w()},function(te){r(te),w()},X),A=null}"onloadend"in A?A.onloadend=k:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(k)},A.onabort=function(){A&&(r(new He("Request aborted",He.ECONNABORTED,e,A)),A=null)},A.onerror=function(W){const X=W&&W.message?W.message:"Network Error",B=new He(X,He.ERR_NETWORK,e,A);B.event=W||null,r(B),A=null},A.ontimeout=function(){let W=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||Id;o.timeoutErrorMessage&&(W=o.timeoutErrorMessage),r(new He(W,X.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,A)),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&K.forEach(u.toJSON(),function(W,X){A.setRequestHeader(X,W)}),K.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),f&&([T,_]=Uu(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([E,b]=Uu(d),A.upload.addEventListener("progress",E),A.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=R=>{A&&(r(!R||R.type?new Wo(null,e,A):R),A.abort(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const F=dC(o.url);if(F&&rn.protocols.indexOf(F)===-1){r(new He("Unsupported protocol "+F+":",He.ERR_BAD_REQUEST,e));return}A.send(a||null)})},bC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(f){if(!o){o=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof He?p:new Wo(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new He(`timeout of ${t}ms exceeded`,He.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>K.asap(c),d}},TC=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},_C=function(e,t){return od(this,null,function*(){try{for(var n=jx(xC(e)),r,o,a;r=!(o=yield new Hr(n.next())).done;r=!1){const u=o.value;yield*qm(TC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Hr(o.call(n)))}finally{if(a)throw a[0]}}})},xC=function(e){return od(this,null,function*(){if(e[Symbol.asyncIterator]){yield*qm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Hr(t.read());if(n)break;yield r}}finally{yield new Hr(t.cancel())}})},V0=(e,t,n,r)=>{const o=_C(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return rt(this,null,function*(){try{const{done:p,value:E}=yield o.next();if(p){c(),f.close();return}let T=E.byteLength;if(n){let b=a+=T;n(b)}f.enqueue(new Uint8Array(E))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})},q0=64*1024,{isFunction:Hu}=K,wC=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:Y0,TextEncoder:W0}=K.global,G0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},SC=e=>{e=K.merge.call({skipUndefined:!0},wC,e);const{fetch:t,Request:n,Response:r}=e,o=t?Hu(t):typeof fetch=="function",a=Hu(n),u=Hu(r);if(!o)return!1;const c=o&&Hu(Y0),d=o&&(typeof W0=="function"?(_=>w=>_.encode(w))(new W0):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&G0(()=>{let _=!1;const w=new Y0,A=new n(rn.origin,{body:w,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return w.cancel(),_&&!A}),p=u&&c&&G0(()=>K.isReadableStream(new r("").body)),E={stream:p&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(w,A)=>{let k=w&&w[_];if(k)return k.call(w);throw new He(`Response type '${_}' is not supported`,He.ERR_NOT_SUPPORT,A)})});const T=_=>rt(null,null,function*(){if(_==null)return 0;if(K.isBlob(_))return _.size;if(K.isSpecCompliantForm(_))return(yield new n(rn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(K.isArrayBufferView(_)||K.isArrayBuffer(_))return _.byteLength;if(K.isURLSearchParams(_)&&(_=_+""),K.isString(_))return(yield d(_)).byteLength}),b=(_,w)=>rt(null,null,function*(){const A=K.toFiniteNumber(_.getContentLength());return A==null?T(w):A});return _=>rt(null,null,function*(){let{url:w,method:A,data:k,signal:F,cancelToken:R,timeout:W,onDownloadProgress:X,onUploadProgress:B,responseType:te,headers:ge,withCredentials:ye="same-origin",fetchOptions:M}=$0(_),ae=t||fetch;te=te?(te+"").toLowerCase():"text";let he=bC([F,R&&R.toAbortSignal()],W),ue=null;const de=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let be;try{if(B&&f&&A!=="get"&&A!=="head"&&(be=yield b(ge,k))!==0){let L=new n(w,{method:"POST",body:k,duplex:"half"}),Q;if(K.isFormData(k)&&(Q=L.headers.get("content-type"))&&ge.setContentType(Q),L.body){const[O,_e]=U0(be,Uu(H0(B)));k=V0(L.body,q0,O,_e)}}K.isString(ye)||(ye=ye?"include":"omit");const Ce=a&&"credentials"in n.prototype,oe=Te(H({},M),{signal:he,method:A.toUpperCase(),headers:ge.normalize().toJSON(),body:k,duplex:"half",credentials:Ce?ye:void 0});ue=a&&new n(w,oe);let q=yield a?ae(ue,M):ae(w,oe);const ne=p&&(te==="stream"||te==="response");if(p&&(X||ne&&de)){const L={};["status","statusText","headers"].forEach(Re=>{L[Re]=q[Re]});const Q=K.toFiniteNumber(q.headers.get("content-length")),[O,_e]=X&&U0(Q,Uu(H0(X),!0))||[];q=new r(V0(q.body,q0,O,()=>{_e&&_e(),de&&de()}),L)}te=te||"text";let S=yield E[K.findKey(E,te)||"text"](q,_);return!ne&&de&&de(),yield new Promise((L,Q)=>{B0(L,Q,{data:S,headers:Tn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:ue})})}catch(Ce){throw de&&de(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,_,ue,Ce&&Ce.response),{cause:Ce.cause||Ce}):He.from(Ce,Ce&&Ce.code,_,ue,Ce&&Ce.response)}})},CC=new Map,K0=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=CC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:SC(t)),p=f;return f};K0();const Md={http:qS,xhr:yC,fetch:{get:K0}};K.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Q0=e=>`- ${e}`,AC=e=>K.isFunction(e)||e===null||e===!1;function vC(e,t){e=K.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,!AC(r)&&(o=Md[(c=String(r)).toLowerCase()],o===void 0))throw new He(`Unknown adapter '${c}'`);if(o&&(K.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 :
5
+ `+u.map(Q0).join(`
6
+ `):" "+Q0(u[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const X0={getAdapter:vC,adapters:Md};function Fd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wo(null,e)}function J0(e){return Fd(e),e.headers=Tn.from(e.headers),e.data=Dd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),X0.getAdapter(e.adapter||qo.adapter,e)(e).then(function(r){return Fd(e),r.data=Dd.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return F0(r)||(Fd(e),r&&r.response&&(r.response.data=Dd.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const Z0="1.15.0",zu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const eg={};zu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Z0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new He(o(u," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!eg[u]&&(eg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},zu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function kC(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new He("option "+a+" must be "+d,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const ju={assertOptions:kC,validators:zu},$n=ju.validators;let Yi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new R0,response:new R0}}request(t,n){return rt(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
7
+ `);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
+ `),c=u===-1?-1:a.indexOf(`
9
+ `,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
10
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ju.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(K.isFunction(o)?n.paramsSerializer={serialize:o}:ju.assertOptions(o,{encode:$n.function,serialize:$n.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ju.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&K.merge(a.common,a[n.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let p,E=0,T;if(!d){const _=[J0.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);E<T;)p=p.then(_[E++],_[E++]);return p}T=c.length;let b=n;for(;E<T;){const _=c[E++],w=c[E++];try{b=_(b)}catch(A){w.call(this,A);break}}try{p=J0.call(this,b)}catch(_){return Promise.reject(_)}for(E=0,T=f.length;E<T;)p=p.then(f[E++],f[E++]);return p}getUri(t){t=qi(this.defaults,t);const n=z0(t.baseURL,t.url,t.allowAbsoluteUrls);return P0(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){Yi.prototype[t]=function(n,r){return this.request(qi(r||{},{method:t,url:n,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(qi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Yi.prototype[t]=n(),Yi.prototype[t+"Form"]=n(!0)});let NC=class Vx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Wo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Vx(function(o){t=o}),cancel:t}}};function OC(e){return function(n){return e.apply(null,n)}}function IC(e){return K.isObject(e)&&e.isAxiosError===!0}const Bd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bd).forEach(([e,t])=>{Bd[t]=e});function tg(e){const t=new Yi(e),n=y0(Yi.prototype.request,t);return K.extend(n,Yi.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return tg(qi(e,o))},n}const Pt=tg(qo);Pt.Axios=Yi,Pt.CanceledError=Wo,Pt.CancelToken=NC,Pt.isCancel=F0,Pt.VERSION=Z0,Pt.toFormData=Fu,Pt.AxiosError=He,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=OC,Pt.isAxiosError=IC,Pt.mergeConfig=qi,Pt.AxiosHeaders=Tn,Pt.formToJSON=e=>L0(K.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=X0.getAdapter,Pt.HttpStatusCode=Bd,Pt.default=Pt;const{Axios:yB,AxiosError:bB,CanceledError:TB,isCancel:_B,CancelToken:xB,VERSION:wB,all:SB,Cancel:CB,isAxiosError:AB,spread:vB,toFormData:kB,AxiosHeaders:NB,HttpStatusCode:OB,formToJSON:IB,getAdapter:PB,mergeConfig:RB}=Pt;class ng{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Pt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const PC=$.createContext(void 0),RC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=$.useMemo(()=>new ng(e,t,n),[e,t,n]);return C.jsx(PC.Provider,{value:o,children:r})};var rg=Symbol.for("immer-nothing"),ig=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Is=Object.getPrototypeOf;function Ps(e){return!!e&&!!e[ot]}function zr(e){var t;return e?sg(e)||Array.isArray(e)||!!e[ig]||!!((t=e.constructor)!=null&&t[ig])||Vu(e)||qu(e):!1}var LC=Object.prototype.constructor.toString();function sg(e){if(!e||typeof e!="object")return!1;const t=Is(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)===LC}function Go(e,t){$u(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function $u(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:Vu(e)?2:qu(e)?3:0}function Ud(e,t){return $u(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function og(e,t,n){const r=$u(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function DC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vu(e){return e instanceof Map}function qu(e){return e instanceof Set}function Vt(e){return e.copy_||e.base_}function Hd(e,t){if(Vu(e))return new Map(e);if(qu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=sg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];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(Is(e),r)}else{const r=Is(e);if(r!==null&&n)return H({},e);const o=Object.create(r);return Object.assign(o,e)}}function zd(e,t=!1){return Yu(e)||Ps(e)||!zr(e)||($u(e)>1&&(e.set=e.add=e.clear=e.delete=MC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>zd(r,!0))),e}function MC(){Vn(2)}function Yu(e){return Object.isFrozen(e)}var jd={};function Wi(e){const t=jd[e];return t||Vn(0,e),t}function FC(e,t){jd[e]||(jd[e]=t)}var Ko;function Wu(){return Ko}function BC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ag(e,t){t&&(Wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $d(e){Vd(e),e.drafts_.forEach(UC),e.drafts_=null}function Vd(e){e===Ko&&(Ko=e.parent_)}function ug(e){return Ko=BC(Ko,e)}function UC(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&($d(t),Vn(4)),zr(e)&&(e=Gu(t,e),t.parent_||Ku(t,e)),t.patches_&&Wi("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=Gu(t,n,[]),$d(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==rg?e:void 0}function Gu(e,t,n){if(Yu(t))return t;const r=t[ot];if(!r)return Go(t,(o,a)=>cg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ku(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),Go(a,(c,d)=>cg(e,r,o,c,d,n,u)),Ku(e,o,!1),n&&e.patches_&&Wi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function cg(e,t,n,r,o,a,u){if(Ps(o)){const c=a&&t&&t.type_!==3&&!Ud(t.assigned_,r)?a.concat(r):void 0,d=Gu(e,o,c);if(og(n,r,d),Ps(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(zr(o)&&!Yu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ku(e,o)}}function Ku(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zd(t,n)}function HC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=qd;n&&(o=[r],a=Qo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var qd={get(e,t){if(t===ot)return e;const n=Vt(e);if(!Ud(n,t))return zC(e,n,t);const r=n[t];return e.finalized_||!zr(r)?r:r===Yd(e.base_,t)?(Wd(e),e.copy_[t]=Xo(r,e)):r},has(e,t){return t in Vt(e)},ownKeys(e){return Reflect.ownKeys(Vt(e))},set(e,t,n){const r=dg(Vt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Yd(Vt(e),t),a=o==null?void 0:o[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(DC(n,o)&&(n!==void 0||Ud(e.base_,t)))return!0;Wd(e),jr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Yd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wd(e),jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){Vn(12)}},Qo={};Go(qd,(e,t)=>{Qo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qo.deleteProperty=function(e,t){return Qo.set.call(this,e,t,void 0)},Qo.set=function(e,t,n){return qd.set.call(this,e[0],t,n,e[0])};function Yd(e,t){const n=e[ot];return(n?Vt(n):e)[t]}function zC(e,t,n){var o;const r=dg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function dg(e,t){if(!(t in e))return;let n=Is(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Is(n)}}function jr(e){e.modified_||(e.modified_=!0,e.parent_&&jr(e.parent_))}function Wd(e){e.copy_||(e.copy_=Hd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jC=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"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(zr(t)){const a=ug(this),u=Xo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?$d(a):Vd(a)}return ag(a,r),lg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===rg&&(o=void 0),this.autoFreeze_&&zd(o,!0),r){const a=[],u=[];Wi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(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)||Vn(8),Ps(e)&&(e=$C(e));const t=ug(this),n=Xo(e,void 0);return n[ot].isManual_=!0,Vd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return ag(r,t),lg(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=Wi("Patches").applyPatches_;return Ps(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Xo(e,t){const n=Vu(e)?Wi("MapSet").proxyMap_(e,t):qu(e)?Wi("MapSet").proxySet_(e,t):HC(e,t);return(t?t.scope_:Wu()).drafts_.push(n),n}function $C(e){return Ps(e)||Vn(10,e),fg(e)}function fg(e){if(!zr(e)||Yu(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Hd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Hd(e,!0);return Go(n,(r,o)=>{og(n,r,fg(o))}),t&&(t.finalized_=!1),n}function VC(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Vt(this[ot]).size}has(d){return Vt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Vt(p).has(d)||Vt(p).get(d)!==f)&&(n(p),jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Vt(d).size&&(n(d),jr(d),d.assigned_=new Map,Go(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Vt(p).forEach((E,T,b)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ot];u(f);const p=Vt(f).get(d);if(f.finalized_||!zr(p)||p!==f.base_.get(d))return p;const E=Xo(p,f);return n(f),f.copy_.set(d,E),E}keys(){return Vt(this[ot]).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[ot]={type_:3,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Vt(this[ot]).size}has(d){const f=this[ot];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[ot];return u(f),this.has(d)||(a(f),jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Vt(d).size&&(a(d),jr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];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 E=p.next();for(;!E.done;)d.call(f,E.value,E.value,this),E=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=Xo(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify(Vt(c)))}FC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new jC,qC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function YC(e,t,n){var r=$.useMemo(function(){return qC(e)},[e]);return $.useReducer(r,t,n)}const hg={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"},Tt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",SET_ENTRY_TYPE:"SET_ENTRY_TYPE",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_IMAGE_FILE:"SET_IMAGE_FILE"},Rs={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},WC=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(o=>t.some(a=>o.name.includes(a)))||null},GC=e=>{switch(!0){case e.includes("search"):return"search";case e.includes("browse"):return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return"search"}},Jo="cimulate",Gd=`${Jo}:pdp-update`,Kd=`${Jo}:browse-update`,Qd=`${Jo}:search-update`,Xd=`${Jo}:ui-state-update`,Jd=`${Jo}:session-state`,xr=H({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},hg),KC={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},$r=H({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},hg),QC={"search-context":$r.SEARCH_CONTEXT_UPDATED,query:$r.QUERY_CHANGED,page:$r.PAGE_CHANGED,pageSize:$r.PAGE_SIZE_CHANGED,includeFacets:$r.FACET_FILTERS_CHANGED,facetFilters:$r.FACET_FILTERS_CHANGED,rangeFilters:$r.RANGE_FILTERS_CHANGED,catalogSegment:$r.CATALOG_SEGMENT_CHANGED,pricebooks:$r.PRICEBOOKS_CHANGED},Y="cim-widget",Ls=`--${Y}`,Gi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},XC=(e=Gi)=>({[`${Ls}-primary-color`]:e.primaryColor||Gi.primaryColor,[`${Ls}-secondary-color`]:e.secondaryColor||Gi.secondaryColor,[`${Ls}-font-color`]:e.fontColor||Gi.fontColor,[`${Ls}-font-family`]:e.fontFamily||Gi.fontFamily,[`${Ls}-background-color`]:e.backgroundColor||Gi.backgroundColor,[`${Ls}-border-color`]:e.borderColor||Gi.borderColor}),ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},pg=$.createContext(null),mg=$.createContext(null);class JC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>rt(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new ng(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ds=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class ZC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Ds(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const gg=$.createContext(null),eA=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:o=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,componentConfig:p,conversationHistory:E,resetConversationMessage:T="What products would you like to explore today?",apiKey:b,apiToken:_,theme:w,isDevelopment:A,__features:k,children:F})=>{const R=$.useMemo(()=>new JC(b,_,A),[b,_,A]),W=$.useMemo(()=>new ZC(A),[A]);$.useEffect(()=>{R.config||R.getConfig()},[R]);const X=$.useMemo(()=>XC(w),[w]),B=$.useMemo(()=>{const ge=(f==null?void 0:f.placeholder)||c,ye=(f==null?void 0:f.buttonLabel)||d;let M="icon";return f!=null&&f.buttonType?M=f.buttonType:d&&(M="text"),Te(H({},f||{}),{placeholder:ge,buttonLabel:ye,buttonType:M})},[f,c,d]),te=$.useMemo(()=>({configModule:R,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:o,disclaimerText:a,disclaimerMarkdown:u,themeVariables:X,logger:W,searchConfig:B,enableMinimize:!!(p!=null&&p.enableMinimize),resetConversationMessage:T,conversationHistory:{sinceHours:typeof(E==null?void 0:E.sinceHours)=="number"?E.sinceHours:1,limit:E==null?void 0:E.limit},features:k}),[R,e,t,r,n,a,u,o,B,p,T,W,X,E,k]);return C.jsx(gg.Provider,{value:te,children:F})},Rt=()=>{const e=$.useContext(gg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class tA{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"entryTypeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return iA(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const at=new tA,Ki=()=>at.connected,Zo=()=>at.isOpen,nA=e=>{window.addEventListener(Xd,e)},rA=e=>{window.removeEventListener(Xd,e)},iA=(e,t)=>{const n=new CustomEvent(Xd,{detail:{property:e,value:t}});window.dispatchEvent(n)},sA=e=>{at.connectedProxy.connected=e},ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);at.entryTypeProxy.entryType=e},Qi=e=>{const t=at.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;at.statusProxy.isOpen=n,n&&(at.statusProxy.isMinimized=!1)},Zd=e=>{const t=at.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;at.statusProxy.isMinimized=n,n&&(at.statusProxy.isOpen=!1)},ef=e=>{at.modalProxy.isFullscreen=e},Qu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);at.statusProxy.type=e,e==="dialog"||e==="chat"?at.modeProxy.mode="embedded":at.modeProxy.mode="standalone"},tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);at.dialogProxy.position=e},oA=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Rt(),o=$.useCallback(k=>{n({type:Tt.SET_COPILOT,payload:k})},[n]),a=$.useCallback(k=>{sA(k),n({type:Tt.SET_CONNECTED,payload:k})},[n]),u=$.useCallback(k=>{n({type:Tt.SET_ENTRY_TYPE,payload:k})},[n]),c=$.useCallback(()=>{n({type:Tt.RESET_COPILOT,payload:{}})},[n]),d=$.useCallback(()=>{n({type:Tt.RESET_STATE,payload:{}})},[n]),f=$.useCallback(k=>{r==null||r.log(`${k.name} event received`,k),n({type:Tt.ADD_MESSAGE,payload:k}),k.bypassHandlers||e==null||e(k)},[e,r,n]),p=$.useCallback(k=>{n({type:Tt.ADD_LOADING_MESSAGE,payload:k})},[n]),E=$.useCallback(k=>{n({type:Tt.REMOVE_LOADING_MESSAGE,payload:k})},[n]),T=$.useCallback(k=>{n({type:Tt.SET_ACTIVE_CONVERSATION_ID,payload:k})},[n]),b=$.useCallback(k=>{n({type:Tt.ADD_CONVERSATION_ID,payload:k})},[n]),_=$.useCallback(k=>{n({type:Tt.SET_CONVERSATION_IDS,payload:k})},[n]),w=$.useCallback(k=>{n({type:Tt.SET_IMAGE_FILE,payload:k})},[n]),A=$.useMemo(()=>({setCopilot:o,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:E,setActiveConversationId:T,addConversationId:b,setConversationIds:_,setImageFile:w}),[o,a,u,c,d,f,p,E,T,b,_,w]);return C.jsx(mg.Provider,{value:A,children:t})};VC();const aA=(e,t)=>{const{type:n,payload:r}=t;if(n===Tt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Tt.RESET_STATE:e.messages=Rs.messages,e.groupedMessages=Rs.groupedMessages,e.loadingMessages=Rs.loadingMessages,e.entryType=Rs.entryType;break;case Tt.RESET_COPILOT:e.copilot=null;break;case Tt.SET_COPILOT:e.copilot=r;break;case Tt.SET_CONNECTED:e.connected=r;break;case Tt.SET_ENTRY_TYPE:e.entryType=r;break;case Tt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Tt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Tt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Tt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Tt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Tt.SET_IMAGE_FILE:e.imageFile=r;break}},uA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?Te(H({},Rs),{entryType:e}):Rs,[o,a]=YC(aA,r);return C.jsx(pg.Provider,{value:o,children:C.jsx(oA,{onCopilotEvent:t,dispatch:a,children:n})})};function lA(){var e=$.useRef(!0);return e.current?(e.current=!1,!0):e.current}var Xu=function(e){$.useEffect(e,[])},cA=function(e,t){return e===t};function dA(e,t){t===void 0&&(t=cA);var n=$.useRef(),r=$.useRef(e),o=lA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class fA{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(sn.size).fill(1).forEach(()=>{const r=sn.first();r&&(t(r),sn.remove())})})}get size(){return this.items.length}}const sn=new fA,Eg=e=>{window.addEventListener(Qd,e)},yg=e=>{window.removeEventListener(Qd,e)},hA=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},bg=e=>{window.addEventListener(Kd,e)},Tg=e=>{window.removeEventListener(Kd,e)},pA=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},_g=e=>{window.addEventListener(Gd,e)},xg=e=>{window.removeEventListener(Gd,e)},wg=(e,t,n)=>{const r=new CustomEvent(Gd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},mA=e=>{window.addEventListener(Jd,e)},gA=e=>{window.removeEventListener(Jd,e)},Ju=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class EA{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=KC[n];return pA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new EA,Sg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Cg=(e,t,n)=>{var u,c;const r=H({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Ag=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},vg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},kg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Ng=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},yA=e=>{if(!Ki()||!Zo()){Ki()&&sn.clear(),sn.add({context:"browse",payload:Te(H({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Og=e=>{Sg(e,ut)},bA=(e,t)=>{Cg(e,t,ut)},Ig=e=>{Ag(e,ut)},TA=({field:e,value:t})=>{vg({field:e,value:t},ut)},_A=e=>{kg(e,ut)},Pg=e=>{Ng(e,ut)},Rg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"browse",payload:H({},e)});return}"facetFilters"in e&&Og(e.facetFilters||{}),"rangeFilters"in e&&Ig(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Pg(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},xA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Rg,updateBrowseCategoryId:yA,updateCatalogSegment:_A,updateFacetFilter:bA,updateFacetFilters:Og,updatePricebooks:Pg,updateRangeFilter:TA,updateRangeFilters:Ig},Symbol.toStringTag,{value:"Module"}));class wA{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>(wg(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const or=new wA,Lg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"pdp",payload:H({},e)});return}or.updateProxy(e),wg("pdp-context",e)},SA=e=>{or.proxy.productId=e,Ki()||sn.add({context:"pdp",payload:H({},or.state)})},CA=e=>{or.proxy.pdpLink=e},AA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Ju("getConversationMessages",{payload:e,callback:t},ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ju("getSessionInformation",{callback:e},ci.GET_SESSION_INFORMATION)},loadConversation:e=>{Ju("loadConversation",e,ci.LOAD_CONVERSATION)},resetConversation:()=>{Ju("resetConversation",!0,ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class vA{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=QC[n];return hA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const gt=new vA,kA=e=>{const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:Te(H({},gt.state),{query:e})});return}gt.queryProxy.query=e},Dg=e=>{Sg(e,gt)},NA=(e,t)=>{Cg(e,t,gt)},Mg=e=>{Ag(e,gt)},OA=({field:e,value:t})=>{vg({field:e,value:t},gt)},IA=e=>{kg(e,gt)},Fg=e=>{Ng(e,gt)},Bg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:H({},e)});return}"facetFilters"in e&&Dg(e.facetFilters||{}),"rangeFilters"in e&&Mg(e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Fg(e.pricebooks||[]),gt.queryProxy.query=e.query},PA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Bg,updateCatalogSegment:IA,updateFacetFilter:NA,updateFacetFilters:Dg,updatePricebooks:Fg,updateRangeFilter:OA,updateRangeFilters:Mg,updateSearchQuery:kA},Symbol.toStringTag,{value:"Module"})),RA={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},Ug=$.createContext(RA),LA=({children:e})=>{const[t,n]=$.useState(ut.categoryId),[r,o]=$.useState(ut.categoryIdProxy.categoryName||""),[a,u]=$.useState(ut.facetFilters||{}),[c,d]=$.useState(ut.rangeFilters||[]),[f,p]=$.useState(ut.catalogSegment||null),[E,T]=$.useState(ut.pricebooks||null);$.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&o(w.value),(w==null?void 0:w.property)==="facetFilters"&&u(w.value),(w==null?void 0:w.property)==="rangeFilters"&&d(w.value),(w==null?void 0:w.property)==="catalogSegment"&&p(w.value),(w==null?void 0:w.property)==="pricebooks"&&T(w.value)};return bg(_),()=>{Tg(_)}},[]);const b=$.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:E}),[t,r,a,c,f,E]);return C.jsx(Ug.Provider,{value:b,children:e})},DA=()=>{const e=$.useContext(Ug);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},MA={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},Hg=$.createContext(MA),FA=({children:e})=>{const[t,n]=$.useState(gt.query),[r,o]=$.useState(gt.facetFilters),[a,u]=$.useState(gt.rangeFilters),[c,d]=$.useState(gt.catalogSegment),[f,p]=$.useState(gt.pricebooks);$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&n(b.value),(b==null?void 0:b.property)==="facetFilters"&&o(b.value),(b==null?void 0:b.property)==="rangeFilters"&&u(b.value),(b==null?void 0:b.property)==="catalogSegment"&&d(b.value),(b==null?void 0:b.property)==="pricebooks"&&p(b.value)};return Eg(T),()=>{yg(T)}},[]);const E=$.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return C.jsx(Hg.Provider,{value:E,children:e})},BA=()=>{const e=$.useContext(Hg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},UA={productId:or.productId,pdpLink:or.pdpLink},zg=$.createContext(UA),HA=({children:e})=>{const[t,n]=$.useState(or.productId),[r,o]=$.useState(or.pdpLink);$.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return _g(u),()=>{xg(u)}},[]);const a=$.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return C.jsx(zg.Provider,{value:a,children:e})},zA=()=>{const e=$.useContext(zg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},ta=()=>{const e=$.useContext(mg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Ms=()=>{const e=$.useContext(pg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},wr=()=>{const e=$.useContext($g);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},nf=()=>{const{status:e}=di(),{entryType:t,messages:n}=Ms(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},jg=$.createContext({mode:at.modeProxy.mode,status:at.statusProxy,dialogPosition:at.dialogProxy.position,isModalFullscreen:at.modalProxy.isFullscreen,previousComponentType:at.statusProxy.type}),jA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:o}=ta(),[a,u]=$.useState(at.modeProxy.mode),[c,d]=$.useState({type:n||at.statusProxy.type,isOpen:at.statusProxy.isOpen,isMinimized:at.statusProxy.isMinimized}),[f,p]=$.useState(at.dialogProxy.position),[E,T]=$.useState(at.modalProxy.isFullscreen),b=dA(c.type);$.useEffect(()=>{const w=A=>{const{property:k,value:F}=A.detail||{};if(!(!k||F===void 0)){if(k==="mode"){u(F);return}if(k==="entryType"){o(F);return}if(k==="isMinimized"){d(R=>Te(H({},R),{isMinimized:F}));return}if(k==="isOpen"){d(R=>Te(H({},R),{isOpen:F}));return}if(k==="type"){d(R=>Te(H({},R),{type:F}));return}if(k==="position"){p(F);return}if(k==="isFullscreen"){T(F);return}}};return nA(w),()=>{rA(w)}},[o]),Xu(()=>{e&&ea(e)}),Xu(()=>{const w=n||(t==null?void 0:t.type);w&&Qu(w),t&&"isOpen"in t&&Qi(!!t.isOpen),t&&"isMinimized"in t&&Zd(!!t.isMinimized)}),Xu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:w}=t.options;w&&tf(w),"isModalFullscreen"in t.options&&ef(!!t.options.isModalFullscreen)});const _=$.useMemo(()=>({mode:a,status:c,previousComponentType:b||"dialog",dialogPosition:f,isModalFullscreen:E}),[a,c,b,f,E]);return C.jsx(jg.Provider,{value:_,children:r})},di=()=>{const e=$.useContext(jg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},$A=({copilot:e})=>{const{logger:t,conversationHistory:n}=Rt(),{addCopilotEvent:r,setEntryType:o}=ta(),{activeConversationId:a}=Ms(),u=$.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=$.useCallback((d,f)=>{e&&d.conversationId&&e.getConversationEvents(d,p=>{t==null||t.log("Retrieved conversation messages: ",p),f==null||f(p)})},[e,t]);return $.useEffect(()=>{if(!a||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const d=3600*1e3*n.sinceHours,f=new Date(Date.now()-d).toISOString(),p={conversationId:a,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(p.limit=n.limit),c(p,E=>{E.forEach(b=>{b.bypassHandlers=!0,r(b)});const T=WC(E);if(T!=null&&T.name){const b=GC(T.name);o(b)}})},[t,a,c,r,o,n]),{getSessionInformation:u,getConversationMessages:c}},$g=$.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),VA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=Rt(),xi=BA(),{searchQuery:f}=xi,p=nn(xi,["searchQuery"]),Zr=DA(),{categoryId:E}=Zr,T=nn(Zr,["categoryId"]),{productId:b,pdpLink:_}=zA(),{setCopilot:w,setConnected:A,resetCopilot:k,resetCopilotState:F,addCopilotEvent:R,addLoadingMessage:W,removeLoadingMessage:X,setActiveConversationId:B,setConversationIds:te}=ta(),{connected:ge,entryType:ye,copilot:M,messages:ae,groupedMessages:he,loadingMessages:ue}=Ms(),{status:de}=di(),be=$.useRef(!1),Ce=$.useRef(!1),{getConversationMessages:oe,getSessionInformation:q}=$A({copilot:M}),ne=$.useMemo(()=>ue.size>0,[ue]),S=$.useCallback(we=>ue.has(we),[ue]),L=$.useCallback(we=>{R(we),W(we.id)},[R,W]),Q=$.useCallback(({query:we,facetFilters:Ue,rangeFilters:je,catalogSegment:Xe,pricebooks:dt,userPrompt:wt,imageFile:mn})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const st={searchParams:{query:we}};wt&&(st.userPrompt=wt),mn&&(st.attachments={image:mn}),Ue&&Object.keys(Ue).length>0&&(st.searchParams.facetFilters=Ue),je&&je.length>0&&(st.searchParams.rangeFilters=je),Xe&&(st.searchParams.catalogSegment=Xe),dt&&(st.searchParams.pricebooks=dt),ea("search"),M.search(st,ee=>{const fe=H({},ee);be.current=!0,L(fe)})},[d,L,M]),O=$.useCallback(({categoryId:we,categoryName:Ue,facetFilters:je,rangeFilters:Xe,catalogSegment:dt,pricebooks:wt,userPrompt:mn,imageFile:st})=>{if(!M){d==null||d.error("Copilot is not initialized");return}const ee=je&&Object.keys(je).length>0;if(we===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const fe={browseParams:{categoryId:we||""}};mn&&(fe.userPrompt=mn),st&&(fe.attachments={image:st}),ee&&(fe.browseParams.facetFilters=je),Xe&&Xe.length>0&&(fe.browseParams.rangeFilters=Xe),dt&&(fe.browseParams.catalogSegment=dt),Array.isArray(wt)&&wt.length>0&&(fe.browseParams.pricebooks=wt),ea("browse"),M.browse(fe,Be=>{const Ve=H({},Be);Ue&&Ve.request&&(Ve.request.label=Ue),Ce.current=!0,L(Ve)})},[d,L,M]),_e=$.useCallback(({productId:we,productName:Ue,pdpLink:je,userPrompt:Xe,imageFile:dt})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const wt={productId:we};Xe&&(wt.userPrompt=Xe),je&&(wt.pdpLink=je),dt&&(wt.attachments={image:dt}),ea("pdp"),M.productView(wt,mn=>{const st=H({},mn);Ue&&st.request&&(st.request.label=Ue),L(st)})},[d,M,L]),Re=$.useCallback(({userPrompt:we,imageFile:Ue})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Ue&&(je.attachments={image:Ue}),M.askCim(je,Xe=>{const dt=H({},Xe);L(dt)})},[d,M,L]),Oe=$.useCallback(we=>{const Ue=Te(H({},we),{id:we.inquiryLinkId||we.id});R(Ue)},[R]),Ge=$.useCallback(we=>{R(we),a==null||a(we)},[R,a]),Ye=$.useCallback(we=>{R(we),u==null||u(we)},[R,u]),et=$.useCallback(we=>{o==null||o(we),A(!0)},[o,A]);$.useEffect(()=>{!M||!ge||!de.isOpen||sn.size>0&&sn.processQueue(we=>{if(we.context==="search"){const Ue=H({},we.payload);Bg(Ue)}if(we.context==="browse"){const Ue=H({},we.payload);Rg(Ue)}if(we.context==="pdp"){const Ue=H({},we.payload);Lg(Ue)}})},[de.isOpen,M,ge]);const Nt=$.useCallback(we=>{we.on("connect_ack",et),we.on("follow_up",R),we.on("inquiry",Oe),we.on("partial_inquiry",Oe),we.on("display_products",R),we.on("progress",R),we.on("refined_search",Ge),we.on("refined_browse",Ye),we.on("done",Ue=>{X(Ue.eventSourceId)}),we.on("error",Ue=>{R(Ue),X(Ue.eventSourceId)}),we.onDisconnect(Ue=>{const je=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Ue),!je.includes(Ue)){A(!1);return}d==null||d.log("De-registering event listeners");const Xe=new Date().toISOString();R({name:"error",message:"Connection was lost. Please try again.",createdAt:Xe,id:`error-${Xe}`,sessionId:"session"}),we.off()})},[d,A,X,Oe,Ge,Ye,R,et]);Xu(()=>{let we;n?we=n:we=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ue={baseUrl:we};e?Ue.apiKey=e:t&&(Ue.apiToken=t);const je=new rS(Ue);return w(je),Nt(je),je.connect(),je.requestSessionInformation(Xe=>{d==null||d.log("Session Information: ",Xe);const{activeConversationId:dt,conversationIds:wt}=Xe.data||{};dt&&B(dt),wt!=null&&wt.length&&te(wt)}),()=>{je.disconnect(),je.off(),k()}});const Kn=$.useCallback(we=>{if(!M)return;const Ue={eventId:we,reason:"User cancelled the request"};M.cancelRequest(Ue,je=>{R(je),X(we)})},[R,X,M]),cs=$.useCallback(()=>{M&&M.conversationReset({},we=>{F(),R(we),M.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Xe}=Ue.data||{};je&&B(je),Xe!=null&&Xe.length&&te(Xe)})})},[M,d,R,F,B,te]),Jr=$.useCallback((we,Ue)=>{if(!we)return;const je={userPrompt:we};switch(Ue&&(je.imageFile=Ue),ye){case"ask_cim":Re(je);return;case"search":Q(H(H({query:f},p),je));return;case"browse":O(H(H({categoryId:E},T),je));return;case"pdp":_e(H({productId:b,pdpLink:_||""},je));return}},[ye,f,p,Q,Re,E,T,O,_e,b,_]),_i=$.useCallback((we,Ue)=>{var wt,mn;const Xe=we.params.userPrompt||"";if(!Xe)return;const dt=ae.find(st=>st.id===Ue);if(dt){if(dt.name==="ask_cim"){Re({userPrompt:Xe});return}if(dt.name==="copilot_search"){const{query:st}=((wt=dt.request)==null?void 0:wt.searchParams)||{};st&&Q(Te(H({query:st||f},p),{userPrompt:Xe}));return}if(dt.name==="copilot_browse"){const{categoryId:st}=((mn=dt.request)==null?void 0:mn.browseParams)||{};O(Te(H({categoryId:st||E||""},T),{userPrompt:Xe}));return}if(dt.name==="product_view"){const st=dt.request;st!=null&&st.productId&&_e(Te(H({},st),{userPrompt:Xe}))}}},[f,p,E,T,ae,Q,Re,O,_e]),ds=$.useMemo(()=>({copilot:M,messages:ae,groupedMessages:he,isLoading:ne,isResponseLoading:S,handleAskCim:Re,handleSearch:Q,handleBrowse:O,handlePdp:_e,handleUserInput:Jr,handleSuggestion:_i,handleCancel:Kn,resetConversation:cs,getSessionInformation:q,getConversationMessages:oe}),[M,ae,he,ne,S,Re,Q,O,_e,Jr,_i,Kn,cs,q,oe]);return C.jsx($g.Provider,{value:ds,children:c})},qA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=ta(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=wr(),f=$.useCallback(({query:T})=>{if(!n||!T)return;const{facetFilters:b}=gt.facetFiltersProxy,{rangeFilters:_}=gt.rangeFiltersProxy,{catalogSegment:w}=gt.catalogSegmentProxy,{pricebooks:A}=gt.pricebooksProxy,k={query:T};k.facetFilters=b||{},k.rangeFilters=_||[],k.catalogSegment=w||"",k.pricebooks=A||[],r(H({},k))},[n,r]),p=$.useCallback(({categoryId:T})=>{if(!n)return;const b=ut.categoryIdProxy.categoryName,{facetFilters:_}=ut.facetFiltersProxy,{rangeFilters:w}=ut.rangeFiltersProxy,{catalogSegment:A}=ut.catalogSegmentProxy,{pricebooks:k}=ut.pricebooksProxy,F={categoryId:T};F.categoryName=b||"",F.facetFilters=_||{},F.rangeFilters=w||[],F.catalogSegment=A||"",F.pricebooks=k||[],o(H({},F))},[n,o]),E=$.useCallback(({productId:T})=>{if(!n||!T)return;const b={productId:T,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(b)},[n,a]);return $.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&f({query:b.value})};return Eg(T),()=>{yg(T)}},[f]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.property)==="pdp-context"){const _=b.value;E({productId:_.productId});return}(b==null?void 0:b.property)==="productId"&&E({productId:b.value})};return _g(T),()=>{xg(T)}},[E]),$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="categoryId"&&p({categoryId:b.value})};return bg(T),()=>{Tg(T)}},[p]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.event)==ci.RESET_CONVERSATION&&u(),(b==null?void 0:b.event)==ci.GET_SESSION_INFORMATION){const _=b.value.callback;c(_)}if((b==null?void 0:b.event)==ci.GET_CONVERSATION_MESSAGES){const{payload:_,callback:w}=b.value;if(!_.conversationId||typeof w!="function")return;d(_,w)}if((b==null?void 0:b.event)==ci.LOAD_CONVERSATION){const _=b.value;if(!_.conversationId)return;d(_,A=>{e(),A.forEach(k=>{t(k)})})}};return mA(T),()=>{gA(T)}},[u,c,d,e,t]),null},YA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>C.jsxs(VA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[C.jsx(qA,{}),c]}),Vg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,componentConfig:p,entryType:E,entryMessage:T,disclaimerText:b,disclaimerMarkdown:_,searchPlaceholder:w,searchButtonLabel:A,searchConfig:k,resetConversationMessage:F,conversationHistory:R,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,__features:ge,children:ye})=>C.jsx(eA,{apiKey:e,logoUrl:r,headerText:o,entryMessage:T,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:w,searchButtonLabel:A,searchConfig:k,componentConfig:p,disclaimerMarkdown:_,disclaimerText:b,resetConversationMessage:F,conversationHistory:R,isDevelopment:d,__features:ge,children:C.jsx(RC,{apiKey:e,apiToken:t,isDevelopment:d,children:C.jsx(uA,{entryType:E,onCopilotEvent:X,children:C.jsx(HA,{children:C.jsx(LA,{children:C.jsx(FA,{children:C.jsx(jA,{entryType:E,componentConfig:p,componentType:f,children:C.jsx(YA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:E,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,children:ye})})})})})})})});function qg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qg(e))&&(r&&(r+=" "),r+=t);return r}var Yg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Wg=$i.createContext&&$i.createContext(Yg),WA=["attr","size","title"];function GA(e,t){if(e==null)return{};var n=KA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function Gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function el(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gg(Object(n),!0).forEach(function(r){QA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QA(e,t,n){return t=XA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XA(e){var t=JA(e,"string");return typeof t=="symbol"?t:t+""}function JA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kg(e){return e&&e.map((t,n)=>$i.createElement(t.tag,el({key:n},t.attr),Kg(t.child)))}function qt(e){return t=>$i.createElement(ZA,Zu({attr:el({},e.attr)},t),Kg(e.child))}function ZA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=GA(e,WA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",Zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:el(el({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return Wg!==void 0?$i.createElement(Wg.Consumer,null,n=>t(n)):t(Yg)}function Qg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function Xg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function na(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function ev(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function Jg(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function tv(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function nv(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function rv(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function iv(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function sv(e){return qt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const rf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>C.jsx("button",{"aria-label":t,className:J(e,`${Y}-close-button`),disabled:r,onClick:n,children:C.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:C.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),sf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>C.jsx("button",{className:J(`${Y}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Vr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:C.jsx("button",{className:J(e,`${Y}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?C.jsx("img",{className:J(`${Y}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),ov=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?C.jsx("img",{className:J(`${Y}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):C.jsx(na,{size:"16px"})},av=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return C.jsx(Vr,{className:J(e,n,r,`${Y}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:C.jsx(na,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return C.jsxs(sf,{className:J(e,n,r,`${Y}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&C.jsx(ov,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function uv(e){return qt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const lv=()=>{const{messages:e}=Ms(),{handleCancel:t}=wr();return{cancelRequest:$.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},cv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Rt(),{cancelRequest:r}=lv();return n!=null&&n.enableCancelSearch?C.jsx(Vr,{className:J(t,`${Y}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:C.jsx(uv,{}),disabled:!e,onClick:r}):null};function BB(){}function UB(){}function Zg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function e1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hv={};function t1(e,t){return(hv.jsx?fv:dv).test(e)}const pv=/[ \t\n\f\r]/g;function mv(e){return typeof e=="object"?e.type==="text"?n1(e.value):!1:n1(e)}function n1(e){return e.replace(pv,"")===""}let ra=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ra.prototype.normal={},ra.prototype.property={},ra.prototype.space=void 0;function r1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ra(n,r,t)}function ia(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let gv=0;const qe=Xi(),Bt=Xi(),of=Xi(),pe=Xi(),ht=Xi(),Fs=Xi(),Pn=Xi();function Xi(){return sd(2,++gv)}const af=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Bt,commaOrSpaceSeparated:Pn,commaSeparated:Fs,number:pe,overloadedBoolean:of,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),uf=Object.keys(af);let lf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),i1(this,"space",o),typeof r=="number")for(;++a<uf.length;){const u=uf[a];i1(this,uf[a],(r&af[u])===af[u])}}};lf.prototype.defined=!0;function i1(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new lf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ia(r)]=r,n[ia(a.attribute)]=r}return new ra(t,n,e.space)}const s1=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ht,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ht,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function o1(e,t){return t in e?e[t]:t}function a1(e,t){return o1(e,t.toLowerCase())}const Ev=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ht,autoFocus:qe,autoPlay:qe,blocking:ht,capture:null,charSet:null,checked:qe,cite:null,className:ht,cols:pe,colSpan:null,content:null,contentEditable:Bt,controls:qe,controlsList:ht,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:of,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ht,height:pe,hidden:of,high:pe,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ht,itemRef:ht,itemScope:qe,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:pe,pattern:null,ping:ht,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ht,required:qe,reversed:qe,rows:pe,rowSpan:pe,sandbox:ht,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:a1}),yv=Bs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o1}),u1=Bs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),l1=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:a1}),c1=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bv={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Tv=/[A-Z]/g,d1=/-[a-z]/g,_v=/^data[-\w.:]+$/i;function cf(e,t){const n=ia(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_v.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(d1,wv);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!d1.test(a)){let u=a.replace(Tv,xv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=lf}return new o(r,t)}function xv(e){return"-"+e.toLowerCase()}function wv(e){return e.charAt(1).toUpperCase()}const tl=r1([s1,Ev,u1,l1,c1],"html"),Us=r1([s1,yv,u1,l1,c1],"svg");function f1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function h1(e){return e.join(" ").trim()}var Hs={},df,p1;function Sv(){if(p1)return df;p1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
11
+ `,f="/",p="*",E="",T="comment",b="declaration";df=function(w,A){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];A=A||{};var k=1,F=1;function R(ue){var de=ue.match(t);de&&(k+=de.length);var be=ue.lastIndexOf(d);F=~be?ue.length-be:F+ue.length}function W(){var ue={line:k,column:F};return function(de){return de.position=new X(ue),ge(),de}}function X(ue){this.start=ue,this.end={line:k,column:F},this.source=A.source}X.prototype.content=w;function B(ue){var de=new Error(A.source+":"+k+":"+F+": "+ue);if(de.reason=ue,de.filename=A.source,de.line=k,de.column=F,de.source=w,!A.silent)throw de}function te(ue){var de=ue.exec(w);if(de){var be=de[0];return R(be),w=w.slice(be.length),de}}function ge(){te(n)}function ye(ue){var de;for(ue=ue||[];de=M();)de!==!1&&ue.push(de);return ue}function M(){var ue=W();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var de=2;E!=w.charAt(de)&&(p!=w.charAt(de)||f!=w.charAt(de+1));)++de;if(de+=2,E===w.charAt(de-1))return B("End of comment missing");var be=w.slice(2,de-2);return F+=2,R(be),w=w.slice(de),F+=2,ue({type:T,comment:be})}}function ae(){var ue=W(),de=te(r);if(de){if(M(),!te(o))return B("property missing ':'");var be=te(a),Ce=ue({type:b,property:_(de[0].replace(e,E)),value:be?_(be[0].replace(e,E)):E});return te(u),Ce}}function he(){var ue=[];ye(ue);for(var de;de=ae();)de!==!1&&(ue.push(de),ye(ue));return ue}return ge(),he()};function _(w){return w?w.replace(c,E):E}return df}var m1;function Cv(){if(m1)return Hs;m1=1;var e=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=n;var t=e(Sv());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return Hs}var sa={},g1;function Av(){if(g1)return sa;g1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,c):f=f.replace(r,c),f.replace(t,u))};return sa.camelCase=d,sa}var oa,E1;function vv(){if(E1)return oa;E1=1;var e=oa&&oa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Cv()),n=Av();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,oa=r,oa}var kv=vv();const Nv=Ke(kv),nl=y1("end"),Sr=y1("start");function y1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function b1(e){const t=Sr(e),n=nl(e);if(t&&n)return{start:t,end:n}}function aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?T1(e.position):"start"in e||"end"in e?T1(e):"line"in e||"column"in e?ff(e):""}function ff(e){return _1(e&&e.line)+":"+_1(e&&e.column)}function T1(e){return ff(e&&e.start)+"-"+ff(e&&e.end)}function _1(e){return e&&typeof e=="number"?e:1}class on extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=H({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=aa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const hf={}.hasOwnProperty,Ov=new Map,Iv=/[A-Z]/g,Pv=new Set(["table","tbody","thead","tfoot","tr"]),Rv=new Set(["td","th"]),x1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Lv(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jv(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=zv(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Us:tl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=w1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function w1(e,t,n){if(t.type==="element")return Dv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Mv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bv(e,t,n);if(t.type==="mdxjsEsm")return Fv(e,t);if(t.type==="root")return Uv(e,t,n);if(t.type==="text")return Hv(e,t)}function Dv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=C1(e,t.tagName,!1),u=$v(e,t);let c=mf(e,t);return Pv.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!mv(d):!0})),S1(e,u,a,t),pf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Mv(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ua(e,t.position)}function Fv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function Bv(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:C1(e,t.name,!0),u=Vv(e,t),c=mf(e,t);return S1(e,u,a,t),pf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Uv(e,t,n){const r={};return pf(r,mf(e,t)),e.create(t,e.Fragment,r,n)}function Hv(e,t){return t.value}function S1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zv(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function jv(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Sr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function $v(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&hf.call(t.properties,o)){const a=qv(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Rv.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Vv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ua(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ua(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function mf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Ov;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=w1(e,a,u);c!==void 0&&n.push(c)}return n}function qv(e,t,n){const r=cf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?e1(n):h1(n)),r.property==="style"){let o=typeof n=="object"?n:Yv(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Wv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?bv[r.property]||r.property:r.attribute,n]}}function Yv(e,t){try{return Nv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=x1+"#cannot-parse-style-attribute",o}}function C1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=t1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=t1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return hf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ua(e)}function ua(e,t){const n=new on("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=x1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wv(e){const t={};let n;for(n in e)hf.call(e,n)&&(t[Gv(n)]=e[n]);return t}function Gv(e){let t=e.replace(Iv,Kv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Kv(e){return"-"+e.toLowerCase()}const gf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Qv={};function Ef(e,t){const n=Qv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return A1(e,r,o)}function A1(e,t,n){if(Xv(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return v1(e.children,t,n)}return Array.isArray(e)?v1(e,t,n):""}function v1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=A1(e[o],t,n);return r.join("")}function Xv(e){return!!(e&&typeof e=="object")}const k1=document.createElement("i");function yf(e){const t="&"+e+";";k1.innerHTML=t;const n=k1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const N1={}.hasOwnProperty;function O1(e){const t={};let n=-1;for(;++n<e.length;)Jv(t,e[n]);return t}function Jv(e,t){let n;for(n in t){const o=(N1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){N1.call(o,u)||(o[u]=[]);const c=a[u];Zv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function Zv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function I1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=fi(/[A-Za-z]/),an=fi(/[\dA-Za-z]/),ek=fi(/[#-'*+\--9=?A-Z^-~]/);function rl(e){return e!==null&&(e<32||e===127)}const bf=fi(/\d/),tk=fi(/[\dA-Fa-f]/),nk=fi(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const il=fi(new RegExp("\\p{P}|\\p{S}","u")),Ji=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ze(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Qe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const rk={tokenize:ik};function ik(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const sk={tokenize:ok},P1={tokenize:ak};function ok(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const W=n[r];return t.containerState=W[1],e.attempt(W[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const W=t.events.length;let X=W,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}k(r);let te=W;for(;te<t.events.length;)t.events[te][1].end=H({},B),te++;return Rn(t.events,X+1,0,t.events.slice(W)),t.events.length=te,f(R)}return c(R)}function f(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return _(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(P1,p,E)(R)}function p(R){return o&&F(),k(r),T(R)}function E(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(R)}function T(R){return t.containerState={},e.attempt(P1,b,_)(R)}function b(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function _(R){if(R===null){o&&F(),k(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(R)}function w(R){if(R===null){A(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return Le(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),w)}function A(R,W){const X=t.sliceStream(R);if(W&&X.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(X),t.parser.lazy[R.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let ge=te,ye,M;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(ye){M=t.events[ge][1].end;break}ye=!0}for(k(r),B=te;B<t.events.length;)t.events[B][1].end=H({},M),B++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=B}}function k(R){let W=n.length;for(;W-- >R;){const X=n[W];t.containerState=X[1],X[0].exit.call(t,e)}n.length=R}function F(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function ak(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function js(e){if(e===null||ft(e)||Ji(e))return 1;if(il(e))return 2}function sl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Tf={name:"attention",resolveAll:uk,tokenize:lk};function uk(e,t){let n=-1,r,o,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=H({},e[r][1].end),T=H({},e[n][1].start);R1(E,-d),R1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=qn(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=qn(f,sl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=qn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Rn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=js(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=js(d),E=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?E:E&&(o||!T)),f._close=!!(a===42?T:T&&(p||!E)),t(d)}}function R1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ck={name:"autolink",tokenize:dk};function dk(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return pn(b)?(e.consume(b),u):b===64?n(b):f(b)}function u(b){return b===43||b===45||b===46||an(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||an(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||rl(b)?n(b):(e.consume(b),d)}function f(b){return b===64?(e.consume(b),p):ek(b)?(e.consume(b),f):n(b)}function p(b){return an(b)?E(b):n(b)}function E(b){return b===46?(e.consume(b),r=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):T(b)}function T(b){if((b===45||an(b))&&r++<63){const _=b===45?T:E;return e.consume(b),_}return n(b)}}const la={partial:!0,tokenize:fk};function fk(e,t,n){return r;function r(a){return Qe(a)?Ze(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const L1={continuation:{tokenize:pk},exit:mk,name:"blockQuote",tokenize:hk};function hk(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function pk(e,t,n){const r=this;return o;function o(u){return Qe(u)?Ze(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(L1,t,n)(u)}}function mk(e){e.exit("blockQuote")}const D1={name:"characterEscape",tokenize:gk};function gk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return nk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const M1={name:"characterReference",tokenize:Ek};function Ek(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,p(E))}function f(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=tk,p):(e.enter("characterReferenceValue"),a=7,u=bf,p(E))}function p(E){if(E===59&&o){const T=e.exit("characterReferenceValue");return u===an&&!yf(r.sliceSerialize(T))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),p):n(E)}}const F1={partial:!0,tokenize:bk},B1={concrete:!0,name:"codeFenced",tokenize:yk};function yk(e,t,n){const r=this,o={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(B)}function p(B){return B===c?(u++,e.consume(B),p):u<3?n(B):(e.exit("codeFencedFenceSequence"),Qe(B)?Ze(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(F1,w,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(B))}function T(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Qe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),T)}function b(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function w(B){return e.attempt(o,W,A)(B)}function A(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),k}function k(B){return a>0&&Qe(B)?Ze(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Le(B)?e.check(F1,w,W)(B):(e.enter("codeFlowValue"),R(B))}function R(B){return B===null||Le(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),R)}function W(B){return e.exit("codeFenced"),t(B)}function X(B,te,ge){let ye=0;return M;function M(be){return B.enter("lineEnding"),B.consume(be),B.exit("lineEnding"),ae}function ae(be){return B.enter("codeFencedFence"),Qe(be)?Ze(B,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):he(be)}function he(be){return be===c?(B.enter("codeFencedFenceSequence"),ue(be)):ge(be)}function ue(be){return be===c?(ye++,B.consume(be),ue):ye>=u?(B.exit("codeFencedFenceSequence"),Qe(be)?Ze(B,de,"whitespace")(be):de(be)):ge(be)}function de(be){return be===null||Le(be)?(B.exit("codeFencedFence"),te(be)):ge(be)}}}function bk(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const _f={name:"codeIndented",tokenize:_k},Tk={partial:!0,tokenize:xk};function _k(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Ze(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Le(f)?e.attempt(Tk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Le(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function xk(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ze(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const wk={name:"codeText",previous:Ck,resolve:Sk,tokenize:Ak};function Sk(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Ck(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ak(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,p(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(E))}function f(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),f)}function p(E){return E===96?(e.consume(E),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",f(E))}}class vk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ca(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,n.reverse())}}}function ca(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function U1(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new vk(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kk(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=H({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function kk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,E,T=-1,b=n,_=0,w=0;const A=[w];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(p=r.sliceStream(b),b.next||p.push(null),E&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=b,b=b.next}for(b=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(w=T+1,A.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):A.pop(),T=A.length;T--;){const k=c.slice(A[T],A[T+1]),F=a.pop();d.push([F,F+k.length-1]),e.splice(F,2,k)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const Nk={resolve:Ik,tokenize:Pk},Ok={partial:!0,tokenize:Rk};function Ik(e){return U1(e),e}function Pk(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(Ok,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Rk(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function H1(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return E;function E(k){return k===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(k),e.exit(a),T):k===null||k===32||k===41||rl(k)?n(k):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(k))}function T(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(e.exit("chunkString"),e.exit(c),T(k)):k===null||k===60||Le(k)?n(k):(e.consume(k),k===92?_:b)}function _(k){return k===60||k===62||k===92?(e.consume(k),b):b(k)}function w(k){return!p&&(k===null||k===41||ft(k))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(k)):p<f&&k===40?(e.consume(k),p++,w):k===41?(e.consume(k),p--,w):k===null||k===32||k===40||rl(k)?n(k):(e.consume(k),k===92?A:w)}function A(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function z1(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),p}function p(b){return c>999||b===null||b===91||b===93&&!d||b===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),E(b))}function E(b){return b===null||b===91||b===93||Le(b)||c++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Qe(b)),b===92?T:E)}function T(b){return b===91||b===92||b===93?(e.consume(b),c++,E):E(b)}}function j1(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?E:p)}function E(T){return T===u||T===92?(e.consume(T),p):p(T)}}function da(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Qe(o)?Ze(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Lk={name:"definition",tokenize:Mk},Dk={partial:!0,tokenize:Fk};function Mk(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),u(b)}function u(b){return z1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ft(b)?da(e,f)(b):f(b)}function f(b){return H1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(Dk,E,E)(b)}function E(b){return Qe(b)?Ze(e,T,"whitespace")(b):T(b)}function T(b){return b===null||Le(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Fk(e,t,n){return r;function r(c){return ft(c)?da(e,o)(c):n(c)}function o(c){return j1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Qe(c)?Ze(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const Bk={name:"hardBreakEscape",tokenize:Uk};function Uk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Hk={name:"headingAtx",resolve:zk,tokenize:jk};function zk(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function jk(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Qe(p)?Ze(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const $k=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$1=["pre","script","style","textarea"],Vk={concrete:!0,name:"htmlFlow",resolveTo:Wk,tokenize:Gk},qk={partial:!0,tokenize:Qk},Yk={partial:!0,tokenize:Kk};function Wk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Gk(e,t,n){const r=this;let o,a,u,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),E}function E(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,w):O===63?(e.consume(O),o=3,r.interrupt?t:S):pn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),o=2,b):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function b(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:he:_):n(O)}function w(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ft(O)){const _e=O===47,Re=u.toLowerCase();return!_e&&!a&&$1.includes(Re)?(o=1,r.interrupt?t(O):he(O)):$k.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),k):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?F(O):R(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function k(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function F(O){return Qe(O)?(e.consume(O),F):M(O)}function R(O){return O===47?(e.consume(O),M):O===58||O===95||pn(O)?(e.consume(O),W):Qe(O)?(e.consume(O),R):M(O)}function W(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),W):X(O)}function X(O){return O===61?(e.consume(O),B):Qe(O)?(e.consume(O),X):R(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Qe(O)?(e.consume(O),B):ge(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||Le(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?X(O):(e.consume(O),ge)}function ye(O){return O===47||O===62||Qe(O)?R(O):n(O)}function M(O){return O===62?(e.consume(O),ae):n(O)}function ae(O){return O===null||Le(O)?he(O):Qe(O)?(e.consume(O),ae):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),oe):O===62&&o===4?(e.consume(O),L):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),ne):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(qk,Q,ue)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ue(O)):(e.consume(O),he)}function ue(O){return e.check(Yk,de,Q)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Le(O)?ue(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),S):he(O)}function oe(O){return O===47?(e.consume(O),u="",q):he(O)}function q(O){if(O===62){const _e=u.toLowerCase();return $1.includes(_e)?(e.consume(O),L):he(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):he(O)}function ne(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),L):O===45&&o===2?(e.consume(O),S):he(O)}function L(O){return O===null||Le(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),L)}function Q(O){return e.exit("htmlFlow"),t(O)}}function Kk(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function Qk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(la,t,n)}}const Xk={name:"htmlText",tokenize:Jk};function Jk(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),X):S===63?(e.consume(S),R):pn(S)?(e.consume(S),ge):n(S)}function f(S){return S===45?(e.consume(S),p):S===91?(e.consume(S),a=0,_):pn(S)?(e.consume(S),F):n(S)}function p(S){return S===45?(e.consume(S),b):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),T):Le(S)?(u=E,oe(S)):(e.consume(S),E)}function T(S){return S===45?(e.consume(S),b):E(S)}function b(S){return S===62?Ce(S):S===45?T(S):E(S)}function _(S){const L="CDATA[";return S===L.charCodeAt(a++)?(e.consume(S),a===L.length?w:_):n(S)}function w(S){return S===null?n(S):S===93?(e.consume(S),A):Le(S)?(u=w,oe(S)):(e.consume(S),w)}function A(S){return S===93?(e.consume(S),k):w(S)}function k(S){return S===62?Ce(S):S===93?(e.consume(S),k):w(S)}function F(S){return S===null||S===62?Ce(S):Le(S)?(u=F,oe(S)):(e.consume(S),F)}function R(S){return S===null?n(S):S===63?(e.consume(S),W):Le(S)?(u=R,oe(S)):(e.consume(S),R)}function W(S){return S===62?Ce(S):R(S)}function X(S){return pn(S)?(e.consume(S),B):n(S)}function B(S){return S===45||an(S)?(e.consume(S),B):te(S)}function te(S){return Le(S)?(u=te,oe(S)):Qe(S)?(e.consume(S),te):Ce(S)}function ge(S){return S===45||an(S)?(e.consume(S),ge):S===47||S===62||ft(S)?ye(S):n(S)}function ye(S){return S===47?(e.consume(S),Ce):S===58||S===95||pn(S)?(e.consume(S),M):Le(S)?(u=ye,oe(S)):Qe(S)?(e.consume(S),ye):Ce(S)}function M(S){return S===45||S===46||S===58||S===95||an(S)?(e.consume(S),M):ae(S)}function ae(S){return S===61?(e.consume(S),he):Le(S)?(u=ae,oe(S)):Qe(S)?(e.consume(S),ae):ye(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ue):Le(S)?(u=he,oe(S)):Qe(S)?(e.consume(S),he):(e.consume(S),de)}function ue(S){return S===o?(e.consume(S),o=void 0,be):S===null?n(S):Le(S)?(u=ue,oe(S)):(e.consume(S),ue)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ft(S)?ye(S):(e.consume(S),de)}function be(S){return S===47||S===62||ft(S)?ye(S):n(S)}function Ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function oe(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return Qe(S)?Ze(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return e.enter("htmlTextData"),u(S)}}const xf={name:"labelEnd",resolveAll:nN,resolveTo:rN,tokenize:iN},Zk={tokenize:sN},eN={tokenize:oN},tN={tokenize:aN};function nN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Rn(e,0,e.length,n),e}function rN(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",p,t]]),c=qn(c,sl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function iN(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?E(T):(u=r.parser.defined.includes(ar(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(Zk,p,u?p:E)(T):T===91?e.attempt(eN,p,u?f:E)(T):u?p(T):E(T)}function f(T){return e.attempt(tN,p,E)(T)}function p(T){return t(T)}function E(T){return a._balanced=!0,n(T)}}function sN(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ft(E)?da(e,a)(E):a(E)}function a(E){return E===41?p(E):H1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return ft(E)?da(e,d)(E):p(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?j1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):p(E)}function f(E){return ft(E)?da(e,p)(E):p(E)}function p(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function oN(e,t,n){const r=this;return o;function o(c){return z1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function aN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const uN={name:"labelStartImage",resolveAll:xf.resolveAll,tokenize:lN};function lN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const cN={name:"labelStartLink",resolveAll:xf.resolveAll,tokenize:dN};function dN(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const wf={name:"lineEnding",tokenize:fN};function fN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const ol={name:"thematicBreak",tokenize:hN};function hN(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Le(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Qe(f)?Ze(e,c,"whitespace")(f):c(f))}}const xn={continuation:{tokenize:EN},exit:bN,name:"list",tokenize:gN},pN={partial:!0,tokenize:TN},mN={partial:!0,tokenize:yN};function gN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(b){const _=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:bf(b)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ol,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return bf(b)&&++u<10?(e.consume(b),d):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(la,r.interrupt?n:p,e.attempt(pN,T,E))}function p(b){return r.containerState.initialBlankLine=!0,a++,T(b)}function E(b){return Qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),T):n(b)}function T(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function EN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Qe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function yN(e,t,n){const r=this;return Ze(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function bN(e){e.exit(this.containerState.type)}function TN(e,t,n){const r=this;return Ze(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Qe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const V1={name:"setextUnderline",resolveTo:_N,tokenize:xN};function _N(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:H({},e[r][1].start),end:H({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function xN(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,E;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){E=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Qe(f)?Ze(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Le(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const wN={tokenize:SN};function SN(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Nk,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const CN={resolveAll:Y1()},AN=q1("string"),vN=q1("text");function q1(e){return{resolveAll:Y1(e==="text"?kN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const E=o[p];let T=-1;if(E)for(;++T<E.length;){const b=E[T];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function Y1(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function kN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:H({},r.end)};r.end=H({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const NN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Lk},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:L1},flow:{35:Hk,42:ol,45:[V1,ol],60:Vk,61:V1,95:ol,96:B1,126:B1},flowInitial:{[-2]:_f,[-1]:_f,32:_f},insideSpan:{null:[Tf,CN]},string:{38:M1,92:D1},text:{[-5]:wf,[-4]:wf,[-3]:wf,33:uN,38:M1,42:Tf,60:[ck,Xk],91:cN,92:[Bk,D1],93:xf,95:Tf,96:wk}},Symbol.toStringTag,{value:"Module"}));function ON(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(X),check:te(B),consume:F,enter:R,exit:W,interrupt:te(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:b,write:E};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function E(ae){return u=qn(u,ae),A(),u[u.length-1]!==null?[]:(ge(t,0),f.events=sl(a,f.events,f),f.events)}function T(ae,he){return PN(b(ae),he)}function b(ae){return IN(u,ae)}function _(){const{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}=r;return{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}}function w(ae){o[ae.line]=ae.column,M()}function A(){let ae;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<he.length;)k(he.charCodeAt(r._bufferIndex));else k(he)}}function k(ae){p=p(ae)}function F(ae){Le(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,M()):ae!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ae}function R(ae,he){const ue=he||{};return ue.type=ae,ue.start=_(),f.events.push(["enter",ue,f]),c.push(ue),ue}function W(ae){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function X(ae,he){ge(ae,he.from)}function B(ae,he){he.restore()}function te(ae,he){return ue;function ue(de,be,Ce){let oe,q,ne,S;return Array.isArray(de)?Q(de):"tokenize"in de?Q([de]):L(de);function L(Oe){return Ge;function Ge(Ye){const et=Ye!==null&&Oe[Ye],Nt=Ye!==null&&Oe.null,Kn=[...Array.isArray(et)?et:et?[et]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return Q(Kn)(Ye)}}function Q(Oe){return oe=Oe,q=0,Oe.length===0?Ce:O(Oe[q])}function O(Oe){return Ge;function Ge(Ye){return S=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Re)(Ye)}}function _e(Oe){return ae(ne,S),be}function Re(Oe){return S.restore(),++q<oe.length?O(oe[q]):Ce}}}function ge(ae,he){ae.resolveAll&&!a.includes(ae)&&a.push(ae),ae.resolve&&Rn(f.events,he,f.events.length-he,ae.resolve(f.events.slice(he),f)),ae.resolveTo&&(f.events=ae.resolveTo(f.events,f))}function ye(){const ae=_(),he=f.previous,ue=f.currentConstruct,de=f.events.length,be=Array.from(c);return{from:de,restore:Ce};function Ce(){r=ae,f.previous=he,f.currentConstruct=ue,f.events.length=de,c=be,M()}}function M(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function IN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function PN(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
9
12
  `;break}case-3:{u=`\r
10
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function CN(e){const r={constructs:v1([_N,...(e||{}).extensions||[]]),content:o(Kv),defined:[],document:o(Xv),flow:o(mN),lazy:{},string:o(yN),text:o(bN)};return r;function o(a){return u;function u(c){return xN(r,a,c)}}}function AN(e){for(;!M1(e););return e}const V1=/[\0\t\n\r]/g;function vN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,E,T,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(V1.lastIndex=E,f=V1.exec(a),T=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(T),!f){t=a.slice(E);break}if(b===10&&E===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<T&&(d.push(a.slice(E,T)),e+=T-E),b){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}E=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const kN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NN(e){return e.replace(kN,ON)}function ON(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return k1(n.slice(a?2:1),a?16:10)}return Ef(n)||e}const q1={}.hasOwnProperty;function IN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),PN(n)(AN(CN(n).document().write(vN()(e,t,!0))))}function PN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(ds),blockQuote:a(Nt),characterEscape:ye,characterReference:ye,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(cs,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(Jr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(_i),hardBreakEscape:a(xi),hardBreakTrailing:a(xi),htmlFlow:a(Zr,u),htmlFlowData:ye,htmlText:a(Zr,u),htmlTextData:ye,image:a(we),label:u,link:a(Ue),listItem:a(Xe),listItemValue:T,listOrdered:a(je,E),listUnordered:a(je),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ds),strong:a(wt),thematicBreak:a(st)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:et,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(k),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:d(v),codeText:d(be),codeTextData:M,data:M,definition:d(),definitionDestinationString:W,definitionLabelString:F,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ue),htmlFlowData:M,htmlText:d(de),htmlTextData:M,image:d(oe),label:ne,labelText:q,lineEnding:ae,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:S,resourceTitleString:L,resource:K,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:B,strong:d(),thematicBreak:d()}};Y1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let fe={type:"root",children:[]};const Be={stack:[fe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let tt=-1;for(;++tt<ee.length;)if(ee[tt][1].type==="listOrdered"||ee[tt][1].type==="listUnordered")if(ee[tt][0]==="enter")Ve.push(tt);else{const Jt=Ve.pop();tt=o(ee,Jt,tt)}for(tt=-1;++tt<ee.length;){const Jt=t[ee[tt][0]];q1.call(Jt,ee[tt][1].type)&&Jt[ee[tt][1].type].call(Object.assign({sliceSerialize:ee[tt][2].sliceSerialize},Be),ee[tt][1])}if(Be.tokenStack.length>0){const Jt=Be.tokenStack[Be.tokenStack.length-1];(Jt[1]||W1).call(Be,void 0,Jt[0])}for(fe.position={start:hi(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:hi(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)fe=t.transforms[tt](fe)||fe;return fe}function o(ee,fe,Be){let Ve=fe-1,tt=-1,Jt=!1,ei,Qn,wi,fs;for(;++Ve<=Be;){const Zt=ee[Ve];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?tt++:tt--,fs=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(ei&&!fs&&!tt&&!wi&&(wi=Ve),fs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fs=void 0}if(!tt&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||tt===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(ei){let Lr=Ve;for(Qn=void 0;Lr--;){const Fn=ee[Lr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",Jt=!0),Fn[1].type="lineEnding",Qn=Lr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}wi&&(!Qn||wi<Qn)&&(ei._spread=!0),ei.end=Object.assign({},Qn?ee[Qn][1].start:Zt[1].end),ee.splice(Qn||Ve,0,["exit",ei,Zt[2]]),Ve++,Be++}if(Zt[1].type==="listItemPrefix"){const Lr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};ei=Lr,ee.splice(Ve,0,["enter",Lr,Zt[2]]),Ve++,Be++,wi=void 0,fs=!0}}}return ee[fe][1]._spread=Jt,Be}function a(ee,fe){return Be;function Be(Ve){c.call(this,ee(Ve),Ve),fe&&fe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,fe,Be){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Be||void 0]),ee.position={start:hi(fe.start),end:void 0}}function d(ee){return fe;function fe(Be){ee&&ee.call(this,Be),f.call(this,Be)}}function f(ee,fe){const Be=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ee.type&&(fe?fe.call(this,ee,Ve[0]):(Ve[1]||W1).call(this,ee,Ve[0]));else throw new Error("Cannot close `"+ee.type+"` ("+aa({start:ee.start,end:ee.end})+"): it’s not open");Be.position.end=hi(ee.end)}function p(){return gf(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function T(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function _(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function F(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase()}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function W(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function X(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Be=this.sliceSerialize(ee).length;fe.depth=Be}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(ee){const Be=this.stack[this.stack.length-1].children;let Ve=Be[Be.length-1];(!Ve||Ve.type!=="text")&&(Ve=mn(),Ve.position={start:hi(ee.start),end:void 0},Be.push(Ve)),this.stack.push(Ve)}function M(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=hi(ee.end)}function ae(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=fe.children[fe.children.length-1];Be.position.end=hi(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(ye.call(this,ee),M.call(this,ee))}function he(){this.data.atHardBreak=!0}function ue(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function de(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function be(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function Ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function oe(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function q(ee){const fe=this.sliceSerialize(ee),Be=this.stack[this.stack.length-2];Be.label=NN(fe),Be.identifier=ar(fe).toLowerCase()}function ne(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ve=ee.children;Be.children=Ve}else Be.alt=fe}function S(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function L(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Re(ee){this.data.characterReferenceType=ee.type}function Oe(ee){const fe=this.sliceSerialize(ee),Be=this.data.characterReferenceType;let Ve;Be?(Ve=k1(fe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Ef(fe);const tt=this.stack[this.stack.length-1];tt.value+=Ve}function Ge(ee){const fe=this.stack.pop();fe.position.end=hi(ee.end)}function Ye(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function et(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function cs(){return{type:"inlineCode",value:""}}function Jr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _i(){return{type:"emphasis",children:[]}}function ds(){return{type:"heading",depth:0,children:[]}}function xi(){return{type:"break"}}function Zr(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function je(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Xe(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function Y1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Y1(e,r):RN(e,r)}}function RN(e,t){let n;for(n in t)if(q1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function W1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is still open")}function LN(e){const t=this;t.parser=n;function n(r){return IN(r,Te(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function DN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function MN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
11
- `}]}function FN(e,t){const n=t.value?t.value+`
12
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function BN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=zs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function zN(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function G1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function $N(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G1(e,t);const o={src:zs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function VN(e,t){const n={src:zs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function qN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function YN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G1(e,t);const o={href:zs(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function WN(e,t){const n={href:zs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GN(e,t,n){const r=e.all(t),o=n?KN(n):K1(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let E;p&&p.type==="element"&&p.tagName==="p"?E=p:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
13
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function RN(e){const r={constructs:O1([NN,...(e||{}).extensions||[]]),content:o(rk),defined:[],document:o(sk),flow:o(wN),lazy:{},string:o(AN),text:o(vN)};return r;function o(a){return u;function u(c){return ON(r,a,c)}}}function LN(e){for(;!U1(e););return e}const W1=/[\0\t\n\r]/g;function DN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,E,T,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(W1.lastIndex=E,f=W1.exec(a),T=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(T),!f){t=a.slice(E);break}if(b===10&&E===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<T&&(d.push(a.slice(E,T)),e+=T-E),b){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}E=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const MN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function FN(e){return e.replace(MN,BN)}function BN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return I1(n.slice(a?2:1),a?16:10)}return yf(n)||e}const G1={}.hasOwnProperty;function UN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),HN(n)(LN(RN(n).document().write(DN()(e,t,!0))))}function HN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(ds),blockQuote:a(Nt),characterEscape:ye,characterReference:ye,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(cs,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(Jr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(_i),hardBreakEscape:a(xi),hardBreakTrailing:a(xi),htmlFlow:a(Zr,u),htmlFlowData:ye,htmlText:a(Zr,u),htmlTextData:ye,image:a(we),label:u,link:a(Ue),listItem:a(Xe),listItemValue:T,listOrdered:a(je,E),listUnordered:a(je),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ds),strong:a(wt),thematicBreak:a(st)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:et,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(A),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:d(k),codeText:d(be),codeTextData:M,data:M,definition:d(),definitionDestinationString:W,definitionLabelString:F,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ue),htmlFlowData:M,htmlText:d(de),htmlTextData:M,image:d(oe),label:ne,labelText:q,lineEnding:ae,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:S,resourceTitleString:L,resource:Q,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:B,strong:d(),thematicBreak:d()}};K1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let fe={type:"root",children:[]};const Be={stack:[fe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let tt=-1;for(;++tt<ee.length;)if(ee[tt][1].type==="listOrdered"||ee[tt][1].type==="listUnordered")if(ee[tt][0]==="enter")Ve.push(tt);else{const Jt=Ve.pop();tt=o(ee,Jt,tt)}for(tt=-1;++tt<ee.length;){const Jt=t[ee[tt][0]];G1.call(Jt,ee[tt][1].type)&&Jt[ee[tt][1].type].call(Object.assign({sliceSerialize:ee[tt][2].sliceSerialize},Be),ee[tt][1])}if(Be.tokenStack.length>0){const Jt=Be.tokenStack[Be.tokenStack.length-1];(Jt[1]||Q1).call(Be,void 0,Jt[0])}for(fe.position={start:hi(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:hi(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)fe=t.transforms[tt](fe)||fe;return fe}function o(ee,fe,Be){let Ve=fe-1,tt=-1,Jt=!1,ei,Qn,wi,fs;for(;++Ve<=Be;){const Zt=ee[Ve];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?tt++:tt--,fs=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(ei&&!fs&&!tt&&!wi&&(wi=Ve),fs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fs=void 0}if(!tt&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||tt===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(ei){let Lr=Ve;for(Qn=void 0;Lr--;){const Fn=ee[Lr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",Jt=!0),Fn[1].type="lineEnding",Qn=Lr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}wi&&(!Qn||wi<Qn)&&(ei._spread=!0),ei.end=Object.assign({},Qn?ee[Qn][1].start:Zt[1].end),ee.splice(Qn||Ve,0,["exit",ei,Zt[2]]),Ve++,Be++}if(Zt[1].type==="listItemPrefix"){const Lr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};ei=Lr,ee.splice(Ve,0,["enter",Lr,Zt[2]]),Ve++,Be++,wi=void 0,fs=!0}}}return ee[fe][1]._spread=Jt,Be}function a(ee,fe){return Be;function Be(Ve){c.call(this,ee(Ve),Ve),fe&&fe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,fe,Be){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Be||void 0]),ee.position={start:hi(fe.start),end:void 0}}function d(ee){return fe;function fe(Be){ee&&ee.call(this,Be),f.call(this,Be)}}function f(ee,fe){const Be=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ee.type&&(fe?fe.call(this,ee,Ve[0]):(Ve[1]||Q1).call(this,ee,Ve[0]));else throw new Error("Cannot close `"+ee.type+"` ("+aa({start:ee.start,end:ee.end})+"): it’s not open");Be.position.end=hi(ee.end)}function p(){return Ef(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function T(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function _(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function F(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase()}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function W(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function X(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Be=this.sliceSerialize(ee).length;fe.depth=Be}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(ee){const Be=this.stack[this.stack.length-1].children;let Ve=Be[Be.length-1];(!Ve||Ve.type!=="text")&&(Ve=mn(),Ve.position={start:hi(ee.start),end:void 0},Be.push(Ve)),this.stack.push(Ve)}function M(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=hi(ee.end)}function ae(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=fe.children[fe.children.length-1];Be.position.end=hi(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(ye.call(this,ee),M.call(this,ee))}function he(){this.data.atHardBreak=!0}function ue(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function de(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function be(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function Ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function oe(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function q(ee){const fe=this.sliceSerialize(ee),Be=this.stack[this.stack.length-2];Be.label=FN(fe),Be.identifier=ar(fe).toLowerCase()}function ne(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ve=ee.children;Be.children=Ve}else Be.alt=fe}function S(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function L(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Re(ee){this.data.characterReferenceType=ee.type}function Oe(ee){const fe=this.sliceSerialize(ee),Be=this.data.characterReferenceType;let Ve;Be?(Ve=I1(fe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=yf(fe);const tt=this.stack[this.stack.length-1];tt.value+=Ve}function Ge(ee){const fe=this.stack.pop();fe.position.end=hi(ee.end)}function Ye(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function et(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function cs(){return{type:"inlineCode",value:""}}function Jr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _i(){return{type:"emphasis",children:[]}}function ds(){return{type:"heading",depth:0,children:[]}}function xi(){return{type:"break"}}function Zr(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function je(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Xe(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function K1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?K1(e,r):zN(e,r)}}function zN(e,t){let n;for(n in t)if(G1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Q1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is still open")}function jN(e){const t=this;t.parser=n;function n(r){return UN(r,Te(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function $N(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function VN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
14
+ `}]}function qN(e,t){const n=t.value?t.value+`
15
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function YN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=zs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function KN(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function X1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function XN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return X1(e,t);const o={src:zs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function JN(e,t){const n={src:zs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ZN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function e3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return X1(e,t);const o={href:zs(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function t3(e,t){const n={href:zs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function n3(e,t,n){const r=e.all(t),o=n?r3(n):J1(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let E;p&&p.type==="element"&&p.tagName==="p"?E=p:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
13
16
  `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
14
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function KN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=K1(n[r])}return t}function K1(e){const t=e.spread;return t==null?e.children.length>1:t}function QN(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function XN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Sr(t.children[1]),d=nl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function t3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const E=t.children[d],T={},b=u?u[d]:void 0;b&&(T.align=b);let _={type:"element",tagName:a,properties:T,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function n3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Q1=9,X1=32;function r3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(J1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(J1(t.slice(o),o>0,!1)),a.join("")}function J1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Q1||a===X1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Q1||a===X1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function i3(e,t){const n={type:"text",value:r3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function s3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const o3={blockquote:DN,break:MN,code:FN,delete:BN,emphasis:UN,footnoteReference:HN,heading:zN,html:jN,imageReference:$N,image:VN,inlineCode:qN,linkReference:YN,link:WN,listItem:GN,list:QN,paragraph:XN,root:JN,strong:ZN,table:e3,tableCell:n3,tableRow:t3,text:i3,thematicBreak:s3,toml:al,yaml:al,definition:al,footnoteDefinition:al};function al(){}const Z1=-1,ul=0,fa=1,ll=2,wf=3,Sf=4,Cf=5,Af=6,eE=7,tE=8,nE=typeof self=="object"?self:globalThis,a3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case ul:case Z1:return n(u,o);case fa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case ll:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case wf:return n(new Date(u),o);case Sf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Cf:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case Af:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case eE:{const{name:c,message:d}=u;return n(new nE[c](d),o)}case tE:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new nE[a](u),o)};return r},rE=e=>a3(new Map,e)(0),$s="",{toString:u3}={},{keys:l3}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[ul,t];const n=u3.call(e).slice(8,-1);switch(n){case"Array":return[fa,$s];case"Object":return[ll,$s];case"Date":return[wf,$s];case"RegExp":return[Sf,$s];case"Map":return[Cf,$s];case"Set":return[Af,$s];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:n.includes("Error")?[eE,n]:[ll,n]},cl=([e,t])=>e===ul&&(t==="function"||t==="symbol"),c3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ha(u);switch(c){case ul:{let p=u;switch(d){case"bigint":c=tE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Z1],u)}return o([c,p],u)}case fa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],E=o([c,p],u);for(const T of u)p.push(a(T));return E}case ll:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],E=o([c,p],u);for(const T of l3(u))(e||!cl(ha(u[T])))&&p.push([a(T),a(u[T])]);return E}case wf:return o([c,u.toISOString()],u);case Sf:{const{source:p,flags:E}=u;return o([c,{source:p,flags:E}],u)}case Cf:{const p=[],E=o([c,p],u);for(const[T,b]of u)(e||!(cl(ha(T))||cl(ha(b))))&&p.push([a(T),a(b)]);return E}case Af:{const p=[],E=o([c,p],u);for(const T of u)(e||!cl(ha(T)))&&p.push(a(T));return E}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},iE=(e,{json:t,lossy:n}={})=>{const r=[];return c3(!(t||n),!!t,new Map,r)(e),r},Zi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rE(iE(e,t)):structuredClone(e):(e,t)=>rE(iE(e,t));function d3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function f3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function h3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||d3,r=e.options.footnoteBackLabel||f3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),E=String(f.identifier).toUpperCase(),T=zs(E.toLowerCase());let b=0;const _=[],w=e.footnoteCounts.get(E);for(;w!==void 0&&++b<=w;){_.length>0&&_.push({type:"text",value:" "});let F=typeof n=="string"?n:n(d,b);typeof F=="string"&&(F={type:"text",value:F}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,b),className:["data-footnote-backref"]},children:Array.isArray(F)?F:[F]})}const k=p[p.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const F=k.children[k.children.length-1];F&&F.type==="text"?F.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(..._)}else p.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:Te(H({},Zi(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
17
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function r3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=J1(n[r])}return t}function J1(e){const t=e.spread;return t==null?e.children.length>1:t}function i3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function s3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function a3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Sr(t.children[1]),d=nl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function l3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const E=t.children[d],T={},b=u?u[d]:void 0;b&&(T.align=b);let _={type:"element",tagName:a,properties:T,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function c3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Z1=9,eE=32;function d3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(tE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(tE(t.slice(o),o>0,!1)),a.join("")}function tE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Z1||a===eE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Z1||a===eE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function f3(e,t){const n={type:"text",value:d3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function h3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const p3={blockquote:$N,break:VN,code:qN,delete:YN,emphasis:WN,footnoteReference:GN,heading:KN,html:QN,imageReference:XN,image:JN,inlineCode:ZN,linkReference:e3,link:t3,listItem:n3,list:i3,paragraph:s3,root:o3,strong:a3,table:u3,tableCell:c3,tableRow:l3,text:f3,thematicBreak:h3,toml:al,yaml:al,definition:al,footnoteDefinition:al};function al(){}const nE=-1,ul=0,fa=1,ll=2,Sf=3,Cf=4,Af=5,vf=6,rE=7,iE=8,sE=typeof self=="object"?self:globalThis,m3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case ul:case nE:return n(u,o);case fa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case ll:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Sf:return n(new Date(u),o);case Cf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Af:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case vf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case rE:{const{name:c,message:d}=u;return n(new sE[c](d),o)}case iE:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new sE[a](u),o)};return r},oE=e=>m3(new Map,e)(0),$s="",{toString:g3}={},{keys:E3}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[ul,t];const n=g3.call(e).slice(8,-1);switch(n){case"Array":return[fa,$s];case"Object":return[ll,$s];case"Date":return[Sf,$s];case"RegExp":return[Cf,$s];case"Map":return[Af,$s];case"Set":return[vf,$s];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:n.includes("Error")?[rE,n]:[ll,n]},cl=([e,t])=>e===ul&&(t==="function"||t==="symbol"),y3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ha(u);switch(c){case ul:{let p=u;switch(d){case"bigint":c=iE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([nE],u)}return o([c,p],u)}case fa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],E=o([c,p],u);for(const T of u)p.push(a(T));return E}case ll:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],E=o([c,p],u);for(const T of E3(u))(e||!cl(ha(u[T])))&&p.push([a(T),a(u[T])]);return E}case Sf:return o([c,u.toISOString()],u);case Cf:{const{source:p,flags:E}=u;return o([c,{source:p,flags:E}],u)}case Af:{const p=[],E=o([c,p],u);for(const[T,b]of u)(e||!(cl(ha(T))||cl(ha(b))))&&p.push([a(T),a(b)]);return E}case vf:{const p=[],E=o([c,p],u);for(const T of u)(e||!cl(ha(T)))&&p.push(a(T));return E}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},aE=(e,{json:t,lossy:n}={})=>{const r=[];return y3(!(t||n),!!t,new Map,r)(e),r},Zi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?oE(aE(e,t)):structuredClone(e):(e,t)=>oE(aE(e,t));function b3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function T3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||b3,r=e.options.footnoteBackLabel||T3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),E=String(f.identifier).toUpperCase(),T=zs(E.toLowerCase());let b=0;const _=[],w=e.footnoteCounts.get(E);for(;w!==void 0&&++b<=w;){_.length>0&&_.push({type:"text",value:" "});let F=typeof n=="string"?n:n(d,b);typeof F=="string"&&(F={type:"text",value:F}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,b),className:["data-footnote-backref"]},children:Array.isArray(F)?F:[F]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const F=A.children[A.children.length-1];F&&F.type==="text"?F.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:Te(H({},Zi(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
15
18
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
16
- `}]}}const dl=(function(e){if(e==null)return E3;if(typeof e=="function")return fl(e);if(typeof e=="object")return Array.isArray(e)?p3(e):m3(e);if(typeof e=="string")return g3(e);throw new Error("Expected function, string, or object as test")});function p3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dl(e[n]);return fl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function m3(e){const t=e;return fl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function g3(e){return fl(t);function t(n){return n&&n.type===e}}function fl(e){return t;function t(n,r,o){return!!(y3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function E3(){return!0}function y3(e){return e!==null&&typeof e=="object"&&"type"in e}function zB(e){return e}const sE=[],b3=!0,vf=!1,T3="skip";function oE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=dl(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const b=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return T;function T(){let b=sE,_,w,k;if((!t||a(d,f,p[p.length-1]||void 0))&&(b=_3(n(d,p)),b[0]===vf))return b;if("children"in d&&d.children){const v=d;if(v.children&&b[0]!==T3)for(w=(r?v.children.length:-1)+u,k=p.concat(v);w>-1&&w<v.children.length;){const F=v.children[w];if(_=c(F,w,k)(),_[0]===vf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return b}}}function _3(e){return Array.isArray(e)?e:typeof e=="number"?[b3,e]:e==null?sE:[e]}function hl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),oE(e,a,c,o);function c(d,f){const p=f[f.length-1],E=p?p.children.indexOf(d):void 0;return u(d,E,p)}}const kf={}.hasOwnProperty,x3={};function w3(e,t){const n=t||x3,r=new Map,o=new Map,a=new Map,u=H(H({},o3),n.handlers),c={all:f,applyData:C3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:S3,wrap:v3};return hl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const E=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();E.has(T)||E.set(T,p)}}),c;function d(p,E){const T=p.type,b=c.handlers[T];if(kf.call(c.handlers,T)&&b)return b(c,p,E);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const w=p,{children:k}=w,v=nn(w,["children"]),F=Zi(v);return F.children=c.all(p),F}return Zi(p)}return(c.options.unknownHandler||A3)(c,p,E)}function f(p){const E=[];if("children"in p){const T=p.children;let b=-1;for(;++b<T.length;){const _=c.one(T[b],p);if(_){if(b&&T[b-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=aE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=aE(w.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function S3(e,t){e.position&&(t.position=g1(e))}function C3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Zi(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function A3(e,t){const n=t.data||{},r="value"in t&&!(kf.call(n,"hProperties")||kf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function v3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
19
+ `}]}}const dl=(function(e){if(e==null)return C3;if(typeof e=="function")return fl(e);if(typeof e=="object")return Array.isArray(e)?x3(e):w3(e);if(typeof e=="string")return S3(e);throw new Error("Expected function, string, or object as test")});function x3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dl(e[n]);return fl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function w3(e){const t=e;return fl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function S3(e){return fl(t);function t(n){return n&&n.type===e}}function fl(e){return t;function t(n,r,o){return!!(A3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function C3(){return!0}function A3(e){return e!==null&&typeof e=="object"&&"type"in e}function KB(e){return e}const uE=[],v3=!0,kf=!1,k3="skip";function lE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=dl(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const b=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return T;function T(){let b=uE,_,w,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(b=N3(n(d,p)),b[0]===kf))return b;if("children"in d&&d.children){const k=d;if(k.children&&b[0]!==k3)for(w=(r?k.children.length:-1)+u,A=p.concat(k);w>-1&&w<k.children.length;){const F=k.children[w];if(_=c(F,w,A)(),_[0]===kf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return b}}}function N3(e){return Array.isArray(e)?e:typeof e=="number"?[v3,e]:e==null?uE:[e]}function hl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),lE(e,a,c,o);function c(d,f){const p=f[f.length-1],E=p?p.children.indexOf(d):void 0;return u(d,E,p)}}const Nf={}.hasOwnProperty,O3={};function I3(e,t){const n=t||O3,r=new Map,o=new Map,a=new Map,u=H(H({},p3),n.handlers),c={all:f,applyData:R3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:P3,wrap:D3};return hl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const E=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();E.has(T)||E.set(T,p)}}),c;function d(p,E){const T=p.type,b=c.handlers[T];if(Nf.call(c.handlers,T)&&b)return b(c,p,E);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const w=p,{children:A}=w,k=nn(w,["children"]),F=Zi(k);return F.children=c.all(p),F}return Zi(p)}return(c.options.unknownHandler||L3)(c,p,E)}function f(p){const E=[];if("children"in p){const T=p.children;let b=-1;for(;++b<T.length;){const _=c.one(T[b],p);if(_){if(b&&T[b-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=cE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=cE(w.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function P3(e,t){e.position&&(t.position=b1(e))}function R3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Zi(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function L3(e,t){const n=t.data||{},r="value"in t&&!(Nf.call(n,"hProperties")||Nf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function D3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
17
20
  `});++r<e.length;)r&&n.push({type:"text",value:`
18
21
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
19
- `}),n}function aE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uE(e,t){const n=w3(e,t),r=n.one(e,void 0),o=h3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
20
- `},o),a}function k3(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=uE(n,H({file:r},t));yield e.run(o,r)})}:function(n,r){return uE(n,H({file:r},e||t))}}function lE(e){if(e)throw e}var Nf,cE;function N3(){if(cE)return Nf;cE=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"),E=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!E)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 Nf=function d(){var f,p,E,T,b,_,w=arguments[0],k=1,v=arguments.length,F=!1;for(typeof w=="boolean"&&(F=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<v;++k)if(f=arguments[k],f!=null)for(p in f)E=c(w,p),T=c(f,p),w!==T&&(F&&T&&(a(T)||(b=o(T)))?(b?(b=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(w,{name:p,newValue:d(F,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},Nf}var O3=N3();const Of=Ke(O3);function If(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 I3(){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 E=-1;if(d){u(d);return}for(;++E<o.length;)(f[E]===null||f[E]===void 0)&&(f[E]=o[E]);o=f,p?P3(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 P3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(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 Cr={basename:R3,dirname:L3,extname:D3,join:M3,sep:"/"};function R3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let n=0,r=-1,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 L3(e){if(pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function D3(e){pa(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 M3(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":F3(n)}function F3(e){pa(e);const t=e.codePointAt(0)===47;let n=B3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function B3(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 pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const U3={cwd:H3};function H3(){return"/"}function Pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function z3(e){if(typeof e=="string")e=new URL(e);else if(!Pf(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 j3(e)}function j3(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 Rf=["history","path","basename","stem","extname","dirname"];class dE{constructor(t){let n;t?Pf(t)?n={path:t}:typeof t=="string"||$3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":U3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rf.length;){const a=Rf[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)Rf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Cr.basename(this.path):void 0}set basename(t){Df(t,"basename"),Lf(t,"basename"),this.path=Cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cr.dirname(this.path):void 0}set dirname(t){fE(this.basename,"dirname"),this.path=Cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cr.extname(this.path):void 0}set extname(t){if(Lf(t,"extname"),fE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pf(t)&&(t=z3(t)),Df(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cr.basename(this.path,this.extname):void 0}set stem(t){Df(t,"stem"),Lf(t,"stem"),this.path=Cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new on(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 Lf(e,t){if(e&&e.includes(Cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cr.sep+"`")}function Df(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const V3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),q3={}.hasOwnProperty;class Mf extends V3{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=I3()}copy(){const t=new Mf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Of(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Uf("data",this.frozen),this.namespace[t]=n,this):q3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Uf("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=pl(t),r=this.parser||this.Parser;return Ff("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ff("process",this.parser||this.Parser),Bf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=pl(t),d=r.parse(c);r.run(d,c,function(p,E,T){if(p||!E||!T)return f(p);const b=E,_=r.stringify(b,T);G3(_)?T.value=_:T.result=_,f(p,T)});function f(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Ff("processSync",this.parser||this.Parser),Bf("processSync",this.compiler||this.Compiler),this.process(t,o),pE("processSync","process",n),r;function o(a,u){n=!0,lE(a),r=u}}run(t,n,r){hE(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=pl(n);o.run(t,d,f);function f(p,E,T){const b=E||t;p?c(p):u?u(b):r(void 0,b,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),pE("runSync","run",r),o;function a(u,c){lE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=pl(n),o=this.compiler||this.Compiler;return Bf("stringify",o),hE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Uf("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,...E]=f;d(p,E)}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=Of(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const E=f[p];a(E)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let E=-1,T=-1;for(;++E<r.length;)if(r[E][0]===f){T=E;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[b,..._]=p;const w=r[T][1];If(w)&&If(b)&&(b=Of(!0,w,b)),r[T]=[f,b,..._]}}}}const Y3=new Mf().freeze();function Ff(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uf(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 hE(e){if(!If(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pl(e){return W3(e)?e:new dE(e)}function W3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function G3(e){return typeof e=="string"||K3(e)}function K3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mE=[],gE={allowDangerousHtml:!0},X3=/^(https?|ircs?|mailto|xmpp)$/i,J3=[{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 EE(e){const t=Z3(e),n=eO(e);return tO(t.runSync(t.parse(n),n),e)}function Z3(e){const t=e.rehypePlugins||mE,n=e.remarkPlugins||mE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),gE):gE;return Y3().use(LN).use(n).use(k3,r).use(t)}function eO(e){const t=e.children||"",n=new dE;return typeof t=="string"&&(n.value=t),n}function tO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||nO;for(const p of J3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Q3+p.id,void 0);return hl(e,f),Av(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function f(p,E,T){if(p.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let b;for(b in mf)if(Object.hasOwn(mf,b)&&Object.hasOwn(p.properties,b)){const _=p.properties[b],w=mf[b];(w===null||w.includes(p.tagName))&&(p.properties[b]=d(String(_||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!b&&r&&typeof E=="number"&&(b=!r(p,E,T)),b&&T&&typeof E=="number")return c&&p.children?T.children.splice(E,1,...p.children):T.children.splice(E,1),E}}}function nO(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||X3.test(e.slice(0,t))?e:""}const yE=/[#.]/g;function rO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){yE.lastIndex=o;const c=yE.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 bE(e,t,n){const r=n?aO(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=rO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,iO(u))c.unshift(u);else for(const[E,T]of Object.entries(u))sO(e,d.properties,E,T)}for(const f of c)Hf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function iO(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 sO(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=l1(r):o.commaSeparated?a=Qg(r):o.commaOrSpaceSeparated?a=l1(Qg(r).join(" ")):a=TE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?oO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(TE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Hf(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)Hf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Hf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function TE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ia(n)===ia(t)))return!0}return n}function oO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function aO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const uO=["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"],lO=bE(tl,"div"),cO=bE(Us,"g",uO);function dO(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=_E(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=_E(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 _E(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
21
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const es={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},xE={}.hasOwnProperty,fO=Object.prototype;function hO(e,t){const n=t||{};return zf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Us:tl,verbose:n.verbose||!1},e)}function zf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:wE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=dO(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ml(e,r,n),n}default:return n=pO(e,t),n}}function wE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=zf(e,t[n]);r.push(o)}return r}function pO(e,t){const n=e.schema;e.schema=t.namespaceURI===es.svg?Us:tl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;xE.call(fO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?cO:lO)(t.tagName,o,wE(e,t.childNodes));if(ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Vs(d.startTag),p=d&&d.endTag&&Vs(d.endTag),E=zf(e,c.content);f&&p&&e.file&&(E.position={start:f.end,end:p.start}),u.content=E}return e.schema=n,u}function ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=mO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mO(e,t,n){const r=Vs(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)xE.call(n.attrs,u)&&(a[lf(e.schema,u).property]=Vs(n.attrs[u]));n.startTag;const c=Vs(n.startTag),d=n.endTag?Vs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Vs(e){const t=SE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=SE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function SE(e){return e.line&&e.column?e:void 0}class ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ma.prototype.property={},ma.prototype.normal={},ma.prototype.space=null;function CE(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 ma(n,r,t)}function jf(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let gO=0;const $e=ts(),Ut=ts(),AE=ts(),me=ts(),pt=ts(),qs=ts(),Ln=ts();function ts(){return sd(2,++gO)}const $f=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Ut,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:me,overloadedBoolean:AE,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),Vf=Object.keys($f);class qf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),vE(this,"space",o),typeof r=="number")for(;++a<Vf.length;){const u=Vf[a];vE(this,Vf[a],(r&$f[u])===$f[u])}}}qf.prototype.defined=!0;function vE(e,t,n){n&&(e[t]=n)}const EO={}.hasOwnProperty;function Ys(e){const t={},n={};let r;for(r in e.properties)if(EO.call(e.properties,r)){const o=e.properties[r],a=new qf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[jf(r)]=r,n[jf(a.attribute)]=r}return new ma(t,n,e.space)}const kE=Ys({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}}),NE=Ys({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function OE(e,t){return t in e?e[t]:t}function IE(e,t){return OE(e,t.toLowerCase())}const PE=Ys({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:IE,properties:{xmlns:null,xmlnsXLink:null}}),RE=Ys({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:pt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ut,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),yO=Ys({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:IE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:pt,autoFocus:$e,autoPlay:$e,blocking:pt,capture:null,charSet:null,checked:$e,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ut,controls:$e,controlsList:pt,coords:me|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:AE,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:pt,height:me,hidden:$e,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:pt,itemRef:pt,itemScope:$e,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:pt,required:$e,reversed:$e,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ut,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:me,security:null,unselectable:null}}),bO=Ys({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:OE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),TO=/^data[-\w.:]+$/i,LE=/-[a-z]/g,_O=/[A-Z]/g;function xO(e,t){const n=jf(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(LE,SO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!LE.test(a)){let u=a.replace(_O,wO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=qf}return new o(r,t)}function wO(e){return"-"+e.toLowerCase()}function SO(e){return e.charAt(1).toUpperCase()}const CO=CE([NE,kE,PE,RE,yO],"html"),DE=CE([NE,kE,PE,RE,bO],"svg"),ME={}.hasOwnProperty;function FE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&ME.call(o,e)){const d=String(o[e]);u=ME.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 AO={},vO={}.hasOwnProperty,BE=FE("type",{handlers:{root:NO,element:LO,text:PO,comment:RO,doctype:IO}});function kO(e,t){const r=(t||AO).space;return BE(e,r==="svg"?DE:CO)}function NO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Yf(e.children,n,t),Ws(e,n),n}function OO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Yf(e.children,n,t),Ws(e,n),n}function IO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ws(e,t),t}function PO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ws(e,t),t}function RO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ws(e,t),t}function LO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=DE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&vO.call(e.properties,a)){const d=DO(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:es[u],childNodes:[],parentNode:null};return c.childNodes=Yf(e.children,c,r),Ws(e,c),e.tagName==="template"&&e.content&&(c.content=OO(e.content,r)),c}function DO(e,t,n){const r=xO(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?Xg(n):c1(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=es[r.space]}return o}function Yf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=BE(e[r],n);a.parentNode=t,o.push(a)}return o}function Ws(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 MO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],FO=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]),_t="�";var A;(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"})(A||(A={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function UE(e){return e>=55296&&e<=57343}function BO(e){return e>=56320&&e<=57343}function UO(e,t){return(e-55296)*1024+9216+t}function HE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function zE(e){return e>=64976&&e<=65007||FO.has(e)}var Z;(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"})(Z||(Z={}));const HO=65536;class zO{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=HO,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(BO(n))return this.pos++,this._addGap(),UO(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(Z.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,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.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,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,UE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){HE(t)?this._err(Z.controlCharacterInInputStream):zE(t)&&this._err(Z.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(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"})(We||(We={}));function jE(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 jO=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),$O=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 VO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$O.get(e))!==null&&t!==void 0?t:e}var Yt;(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"})(Yt||(Yt={}));const qO=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function Wf(e){return e>=Yt.ZERO&&e<=Yt.NINE}function YO(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_F||e>=Yt.LOWER_A&&e<=Yt.LOWER_F}function WO(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_Z||e>=Yt.LOWER_A&&e<=Yt.LOWER_Z||Wf(e)}function GO(e){return e===Yt.EQUALS||WO(e)}var Wt;(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"})(Wt||(Wt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class KO{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Yt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|qO)===Yt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.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(Wf(o)||YO(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(Wf(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===Yt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(VO(this.result),this.consumed),this.errors&&(t!==Yt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=QO(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||GO(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&pi.VALUE_LENGTH)>>14,a!==0){if(u===Yt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.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]&pi.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]&~pi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function QO(e,t,n,r){const o=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 ie;(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/"})(ie||(ie={}));var ns;(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"})(ns||(ns={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));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 XO=new Map([[j.A,m.A],[j.ADDRESS,m.ADDRESS],[j.ANNOTATION_XML,m.ANNOTATION_XML],[j.APPLET,m.APPLET],[j.AREA,m.AREA],[j.ARTICLE,m.ARTICLE],[j.ASIDE,m.ASIDE],[j.B,m.B],[j.BASE,m.BASE],[j.BASEFONT,m.BASEFONT],[j.BGSOUND,m.BGSOUND],[j.BIG,m.BIG],[j.BLOCKQUOTE,m.BLOCKQUOTE],[j.BODY,m.BODY],[j.BR,m.BR],[j.BUTTON,m.BUTTON],[j.CAPTION,m.CAPTION],[j.CENTER,m.CENTER],[j.CODE,m.CODE],[j.COL,m.COL],[j.COLGROUP,m.COLGROUP],[j.DD,m.DD],[j.DESC,m.DESC],[j.DETAILS,m.DETAILS],[j.DIALOG,m.DIALOG],[j.DIR,m.DIR],[j.DIV,m.DIV],[j.DL,m.DL],[j.DT,m.DT],[j.EM,m.EM],[j.EMBED,m.EMBED],[j.FIELDSET,m.FIELDSET],[j.FIGCAPTION,m.FIGCAPTION],[j.FIGURE,m.FIGURE],[j.FONT,m.FONT],[j.FOOTER,m.FOOTER],[j.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[j.FORM,m.FORM],[j.FRAME,m.FRAME],[j.FRAMESET,m.FRAMESET],[j.H1,m.H1],[j.H2,m.H2],[j.H3,m.H3],[j.H4,m.H4],[j.H5,m.H5],[j.H6,m.H6],[j.HEAD,m.HEAD],[j.HEADER,m.HEADER],[j.HGROUP,m.HGROUP],[j.HR,m.HR],[j.HTML,m.HTML],[j.I,m.I],[j.IMG,m.IMG],[j.IMAGE,m.IMAGE],[j.INPUT,m.INPUT],[j.IFRAME,m.IFRAME],[j.KEYGEN,m.KEYGEN],[j.LABEL,m.LABEL],[j.LI,m.LI],[j.LINK,m.LINK],[j.LISTING,m.LISTING],[j.MAIN,m.MAIN],[j.MALIGNMARK,m.MALIGNMARK],[j.MARQUEE,m.MARQUEE],[j.MATH,m.MATH],[j.MENU,m.MENU],[j.META,m.META],[j.MGLYPH,m.MGLYPH],[j.MI,m.MI],[j.MO,m.MO],[j.MN,m.MN],[j.MS,m.MS],[j.MTEXT,m.MTEXT],[j.NAV,m.NAV],[j.NOBR,m.NOBR],[j.NOFRAMES,m.NOFRAMES],[j.NOEMBED,m.NOEMBED],[j.NOSCRIPT,m.NOSCRIPT],[j.OBJECT,m.OBJECT],[j.OL,m.OL],[j.OPTGROUP,m.OPTGROUP],[j.OPTION,m.OPTION],[j.P,m.P],[j.PARAM,m.PARAM],[j.PLAINTEXT,m.PLAINTEXT],[j.PRE,m.PRE],[j.RB,m.RB],[j.RP,m.RP],[j.RT,m.RT],[j.RTC,m.RTC],[j.RUBY,m.RUBY],[j.S,m.S],[j.SCRIPT,m.SCRIPT],[j.SEARCH,m.SEARCH],[j.SECTION,m.SECTION],[j.SELECT,m.SELECT],[j.SOURCE,m.SOURCE],[j.SMALL,m.SMALL],[j.SPAN,m.SPAN],[j.STRIKE,m.STRIKE],[j.STRONG,m.STRONG],[j.STYLE,m.STYLE],[j.SUB,m.SUB],[j.SUMMARY,m.SUMMARY],[j.SUP,m.SUP],[j.TABLE,m.TABLE],[j.TBODY,m.TBODY],[j.TEMPLATE,m.TEMPLATE],[j.TEXTAREA,m.TEXTAREA],[j.TFOOT,m.TFOOT],[j.TD,m.TD],[j.TH,m.TH],[j.THEAD,m.THEAD],[j.TITLE,m.TITLE],[j.TR,m.TR],[j.TRACK,m.TRACK],[j.TT,m.TT],[j.U,m.U],[j.UL,m.UL],[j.SVG,m.SVG],[j.VAR,m.VAR],[j.WBR,m.WBR],[j.XMP,m.XMP]]);function Gs(e){var t;return(t=XO.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const le=m,JO={[ie.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[ie.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[ie.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Gf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var N;(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"})(N||(N={}));const Lt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function ZO(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function ga(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function eI(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function mi(e){return eI(e)||ga(e)}function $E(e){return mi(e)||ZO(e)}function gl(e){return e+32}function VE(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function qE(e){return VE(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function tI(e){return e===A.NULL?Z.nullCharacterReference:e>1114111?Z.characterReferenceOutsideUnicodeRange:UE(e)?Z.surrogateCharacterReference:zE(e)?Z.noncharacterCharacterReference:HE(e)||e===A.CARRIAGE_RETURN?Z.controlCharacterReference:null}class nI{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zO(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new KO(jO,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=tI(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:We.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.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(jE(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(Z.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=Gs(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Z.endTagWithAttributes),t.selfClosing&&this._err(Z.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 We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.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:We.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=VE(t)?We.WHITESPACE_CHARACTER:t===A.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(Z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(Z.missingEndTagName),this.state=N.DATA;break}case A.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.tagName+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(Z.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(Z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(Z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(Z.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(Z.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Z.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(Z.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ga(t))this._createDoctypeToken(String.fromCharCode(gl(t))),this.state=N.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(Z.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=N.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.name+=_t;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Z.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.NULL:{this._err(Z.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(Z.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$E(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$E(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(Z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const YE=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),WE=new Set([...YE,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),El=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),rI=new Set([...El,m.OL,m.UL]),iI=new Set([...El,m.BUTTON]),GE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),KE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),sI=new Set([m.TR,m.TEMPLATE,m.HTML]),oI=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),aI=new Set([m.TABLE,m.TEMPLATE,m.HTML]),uI=new Set([m.TD,m.TH]);class lI{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)===ie.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])!==ie.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(Gf,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uI,ie.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(aI,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(oI,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(sI,ie.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 ie.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ie.SVG:{if(KE.has(o))return!1;break}case ie.MATHML:{if(GE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,El)}hasInListItemScope(t){return this.hasInDynamicScope(t,rI)}hasInButtonScope(t){return this.hasInDynamicScope(t,iI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Gf.has(n))return!0;if(El.has(n))return!1;break}case ie.SVG:{if(KE.has(n))return!1;break}case ie.MATHML:{if(GE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.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])===ie.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])===ie.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&&YE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&WE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&WE.has(this.currentTagId);)this.pop()}}const Kf=3;var Ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ar||(Ar={}));const QE={type:Ar.Marker};class cI{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===Ar.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<Kf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Kf)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>=Kf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(QE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ar.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(QE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ar.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Wn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=H(H({},e.sourceCodeLocation),t)}},XE="html",dI="about:legacy-compat",fI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",JE=["+//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//"],hI=[...JE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],pI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ZE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],mI=[...ZE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ey(e,t){return t.some(n=>e.startsWith(n))}function gI(e){return e.name===XE&&e.publicId===null&&(e.systemId===null||e.systemId===dI)}function EI(e){if(e.name!==XE)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===fI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),pI.has(n))return Wn.QUIRKS;let r=t===null?hI:JE;if(ey(n,r))return Wn.QUIRKS;if(r=t===null?ZE:mI,ey(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const ty={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},yI="definitionurl",bI="definitionURL",TI=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])),_I=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),xI=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])),wI=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 SI(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ns.COLOR||r===ns.SIZE||r===ns.FACE)||wI.has(t)}function ny(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===yI){e.attrs[t].name=bI;break}}function ry(e){for(let t=0;t<e.attrs.length;t++){const n=TI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Qf(e){for(let t=0;t<e.attrs.length;t++){const n=_I.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 CI(e){const t=xI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function AI(e,t){return t===ie.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function vI(e,t,n){if(t===ie.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ns.ENCODING){const o=n[r].value.toLowerCase();return o===ty.TEXT_HTML||o===ty.APPLICATION_XML}}return t===ie.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function kI(e,t,n,r){return(!r||r===ie.HTML)&&vI(e,t,n)||(!r||r===ie.MATHML)&&AI(e,t)}const NI="hidden",OI=8,II=3;var P;(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"})(P||(P={}));const PI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},iy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),sy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class oy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=H(H({},sy),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 nI(this.options,this),this.activeFormattingElements=new cI(this.treeAdapter),this.fragmentContextID=r?Gs(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new lI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=H(H({},sy),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,ie.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:PI,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)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&Te(H({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.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(j.HTML,ie.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===We.END_TAG&&o===n.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return kI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ar.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=P.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=P.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=P.IN_TABLE;return}case m.BODY:{this.insertionMode=P.IN_BODY;return}case m.FRAMESET:{this.insertionMode=P.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?P.AFTER_HEAD:P.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.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=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return iy.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)===ie.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 JO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{uy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_TABLE_TEXT:{gy(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Jf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Jf(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.AFTER_BODY:{UI(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{HI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{zI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,Z.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?lR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{jI(this,t);break}case P.BEFORE_HEAD:{VI(this,t);break}case P.IN_HEAD:{ur(this,t);break}case P.IN_HEAD_NO_SCRIPT:{WI(this,t);break}case P.AFTER_HEAD:{KI(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ks(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{qP(this,t);break}case P.IN_COLUMN_GROUP:{th(this,t);break}case P.IN_TABLE_BODY:{_l(this,t);break}case P.IN_ROW:{xl(this,t);break}case P.IN_CELL:{GP(this,t);break}case P.IN_SELECT:{by(this,t);break}case P.IN_SELECT_IN_TABLE:{QP(this,t);break}case P.IN_TEMPLATE:{JP(this,t);break}case P.AFTER_BODY:{eR(this,t);break}case P.IN_FRAMESET:{tR(this,t);break}case P.AFTER_FRAMESET:{rR(this,t);break}case P.AFTER_AFTER_BODY:{sR(this,t);break}case P.AFTER_AFTER_FRAMESET:{oR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?cR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{$I(this,t);break}case P.BEFORE_HEAD:{qI(this,t);break}case P.IN_HEAD:{YI(this,t);break}case P.IN_HEAD_NO_SCRIPT:{GI(this,t);break}case P.AFTER_HEAD:{QI(this,t);break}case P.IN_BODY:{bl(this,t);break}case P.TEXT:{DP(this,t);break}case P.IN_TABLE:{wa(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{YP(this,t);break}case P.IN_COLUMN_GROUP:{WP(this,t);break}case P.IN_TABLE_BODY:{nh(this,t);break}case P.IN_ROW:{yy(this,t);break}case P.IN_CELL:{KP(this,t);break}case P.IN_SELECT:{Ty(this,t);break}case P.IN_SELECT_IN_TABLE:{XP(this,t);break}case P.IN_TEMPLATE:{ZP(this,t);break}case P.AFTER_BODY:{xy(this,t);break}case P.IN_FRAMESET:{nR(this,t);break}case P.AFTER_FRAMESET:{iR(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{py(this,t);break}case P.TEXT:{MP(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_TEMPLATE:{_y(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Zf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{ay(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_TABLE_TEXT:{my(this,t);break}}}}function RI(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):hy(e,t),n}function LI(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 DI(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>=II;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=MI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function MI(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 FI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Gs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function BI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Xf(e,t){for(let n=0;n<OI;n++){const r=RI(e,t);if(!r)break;const o=LI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=DI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&FI(e,u,a),BI(e,o,r)}}function Jf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function UI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function HI(e,t){e._appendCommentNode(t,e.document)}function Zf(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 zI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:EI(t);gI(t)||e._err(t,Z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ea(e,t){e._err(t,Z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function jI(e,t){t.tagID===m.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=P.BEFORE_HEAD):ya(e,t)}function $I(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function VI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:ba(e,t)}}function qI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?ba(e,t):e._err(t,Z.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(j.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function ur(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function YI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ta(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Ta(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function WI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{ur(e,t);break}case m.NOSCRIPT:{e._err(t,Z.nestedNoscriptInHead);break}default:_a(e,t)}}function GI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case m.BR:{_a(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function _a(e,t){const n=t.type===We.EOF?Z.openElementsLeftAfterEof:Z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function KI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=P.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,Z.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),ur(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function QI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{xa(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(j.BODY,m.BODY),e.insertionMode=P.IN_BODY,yl(e,t)}function yl(e,t){switch(t.type){case We.CHARACTER:{uy(e,t);break}case We.WHITESPACE_CHARACTER:{ay(e,t);break}case We.COMMENT:{Jf(e,t);break}case We.START_TAG:{un(e,t);break}case We.END_TAG:{bl(e,t);break}case We.EOF:{py(e,t);break}}}function ay(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function XI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function JI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ZI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET)}function eP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function tP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Gf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function nP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function rP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function iP(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,ie.HTML)}function sP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Lt.PLAINTEXT}function oP(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function aP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function dP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function ly(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cy(e){const t=jE(e,ns.TYPE);return t!=null&&t.toLowerCase()===NI}function fP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),cy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function hP(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function pP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mP(e,t){t.tagName=j.IMG,t.tagID=m.IMG,ly(e,t)}function gP(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function EP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function yP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function dy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function bP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function TP(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function _P(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function xP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ie.HTML)}function wP(e,t){e._reconstructActiveFormattingElements(),ny(t),Qf(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function SP(e,t){e._reconstructActiveFormattingElements(),ry(t),Qf(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function fy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function un(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:{uP(e,t);break}case m.A:{aP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{tP(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:{eP(e,t);break}case m.LI:case m.DD:case m.DT:{iP(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{ly(e,t);break}case m.HR:{pP(e,t);break}case m.RB:case m.RTC:{_P(e,t);break}case m.RT:case m.RP:{xP(e,t);break}case m.PRE:case m.LISTING:{nP(e,t);break}case m.XMP:{EP(e,t);break}case m.SVG:{SP(e,t);break}case m.HTML:{XI(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:{ur(e,t);break}case m.BODY:{JI(e,t);break}case m.FORM:{rP(e,t);break}case m.NOBR:{lP(e,t);break}case m.MATH:{wP(e,t);break}case m.TABLE:{dP(e,t);break}case m.INPUT:{fP(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{hP(e,t);break}case m.IMAGE:{mP(e,t);break}case m.BUTTON:{oP(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{cP(e,t);break}case m.IFRAME:{yP(e,t);break}case m.SELECT:{bP(e,t);break}case m.OPTION:case m.OPTGROUP:{TP(e,t);break}case m.NOEMBED:case m.NOFRAMES:{dy(e,t);break}case m.FRAMESET:{ZI(e,t);break}case m.TEXTAREA:{gP(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?dy(e,t):fy(e,t);break}case m.PLAINTEXT:{sP(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:fy(e,t)}}function CP(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function AP(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,xy(e,t))}function vP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kP(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 NP(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(j.P,m.P),e._closePElement()}function OP(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function IP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function PP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function RP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function LP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function hy(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 bl(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Xf(e,t);break}case m.P:{NP(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:{vP(e,t);break}case m.LI:{OP(e);break}case m.DD:case m.DT:{IP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PP(e);break}case m.BR:{LP(e);break}case m.BODY:{CP(e,t);break}case m.HTML:{AP(e,t);break}case m.FORM:{kP(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{RP(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:hy(e,t)}}function py(e,t){e.tmplInsertionModeStack.length>0?_y(e,t):Zf(e,t)}function DP(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 MP(e,t){e._err(t,Z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function eh(e,t){if(e.openElements.currentTagId!==void 0&&iy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case We.CHARACTER:{gy(e,t);break}case We.WHITESPACE_CHARACTER:{my(e,t);break}}else Sa(e,t)}function FP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CAPTION}function BP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function UP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,m.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,th(e,t)}function HP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_TABLE_BODY}function zP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,m.TBODY),e.insertionMode=P.IN_TABLE_BODY,_l(e,t)}function jP(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $P(e,t){cy(t)?e._appendElement(t,ie.HTML):Sa(e,t),t.ackSelfClosing=!0}function VP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{zP(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}case m.COL:{UP(e,t);break}case m.FORM:{VP(e,t);break}case m.TABLE:{jP(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{HP(e,t);break}case m.INPUT:{$P(e,t);break}case m.CAPTION:{FP(e,t);break}case m.COLGROUP:{BP(e,t);break}default:Sa(e,t)}}function wa(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{rs(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:Sa(e,t)}}function Sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yl(e,t),e.fosterParentingEnabled=n}function my(e,t){e.pendingCharacterTokens.push(t)}function gy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ca(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ey=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function qP(e,t){const n=t.tagID;Ey.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ks(e,t)):un(e,t)}function YP(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=P.IN_TABLE,n===m.TABLE&&wa(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:bl(e,t)}}function th(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{ur(e,t);break}default:Tl(e,t)}}function WP(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TEMPLATE:{rs(e,t);break}case m.COL:break;default:Tl(e,t)}}function Tl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function _l(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,m.TR),e.insertionMode=P.IN_ROW,xl(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=P.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function nh(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=P.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,wa(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:wa(e,t)}}function xl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.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=P.IN_TABLE_BODY,_l(e,t));break}default:Ks(e,t)}}function yy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,nh(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=P.IN_TABLE_BODY,nh(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:wa(e,t)}}function GP(e,t){const n=t.tagID;Ey.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),xl(e,t)):un(e,t)}function KP(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=P.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),yy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:bl(e,t)}}function by(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.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:{ur(e,t);break}}}function Ty(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:{rs(e,t);break}}}function QP(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)):by(e,t)}function XP(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)):Ty(e,t)}function JP(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:{ur(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ks(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,th(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,_l(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,xl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function ZP(e,t){t.tagID===m.TEMPLATE&&rs(e,t)}function _y(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zf(e,t)}function eR(e,t){t.tagID===m.HTML?un(e,t):wl(e,t)}function xy(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=P.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 wl(e,t)}function wl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function tR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.FRAMESET:{e._insertElement(t,ie.HTML);break}case m.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{ur(e,t);break}}}function nR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function rR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function iR(e,t){t.tagID===m.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function sR(e,t){t.tagID===m.HTML?un(e,t):Sl(e,t)}function Sl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function oR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function aR(e,t){t.chars=_t,e._insertCharacters(t)}function uR(e,t){e._insertCharacters(t),e.framesetOk=!1}function wy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function lR(e,t){if(SI(t))wy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?ny(t):r===ie.SVG&&(CI(t),ry(t)),Qf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function cR(e,t){if(t.tagID===m.P||t.tagID===m.BR){wy(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)===ie.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const dR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Sy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Cy(e,t){const n=xR(e),r=FE("type",{handlers:{root:hR,element:pR,text:mR,comment:vy,doctype:gR,raw:yR},unknown:bR}),o={parser:n?new oy(Sy):oy.getFragmentParser(void 0,Sy),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Qs(o,Sr());const a=n?o.parser.document:o.parser.getFragment(),u=hO(a,{file:o.options.file});return o.stitches&&hl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const E=f.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Ay(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function hR(e,t){Ay(e.children,t)}function pR(e,t){TR(e,t),Ay(e.children,t),_R(e,t)}function mR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ER(e,t){t.stitches=!0;const n=wR(e);if("children"in e&&"children"in n){const r=Cy({type:"root",children:e.children},t.options);n.children=r.children}vy({type:"comment",value:{stitch:n}},t)}function vy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function yR(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,ky(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(dR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function bR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ER(n,t);else{let r="";throw fR.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 Qs(e,t){ky(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ky(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 TR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:es.html;o===es.html&&n==="svg"&&(o=es.svg);const a=kO(Te(H({},e),{children:[]}),{space:o===es.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Aa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _R(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&MO.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,nl(e));const r={type:We.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Aa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function xR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Aa(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=nl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function wR(e){return"children"in e?Zi(Te(H({},e),{children:[]})):Zi(e)}function Ny(e){return function(t,n){return Cy(t,Te(H({},e),{file:n}))}}const is=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Oy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...is,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...is],h2:[["className","sr-only"]],img:[...is,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...is,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...is],table:[...is],ul:[...is,["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"]},Ei={}.hasOwnProperty;function SR(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Oy),t):Oy,stack:[]},o=Iy(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Iy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return CR(e,n);case"doctype":return AR(e,n);case"element":return vR(e,n);case"root":return kR(e,n);case"text":return NR(e,n)}}}function CR(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 va(a,t),a}}function AR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return va(n,t),n}}function vR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Py(e,t.children),o=OR(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&&Ei.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 va(u,t),u}function kR(e,t){const r={type:"root",children:Py(e,t.children)};return va(r,t),r}function NR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return va(r,t),r}function Py(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Iy(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function OR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ei.call(c,f)){const p=c[f];let E=Ry(e,Dy(a,f),f,p);E==null&&(E=Ry(e,Dy(u,f),f,p)),E!=null&&(d[f]=E)}if(o&&Ei.call(o,n)){const p=o[n];for(f in p)Ei.call(p,f)&&!Ei.call(d,f)&&(d[f]=p[f])}return d}function Ry(e,t,n,r){return t?Array.isArray(r)?IR(e,t,n,r):Ly(e,t,n,r):void 0}function IR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ly(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ly(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&PR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function PR(e,t,n){const r=e.schema.protocols&&Ei.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 va(e,t){const n=g1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function Dy(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 RR(e){return function(t){return SR(t,e)}}const My=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return C.jsx("a",Te(H(H({className:J(e,`${Y}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},LR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=Rt();return!e&&!t?null:C.jsx("div",{className:J(n,`${Y}-disclaimer`),children:t?C.jsx(EE,{rehypePlugins:[Ny,RR],components:{ul:({children:o})=>C.jsx("ul",{className:J(n,`${Y}-ul`),children:o}),ol:({children:o})=>C.jsx("ol",{className:J(n,`${Y}-ol`),children:o}),li:({children:o})=>C.jsx("li",{className:J(n,`${Y}-li`),children:o}),a:({href:o,title:a,children:u})=>C.jsx(My,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>C.jsx("img",{className:J(n,`${Y}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:o}),span:({children:o})=>C.jsx("span",{className:J(n,`${Y}-disclaimer-text-span`),children:o})},children:t}):C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:e})})},rh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Ms(),{setImageFile:u}=ta(),{logger:c,globalClassName:d,searchConfig:f,features:p}=Rt(),E=$.useRef(null),T=$.useRef(null),b=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,k=w?"connected":"disconnected",v=t||!w,F=()=>a?new Promise((B,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>B(ge.result),ge.onerror=ye=>te(ye)}):Promise.resolve(""),R=B=>rt(null,null,function*(){var ye;if(v)return;const te=10*1024*1024,ge=(ye=B.target.files)==null?void 0:ye[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),W=()=>{u(null),T.current&&(T.current.value="")},X=B=>rt(null,null,function*(){var ye;B.preventDefault();const te=(((ye=E.current)==null?void 0:ye.value)||"").trim();let ge="";try{ge=yield F()}catch(M){c==null||c.error("Error converting file to base64:",M),alert("There was an error processing the file. Please try again.");return}te&&(W(),E.current.value="",r(te,ge))});return C.jsxs("div",{className:J(d,e,n,a&&"with-attachments",`${Y}-search-bar-wrapper`),children:[a&&C.jsxs("div",{className:J(d,n,`${Y}-image-file-preview`),children:[C.jsx("img",{className:J(d,n,`${Y}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),C.jsx("span",{className:J(d,n,`${Y}-image-file-name`),title:_,children:_}),C.jsx(nf,{className:J(n,"clear-attachment"),label:"Remove image",onClick:W})]}),C.jsxs("form",{className:J(d,e,n,`${Y}-search-bar`),name:`${Y}-search-form`,onSubmit:X,children:[C.jsx("span",{role:"status",className:J(`${Y}-connection-status-icon`,k)}),b&&C.jsxs("div",{role:"button",className:J(d,e,n,v&&"disabled",`${Y}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[C.jsx("label",{className:J(d,e,n,v&&"disabled",`${Y}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:C.jsx(XA,{})}),C.jsx("input",{className:J(d,e,n,`${Y}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${Y}-file-input`,disabled:v,onInput:R})]}),C.jsx("input",{className:J(d,e,n,`${Y}-search-input`),type:"text",ref:E,placeholder:f==null?void 0:f.placeholder,name:`${Y}-user-input`}),C.jsx(nv,{isLoading:v}),C.jsx(ZA,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),C.jsx(LR,{})]})};function DR(e){return e==null?[]:Array.isArray(e)?e:[e]}var MR=e=>e!=null&&typeof e=="object",Cl=e=>typeof e=="string",Xs=e=>typeof e=="function",FR=e=>e==null,BR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),UR=e=>Object.prototype.toString.call(e),Fy=Function.prototype.toString,HR=Fy.call(Object),zR=e=>{if(!MR(e)||UR(e)!="[object Object]"||VR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=BR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fy.call(n)==HR},jR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,$R=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,VR=e=>jR(e)||$R(e),qR=e=>e(),YR=()=>{},ih=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function sh(e){if(!zR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=sh(o))}return n}function oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function WR(e,t){if(e==null)throw new Error(t())}var GR=Object.defineProperty,KR=(e,t,n)=>t in e?GR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t,n)=>KR(e,typeof t!="symbol"?t+"":t,n),By=()=>{},Al=e=>typeof e=="object"&&e!==null,QR=e=>e?"":void 0,XR=e=>e?"true":void 0,JR=1,ZR=9,eL=11,Gt=e=>Al(e)&&e.nodeType===JR&&typeof e.nodeName=="string",vl=e=>Al(e)&&e.nodeType===ZR,tL=e=>Al(e)&&e===e.window,Uy=e=>Gt(e)?e.localName||"":"#document";function nL(e){return["html","body","#document"].includes(Uy(e))}var rL=e=>Al(e)&&e.nodeType!==void 0,ss=e=>rL(e)&&e.nodeType===eL&&"host"in e,iL=e=>Gt(e)&&e.localName==="input",sL=e=>Gt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var oL=/(textarea|select)/;function aL(e){if(e==null||!Gt(e))return!1;try{return iL(e)&&e.selectionStart!=null||oL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function kl(e,t){var r;if(!e||!t||!Gt(e)||!Gt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ss(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function vr(e){var t;return vl(e)?e:tL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function uL(e){return vr(e).documentElement}function Js(e){var t,n,r;return ss(e)?Js(e.host):vl(e)?(t=e.defaultView)!=null?t:window:Gt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Zs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function lL(e){if(Uy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ss(e)&&e.host||uL(e);return ss(t)?t.host:t}function uh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),vl(t)||ss(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var lh=new WeakMap;function Nl(e){return lh.has(e)||lh.set(e,Js(e).getComputedStyle(e)),lh.get(e)}var ch=new Set(["menu","listbox","dialog","grid","tree","region"]),cL=e=>ch.has(e),Hy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function zy(e,t){const n=new Set,r=uh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Hy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(E&&cL(E)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function jy(e,t){const n=uh(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=Hy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";E&&ch.has(E)&&!T&&(t(p),o(p))}}}};o(e)}function dL(e){const t=new Set;return jy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function fL(e){const t=e.getAttribute("role");return!!(t&&ch.has(t))}function hL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function pL(e){var t;return hL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function mL(e){if(!e.id)return!1;const t=uh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&fL(e))}var dh=()=>typeof document!="undefined";function gL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var fh=e=>dh()&&e.test(gL()),EL=e=>dh()&&e.test(navigator.vendor),$y=()=>dh()&&!!navigator.maxTouchPoints,yL=()=>fh(/^iPhone/i),bL=()=>fh(/^iPad/i)||hh()&&navigator.maxTouchPoints>1,Vy=()=>yL()||bL(),TL=()=>hh()||Vy(),hh=()=>fh(/^Mac/i),_L=()=>TL()&&EL(/apple/i);function xL(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 Yr(e){var n;const t=xL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var wL=e=>e.button===0,SL=e=>e.button===2||hh()&&e.ctrlKey&&e.button===0,lr=(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)}},qy=e=>Gt(e)&&e.tagName==="IFRAME",CL=/^(audio|video|details)$/;function Yy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var AL=e=>!Number.isNaN(Yy(e)),vL=e=>Yy(e)<0;function kL(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 Wy(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=kL(d,t);if(f){const p=Array.from(f.querySelectorAll(Ol)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...p),p.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+p.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...p),p.forEach((b,_)=>{u.set(b,T+_)})}o.push(...p)}}return r}var Ol="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Gy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));(n==!0||n=="if-empty"&&o.length===0)&&Gt(e)&&Wr(e)&&o.unshift(e);const u=[];for(const c of o)if(Wr(c)){if(qy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wy(u,r,Wr):u};function Wr(e){return!Gt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&sL(e)}function Na(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));n&&os(e)&&o.unshift(e);const a=[];for(const u of o)if(os(u)){if(qy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Na(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wy(a,r,os);return!u.length&&n?o:u}return!a.length&&n?o:a}function os(e){return Gt(e)&&e.tabIndex>0?!0:Wr(e)&&!vL(e)}function NL(e,t={}){const n=Na(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function OL(e,t={}){const{current:n,getShadowRoot:r}=t,o=Na(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Zs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Oa(e){return e.tabIndex<0&&(CL.test(e.localName)||aL(e))&&!AL(e)?0:e.tabIndex}function Ky(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=Na(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var IL=class jx{constructor(){ah(this,"id",null),ah(this,"fn_cleanup"),ah(this,"cleanup",()=>{this.cancel()})}static create(){return new jx}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 Sn(e){const t=IL.create();return t.request(e),t.cleanup}function PL(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 ph(e){const t=lL(e);return nL(t)?vr(t).body:Gt(t)&&DL(t)?t:ph(t)}var RL=/auto|scroll|overlay|hidden|clip/,LL=new Set(["inline","contents"]);function DL(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return RL.test(n+o+r)&&!LL.has(a)}function ML(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[E,T]=NL(e,{includeContainer:!0,getShadowRoot:a}),b=OL(c,{current:n,getShadowRoot:a}),_=!E&&!T;f.shiftKey&&ka(b)?(o==null||o(),p=T):f.shiftKey&&(ka(E)||_)?p=n:!f.shiftKey&&ka(n)?(o==null||o(),p=E):!f.shiftKey&&(ka(T)||_)&&(p=b),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return lr(u,"keydown",d,!0)}function FL(e,t){const c=t,{defer:n,triggerElement:r}=c,o=nn(c,["defer","triggerElement"]),a=n?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(ML(d,H({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Il(e,t){if(!e)return By;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 BL(e,t,n){if(!e)return By;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 UL(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 HL(e,t){const{timeout:n,rootNode:r}=t,o=Js(r),a=vr(r),u=new o.AbortController;return UL(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 zL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),jL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qy=e=>{const t={};let n;for(;n=jL.exec(e);)t[n[1]]=n[2];return t},$L=(e,t)=>{if(Cl(e)){if(Cl(t))return`${e};${t}`;e=Qy(e)}else Cl(t)&&(t=Qy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cr(...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]=ih(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=zL(t[o],n[o]);continue}if(o==="style"){t[o]=$L(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 jB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),mh="__init__";function VL(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>vr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Zs(t()),a=u=>t().getElementById(u);return Te(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ka,getById:a})}var gh={exports:{}},Cn={},Eh={exports:{}},yh={};var Xy;function qL(){return Xy||(Xy=1,(function(e){function t(q,ne){var S=q.length;q.push(ne);e:for(;0<S;){var L=S-1>>>1,K=q[L];if(0<o(K,ne))q[L]=ne,q[S]=K,S=L;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],S=q.pop();if(S!==ne){q[0]=S;e:for(var L=0,K=q.length,O=K>>>1;L<O;){var _e=2*(L+1)-1,Re=q[_e],Oe=_e+1,Ge=q[Oe];if(0>o(Re,S))Oe<K&&0>o(Ge,Re)?(q[L]=Ge,q[Oe]=S,L=Oe):(q[L]=Re,q[_e]=S,L=_e);else if(Oe<K&&0>o(Ge,S))q[L]=Ge,q[Oe]=S,L=Oe;else break e}}return ne}function o(q,ne){var S=q.sortIndex-ne.sortIndex;return S!==0?S:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,E=null,T=3,b=!1,_=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=q)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function W(q){if(w=!1,R(q),!_)if(n(d)!==null)_=!0,Ce(X);else{var ne=n(f);ne!==null&&oe(W,ne.startTime-q)}}function X(q,ne){_=!1,w&&(w=!1,v(ge),ge=-1),b=!0;var S=T;try{for(R(ne),E=n(d);E!==null&&(!(E.expirationTime>ne)||q&&!ae());){var L=E.callback;if(typeof L=="function"){E.callback=null,T=E.priorityLevel;var K=L(E.expirationTime<=ne);ne=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(d)&&r(d),R(ne)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(f);_e!==null&&oe(W,_e.startTime-ne),O=!1}return O}finally{E=null,T=S,b=!1}}var B=!1,te=null,ge=-1,ye=5,M=-1;function ae(){return!(e.unstable_now()-M<ye)}function he(){if(te!==null){var q=e.unstable_now();M=q;var ne=!0;try{ne=te(!0,q)}finally{ne?ue():(B=!1,te=null)}}else B=!1}var ue;if(typeof F=="function")ue=function(){F(he)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,be=de.port2;de.port1.onmessage=he,ue=function(){be.postMessage(null)}}else ue=function(){k(he,0)};function Ce(q){te=q,B||(B=!0,ue())}function oe(q,ne){ge=k(function(){q(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||b||(_=!0,Ce(X))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(T){case 1:case 2:case 3:var ne=3;break;default:ne=T}var S=T;T=ne;try{return q()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var S=T;T=q;try{return ne()}finally{T=S}},e.unstable_scheduleCallback=function(q,ne,S){var L=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?L+S:L):S=L,q){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=S+K,q={id:p++,callback:ne,priorityLevel:q,startTime:S,expirationTime:K,sortIndex:-1},S>L?(q.sortIndex=S,t(f,q),n(d)===null&&q===n(f)&&(w?(v(ge),ge=-1):w=!0,oe(W,S-L))):(q.sortIndex=K,t(d,q),_||b||(_=!0,Ce(X))),q},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(q){var ne=T;return function(){var S=T;T=ne;try{return q.apply(this,arguments)}finally{T=S}}}})(yh)),yh}var Jy;function YL(){return Jy||(Jy=1,Eh.exports=qL()),Eh.exports}var Zy;function WL(){if(Zy)return Cn;Zy=1;var e=As(),t=YL();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},E={};function T(i){return d.call(E,i)?!0:d.call(p,i)?!1:f.test(i)?E[i]=!0:(p[i]=!0,!1)}function b(i,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,h){if(s===null||typeof s=="undefined"||b(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(i,s,l,h,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){k[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];k[s]=new w(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){k[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){k[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){k[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){k[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){k[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){k[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){k[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function F(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(v,F);k[s]=new w(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(v,F);k[s]=new w(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(v,F);k[s]=new w(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){k[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),k.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){k[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,h){var g=k.hasOwnProperty(s)?k[s]:null;(g!==null?g.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,h)&&(l=null),h||g===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,h=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),ae=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,L;function K(i){if(L===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
22
+ `}),n}function cE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dE(e,t){const n=I3(e,t),r=n.one(e,void 0),o=_3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
23
+ `},o),a}function M3(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=dE(n,H({file:r},t));yield e.run(o,r)})}:function(n,r){return dE(n,H({file:r},e||t))}}function fE(e){if(e)throw e}var Of,hE;function F3(){if(hE)return Of;hE=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"),E=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!E)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 Of=function d(){var f,p,E,T,b,_,w=arguments[0],A=1,k=arguments.length,F=!1;for(typeof w=="boolean"&&(F=w,w=arguments[1]||{},A=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});A<k;++A)if(f=arguments[A],f!=null)for(p in f)E=c(w,p),T=c(f,p),w!==T&&(F&&T&&(a(T)||(b=o(T)))?(b?(b=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(w,{name:p,newValue:d(F,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},Of}var B3=F3();const If=Ke(B3);function Pf(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 U3(){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 E=-1;if(d){u(d);return}for(;++E<o.length;)(f[E]===null||f[E]===void 0)&&(f[E]=o[E]);o=f,p?H3(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 H3(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 Cr={basename:z3,dirname:j3,extname:$3,join:V3,sep:"/"};function z3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let n=0,r=-1,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 j3(e){if(pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function $3(e){pa(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 V3(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":q3(n)}function q3(e){pa(e);const t=e.codePointAt(0)===47;let n=Y3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Y3(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 pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const W3={cwd:G3};function G3(){return"/"}function Rf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function K3(e){if(typeof e=="string")e=new URL(e);else if(!Rf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Q3(e)}function Q3(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 Lf=["history","path","basename","stem","extname","dirname"];class pE{constructor(t){let n;t?Rf(t)?n={path:t}:typeof t=="string"||X3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":W3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Lf.length;){const a=Lf[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)Lf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Cr.basename(this.path):void 0}set basename(t){Mf(t,"basename"),Df(t,"basename"),this.path=Cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cr.dirname(this.path):void 0}set dirname(t){mE(this.basename,"dirname"),this.path=Cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cr.extname(this.path):void 0}set extname(t){if(Df(t,"extname"),mE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Rf(t)&&(t=K3(t)),Mf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cr.basename(this.path,this.extname):void 0}set stem(t){Mf(t,"stem"),Df(t,"stem"),this.path=Cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new on(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 Df(e,t){if(e&&e.includes(Cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cr.sep+"`")}function Mf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function X3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const J3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Z3={}.hasOwnProperty;class Ff extends J3{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=U3()}copy(){const t=new Ff;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(If(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Hf("data",this.frozen),this.namespace[t]=n,this):Z3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Hf("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=pl(t),r=this.parser||this.Parser;return Bf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Bf("process",this.parser||this.Parser),Uf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=pl(t),d=r.parse(c);r.run(d,c,function(p,E,T){if(p||!E||!T)return f(p);const b=E,_=r.stringify(b,T);nO(_)?T.value=_:T.result=_,f(p,T)});function f(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Bf("processSync",this.parser||this.Parser),Uf("processSync",this.compiler||this.Compiler),this.process(t,o),EE("processSync","process",n),r;function o(a,u){n=!0,fE(a),r=u}}run(t,n,r){gE(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=pl(n);o.run(t,d,f);function f(p,E,T){const b=E||t;p?c(p):u?u(b):r(void 0,b,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),EE("runSync","run",r),o;function a(u,c){fE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=pl(n),o=this.compiler||this.Compiler;return Uf("stringify",o),gE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Hf("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,...E]=f;d(p,E)}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=If(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const E=f[p];a(E)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let E=-1,T=-1;for(;++E<r.length;)if(r[E][0]===f){T=E;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[b,..._]=p;const w=r[T][1];Pf(w)&&Pf(b)&&(b=If(!0,w,b)),r[T]=[f,b,..._]}}}}const eO=new Ff().freeze();function Bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Hf(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 gE(e){if(!Pf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function EE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pl(e){return tO(e)?e:new pE(e)}function tO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nO(e){return typeof e=="string"||rO(e)}function rO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yE=[],bE={allowDangerousHtml:!0},sO=/^(https?|ircs?|mailto|xmpp)$/i,oO=[{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 TE(e){const t=aO(e),n=uO(e);return lO(t.runSync(t.parse(n),n),e)}function aO(e){const t=e.rehypePlugins||yE,n=e.remarkPlugins||yE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),bE):bE;return eO().use(jN).use(n).use(M3,r).use(t)}function uO(e){const t=e.children||"",n=new pE;return typeof t=="string"&&(n.value=t),n}function lO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||cO;for(const p of oO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+iO+p.id,void 0);return hl(e,f),Lv(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function f(p,E,T){if(p.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let b;for(b in gf)if(Object.hasOwn(gf,b)&&Object.hasOwn(p.properties,b)){const _=p.properties[b],w=gf[b];(w===null||w.includes(p.tagName))&&(p.properties[b]=d(String(_||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!b&&r&&typeof E=="number"&&(b=!r(p,E,T)),b&&T&&typeof E=="number")return c&&p.children?T.children.splice(E,1,...p.children):T.children.splice(E,1),E}}}function cO(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||sO.test(e.slice(0,t))?e:""}const _E=/[#.]/g;function dO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){_E.lastIndex=o;const c=_E.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 xE(e,t,n){const r=n?mO(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=dO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,fO(u))c.unshift(u);else for(const[E,T]of Object.entries(u))hO(e,d.properties,E,T)}for(const f of c)zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function fO(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 hO(e,t,n,r){const o=cf(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=f1(r):o.commaSeparated?a=Zg(r):o.commaOrSpaceSeparated?a=f1(Zg(r).join(" ")):a=wE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?pO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(wE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function zf(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)zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ia(n)===ia(t)))return!0}return n}function pO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function mO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const gO=["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"],EO=xE(tl,"div"),yO=xE(Us,"g",gO);function bO(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=SE(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=SE(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 SE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
24
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const es={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},CE={}.hasOwnProperty,TO=Object.prototype;function _O(e,t){const n=t||{};return jf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Us:tl,verbose:n.verbose||!1},e)}function jf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:AE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=bO(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ml(e,r,n),n}default:return n=xO(e,t),n}}function AE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=jf(e,t[n]);r.push(o)}return r}function xO(e,t){const n=e.schema;e.schema=t.namespaceURI===es.svg?Us:tl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;CE.call(TO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?yO:EO)(t.tagName,o,AE(e,t.childNodes));if(ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Vs(d.startTag),p=d&&d.endTag&&Vs(d.endTag),E=jf(e,c.content);f&&p&&e.file&&(E.position={start:f.end,end:p.start}),u.content=E}return e.schema=n,u}function ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=wO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function wO(e,t,n){const r=Vs(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)CE.call(n.attrs,u)&&(a[cf(e.schema,u).property]=Vs(n.attrs[u]));n.startTag;const c=Vs(n.startTag),d=n.endTag?Vs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Vs(e){const t=vE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vE(e){return e.line&&e.column?e:void 0}class ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ma.prototype.property={},ma.prototype.normal={},ma.prototype.space=null;function kE(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 ma(n,r,t)}function $f(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let SO=0;const $e=ts(),Ut=ts(),NE=ts(),me=ts(),pt=ts(),qs=ts(),Ln=ts();function ts(){return sd(2,++SO)}const Vf=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Ut,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:me,overloadedBoolean:NE,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),qf=Object.keys(Vf);class Yf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),OE(this,"space",o),typeof r=="number")for(;++a<qf.length;){const u=qf[a];OE(this,qf[a],(r&Vf[u])===Vf[u])}}}Yf.prototype.defined=!0;function OE(e,t,n){n&&(e[t]=n)}const CO={}.hasOwnProperty;function Ys(e){const t={},n={};let r;for(r in e.properties)if(CO.call(e.properties,r)){const o=e.properties[r],a=new Yf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$f(r)]=r,n[$f(a.attribute)]=r}return new ma(t,n,e.space)}const IE=Ys({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}}),PE=Ys({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function RE(e,t){return t in e?e[t]:t}function LE(e,t){return RE(e,t.toLowerCase())}const DE=Ys({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:LE,properties:{xmlns:null,xmlnsXLink:null}}),ME=Ys({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:pt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ut,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),AO=Ys({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:LE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:pt,autoFocus:$e,autoPlay:$e,blocking:pt,capture:null,charSet:null,checked:$e,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ut,controls:$e,controlsList:pt,coords:me|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:NE,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:pt,height:me,hidden:$e,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:pt,itemRef:pt,itemScope:$e,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:pt,required:$e,reversed:$e,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ut,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:me,security:null,unselectable:null}}),vO=Ys({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:RE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),kO=/^data[-\w.:]+$/i,FE=/-[a-z]/g,NO=/[A-Z]/g;function OO(e,t){const n=$f(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(FE,PO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!FE.test(a)){let u=a.replace(NO,IO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Yf}return new o(r,t)}function IO(e){return"-"+e.toLowerCase()}function PO(e){return e.charAt(1).toUpperCase()}const RO=kE([PE,IE,DE,ME,AO],"html"),BE=kE([PE,IE,DE,ME,vO],"svg"),UE={}.hasOwnProperty;function HE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&UE.call(o,e)){const d=String(o[e]);u=UE.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 LO={},DO={}.hasOwnProperty,zE=HE("type",{handlers:{root:FO,element:jO,text:HO,comment:zO,doctype:UO}});function MO(e,t){const r=(t||LO).space;return zE(e,r==="svg"?BE:RO)}function FO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Wf(e.children,n,t),Ws(e,n),n}function BO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Wf(e.children,n,t),Ws(e,n),n}function UO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ws(e,t),t}function HO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ws(e,t),t}function zO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ws(e,t),t}function jO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=BE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&DO.call(e.properties,a)){const d=$O(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:es[u],childNodes:[],parentNode:null};return c.childNodes=Wf(e.children,c,r),Ws(e,c),e.tagName==="template"&&e.content&&(c.content=BO(e.content,r)),c}function $O(e,t,n){const r=OO(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?e1(n):h1(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=es[r.space]}return o}function Wf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=zE(e[r],n);a.parentNode=t,o.push(a)}return o}function Ws(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 VO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qO=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]),_t="�";var v;(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"})(v||(v={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function jE(e){return e>=55296&&e<=57343}function YO(e){return e>=56320&&e<=57343}function WO(e,t){return(e-55296)*1024+9216+t}function $E(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function VE(e){return e>=64976&&e<=65007||qO.has(e)}var Z;(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"})(Z||(Z={}));const GO=65536;class KO{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=GO,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(YO(n))return this.pos++,this._addGap(),WO(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,v.EOF;return this._err(Z.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,v.EOF;const r=this.html.charCodeAt(n);return r===v.CARRIAGE_RETURN?v.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,v.EOF;let t=this.html.charCodeAt(this.pos);return t===v.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,v.LINE_FEED):t===v.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,jE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===v.LINE_FEED||t===v.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){$E(t)?this._err(Z.controlCharacterInInputStream):VE(t)&&this._err(Z.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(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"})(We||(We={}));function qE(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 QO=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),XO=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 JO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=XO.get(e))!==null&&t!==void 0?t:e}var Yt;(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"})(Yt||(Yt={}));const ZO=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function Gf(e){return e>=Yt.ZERO&&e<=Yt.NINE}function eI(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_F||e>=Yt.LOWER_A&&e<=Yt.LOWER_F}function tI(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_Z||e>=Yt.LOWER_A&&e<=Yt.LOWER_Z||Gf(e)}function nI(e){return e===Yt.EQUALS||tI(e)}var Wt;(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"})(Wt||(Wt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class rI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Yt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ZO)===Yt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.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(Gf(o)||eI(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(Gf(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===Yt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(JO(this.result),this.consumed),this.errors&&(t!==Yt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=iI(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||nI(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&pi.VALUE_LENGTH)>>14,a!==0){if(u===Yt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.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]&pi.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]&~pi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function iI(e,t,n,r){const o=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 ie;(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/"})(ie||(ie={}));var ns;(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"})(ns||(ns={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));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 sI=new Map([[j.A,m.A],[j.ADDRESS,m.ADDRESS],[j.ANNOTATION_XML,m.ANNOTATION_XML],[j.APPLET,m.APPLET],[j.AREA,m.AREA],[j.ARTICLE,m.ARTICLE],[j.ASIDE,m.ASIDE],[j.B,m.B],[j.BASE,m.BASE],[j.BASEFONT,m.BASEFONT],[j.BGSOUND,m.BGSOUND],[j.BIG,m.BIG],[j.BLOCKQUOTE,m.BLOCKQUOTE],[j.BODY,m.BODY],[j.BR,m.BR],[j.BUTTON,m.BUTTON],[j.CAPTION,m.CAPTION],[j.CENTER,m.CENTER],[j.CODE,m.CODE],[j.COL,m.COL],[j.COLGROUP,m.COLGROUP],[j.DD,m.DD],[j.DESC,m.DESC],[j.DETAILS,m.DETAILS],[j.DIALOG,m.DIALOG],[j.DIR,m.DIR],[j.DIV,m.DIV],[j.DL,m.DL],[j.DT,m.DT],[j.EM,m.EM],[j.EMBED,m.EMBED],[j.FIELDSET,m.FIELDSET],[j.FIGCAPTION,m.FIGCAPTION],[j.FIGURE,m.FIGURE],[j.FONT,m.FONT],[j.FOOTER,m.FOOTER],[j.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[j.FORM,m.FORM],[j.FRAME,m.FRAME],[j.FRAMESET,m.FRAMESET],[j.H1,m.H1],[j.H2,m.H2],[j.H3,m.H3],[j.H4,m.H4],[j.H5,m.H5],[j.H6,m.H6],[j.HEAD,m.HEAD],[j.HEADER,m.HEADER],[j.HGROUP,m.HGROUP],[j.HR,m.HR],[j.HTML,m.HTML],[j.I,m.I],[j.IMG,m.IMG],[j.IMAGE,m.IMAGE],[j.INPUT,m.INPUT],[j.IFRAME,m.IFRAME],[j.KEYGEN,m.KEYGEN],[j.LABEL,m.LABEL],[j.LI,m.LI],[j.LINK,m.LINK],[j.LISTING,m.LISTING],[j.MAIN,m.MAIN],[j.MALIGNMARK,m.MALIGNMARK],[j.MARQUEE,m.MARQUEE],[j.MATH,m.MATH],[j.MENU,m.MENU],[j.META,m.META],[j.MGLYPH,m.MGLYPH],[j.MI,m.MI],[j.MO,m.MO],[j.MN,m.MN],[j.MS,m.MS],[j.MTEXT,m.MTEXT],[j.NAV,m.NAV],[j.NOBR,m.NOBR],[j.NOFRAMES,m.NOFRAMES],[j.NOEMBED,m.NOEMBED],[j.NOSCRIPT,m.NOSCRIPT],[j.OBJECT,m.OBJECT],[j.OL,m.OL],[j.OPTGROUP,m.OPTGROUP],[j.OPTION,m.OPTION],[j.P,m.P],[j.PARAM,m.PARAM],[j.PLAINTEXT,m.PLAINTEXT],[j.PRE,m.PRE],[j.RB,m.RB],[j.RP,m.RP],[j.RT,m.RT],[j.RTC,m.RTC],[j.RUBY,m.RUBY],[j.S,m.S],[j.SCRIPT,m.SCRIPT],[j.SEARCH,m.SEARCH],[j.SECTION,m.SECTION],[j.SELECT,m.SELECT],[j.SOURCE,m.SOURCE],[j.SMALL,m.SMALL],[j.SPAN,m.SPAN],[j.STRIKE,m.STRIKE],[j.STRONG,m.STRONG],[j.STYLE,m.STYLE],[j.SUB,m.SUB],[j.SUMMARY,m.SUMMARY],[j.SUP,m.SUP],[j.TABLE,m.TABLE],[j.TBODY,m.TBODY],[j.TEMPLATE,m.TEMPLATE],[j.TEXTAREA,m.TEXTAREA],[j.TFOOT,m.TFOOT],[j.TD,m.TD],[j.TH,m.TH],[j.THEAD,m.THEAD],[j.TITLE,m.TITLE],[j.TR,m.TR],[j.TRACK,m.TRACK],[j.TT,m.TT],[j.U,m.U],[j.UL,m.UL],[j.SVG,m.SVG],[j.VAR,m.VAR],[j.WBR,m.WBR],[j.XMP,m.XMP]]);function Gs(e){var t;return(t=sI.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const le=m,oI={[ie.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[ie.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[ie.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Kf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var N;(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"})(N||(N={}));const Lt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function aI(e){return e>=v.DIGIT_0&&e<=v.DIGIT_9}function ga(e){return e>=v.LATIN_CAPITAL_A&&e<=v.LATIN_CAPITAL_Z}function uI(e){return e>=v.LATIN_SMALL_A&&e<=v.LATIN_SMALL_Z}function mi(e){return uI(e)||ga(e)}function YE(e){return mi(e)||aI(e)}function gl(e){return e+32}function WE(e){return e===v.SPACE||e===v.LINE_FEED||e===v.TABULATION||e===v.FORM_FEED}function GE(e){return WE(e)||e===v.SOLIDUS||e===v.GREATER_THAN_SIGN}function lI(e){return e===v.NULL?Z.nullCharacterReference:e>1114111?Z.characterReferenceOutsideUnicodeRange:jE(e)?Z.surrogateCharacterReference:VE(e)?Z.noncharacterCharacterReference:$E(e)||e===v.CARRIAGE_RETURN?Z.controlCharacterReference:null}class cI{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new KO(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new rI(QO,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=lI(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:We.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.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(qE(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(Z.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=Gs(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Z.endTagWithAttributes),t.selfClosing&&this._err(Z.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 We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.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:We.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=WE(t)?We.WHITESPACE_CHARACTER:t===v.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitCodePoint(t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case v.AMPERSAND:{this._startCharacterReference();break}case v.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case v.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case v.QUESTION_MARK:{this._err(Z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case v.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.GREATER_THAN_SIGN:{this._err(Z.missingEndTagName),this.state=N.DATA;break}case v.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.tagName+=_t;break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateRcdataLessThanSign(t){t===v.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case v.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case v.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===v.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case v.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case v.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===v.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&GE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case v.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===v.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&GE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._err(Z.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:{this._err(Z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case v.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:case v.EQUALS_SIGN:case v.GRAVE_ACCENT:{this._err(Z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case v.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(Z.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case v.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}case v.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case v.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case v.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==v.GREATER_THAN_SIGN&&t!==v.EOF&&this._err(Z.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case v.HYPHEN_MINUS:{n.data+="-";break}case v.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Z.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case v.EOF:{this._err(Z.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ga(t))this._createDoctypeToken(String.fromCharCode(gl(t))),this.state=N.DOCTYPE_NAME;else switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.NULL:{this._err(Z.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=N.DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.name+=_t;break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Z.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.QUOTATION_MARK:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case v.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.NULL:{this._err(Z.unexpectedNullCharacter);break}case v.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case v.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case v.EOF:{this._err(Z.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===v.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA;break}case v.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(v.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&YE(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){YE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===v.SEMICOLON&&this._err(Z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const KE=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),QE=new Set([...KE,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),El=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),dI=new Set([...El,m.OL,m.UL]),fI=new Set([...El,m.BUTTON]),XE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),JE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),hI=new Set([m.TR,m.TEMPLATE,m.HTML]),pI=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),mI=new Set([m.TABLE,m.TEMPLATE,m.HTML]),gI=new Set([m.TD,m.TH]);class EI{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)===ie.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])!==ie.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(Kf,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(gI,ie.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(mI,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(pI,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(hI,ie.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 ie.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ie.SVG:{if(JE.has(o))return!1;break}case ie.MATHML:{if(XE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,El)}hasInListItemScope(t){return this.hasInDynamicScope(t,dI)}hasInButtonScope(t){return this.hasInDynamicScope(t,fI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Kf.has(n))return!0;if(El.has(n))return!1;break}case ie.SVG:{if(JE.has(n))return!1;break}case ie.MATHML:{if(XE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.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])===ie.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])===ie.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&&KE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&QE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&QE.has(this.currentTagId);)this.pop()}}const Qf=3;var Ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ar||(Ar={}));const ZE={type:Ar.Marker};class yI{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===Ar.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<Qf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Qf)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>=Qf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(ZE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ar.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(ZE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ar.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Wn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=H(H({},e.sourceCodeLocation),t)}},ey="html",bI="about:legacy-compat",TI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ty=["+//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//"],_I=[...ty,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],xI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ny=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],wI=[...ny,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ry(e,t){return t.some(n=>e.startsWith(n))}function SI(e){return e.name===ey&&e.publicId===null&&(e.systemId===null||e.systemId===bI)}function CI(e){if(e.name!==ey)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===TI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xI.has(n))return Wn.QUIRKS;let r=t===null?_I:ty;if(ry(n,r))return Wn.QUIRKS;if(r=t===null?ny:wI,ry(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const iy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},AI="definitionurl",vI="definitionURL",kI=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])),NI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),OI=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])),II=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 PI(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ns.COLOR||r===ns.SIZE||r===ns.FACE)||II.has(t)}function sy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===AI){e.attrs[t].name=vI;break}}function oy(e){for(let t=0;t<e.attrs.length;t++){const n=kI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Xf(e){for(let t=0;t<e.attrs.length;t++){const n=NI.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 RI(e){const t=OI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function LI(e,t){return t===ie.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function DI(e,t,n){if(t===ie.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ns.ENCODING){const o=n[r].value.toLowerCase();return o===iy.TEXT_HTML||o===iy.APPLICATION_XML}}return t===ie.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function MI(e,t,n,r){return(!r||r===ie.HTML)&&DI(e,t,n)||(!r||r===ie.MATHML)&&LI(e,t)}const FI="hidden",BI=8,UI=3;var P;(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"})(P||(P={}));const HI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ay=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),uy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class ly{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=H(H({},uy),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 cI(this.options,this),this.activeFormattingElements=new yI(this.treeAdapter),this.fragmentContextID=r?Gs(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new EI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=H(H({},uy),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,ie.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:HI,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)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&Te(H({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.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(j.HTML,ie.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===We.END_TAG&&o===n.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return MI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ar.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=P.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=P.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=P.IN_TABLE;return}case m.BODY:{this.insertionMode=P.IN_BODY;return}case m.FRAMESET:{this.insertionMode=P.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?P.AFTER_HEAD:P.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.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=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return ay.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)===ie.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 oI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{dy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_TABLE_TEXT:{by(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Zf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Zf(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.AFTER_BODY:{WI(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{GI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{KI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,Z.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ER(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{QI(this,t);break}case P.BEFORE_HEAD:{JI(this,t);break}case P.IN_HEAD:{ur(this,t);break}case P.IN_HEAD_NO_SCRIPT:{tP(this,t);break}case P.AFTER_HEAD:{rP(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ks(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{ZP(this,t);break}case P.IN_COLUMN_GROUP:{nh(this,t);break}case P.IN_TABLE_BODY:{_l(this,t);break}case P.IN_ROW:{xl(this,t);break}case P.IN_CELL:{nR(this,t);break}case P.IN_SELECT:{xy(this,t);break}case P.IN_SELECT_IN_TABLE:{iR(this,t);break}case P.IN_TEMPLATE:{oR(this,t);break}case P.AFTER_BODY:{uR(this,t);break}case P.IN_FRAMESET:{lR(this,t);break}case P.AFTER_FRAMESET:{dR(this,t);break}case P.AFTER_AFTER_BODY:{hR(this,t);break}case P.AFTER_AFTER_FRAMESET:{pR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{XI(this,t);break}case P.BEFORE_HEAD:{ZI(this,t);break}case P.IN_HEAD:{eP(this,t);break}case P.IN_HEAD_NO_SCRIPT:{nP(this,t);break}case P.AFTER_HEAD:{iP(this,t);break}case P.IN_BODY:{bl(this,t);break}case P.TEXT:{$P(this,t);break}case P.IN_TABLE:{wa(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{eR(this,t);break}case P.IN_COLUMN_GROUP:{tR(this,t);break}case P.IN_TABLE_BODY:{rh(this,t);break}case P.IN_ROW:{_y(this,t);break}case P.IN_CELL:{rR(this,t);break}case P.IN_SELECT:{wy(this,t);break}case P.IN_SELECT_IN_TABLE:{sR(this,t);break}case P.IN_TEMPLATE:{aR(this,t);break}case P.AFTER_BODY:{Cy(this,t);break}case P.IN_FRAMESET:{cR(this,t);break}case P.AFTER_FRAMESET:{fR(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{Ey(this,t);break}case P.TEXT:{VP(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_TEMPLATE:{Sy(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{eh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===v.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{cy(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_TABLE_TEXT:{yy(this,t);break}}}}function zI(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):gy(e,t),n}function jI(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 $I(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>=UI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=VI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function VI(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 qI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Gs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function YI(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 Jf(e,t){for(let n=0;n<BI;n++){const r=zI(e,t);if(!r)break;const o=jI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=$I(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&qI(e,u,a),YI(e,o,r)}}function Zf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function WI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function GI(e,t){e._appendCommentNode(t,e.document)}function eh(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 KI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:CI(t);SI(t)||e._err(t,Z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ea(e,t){e._err(t,Z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function QI(e,t){t.tagID===m.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=P.BEFORE_HEAD):ya(e,t)}function XI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function JI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:ba(e,t)}}function ZI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?ba(e,t):e._err(t,Z.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(j.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function ur(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function eP(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ta(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Ta(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function tP(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{ur(e,t);break}case m.NOSCRIPT:{e._err(t,Z.nestedNoscriptInHead);break}default:_a(e,t)}}function nP(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case m.BR:{_a(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function _a(e,t){const n=t.type===We.EOF?Z.openElementsLeftAfterEof:Z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function rP(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=P.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,Z.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),ur(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function iP(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{xa(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(j.BODY,m.BODY),e.insertionMode=P.IN_BODY,yl(e,t)}function yl(e,t){switch(t.type){case We.CHARACTER:{dy(e,t);break}case We.WHITESPACE_CHARACTER:{cy(e,t);break}case We.COMMENT:{Zf(e,t);break}case We.START_TAG:{un(e,t);break}case We.END_TAG:{bl(e,t);break}case We.EOF:{Ey(e,t);break}}}function cy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function dy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function sP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function oP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function aP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET)}function uP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function lP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Kf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function cP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function dP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function fP(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,ie.HTML)}function hP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Lt.PLAINTEXT}function pP(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function mP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Jf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Jf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function fy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function hy(e){const t=qE(e,ns.TYPE);return t!=null&&t.toLowerCase()===FI}function TP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),hy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _P(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function xP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wP(e,t){t.tagName=j.IMG,t.tagID=m.IMG,fy(e,t)}function SP(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function CP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function AP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function py(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function vP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function kP(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function NP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function OP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ie.HTML)}function IP(e,t){e._reconstructActiveFormattingElements(),sy(t),Xf(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function PP(e,t){e._reconstructActiveFormattingElements(),oy(t),Xf(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function my(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function un(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:{gP(e,t);break}case m.A:{mP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{lP(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:{uP(e,t);break}case m.LI:case m.DD:case m.DT:{fP(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{fy(e,t);break}case m.HR:{xP(e,t);break}case m.RB:case m.RTC:{NP(e,t);break}case m.RT:case m.RP:{OP(e,t);break}case m.PRE:case m.LISTING:{cP(e,t);break}case m.XMP:{CP(e,t);break}case m.SVG:{PP(e,t);break}case m.HTML:{sP(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:{ur(e,t);break}case m.BODY:{oP(e,t);break}case m.FORM:{dP(e,t);break}case m.NOBR:{EP(e,t);break}case m.MATH:{IP(e,t);break}case m.TABLE:{bP(e,t);break}case m.INPUT:{TP(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{_P(e,t);break}case m.IMAGE:{wP(e,t);break}case m.BUTTON:{pP(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{yP(e,t);break}case m.IFRAME:{AP(e,t);break}case m.SELECT:{vP(e,t);break}case m.OPTION:case m.OPTGROUP:{kP(e,t);break}case m.NOEMBED:case m.NOFRAMES:{py(e,t);break}case m.FRAMESET:{aP(e,t);break}case m.TEXTAREA:{SP(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?py(e,t):my(e,t);break}case m.PLAINTEXT:{hP(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:my(e,t)}}function RP(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function LP(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,Cy(e,t))}function DP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function MP(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 FP(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(j.P,m.P),e._closePElement()}function BP(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function UP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function HP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function gy(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 bl(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:{Jf(e,t);break}case m.P:{FP(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:{DP(e,t);break}case m.LI:{BP(e);break}case m.DD:case m.DT:{UP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{HP(e);break}case m.BR:{jP(e);break}case m.BODY:{RP(e,t);break}case m.HTML:{LP(e,t);break}case m.FORM:{MP(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{zP(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:gy(e,t)}}function Ey(e,t){e.tmplInsertionModeStack.length>0?Sy(e,t):eh(e,t)}function $P(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 VP(e,t){e._err(t,Z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function th(e,t){if(e.openElements.currentTagId!==void 0&&ay.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case We.CHARACTER:{by(e,t);break}case We.WHITESPACE_CHARACTER:{yy(e,t);break}}else Sa(e,t)}function qP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CAPTION}function YP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function WP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,m.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,nh(e,t)}function GP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_TABLE_BODY}function KP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,m.TBODY),e.insertionMode=P.IN_TABLE_BODY,_l(e,t)}function QP(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function XP(e,t){hy(t)?e._appendElement(t,ie.HTML):Sa(e,t),t.ackSelfClosing=!0}function JP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{KP(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}case m.COL:{WP(e,t);break}case m.FORM:{JP(e,t);break}case m.TABLE:{QP(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{GP(e,t);break}case m.INPUT:{XP(e,t);break}case m.CAPTION:{qP(e,t);break}case m.COLGROUP:{YP(e,t);break}default:Sa(e,t)}}function wa(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{rs(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:Sa(e,t)}}function Sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yl(e,t),e.fosterParentingEnabled=n}function yy(e,t){e.pendingCharacterTokens.push(t)}function by(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ca(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ty=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function ZP(e,t){const n=t.tagID;Ty.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ks(e,t)):un(e,t)}function eR(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=P.IN_TABLE,n===m.TABLE&&wa(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:bl(e,t)}}function nh(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{ur(e,t);break}default:Tl(e,t)}}function tR(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TEMPLATE:{rs(e,t);break}case m.COL:break;default:Tl(e,t)}}function Tl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function _l(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,m.TR),e.insertionMode=P.IN_ROW,xl(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=P.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function rh(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=P.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,wa(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:wa(e,t)}}function xl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.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=P.IN_TABLE_BODY,_l(e,t));break}default:Ks(e,t)}}function _y(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,rh(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=P.IN_TABLE_BODY,rh(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:wa(e,t)}}function nR(e,t){const n=t.tagID;Ty.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),xl(e,t)):un(e,t)}function rR(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=P.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),_y(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:bl(e,t)}}function xy(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.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:{ur(e,t);break}}}function wy(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:{rs(e,t);break}}}function iR(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)):xy(e,t)}function sR(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)):wy(e,t)}function oR(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:{ur(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ks(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,nh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,_l(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,xl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function aR(e,t){t.tagID===m.TEMPLATE&&rs(e,t)}function Sy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):eh(e,t)}function uR(e,t){t.tagID===m.HTML?un(e,t):wl(e,t)}function Cy(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=P.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 wl(e,t)}function wl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function lR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.FRAMESET:{e._insertElement(t,ie.HTML);break}case m.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{ur(e,t);break}}}function cR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function dR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function fR(e,t){t.tagID===m.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function hR(e,t){t.tagID===m.HTML?un(e,t):Sl(e,t)}function Sl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function pR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function mR(e,t){t.chars=_t,e._insertCharacters(t)}function gR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ay(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ER(e,t){if(PI(t))Ay(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?sy(t):r===ie.SVG&&(RI(t),oy(t)),Xf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yR(e,t){if(t.tagID===m.P||t.tagID===m.BR){Ay(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)===ie.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const bR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,TR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ky(e,t){const n=OR(e),r=HE("type",{handlers:{root:_R,element:xR,text:wR,comment:Oy,doctype:SR,raw:AR},unknown:vR}),o={parser:n?new ly(vy):ly.getFragmentParser(void 0,vy),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Qs(o,Sr());const a=n?o.parser.document:o.parser.getFragment(),u=_O(a,{file:o.options.file});return o.stitches&&hl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const E=f.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Ny(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _R(e,t){Ny(e.children,t)}function xR(e,t){kR(e,t),Ny(e.children,t),NR(e,t)}function wR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function SR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function CR(e,t){t.stitches=!0;const n=IR(e);if("children"in e&&"children"in n){const r=ky({type:"root",children:e.children},t.options);n.children=r.children}Oy({type:"comment",value:{stitch:n}},t)}function Oy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function AR(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,Iy(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(bR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function vR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))CR(n,t);else{let r="";throw TR.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 Qs(e,t){Iy(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Iy(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 kR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:es.html;o===es.html&&n==="svg"&&(o=es.svg);const a=MO(Te(H({},e),{children:[]}),{space:o===es.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Aa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function NR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&VO.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,nl(e));const r={type:We.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Aa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function OR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Aa(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=nl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function IR(e){return"children"in e?Zi(Te(H({},e),{children:[]})):Zi(e)}function Py(e){return function(t,n){return ky(t,Te(H({},e),{file:n}))}}const is=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ry={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...is,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...is],h2:[["className","sr-only"]],img:[...is,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...is,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...is],table:[...is],ul:[...is,["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"]},Ei={}.hasOwnProperty;function PR(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Ry),t):Ry,stack:[]},o=Ly(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ly(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return RR(e,n);case"doctype":return LR(e,n);case"element":return DR(e,n);case"root":return MR(e,n);case"text":return FR(e,n)}}}function RR(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 va(a,t),a}}function LR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return va(n,t),n}}function DR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Dy(e,t.children),o=BR(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&&Ei.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 va(u,t),u}function MR(e,t){const r={type:"root",children:Dy(e,t.children)};return va(r,t),r}function FR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return va(r,t),r}function Dy(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ly(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function BR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ei.call(c,f)){const p=c[f];let E=My(e,By(a,f),f,p);E==null&&(E=My(e,By(u,f),f,p)),E!=null&&(d[f]=E)}if(o&&Ei.call(o,n)){const p=o[n];for(f in p)Ei.call(p,f)&&!Ei.call(d,f)&&(d[f]=p[f])}return d}function My(e,t,n,r){return t?Array.isArray(r)?UR(e,t,n,r):Fy(e,t,n,r):void 0}function UR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Fy(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Fy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&HR(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 HR(e,t,n){const r=e.schema.protocols&&Ei.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 va(e,t){const n=b1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function By(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 zR(e){return function(t){return PR(t,e)}}const Uy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return C.jsx("a",Te(H(H({className:J(e,`${Y}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},jR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=Rt();return!e&&!t?null:C.jsx("div",{className:J(n,`${Y}-disclaimer`),children:t?C.jsx(TE,{rehypePlugins:[Py,zR],components:{ul:({children:o})=>C.jsx("ul",{className:J(n,`${Y}-ul`),children:o}),ol:({children:o})=>C.jsx("ol",{className:J(n,`${Y}-ol`),children:o}),li:({children:o})=>C.jsx("li",{className:J(n,`${Y}-li`),children:o}),a:({href:o,title:a,children:u})=>C.jsx(Uy,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>C.jsx("img",{className:J(n,`${Y}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:o}),span:({children:o})=>C.jsx("span",{className:J(n,`${Y}-disclaimer-text-span`),children:o})},children:t}):C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:e})})},ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Ms(),{setImageFile:u}=ta(),{logger:c,globalClassName:d,searchConfig:f,features:p}=Rt(),E=$.useRef(null),T=$.useRef(null),b=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,A=w?"connected":"disconnected",k=t||!w,F=()=>a?new Promise((B,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>B(ge.result),ge.onerror=ye=>te(ye)}):Promise.resolve(""),R=B=>rt(null,null,function*(){var ye;if(k)return;const te=10*1024*1024,ge=(ye=B.target.files)==null?void 0:ye[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),W=()=>{u(null),T.current&&(T.current.value="")},X=B=>rt(null,null,function*(){var ye;B.preventDefault();const te=(((ye=E.current)==null?void 0:ye.value)||"").trim();let ge="";try{ge=yield F()}catch(M){c==null||c.error("Error converting file to base64:",M),alert("There was an error processing the file. Please try again.");return}te&&(W(),E.current.value="",r(te,ge))});return C.jsxs("div",{className:J(d,e,n,a&&"with-attachments",`${Y}-search-bar-wrapper`),children:[a&&C.jsxs("div",{className:J(d,n,`${Y}-image-file-preview`),children:[C.jsx("img",{className:J(d,n,`${Y}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),C.jsx("span",{className:J(d,n,`${Y}-image-file-name`),title:_,children:_}),C.jsx(rf,{className:J(n,"clear-attachment"),label:"Remove image",onClick:W})]}),C.jsxs("form",{className:J(d,e,n,`${Y}-search-bar`),name:`${Y}-search-form`,onSubmit:X,children:[C.jsx("span",{role:"status",className:J(`${Y}-connection-status-icon`,A)}),b&&C.jsxs("div",{role:"button",className:J(d,e,n,k&&"disabled",`${Y}-image-upload-button`),"aria-disabled":k,tabIndex:0,children:[C.jsx("label",{className:J(d,e,n,k&&"disabled",`${Y}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:C.jsx(sv,{})}),C.jsx("input",{className:J(d,e,n,`${Y}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${Y}-file-input`,disabled:k,onInput:R})]}),C.jsx("input",{className:J(d,e,n,`${Y}-search-input`),type:"text",ref:E,placeholder:f==null?void 0:f.placeholder,name:`${Y}-user-input`}),C.jsx(cv,{isLoading:k}),C.jsx(av,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:k})]}),C.jsx(jR,{})]})};function $R(e){return e==null?[]:Array.isArray(e)?e:[e]}var VR=e=>e!=null&&typeof e=="object",Cl=e=>typeof e=="string",Xs=e=>typeof e=="function",qR=e=>e==null,YR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),WR=e=>Object.prototype.toString.call(e),Hy=Function.prototype.toString,GR=Hy.call(Object),KR=e=>{if(!VR(e)||WR(e)!="[object Object]"||JR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=YR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hy.call(n)==GR},QR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,XR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,JR=e=>QR(e)||XR(e),ZR=e=>e(),eL=()=>{},sh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function oh(e){if(!KR(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 ah(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function tL(e,t){if(e==null)throw new Error(t())}var nL=Object.defineProperty,rL=(e,t,n)=>t in e?nL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uh=(e,t,n)=>rL(e,typeof t!="symbol"?t+"":t,n),zy=()=>{},Al=e=>typeof e=="object"&&e!==null,iL=e=>e?"":void 0,sL=e=>e?"true":void 0,oL=1,aL=9,uL=11,Gt=e=>Al(e)&&e.nodeType===oL&&typeof e.nodeName=="string",vl=e=>Al(e)&&e.nodeType===aL,lL=e=>Al(e)&&e===e.window,jy=e=>Gt(e)?e.localName||"":"#document";function cL(e){return["html","body","#document"].includes(jy(e))}var dL=e=>Al(e)&&e.nodeType!==void 0,ss=e=>dL(e)&&e.nodeType===uL&&"host"in e,fL=e=>Gt(e)&&e.localName==="input",hL=e=>Gt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var pL=/(textarea|select)/;function mL(e){if(e==null||!Gt(e))return!1;try{return fL(e)&&e.selectionStart!=null||pL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function kl(e,t){var r;if(!e||!t||!Gt(e)||!Gt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ss(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function vr(e){var t;return vl(e)?e:lL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function gL(e){return vr(e).documentElement}function Js(e){var t,n,r;return ss(e)?Js(e.host):vl(e)?(t=e.defaultView)!=null?t:window:Gt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Zs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function EL(e){if(jy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ss(e)&&e.host||gL(e);return ss(t)?t.host:t}function lh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),vl(t)||ss(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var ch=new WeakMap;function Nl(e){return ch.has(e)||ch.set(e,Js(e).getComputedStyle(e)),ch.get(e)}var dh=new Set(["menu","listbox","dialog","grid","tree","region"]),yL=e=>dh.has(e),$y=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Vy(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=$y(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(E&&yL(E)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function qy(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=$y(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";E&&dh.has(E)&&!T&&(t(p),o(p))}}}};o(e)}function bL(e){const t=new Set;return qy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function TL(e){const t=e.getAttribute("role");return!!(t&&dh.has(t))}function _L(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function xL(e){var t;return _L(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function wL(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)&&TL(e))}var fh=()=>typeof document!="undefined";function SL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var hh=e=>fh()&&e.test(SL()),CL=e=>fh()&&e.test(navigator.vendor),Yy=()=>fh()&&!!navigator.maxTouchPoints,AL=()=>hh(/^iPhone/i),vL=()=>hh(/^iPad/i)||ph()&&navigator.maxTouchPoints>1,Wy=()=>AL()||vL(),kL=()=>ph()||Wy(),ph=()=>hh(/^Mac/i),NL=()=>kL()&&CL(/apple/i);function OL(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 Yr(e){var n;const t=OL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var IL=e=>e.button===0,PL=e=>e.button===2||ph()&&e.ctrlKey&&e.button===0,lr=(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)}},Gy=e=>Gt(e)&&e.tagName==="IFRAME",RL=/^(audio|video|details)$/;function Ky(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var LL=e=>!Number.isNaN(Ky(e)),DL=e=>Ky(e)<0;function ML(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 Qy(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=ML(d,t);if(f){const p=Array.from(f.querySelectorAll(Ol)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...p),p.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+p.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...p),p.forEach((b,_)=>{u.set(b,T+_)})}o.push(...p)}}return r}var Ol="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Xy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));(n==!0||n=="if-empty"&&o.length===0)&&Gt(e)&&Wr(e)&&o.unshift(e);const u=[];for(const c of o)if(Wr(c)){if(Gy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Xy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Qy(u,r,Wr):u};function Wr(e){return!Gt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&hL(e)}function Na(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));n&&os(e)&&o.unshift(e);const a=[];for(const u of o)if(os(u)){if(Gy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Na(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Qy(a,r,os);return!u.length&&n?o:u}return!a.length&&n?o:a}function os(e){return Gt(e)&&e.tabIndex>0?!0:Wr(e)&&!DL(e)}function FL(e,t={}){const n=Na(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function BL(e,t={}){const{current:n,getShadowRoot:r}=t,o=Na(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Zs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Oa(e){return e.tabIndex<0&&(RL.test(e.localName)||mL(e))&&!LL(e)?0:e.tabIndex}function Jy(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=Na(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var UL=class qx{constructor(){uh(this,"id",null),uh(this,"fn_cleanup"),uh(this,"cleanup",()=>{this.cancel()})}static create(){return new qx}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 Sn(e){const t=UL.create();return t.request(e),t.cleanup}function HL(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 mh(e){const t=EL(e);return cL(t)?vr(t).body:Gt(t)&&$L(t)?t:mh(t)}var zL=/auto|scroll|overlay|hidden|clip/,jL=new Set(["inline","contents"]);function $L(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return zL.test(n+o+r)&&!jL.has(a)}function VL(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[E,T]=FL(e,{includeContainer:!0,getShadowRoot:a}),b=BL(c,{current:n,getShadowRoot:a}),_=!E&&!T;f.shiftKey&&ka(b)?(o==null||o(),p=T):f.shiftKey&&(ka(E)||_)?p=n:!f.shiftKey&&ka(n)?(o==null||o(),p=E):!f.shiftKey&&(ka(T)||_)&&(p=b),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return lr(u,"keydown",d,!0)}function qL(e,t){const c=t,{defer:n,triggerElement:r}=c,o=nn(c,["defer","triggerElement"]),a=n?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(VL(d,H({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Il(e,t){if(!e)return zy;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 YL(e,t,n){if(!e)return zy;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 WL(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 GL(e,t){const{timeout:n,rootNode:r}=t,o=Js(r),a=vr(r),u=new o.AbortController;return WL(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 KL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),QL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Zy=e=>{const t={};let n;for(;n=QL.exec(e);)t[n[1]]=n[2];return t},XL=(e,t)=>{if(Cl(e)){if(Cl(t))return`${e};${t}`;e=Zy(e)}else Cl(t)&&(t=Zy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cr(...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]=sh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=KL(t[o],n[o]);continue}if(o==="style"){t[o]=XL(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 QB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),gh="__init__";function JL(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>vr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Zs(t()),a=u=>t().getElementById(u);return Te(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ka,getById:a})}var Eh={exports:{}},Cn={},yh={exports:{}},bh={};var eb;function ZL(){return eb||(eb=1,(function(e){function t(q,ne){var S=q.length;q.push(ne);e:for(;0<S;){var L=S-1>>>1,Q=q[L];if(0<o(Q,ne))q[L]=ne,q[S]=Q,S=L;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],S=q.pop();if(S!==ne){q[0]=S;e:for(var L=0,Q=q.length,O=Q>>>1;L<O;){var _e=2*(L+1)-1,Re=q[_e],Oe=_e+1,Ge=q[Oe];if(0>o(Re,S))Oe<Q&&0>o(Ge,Re)?(q[L]=Ge,q[Oe]=S,L=Oe):(q[L]=Re,q[_e]=S,L=_e);else if(Oe<Q&&0>o(Ge,S))q[L]=Ge,q[Oe]=S,L=Oe;else break e}}return ne}function o(q,ne){var S=q.sortIndex-ne.sortIndex;return S!==0?S:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,E=null,T=3,b=!1,_=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=q)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function W(q){if(w=!1,R(q),!_)if(n(d)!==null)_=!0,Ce(X);else{var ne=n(f);ne!==null&&oe(W,ne.startTime-q)}}function X(q,ne){_=!1,w&&(w=!1,k(ge),ge=-1),b=!0;var S=T;try{for(R(ne),E=n(d);E!==null&&(!(E.expirationTime>ne)||q&&!ae());){var L=E.callback;if(typeof L=="function"){E.callback=null,T=E.priorityLevel;var Q=L(E.expirationTime<=ne);ne=e.unstable_now(),typeof Q=="function"?E.callback=Q:E===n(d)&&r(d),R(ne)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(f);_e!==null&&oe(W,_e.startTime-ne),O=!1}return O}finally{E=null,T=S,b=!1}}var B=!1,te=null,ge=-1,ye=5,M=-1;function ae(){return!(e.unstable_now()-M<ye)}function he(){if(te!==null){var q=e.unstable_now();M=q;var ne=!0;try{ne=te(!0,q)}finally{ne?ue():(B=!1,te=null)}}else B=!1}var ue;if(typeof F=="function")ue=function(){F(he)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,be=de.port2;de.port1.onmessage=he,ue=function(){be.postMessage(null)}}else ue=function(){A(he,0)};function Ce(q){te=q,B||(B=!0,ue())}function oe(q,ne){ge=A(function(){q(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||b||(_=!0,Ce(X))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(T){case 1:case 2:case 3:var ne=3;break;default:ne=T}var S=T;T=ne;try{return q()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var S=T;T=q;try{return ne()}finally{T=S}},e.unstable_scheduleCallback=function(q,ne,S){var L=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?L+S:L):S=L,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=S+Q,q={id:p++,callback:ne,priorityLevel:q,startTime:S,expirationTime:Q,sortIndex:-1},S>L?(q.sortIndex=S,t(f,q),n(d)===null&&q===n(f)&&(w?(k(ge),ge=-1):w=!0,oe(W,S-L))):(q.sortIndex=Q,t(d,q),_||b||(_=!0,Ce(X))),q},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(q){var ne=T;return function(){var S=T;T=ne;try{return q.apply(this,arguments)}finally{T=S}}}})(bh)),bh}var tb;function e6(){return tb||(tb=1,yh.exports=ZL()),yh.exports}var nb;function t6(){if(nb)return Cn;nb=1;var e=As(),t=e6();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},E={};function T(i){return d.call(E,i)?!0:d.call(p,i)?!1:f.test(i)?E[i]=!0:(p[i]=!0,!1)}function b(i,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,h){if(s===null||typeof s=="undefined"||b(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(i,s,l,h,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new w(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function F(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(k,F);A[s]=new w(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(k,F);A[s]=new w(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(k,F);A[s]=new w(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,h){var g=A.hasOwnProperty(s)?A[s]:null;(g!==null?g.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,h)&&(l=null),h||g===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,h=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),ae=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,L;function Q(i){if(L===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
22
25
  `+L+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(G){var h=G}Reflect.construct(i,[],s)}else{try{s.call()}catch(G){h=G}i.call(s.prototype)}else{try{throw Error()}catch(G){h=G}i()}}catch(G){if(G&&h&&typeof G.stack=="string"){for(var g=G.stack.split(`
23
26
  `),y=h.stack.split(`
24
27
  `),x=g.length-1,I=y.length-1;1<=x&&0<=I&&g[x]!==y[I];)I--;for(;1<=x&&0<=I;x--,I--)if(g[x]!==y[I]){if(x!==1||I!==1)do if(x--,I--,0>I||g[x]!==y[I]){var D=`
25
- `+g[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Re(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case ye:return"Profiler";case ge:return"StrictMode";case ue:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case M:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ge(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===ge?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function et(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=et(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){h=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function cs(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=et(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Jr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function _i(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ds(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ye(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xi(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Zr(i,s){xi(i,s);var l=Ye(s.value),h=s.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Ue(i,s.type,l):s.hasOwnProperty("defaultValue")&&Ue(i,s.type,Ye(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function we(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Ue(i,s,l){(s!=="number"||Jr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Xe(i,s,l,h){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function wt(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ye(l)}}function mn(i,s){var l=Ye(s.value),h=Ye(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function st(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Jt).forEach(function(i){ei.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Jt[s]=Jt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Jt.hasOwnProperty(i)&&Jt[i]?(""+s).trim():s+"px"}function wi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=Qn(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,g):i[l]=g}}var fs=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,s){if(s){if(fs[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Lr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fn=null;function ip(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var sp=null,ho=null,po=null;function e2(i){if(i=lu(i)){if(typeof sp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=bc(s),sp(i.stateNode,i.type,s))}}function t2(i){ho?po?po.push(i):po=[i]:ho=i}function n2(){if(ho){var i=ho,s=po;if(po=ho=null,e2(i),s)for(i=0;i<s.length;i++)e2(s[i])}}function r2(i,s){return i(s)}function i2(){}var op=!1;function s2(i,s,l){if(op)return i(s,l);op=!0;try{return r2(i,s,l)}finally{op=!1,(ho!==null||po!==null)&&(i2(),n2())}}function ja(i,s){var l=i.stateNode;if(l===null)return null;var h=bc(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var ap=!1;if(c)try{var $a={};Object.defineProperty($a,"passive",{get:function(){ap=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch(i){ap=!1}function sM(i,s,l,h,g,y,x,I,D){var G=Array.prototype.slice.call(arguments,3);try{s.apply(l,G)}catch(se){this.onError(se)}}var Va=!1,Xl=null,Jl=!1,up=null,oM={onError:function(i){Va=!0,Xl=i}};function aM(i,s,l,h,g,y,x,I,D){Va=!1,Xl=null,sM.apply(oM,arguments)}function uM(i,s,l,h,g,y,x,I,D){if(aM.apply(this,arguments),Va){if(Va){var G=Xl;Va=!1,Xl=null}else throw Error(n(198));Jl||(Jl=!0,up=G)}}function hs(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function o2(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function a2(i){if(hs(i)!==i)throw Error(n(188))}function lM(i){var s=i.alternate;if(!s){if(s=hs(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return a2(g),i;if(y===h)return a2(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=y;else{for(var x=!1,I=g.child;I;){if(I===l){x=!0,l=g,h=y;break}if(I===h){x=!0,h=g,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,h=g;break}if(I===h){x=!0,h=y,l=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function u2(i){return i=lM(i),i!==null?l2(i):null}function l2(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=l2(i);if(s!==null)return s;i=i.sibling}return null}var c2=t.unstable_scheduleCallback,d2=t.unstable_cancelCallback,cM=t.unstable_shouldYield,dM=t.unstable_requestPaint,Dt=t.unstable_now,fM=t.unstable_getCurrentPriorityLevel,lp=t.unstable_ImmediatePriority,f2=t.unstable_UserBlockingPriority,Zl=t.unstable_NormalPriority,hM=t.unstable_LowPriority,h2=t.unstable_IdlePriority,ec=null,Dr=null;function pM(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ec,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:EM,mM=Math.log,gM=Math.LN2;function EM(i){return i>>>=0,i===0?32:31-(mM(i)/gM|0)|0}var tc=64,nc=4194304;function qa(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function rc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~g;I!==0?h=qa(I):(y&=x,y!==0&&(h=qa(y)))}else x=l&~g,x!==0?h=qa(x):y!==0&&(h=qa(y));if(h===0)return 0;if(s!==0&&s!==h&&(s&g)===0&&(g=h&-h,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-hr(s),g=1<<l,h|=i[l],s&=~g;return h}function yM(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bM(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-hr(y),I=1<<x,D=g[x];D===-1?((I&l)===0||(I&h)!==0)&&(g[x]=yM(I,s)):D<=s&&(i.expiredLanes|=I),y&=~I}}function cp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function p2(){var i=tc;return tc<<=1,(tc&4194240)===0&&(tc=64),i}function dp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ya(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function TM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,h[g]=-1,i[g]=-1,l&=~y}}function fp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-hr(l),g=1<<h;g&s|i[h]&s&&(i[h]|=s),l&=~g}}var lt=0;function m2(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var g2,hp,E2,y2,b2,pp=!1,ic=[],Si=null,Ci=null,Ai=null,Wa=new Map,Ga=new Map,vi=[],_M="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function T2(i,s){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ga.delete(s.pointerId)}}function Ka(i,s,l,h,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},s!==null&&(s=lu(s),s!==null&&hp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function xM(i,s,l,h,g){switch(s){case"focusin":return Si=Ka(Si,i,s,l,h,g),!0;case"dragenter":return Ci=Ka(Ci,i,s,l,h,g),!0;case"mouseover":return Ai=Ka(Ai,i,s,l,h,g),!0;case"pointerover":var y=g.pointerId;return Wa.set(y,Ka(Wa.get(y)||null,i,s,l,h,g)),!0;case"gotpointercapture":return y=g.pointerId,Ga.set(y,Ka(Ga.get(y)||null,i,s,l,h,g)),!0}return!1}function _2(i){var s=ps(i.target);if(s!==null){var l=hs(s);if(l!==null){if(s=l.tag,s===13){if(s=o2(l),s!==null){i.blockedOn=s,b2(i.priority,function(){E2(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function sc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=gp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Fn=h,l.target.dispatchEvent(h),Fn=null}else return s=lu(l),s!==null&&hp(s),i.blockedOn=l,!1;s.shift()}return!0}function x2(i,s,l){sc(i)&&l.delete(s)}function wM(){pp=!1,Si!==null&&sc(Si)&&(Si=null),Ci!==null&&sc(Ci)&&(Ci=null),Ai!==null&&sc(Ai)&&(Ai=null),Wa.forEach(x2),Ga.forEach(x2)}function Qa(i,s){i.blockedOn===s&&(i.blockedOn=null,pp||(pp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,wM)))}function Xa(i){function s(g){return Qa(g,i)}if(0<ic.length){Qa(ic[0],i);for(var l=1;l<ic.length;l++){var h=ic[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&Qa(Si,i),Ci!==null&&Qa(Ci,i),Ai!==null&&Qa(Ai,i),Wa.forEach(s),Ga.forEach(s),l=0;l<vi.length;l++)h=vi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)_2(l),l.blockedOn===null&&vi.shift()}var mo=W.ReactCurrentBatchConfig,oc=!0;function SM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=1,mp(i,s,l,h)}finally{lt=g,mo.transition=y}}function CM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=4,mp(i,s,l,h)}finally{lt=g,mo.transition=y}}function mp(i,s,l,h){if(oc){var g=gp(i,s,l,h);if(g===null)Rp(i,s,h,ac,l),T2(i,h);else if(xM(g,i,s,l,h))h.stopPropagation();else if(T2(i,h),s&4&&-1<_M.indexOf(i)){for(;g!==null;){var y=lu(g);if(y!==null&&g2(y),y=gp(i,s,l,h),y===null&&Rp(i,s,h,ac,l),y===g)break;g=y}g!==null&&h.stopPropagation()}else Rp(i,s,h,null,l)}}var ac=null;function gp(i,s,l,h){if(ac=null,i=ip(h),i=ps(i),i!==null)if(s=hs(i),s===null)i=null;else if(l=s.tag,l===13){if(i=o2(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return ac=i,null}function w2(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fM()){case lp:return 1;case f2:return 4;case Zl:case hM:return 16;case h2:return 536870912;default:return 16}default:return 16}}var ki=null,Ep=null,uc=null;function S2(){if(uc)return uc;var i,s=Ep,l=s.length,h,g="value"in ki?ki.value:ki.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===g[y-h];h++);return uc=g.slice(i,1<h?1-h:void 0)}function lc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function cc(){return!0}function C2(){return!1}function Bn(i){function s(l,h,g,y,x){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?cc:C2,this.isPropagationStopped=C2,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cc)},persist:function(){},isPersistent:cc}),s}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yp=Bn(go),Ja=S({},go,{view:0,detail:0}),AM=Bn(Ja),bp,Tp,Za,dc=S({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Za&&(Za&&i.type==="mousemove"?(bp=i.screenX-Za.screenX,Tp=i.screenY-Za.screenY):Tp=bp=0,Za=i),bp)},movementY:function(i){return"movementY"in i?i.movementY:Tp}}),A2=Bn(dc),vM=S({},dc,{dataTransfer:0}),kM=Bn(vM),NM=S({},Ja,{relatedTarget:0}),_p=Bn(NM),OM=S({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),IM=Bn(OM),PM=S({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),RM=Bn(PM),LM=S({},go,{data:0}),v2=Bn(LM),DM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},FM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=FM[i])?!!s[i]:!1}function xp(){return BM}var UM=S({},Ja,{key:function(i){if(i.key){var s=DM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?MM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xp,charCode:function(i){return i.type==="keypress"?lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),HM=Bn(UM),zM=S({},dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k2=Bn(zM),jM=S({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xp}),$M=Bn(jM),VM=S({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),qM=Bn(VM),YM=S({},dc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),WM=Bn(YM),GM=[9,13,27,32],wp=c&&"CompositionEvent"in window,eu=null;c&&"documentMode"in document&&(eu=document.documentMode);var KM=c&&"TextEvent"in window&&!eu,N2=c&&(!wp||eu&&8<eu&&11>=eu),O2=" ",I2=!1;function P2(i,s){switch(i){case"keyup":return GM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function QM(i,s){switch(i){case"compositionend":return R2(s);case"keypress":return s.which!==32?null:(I2=!0,O2);case"textInput":return i=s.data,i===O2&&I2?null:i;default:return null}}function XM(i,s){if(Eo)return i==="compositionend"||!wp&&P2(i,s)?(i=S2(),uc=Ep=ki=null,Eo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return N2&&s.locale!=="ko"?null:s.data;default:return null}}var JM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function L2(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!JM[i.type]:s==="textarea"}function D2(i,s,l,h){t2(h),s=gc(s,"onChange"),0<s.length&&(l=new yp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var tu=null,nu=null;function ZM(i){Z2(i,0)}function fc(i){var s=xo(i);if(cs(s))return i}function eF(i,s){if(i==="change")return s}var M2=!1;if(c){var Sp;if(c){var Cp="oninput"in document;if(!Cp){var F2=document.createElement("div");F2.setAttribute("oninput","return;"),Cp=typeof F2.oninput=="function"}Sp=Cp}else Sp=!1;M2=Sp&&(!document.documentMode||9<document.documentMode)}function B2(){tu&&(tu.detachEvent("onpropertychange",U2),nu=tu=null)}function U2(i){if(i.propertyName==="value"&&fc(nu)){var s=[];D2(s,nu,i,ip(i)),s2(ZM,s)}}function tF(i,s,l){i==="focusin"?(B2(),tu=s,nu=l,tu.attachEvent("onpropertychange",U2)):i==="focusout"&&B2()}function nF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return fc(nu)}function rF(i,s){if(i==="click")return fc(s)}function iF(i,s){if(i==="input"||i==="change")return fc(s)}function sF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:sF;function ru(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var g=l[h];if(!d.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function H2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function z2(i,s){var l=H2(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=H2(l)}}function j2(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?j2(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function $2(){for(var i=window,s=Jr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=Jr(i.document)}return s}function Ap(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function oF(i){var s=$2(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&j2(l.ownerDocument.documentElement,l)){if(h!==null&&Ap(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(h.start,g);h=h.end===void 0?y:Math.min(h.end,g),!i.extend&&y>h&&(g=h,h=y,y=g),g=z2(l,y);var x=z2(l,h);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var aF=c&&"documentMode"in document&&11>=document.documentMode,yo=null,vp=null,iu=null,kp=!1;function V2(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;kp||yo==null||yo!==Jr(h)||(h=yo,"selectionStart"in h&&Ap(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),iu&&ru(iu,h)||(iu=h,h=gc(vp,"onSelect"),0<h.length&&(s=new yp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=yo)))}function hc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var bo={animationend:hc("Animation","AnimationEnd"),animationiteration:hc("Animation","AnimationIteration"),animationstart:hc("Animation","AnimationStart"),transitionend:hc("Transition","TransitionEnd")},Np={},q2={};c&&(q2=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function pc(i){if(Np[i])return Np[i];if(!bo[i])return i;var s=bo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in q2)return Np[i]=s[l];return i}var Y2=pc("animationend"),W2=pc("animationiteration"),G2=pc("animationstart"),K2=pc("transitionend"),Q2=new Map,X2="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ni(i,s){Q2.set(i,s),a(s,[i])}for(var Op=0;Op<X2.length;Op++){var Ip=X2[Op],uF=Ip.toLowerCase(),lF=Ip[0].toUpperCase()+Ip.slice(1);Ni(uF,"on"+lF)}Ni(Y2,"onAnimationEnd"),Ni(W2,"onAnimationIteration"),Ni(G2,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(K2,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cF=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function J2(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,uM(h,s,void 0,i),i.currentTarget=null}function Z2(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],g=h.event;h=h.listeners;e:{var y=void 0;if(s)for(var x=h.length-1;0<=x;x--){var I=h[x],D=I.instance,G=I.currentTarget;if(I=I.listener,D!==y&&g.isPropagationStopped())break e;J2(g,I,G),y=D}else for(x=0;x<h.length;x++){if(I=h[x],D=I.instance,G=I.currentTarget,I=I.listener,D!==y&&g.isPropagationStopped())break e;J2(g,I,G),y=D}}}if(Jl)throw i=up,Jl=!1,up=null,i}function Et(i,s){var l=s[Up];l===void 0&&(l=s[Up]=new Set);var h=i+"__bubble";l.has(h)||(e_(s,i,2,!1),l.add(h))}function Pp(i,s,l){var h=0;s&&(h|=4),e_(l,i,h,s)}var mc="_reactListening"+Math.random().toString(36).slice(2);function ou(i){if(!i[mc]){i[mc]=!0,r.forEach(function(l){l!=="selectionchange"&&(cF.has(l)||Pp(l,!1,i),Pp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[mc]||(s[mc]=!0,Pp("selectionchange",!1,s))}}function e_(i,s,l,h){switch(w2(s)){case 1:var g=SM;break;case 4:g=CM;break;default:g=mp}l=g.bind(null,s,l,i),g=void 0,!ap||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function Rp(i,s,l,h,g){var y=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var I=h.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=h.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;x=x.return}for(;I!==null;){if(x=ps(I),x===null)return;if(D=x.tag,D===5||D===6){h=y=x;continue e}I=I.parentNode}}h=h.return}s2(function(){var G=y,se=ip(l),ce=[];e:{var re=Q2.get(i);if(re!==void 0){var xe=yp,Ae=i;switch(i){case"keypress":if(lc(l)===0)break e;case"keydown":case"keyup":xe=HM;break;case"focusin":Ae="focus",xe=_p;break;case"focusout":Ae="blur",xe=_p;break;case"beforeblur":case"afterblur":xe=_p;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=A2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=kM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=$M;break;case Y2:case W2:case G2:xe=IM;break;case K2:xe=qM;break;case"scroll":xe=AM;break;case"wheel":xe=WM;break;case"copy":case"cut":case"paste":xe=RM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=k2}var ke=(s&4)!==0,Mt=!ke&&i==="scroll",z=ke?re!==null?re+"Capture":null:re;ke=[];for(var U=G,V;U!==null;){V=U;var Ee=V.stateNode;if(V.tag===5&&Ee!==null&&(V=Ee,z!==null&&(Ee=ja(U,z),Ee!=null&&ke.push(au(U,Ee,V)))),Mt)break;U=U.return}0<ke.length&&(re=new xe(re,Ae,null,l,se),ce.push({event:re,listeners:ke}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Fn&&(Ae=l.relatedTarget||l.fromElement)&&(ps(Ae)||Ae[ti]))break e;if((xe||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=G,Ae=Ae?ps(Ae):null,Ae!==null&&(Mt=hs(Ae),Ae!==Mt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=G),xe!==Ae)){if(ke=A2,Ee="onMouseLeave",z="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=k2,Ee="onPointerLeave",z="onPointerEnter",U="pointer"),Mt=xe==null?re:xo(xe),V=Ae==null?re:xo(Ae),re=new ke(Ee,U+"leave",xe,l,se),re.target=Mt,re.relatedTarget=V,Ee=null,ps(se)===G&&(ke=new ke(z,U+"enter",Ae,l,se),ke.target=V,ke.relatedTarget=Mt,Ee=ke),Mt=Ee,xe&&Ae)t:{for(ke=xe,z=Ae,U=0,V=ke;V;V=To(V))U++;for(V=0,Ee=z;Ee;Ee=To(Ee))V++;for(;0<U-V;)ke=To(ke),U--;for(;0<V-U;)z=To(z),V--;for(;U--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=To(ke),z=To(z)}ke=null}else ke=null;xe!==null&&t_(ce,re,xe,ke,!1),Ae!==null&&Mt!==null&&t_(ce,Mt,Ae,ke,!0)}}e:{if(re=G?xo(G):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=eF;else if(L2(re))if(M2)Ne=iF;else{Ne=nF;var De=tF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=rF);if(Ne&&(Ne=Ne(i,G))){D2(ce,Ne,l,se);break e}De&&De(i,re,G),i==="focusout"&&(De=re._wrapperState)&&De.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(De=G?xo(G):window,i){case"focusin":(L2(De)||De.contentEditable==="true")&&(yo=De,vp=G,iu=null);break;case"focusout":iu=vp=yo=null;break;case"mousedown":kp=!0;break;case"contextmenu":case"mouseup":case"dragend":kp=!1,V2(ce,l,se);break;case"selectionchange":if(aF)break;case"keydown":case"keyup":V2(ce,l,se)}var Me;if(wp)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Eo?P2(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(N2&&l.locale!=="ko"&&(Eo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Eo&&(Me=S2()):(ki=se,Ep="value"in ki?ki.value:ki.textContent,Eo=!0)),De=gc(G,ze),0<De.length&&(ze=new v2(ze,i,null,l,se),ce.push({event:ze,listeners:De}),Me?ze.data=Me:(Me=R2(l),Me!==null&&(ze.data=Me)))),(Me=KM?QM(i,l):XM(i,l))&&(G=gc(G,"onBeforeInput"),0<G.length&&(se=new v2("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:G}),se.data=Me))}Z2(ce,s)})}function au(i,s,l){return{instance:i,listener:s,currentTarget:l}}function gc(i,s){for(var l=s+"Capture",h=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ja(i,l),y!=null&&h.unshift(au(i,y,g)),y=ja(i,s),y!=null&&h.push(au(i,y,g))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function t_(i,s,l,h,g){for(var y=s._reactName,x=[];l!==null&&l!==h;){var I=l,D=I.alternate,G=I.stateNode;if(D!==null&&D===h)break;I.tag===5&&G!==null&&(I=G,g?(D=ja(l,y),D!=null&&x.unshift(au(l,D,I))):g||(D=ja(l,y),D!=null&&x.push(au(l,D,I)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var dF=/\r\n?/g,fF=/\u0000|\uFFFD/g;function n_(i){return(typeof i=="string"?i:""+i).replace(dF,`
26
- `).replace(fF,"")}function Ec(i,s,l){if(s=n_(s),n_(i)!==s&&l)throw Error(n(425))}function yc(){}var Lp=null,Dp=null;function Mp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Fp=typeof setTimeout=="function"?setTimeout:void 0,hF=typeof clearTimeout=="function"?clearTimeout:void 0,r_=typeof Promise=="function"?Promise:void 0,pF=typeof queueMicrotask=="function"?queueMicrotask:typeof r_!="undefined"?function(i){return r_.resolve(null).then(i).catch(mF)}:Fp;function mF(i){setTimeout(function(){throw i})}function Bp(i,s){var l=s,h=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){i.removeChild(g),Xa(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Xa(s)}function Oi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function i_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var _o=Math.random().toString(36).slice(2),Mr="__reactFiber$"+_o,uu="__reactProps$"+_o,ti="__reactContainer$"+_o,Up="__reactEvents$"+_o,gF="__reactListeners$"+_o,EF="__reactHandles$"+_o;function ps(i){var s=i[Mr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ti]||l[Mr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=i_(i);i!==null;){if(l=i[Mr])return l;i=i_(i)}return s}i=l,l=i.parentNode}return null}function lu(i){return i=i[Mr]||i[ti],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function bc(i){return i[uu]||null}var Hp=[],wo=-1;function Ii(i){return{current:i}}function yt(i){0>wo||(i.current=Hp[wo],Hp[wo]=null,wo--)}function mt(i,s){wo++,Hp[wo]=i.current,i.current=s}var Pi={},ln=Ii(Pi),An=Ii(!1),ms=Pi;function So(i,s){var l=i.type.contextTypes;if(!l)return Pi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function Tc(){yt(An),yt(ln)}function s_(i,s,l){if(ln.current!==Pi)throw Error(n(168));mt(ln,s),mt(An,l)}function o_(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in s))throw Error(n(108,Ge(i)||"Unknown",g));return S({},l,h)}function _c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,ms=ln.current,mt(ln,i),mt(An,An.current),!0}function a_(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=o_(i,s,ms),h.__reactInternalMemoizedMergedChildContext=i,yt(An),yt(ln),mt(ln,i)):yt(An),mt(An,l)}var ni=null,xc=!1,zp=!1;function u_(i){ni===null?ni=[i]:ni.push(i)}function yF(i){xc=!0,u_(i)}function Ri(){if(!zp&&ni!==null){zp=!0;var i=0,s=lt;try{var l=ni;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ni=null,xc=!1}catch(g){throw ni!==null&&(ni=ni.slice(i+1)),c2(lp,Ri),g}finally{lt=s,zp=!1}}return null}var Co=[],Ao=0,wc=null,Sc=0,Xn=[],Jn=0,gs=null,ri=1,ii="";function Es(i,s){Co[Ao++]=Sc,Co[Ao++]=wc,wc=i,Sc=s}function l_(i,s,l){Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,gs=i;var h=ri;i=ii;var g=32-hr(h)-1;h&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var x=g-g%5;y=(h&(1<<x)-1).toString(32),h>>=x,g-=x,ri=1<<32-hr(s)+g|l<<g|h,ii=y+i}else ri=1<<y|l<<g|h,ii=i}function jp(i){i.return!==null&&(Es(i,1),l_(i,1,0))}function $p(i){for(;i===wc;)wc=Co[--Ao],Co[Ao]=null,Sc=Co[--Ao],Co[Ao]=null;for(;i===gs;)gs=Xn[--Jn],Xn[Jn]=null,ii=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,St=!1,mr=null;function c_(i,s){var l=nr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function d_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Un=i,Hn=Oi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=gs!==null?{id:ri,overflow:ii}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Vp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function qp(i){if(St){var s=Hn;if(s){var l=s;if(!d_(i,s)){if(Vp(i))throw Error(n(418));s=Oi(l.nextSibling);var h=Un;s&&d_(i,s)?c_(h,l):(i.flags=i.flags&-4097|2,St=!1,Un=i)}}else{if(Vp(i))throw Error(n(418));i.flags=i.flags&-4097|2,St=!1,Un=i}}}function f_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Cc(i){if(i!==Un)return!1;if(!St)return f_(i),St=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Mp(i.type,i.memoizedProps)),s&&(s=Hn)){if(Vp(i))throw h_(),Error(n(418));for(;s;)c_(i,s),s=Oi(s.nextSibling)}if(f_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Hn=Oi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?Oi(i.stateNode.nextSibling):null;return!0}function h_(){for(var i=Hn;i;)i=Oi(i.nextSibling)}function vo(){Hn=Un=null,St=!1}function Yp(i){mr===null?mr=[i]:mr.push(i)}var bF=W.ReactCurrentBatchConfig;function cu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var g=h,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Ac(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function p_(i){var s=i._init;return s(i._payload)}function m_(i){function s(z,U){if(i){var V=z.deletions;V===null?(z.deletions=[U],z.flags|=16):V.push(U)}}function l(z,U){if(!i)return null;for(;U!==null;)s(z,U),U=U.sibling;return null}function h(z,U){for(z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function g(z,U){return z=zi(z,U),z.index=0,z.sibling=null,z}function y(z,U,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<U?(z.flags|=2,U):V):(z.flags|=2,U)):(z.flags|=1048576,U)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,U,V,Ee){return U===null||U.tag!==6?(U=Fm(V,z.mode,Ee),U.return=z,U):(U=g(U,V),U.return=z,U)}function D(z,U,V,Ee){var Ne=V.type;return Ne===te?se(z,U,V.props.children,Ee,V.key):U!==null&&(U.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&p_(Ne)===U.type)?(Ee=g(U,V.props),Ee.ref=cu(z,U,V),Ee.return=z,Ee):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,Ee)}function G(z,U,V,Ee){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=Bm(V,z.mode,Ee),U.return=z,U):(U=g(U,V.children||[]),U.return=z,U)}function se(z,U,V,Ee,Ne){return U===null||U.tag!==7?(U=Cs(V,z.mode,Ee,Ne),U.return=z,U):(U=g(U,V),U.return=z,U)}function ce(z,U,V){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Fm(""+U,z.mode,V),U.return=z,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case X:return V=Qc(U.type,U.key,U.props,null,z.mode,V),V.ref=cu(z,null,U),V.return=z,V;case B:return U=Bm(U,z.mode,V),U.return=z,U;case Ce:var Ee=U._init;return ce(z,Ee(U._payload),V)}if(je(U)||ne(U))return U=Cs(U,z.mode,V,null),U.return=z,U;Ac(z,U)}return null}function re(z,U,V,Ee){var Ne=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:I(z,U,""+V,Ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===Ne?D(z,U,V,Ee):null;case B:return V.key===Ne?G(z,U,V,Ee):null;case Ce:return Ne=V._init,re(z,U,Ne(V._payload),Ee)}if(je(V)||ne(V))return Ne!==null?null:se(z,U,V,Ee,null);Ac(z,V)}return null}function xe(z,U,V,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get(V)||null,I(U,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case X:return z=z.get(Ee.key===null?V:Ee.key)||null,D(U,z,Ee,Ne);case B:return z=z.get(Ee.key===null?V:Ee.key)||null,G(U,z,Ee,Ne);case Ce:var De=Ee._init;return xe(z,U,V,De(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return z=z.get(V)||null,se(U,z,Ee,Ne,null);Ac(U,Ee)}return null}function Ae(z,U,V,Ee){for(var Ne=null,De=null,Me=U,ze=U=0,Xt=null;Me!==null&&ze<V.length;ze++){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var it=re(z,Me,V[ze],Ee);if(it===null){Me===null&&(Me=Xt);break}i&&Me&&it.alternate===null&&s(z,Me),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it,Me=Xt}if(ze===V.length)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;ze<V.length;ze++)Me=ce(z,V[ze],Ee),Me!==null&&(U=y(Me,U,ze),De===null?Ne=Me:De.sibling=Me,De=Me);return St&&Es(z,ze),Ne}for(Me=h(z,Me);ze<V.length;ze++)Xt=xe(Me,z,ze,V[ze],Ee),Xt!==null&&(i&&Xt.alternate!==null&&Me.delete(Xt.key===null?ze:Xt.key),U=y(Xt,U,ze),De===null?Ne=Xt:De.sibling=Xt,De=Xt);return i&&Me.forEach(function(ji){return s(z,ji)}),St&&Es(z,ze),Ne}function ke(z,U,V,Ee){var Ne=ne(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=U,ze=U=0,Xt=null,it=V.next();Me!==null&&!it.done;ze++,it=V.next()){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var ji=re(z,Me,it.value,Ee);if(ji===null){Me===null&&(Me=Xt);break}i&&Me&&ji.alternate===null&&s(z,Me),U=y(ji,U,ze),De===null?Ne=ji:De.sibling=ji,De=ji,Me=Xt}if(it.done)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;!it.done;ze++,it=V.next())it=ce(z,it.value,Ee),it!==null&&(U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return St&&Es(z,ze),Ne}for(Me=h(z,Me);!it.done;ze++,it=V.next())it=xe(Me,z,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Me.delete(it.key===null?ze:it.key),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return i&&Me.forEach(function(JF){return s(z,JF)}),St&&Es(z,ze),Ne}function Mt(z,U,V,Ee){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var Ne=V.key,De=U;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),U=g(De,V.props.children),U.return=z,z=U;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&p_(Ne)===De.type){l(z,De.sibling),U=g(De,V.props),U.ref=cu(z,De,V),U.return=z,z=U;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(U=Cs(V.props.children,z.mode,Ee,V.key),U.return=z,z=U):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,z=Ee)}return x(z);case B:e:{for(De=V.key;U!==null;){if(U.key===De)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){l(z,U.sibling),U=g(U,V.children||[]),U.return=z,z=U;break e}else{l(z,U);break}else s(z,U);U=U.sibling}U=Bm(V,z.mode,Ee),U.return=z,z=U}return x(z);case Ce:return De=V._init,Mt(z,U,De(V._payload),Ee)}if(je(V))return Ae(z,U,V,Ee);if(ne(V))return ke(z,U,V,Ee);Ac(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,U!==null&&U.tag===6?(l(z,U.sibling),U=g(U,V),U.return=z,z=U):(l(z,U),U=Fm(V,z.mode,Ee),U.return=z,z=U),x(z)):l(z,U)}return Mt}var ko=m_(!0),g_=m_(!1),vc=Ii(null),kc=null,No=null,Wp=null;function Gp(){Wp=No=kc=null}function Kp(i){var s=vc.current;yt(vc),i._currentValue=s}function Qp(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Oo(i,s){kc=i,Wp=No=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(Wp!==i)if(i={context:i,memoizedValue:s,next:null},No===null){if(kc===null)throw Error(n(308));No=i,kc.dependencies={lanes:0,firstContext:i}}else No=No.next=i;return s}var ys=null;function Xp(i){ys===null?ys=[i]:ys.push(i)}function E_(i,s,l,h){var g=s.interleaved;return g===null?(l.next=l,Xp(s)):(l.next=g.next,g.next=l),s.interleaved=l,si(i,h)}function si(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Li=!1;function Jp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function oi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,si(i,l)}return g=h.interleaved,g===null?(s.next=s,Xp(h)):(s.next=g.next,g.next=s),h.interleaved=s,si(i,l)}function Nc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,fp(i,l)}}function b_(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function Oc(i,s,l,h){var g=i.updateQueue;Li=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,G=D.next;D.next=null,x===null?y=G:x.next=G,x=D;var se=i.alternate;se!==null&&(se=se.updateQueue,I=se.lastBaseUpdate,I!==x&&(I===null?se.firstBaseUpdate=G:I.next=G,se.lastBaseUpdate=D))}if(y!==null){var ce=g.baseState;x=0,se=G=D=null,I=y;do{var re=I.lane,xe=I.eventTime;if((h&re)===re){se!==null&&(se=se.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ae=i,ke=I;switch(re=s,xe=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ce=Ae.call(xe,ce,re);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,re=typeof Ae=="function"?Ae.call(xe,ce,re):Ae,re==null)break e;ce=S({},ce,re);break e;case 2:Li=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[I]:re.push(I))}else xe={eventTime:xe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},se===null?(G=se=xe,D=ce):se=se.next=xe,x|=re;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;re=I,I=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(se===null&&(D=ce),g.baseState=D,g.firstBaseUpdate=G,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);_s|=x,i.lanes=x,i.memoizedState=ce}}function T_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var du={},Fr=Ii(du),fu=Ii(du),hu=Ii(du);function bs(i){if(i===du)throw Error(n(174));return i}function Zp(i,s){switch(mt(hu,s),mt(fu,i),mt(Fr,du),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=fe(s,i)}yt(Fr),mt(Fr,s)}function Io(){yt(Fr),yt(fu),yt(hu)}function __(i){bs(hu.current);var s=bs(Fr.current),l=fe(s,i.type);s!==l&&(mt(fu,i),mt(Fr,l))}function em(i){fu.current===i&&(yt(Fr),yt(fu))}var At=Ii(0);function Ic(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var tm=[];function nm(){for(var i=0;i<tm.length;i++)tm[i]._workInProgressVersionPrimary=null;tm.length=0}var Pc=W.ReactCurrentDispatcher,rm=W.ReactCurrentBatchConfig,Ts=0,vt=null,zt=null,Kt=null,Rc=!1,pu=!1,mu=0,TF=0;function cn(){throw Error(n(321))}function im(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function sm(i,s,l,h,g,y){if(Ts=y,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Pc.current=i===null||i.memoizedState===null?SF:CF,i=l(h,g),pu){y=0;do{if(pu=!1,mu=0,25<=y)throw Error(n(301));y+=1,Kt=zt=null,s.updateQueue=null,Pc.current=AF,i=l(h,g)}while(pu)}if(Pc.current=Mc,s=zt!==null&&zt.next!==null,Ts=0,Kt=zt=vt=null,Rc=!1,s)throw Error(n(300));return i}function om(){var i=mu!==0;return mu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i,Kt}function er(){if(zt===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var s=Kt===null?vt.memoizedState:Kt.next;if(s!==null)Kt=s,zt=i;else{if(i===null)throw Error(n(310));zt=i,i={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i}return Kt}function gu(i,s){return typeof s=="function"?s(i):s}function am(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=zt,g=h.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}h.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,h=h.baseState;var I=x=null,D=null,G=y;do{var se=G.lane;if((Ts&se)===se)D!==null&&(D=D.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),h=G.hasEagerState?G.eagerState:i(h,G.action);else{var ce={lane:se,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};D===null?(I=D=ce,x=h):D=D.next=ce,vt.lanes|=se,_s|=se}G=G.next}while(G!==null&&G!==y);D===null?x=h:D.next=I,pr(h,s.memoizedState)||(kn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){g=i;do y=g.lane,vt.lanes|=y,_s|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function um(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,h]}function x_(){}function w_(i,s){var l=vt,h=er(),g=s(),y=!pr(h.memoizedState,g);if(y&&(h.memoizedState=g,kn=!0),h=h.queue,lm(A_.bind(null,l,h,i),[i]),h.getSnapshot!==s||y||Kt!==null&&Kt.memoizedState.tag&1){if(l.flags|=2048,Eu(9,C_.bind(null,l,h,g,s),void 0,null),Qt===null)throw Error(n(349));(Ts&30)!==0||S_(l,s,g)}return g}function S_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function C_(i,s,l,h){s.value=l,s.getSnapshot=h,v_(s)&&k_(i)}function A_(i,s,l){return l(function(){v_(s)&&k_(i)})}function v_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(h){return!0}}function k_(i){var s=si(i,1);s!==null&&br(s,i,1,-1)}function N_(i){var s=Br();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gu,lastRenderedState:i},s.queue=i,i=i.dispatch=wF.bind(null,vt,i),[s.memoizedState,i]}function Eu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function O_(){return er().memoizedState}function Lc(i,s,l,h){var g=Br();vt.flags|=i,g.memoizedState=Eu(1|s,l,void 0,h===void 0?null:h)}function Dc(i,s,l,h){var g=er();h=h===void 0?null:h;var y=void 0;if(zt!==null){var x=zt.memoizedState;if(y=x.destroy,h!==null&&im(h,x.deps)){g.memoizedState=Eu(s,l,y,h);return}}vt.flags|=i,g.memoizedState=Eu(1|s,l,y,h)}function I_(i,s){return Lc(8390656,8,i,s)}function lm(i,s){return Dc(2048,8,i,s)}function P_(i,s){return Dc(4,2,i,s)}function R_(i,s){return Dc(4,4,i,s)}function L_(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function D_(i,s,l){return l=l!=null?l.concat([i]):null,Dc(4,4,L_.bind(null,s,i),l)}function cm(){}function M_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&im(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function F_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&im(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function B_(i,s,l){return(Ts&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=p2(),vt.lanes|=l,_s|=l,i.baseState=!0),s)}function _F(i,s){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=rm.transition;rm.transition={};try{i(!1),s()}finally{lt=l,rm.transition=h}}function U_(){return er().memoizedState}function xF(i,s,l){var h=Ui(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},H_(i))z_(s,l);else if(l=E_(i,s,l,h),l!==null){var g=En();br(l,i,h,g),j_(l,s,h)}}function wF(i,s,l){var h=Ui(i),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(H_(i))z_(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,x)){var D=s.interleaved;D===null?(g.next=g,Xp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(G){}l=E_(i,s,g,h),l!==null&&(g=En(),br(l,i,h,g),j_(l,s,h))}}function H_(i){var s=i.alternate;return i===vt||s!==null&&s===vt}function z_(i,s){pu=Rc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function j_(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,fp(i,l)}}var Mc={readContext:Zn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},SF={readContext:Zn,useCallback:function(i,s){return Br().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:I_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Lc(4194308,4,L_.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Lc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Lc(4,2,i,s)},useMemo:function(i,s){var l=Br();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Br();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=xF.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var s=Br();return i={current:i},s.memoizedState=i},useState:N_,useDebugValue:cm,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=N_(!1),s=i[0];return i=_F.bind(null,i[1]),Br().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=vt,g=Br();if(St){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Qt===null)throw Error(n(349));(Ts&30)!==0||S_(h,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,I_(A_.bind(null,h,y,i),[i]),h.flags|=2048,Eu(9,C_.bind(null,h,y,l,s),void 0,null),l},useId:function(){var i=Br(),s=Qt.identifierPrefix;if(St){var l=ii,h=ri;l=(h&~(1<<32-hr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=mu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=TF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},CF={readContext:Zn,useCallback:M_,useContext:Zn,useEffect:lm,useImperativeHandle:D_,useInsertionEffect:P_,useLayoutEffect:R_,useMemo:F_,useReducer:am,useRef:O_,useState:function(){return am(gu)},useDebugValue:cm,useDeferredValue:function(i){var s=er();return B_(s,zt.memoizedState,i)},useTransition:function(){var i=am(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:x_,useSyncExternalStore:w_,useId:U_,unstable_isNewReconciler:!1},AF={readContext:Zn,useCallback:M_,useContext:Zn,useEffect:lm,useImperativeHandle:D_,useInsertionEffect:P_,useLayoutEffect:R_,useMemo:F_,useReducer:um,useRef:O_,useState:function(){return um(gu)},useDebugValue:cm,useDeferredValue:function(i){var s=er();return zt===null?s.memoizedState=i:B_(s,zt.memoizedState,i)},useTransition:function(){var i=um(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:x_,useSyncExternalStore:w_,useId:U_,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function dm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Fc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),h=Ui(i),g=oi(l,h);g.tag=2,s!=null&&(g.callback=s),s=Di(i,g,h),s!==null&&(br(s,i,h,l),Nc(s,i,h))}};function $_(i,s,l,h,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,x):s.prototype&&s.prototype.isPureReactComponent?!ru(l,h)||!ru(g,y):!0}function V_(i,s,l){var h=!1,g=Pi,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?ms:ln.current,h=s.contextTypes,y=(h=h!=null)?So(i,g):Pi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Fc,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function q_(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&Fc.enqueueReplaceState(s,s.state,null)}function fm(i,s,l,h){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Jp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?ms:ln.current,g.context=So(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(dm(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Fc.enqueueReplaceState(g,g.state,null),Oc(i,l,g,h),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,s){try{var l="",h=s;do l+=Re(h),h=h.return;while(h);var g=l}catch(y){g=`
28
+ `+g[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Re(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case ye:return"Profiler";case ge:return"StrictMode";case ue:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case M:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ge(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===ge?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function et(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=et(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){h=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function cs(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=et(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Jr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function _i(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ds(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ye(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xi(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Zr(i,s){xi(i,s);var l=Ye(s.value),h=s.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Ue(i,s.type,l):s.hasOwnProperty("defaultValue")&&Ue(i,s.type,Ye(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function we(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Ue(i,s,l){(s!=="number"||Jr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Xe(i,s,l,h){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function wt(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ye(l)}}function mn(i,s){var l=Ye(s.value),h=Ye(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function st(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Jt).forEach(function(i){ei.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Jt[s]=Jt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Jt.hasOwnProperty(i)&&Jt[i]?(""+s).trim():s+"px"}function wi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=Qn(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,g):i[l]=g}}var fs=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,s){if(s){if(fs[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Lr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fn=null;function sp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var op=null,ho=null,po=null;function r2(i){if(i=lu(i)){if(typeof op!="function")throw Error(n(280));var s=i.stateNode;s&&(s=bc(s),op(i.stateNode,i.type,s))}}function i2(i){ho?po?po.push(i):po=[i]:ho=i}function s2(){if(ho){var i=ho,s=po;if(po=ho=null,r2(i),s)for(i=0;i<s.length;i++)r2(s[i])}}function o2(i,s){return i(s)}function a2(){}var ap=!1;function u2(i,s,l){if(ap)return i(s,l);ap=!0;try{return o2(i,s,l)}finally{ap=!1,(ho!==null||po!==null)&&(a2(),s2())}}function ja(i,s){var l=i.stateNode;if(l===null)return null;var h=bc(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var up=!1;if(c)try{var $a={};Object.defineProperty($a,"passive",{get:function(){up=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch(i){up=!1}function hM(i,s,l,h,g,y,x,I,D){var G=Array.prototype.slice.call(arguments,3);try{s.apply(l,G)}catch(se){this.onError(se)}}var Va=!1,Xl=null,Jl=!1,lp=null,pM={onError:function(i){Va=!0,Xl=i}};function mM(i,s,l,h,g,y,x,I,D){Va=!1,Xl=null,hM.apply(pM,arguments)}function gM(i,s,l,h,g,y,x,I,D){if(mM.apply(this,arguments),Va){if(Va){var G=Xl;Va=!1,Xl=null}else throw Error(n(198));Jl||(Jl=!0,lp=G)}}function hs(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function l2(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c2(i){if(hs(i)!==i)throw Error(n(188))}function EM(i){var s=i.alternate;if(!s){if(s=hs(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return c2(g),i;if(y===h)return c2(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=y;else{for(var x=!1,I=g.child;I;){if(I===l){x=!0,l=g,h=y;break}if(I===h){x=!0,h=g,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,h=g;break}if(I===h){x=!0,h=y,l=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function d2(i){return i=EM(i),i!==null?f2(i):null}function f2(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=f2(i);if(s!==null)return s;i=i.sibling}return null}var h2=t.unstable_scheduleCallback,p2=t.unstable_cancelCallback,yM=t.unstable_shouldYield,bM=t.unstable_requestPaint,Dt=t.unstable_now,TM=t.unstable_getCurrentPriorityLevel,cp=t.unstable_ImmediatePriority,m2=t.unstable_UserBlockingPriority,Zl=t.unstable_NormalPriority,_M=t.unstable_LowPriority,g2=t.unstable_IdlePriority,ec=null,Dr=null;function xM(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ec,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:CM,wM=Math.log,SM=Math.LN2;function CM(i){return i>>>=0,i===0?32:31-(wM(i)/SM|0)|0}var tc=64,nc=4194304;function qa(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function rc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~g;I!==0?h=qa(I):(y&=x,y!==0&&(h=qa(y)))}else x=l&~g,x!==0?h=qa(x):y!==0&&(h=qa(y));if(h===0)return 0;if(s!==0&&s!==h&&(s&g)===0&&(g=h&-h,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-hr(s),g=1<<l,h|=i[l],s&=~g;return h}function AM(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vM(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-hr(y),I=1<<x,D=g[x];D===-1?((I&l)===0||(I&h)!==0)&&(g[x]=AM(I,s)):D<=s&&(i.expiredLanes|=I),y&=~I}}function dp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function E2(){var i=tc;return tc<<=1,(tc&4194240)===0&&(tc=64),i}function fp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ya(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function kM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,h[g]=-1,i[g]=-1,l&=~y}}function hp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-hr(l),g=1<<h;g&s|i[h]&s&&(i[h]|=s),l&=~g}}var lt=0;function y2(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var b2,pp,T2,_2,x2,mp=!1,ic=[],Si=null,Ci=null,Ai=null,Wa=new Map,Ga=new Map,vi=[],NM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function w2(i,s){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ga.delete(s.pointerId)}}function Ka(i,s,l,h,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},s!==null&&(s=lu(s),s!==null&&pp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function OM(i,s,l,h,g){switch(s){case"focusin":return Si=Ka(Si,i,s,l,h,g),!0;case"dragenter":return Ci=Ka(Ci,i,s,l,h,g),!0;case"mouseover":return Ai=Ka(Ai,i,s,l,h,g),!0;case"pointerover":var y=g.pointerId;return Wa.set(y,Ka(Wa.get(y)||null,i,s,l,h,g)),!0;case"gotpointercapture":return y=g.pointerId,Ga.set(y,Ka(Ga.get(y)||null,i,s,l,h,g)),!0}return!1}function S2(i){var s=ps(i.target);if(s!==null){var l=hs(s);if(l!==null){if(s=l.tag,s===13){if(s=l2(l),s!==null){i.blockedOn=s,x2(i.priority,function(){T2(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function sc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Ep(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Fn=h,l.target.dispatchEvent(h),Fn=null}else return s=lu(l),s!==null&&pp(s),i.blockedOn=l,!1;s.shift()}return!0}function C2(i,s,l){sc(i)&&l.delete(s)}function IM(){mp=!1,Si!==null&&sc(Si)&&(Si=null),Ci!==null&&sc(Ci)&&(Ci=null),Ai!==null&&sc(Ai)&&(Ai=null),Wa.forEach(C2),Ga.forEach(C2)}function Qa(i,s){i.blockedOn===s&&(i.blockedOn=null,mp||(mp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IM)))}function Xa(i){function s(g){return Qa(g,i)}if(0<ic.length){Qa(ic[0],i);for(var l=1;l<ic.length;l++){var h=ic[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&Qa(Si,i),Ci!==null&&Qa(Ci,i),Ai!==null&&Qa(Ai,i),Wa.forEach(s),Ga.forEach(s),l=0;l<vi.length;l++)h=vi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)S2(l),l.blockedOn===null&&vi.shift()}var mo=W.ReactCurrentBatchConfig,oc=!0;function PM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=1,gp(i,s,l,h)}finally{lt=g,mo.transition=y}}function RM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=4,gp(i,s,l,h)}finally{lt=g,mo.transition=y}}function gp(i,s,l,h){if(oc){var g=Ep(i,s,l,h);if(g===null)Lp(i,s,h,ac,l),w2(i,h);else if(OM(g,i,s,l,h))h.stopPropagation();else if(w2(i,h),s&4&&-1<NM.indexOf(i)){for(;g!==null;){var y=lu(g);if(y!==null&&b2(y),y=Ep(i,s,l,h),y===null&&Lp(i,s,h,ac,l),y===g)break;g=y}g!==null&&h.stopPropagation()}else Lp(i,s,h,null,l)}}var ac=null;function Ep(i,s,l,h){if(ac=null,i=sp(h),i=ps(i),i!==null)if(s=hs(i),s===null)i=null;else if(l=s.tag,l===13){if(i=l2(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return ac=i,null}function A2(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(TM()){case cp:return 1;case m2:return 4;case Zl:case _M:return 16;case g2:return 536870912;default:return 16}default:return 16}}var ki=null,yp=null,uc=null;function v2(){if(uc)return uc;var i,s=yp,l=s.length,h,g="value"in ki?ki.value:ki.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===g[y-h];h++);return uc=g.slice(i,1<h?1-h:void 0)}function lc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function cc(){return!0}function k2(){return!1}function Bn(i){function s(l,h,g,y,x){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?cc:k2,this.isPropagationStopped=k2,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cc)},persist:function(){},isPersistent:cc}),s}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bp=Bn(go),Ja=S({},go,{view:0,detail:0}),LM=Bn(Ja),Tp,_p,Za,dc=S({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Za&&(Za&&i.type==="mousemove"?(Tp=i.screenX-Za.screenX,_p=i.screenY-Za.screenY):_p=Tp=0,Za=i),Tp)},movementY:function(i){return"movementY"in i?i.movementY:_p}}),N2=Bn(dc),DM=S({},dc,{dataTransfer:0}),MM=Bn(DM),FM=S({},Ja,{relatedTarget:0}),xp=Bn(FM),BM=S({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),UM=Bn(BM),HM=S({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),zM=Bn(HM),jM=S({},go,{data:0}),O2=Bn(jM),$M={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=qM[i])?!!s[i]:!1}function wp(){return YM}var WM=S({},Ja,{key:function(i){if(i.key){var s=$M[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?VM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wp,charCode:function(i){return i.type==="keypress"?lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),GM=Bn(WM),KM=S({},dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),I2=Bn(KM),QM=S({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wp}),XM=Bn(QM),JM=S({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZM=Bn(JM),eF=S({},dc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),tF=Bn(eF),nF=[9,13,27,32],Sp=c&&"CompositionEvent"in window,eu=null;c&&"documentMode"in document&&(eu=document.documentMode);var rF=c&&"TextEvent"in window&&!eu,P2=c&&(!Sp||eu&&8<eu&&11>=eu),R2=" ",L2=!1;function D2(i,s){switch(i){case"keyup":return nF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function iF(i,s){switch(i){case"compositionend":return M2(s);case"keypress":return s.which!==32?null:(L2=!0,R2);case"textInput":return i=s.data,i===R2&&L2?null:i;default:return null}}function sF(i,s){if(Eo)return i==="compositionend"||!Sp&&D2(i,s)?(i=v2(),uc=yp=ki=null,Eo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return P2&&s.locale!=="ko"?null:s.data;default:return null}}var oF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function F2(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!oF[i.type]:s==="textarea"}function B2(i,s,l,h){i2(h),s=gc(s,"onChange"),0<s.length&&(l=new bp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var tu=null,nu=null;function aF(i){n_(i,0)}function fc(i){var s=xo(i);if(cs(s))return i}function uF(i,s){if(i==="change")return s}var U2=!1;if(c){var Cp;if(c){var Ap="oninput"in document;if(!Ap){var H2=document.createElement("div");H2.setAttribute("oninput","return;"),Ap=typeof H2.oninput=="function"}Cp=Ap}else Cp=!1;U2=Cp&&(!document.documentMode||9<document.documentMode)}function z2(){tu&&(tu.detachEvent("onpropertychange",j2),nu=tu=null)}function j2(i){if(i.propertyName==="value"&&fc(nu)){var s=[];B2(s,nu,i,sp(i)),u2(aF,s)}}function lF(i,s,l){i==="focusin"?(z2(),tu=s,nu=l,tu.attachEvent("onpropertychange",j2)):i==="focusout"&&z2()}function cF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return fc(nu)}function dF(i,s){if(i==="click")return fc(s)}function fF(i,s){if(i==="input"||i==="change")return fc(s)}function hF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:hF;function ru(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var g=l[h];if(!d.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function $2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function V2(i,s){var l=$2(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=$2(l)}}function q2(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?q2(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Y2(){for(var i=window,s=Jr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=Jr(i.document)}return s}function vp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function pF(i){var s=Y2(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&q2(l.ownerDocument.documentElement,l)){if(h!==null&&vp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(h.start,g);h=h.end===void 0?y:Math.min(h.end,g),!i.extend&&y>h&&(g=h,h=y,y=g),g=V2(l,y);var x=V2(l,h);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var mF=c&&"documentMode"in document&&11>=document.documentMode,yo=null,kp=null,iu=null,Np=!1;function W2(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Np||yo==null||yo!==Jr(h)||(h=yo,"selectionStart"in h&&vp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),iu&&ru(iu,h)||(iu=h,h=gc(kp,"onSelect"),0<h.length&&(s=new bp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=yo)))}function hc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var bo={animationend:hc("Animation","AnimationEnd"),animationiteration:hc("Animation","AnimationIteration"),animationstart:hc("Animation","AnimationStart"),transitionend:hc("Transition","TransitionEnd")},Op={},G2={};c&&(G2=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function pc(i){if(Op[i])return Op[i];if(!bo[i])return i;var s=bo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in G2)return Op[i]=s[l];return i}var K2=pc("animationend"),Q2=pc("animationiteration"),X2=pc("animationstart"),J2=pc("transitionend"),Z2=new Map,e_="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ni(i,s){Z2.set(i,s),a(s,[i])}for(var Ip=0;Ip<e_.length;Ip++){var Pp=e_[Ip],gF=Pp.toLowerCase(),EF=Pp[0].toUpperCase()+Pp.slice(1);Ni(gF,"on"+EF)}Ni(K2,"onAnimationEnd"),Ni(Q2,"onAnimationIteration"),Ni(X2,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(J2,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yF=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function t_(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,gM(h,s,void 0,i),i.currentTarget=null}function n_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],g=h.event;h=h.listeners;e:{var y=void 0;if(s)for(var x=h.length-1;0<=x;x--){var I=h[x],D=I.instance,G=I.currentTarget;if(I=I.listener,D!==y&&g.isPropagationStopped())break e;t_(g,I,G),y=D}else for(x=0;x<h.length;x++){if(I=h[x],D=I.instance,G=I.currentTarget,I=I.listener,D!==y&&g.isPropagationStopped())break e;t_(g,I,G),y=D}}}if(Jl)throw i=lp,Jl=!1,lp=null,i}function Et(i,s){var l=s[Hp];l===void 0&&(l=s[Hp]=new Set);var h=i+"__bubble";l.has(h)||(r_(s,i,2,!1),l.add(h))}function Rp(i,s,l){var h=0;s&&(h|=4),r_(l,i,h,s)}var mc="_reactListening"+Math.random().toString(36).slice(2);function ou(i){if(!i[mc]){i[mc]=!0,r.forEach(function(l){l!=="selectionchange"&&(yF.has(l)||Rp(l,!1,i),Rp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[mc]||(s[mc]=!0,Rp("selectionchange",!1,s))}}function r_(i,s,l,h){switch(A2(s)){case 1:var g=PM;break;case 4:g=RM;break;default:g=gp}l=g.bind(null,s,l,i),g=void 0,!up||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function Lp(i,s,l,h,g){var y=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var I=h.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=h.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;x=x.return}for(;I!==null;){if(x=ps(I),x===null)return;if(D=x.tag,D===5||D===6){h=y=x;continue e}I=I.parentNode}}h=h.return}u2(function(){var G=y,se=sp(l),ce=[];e:{var re=Z2.get(i);if(re!==void 0){var xe=bp,Ae=i;switch(i){case"keypress":if(lc(l)===0)break e;case"keydown":case"keyup":xe=GM;break;case"focusin":Ae="focus",xe=xp;break;case"focusout":Ae="blur",xe=xp;break;case"beforeblur":case"afterblur":xe=xp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=N2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=MM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=XM;break;case K2:case Q2:case X2:xe=UM;break;case J2:xe=ZM;break;case"scroll":xe=LM;break;case"wheel":xe=tF;break;case"copy":case"cut":case"paste":xe=zM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=I2}var ke=(s&4)!==0,Mt=!ke&&i==="scroll",z=ke?re!==null?re+"Capture":null:re;ke=[];for(var U=G,V;U!==null;){V=U;var Ee=V.stateNode;if(V.tag===5&&Ee!==null&&(V=Ee,z!==null&&(Ee=ja(U,z),Ee!=null&&ke.push(au(U,Ee,V)))),Mt)break;U=U.return}0<ke.length&&(re=new xe(re,Ae,null,l,se),ce.push({event:re,listeners:ke}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Fn&&(Ae=l.relatedTarget||l.fromElement)&&(ps(Ae)||Ae[ti]))break e;if((xe||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=G,Ae=Ae?ps(Ae):null,Ae!==null&&(Mt=hs(Ae),Ae!==Mt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=G),xe!==Ae)){if(ke=N2,Ee="onMouseLeave",z="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=I2,Ee="onPointerLeave",z="onPointerEnter",U="pointer"),Mt=xe==null?re:xo(xe),V=Ae==null?re:xo(Ae),re=new ke(Ee,U+"leave",xe,l,se),re.target=Mt,re.relatedTarget=V,Ee=null,ps(se)===G&&(ke=new ke(z,U+"enter",Ae,l,se),ke.target=V,ke.relatedTarget=Mt,Ee=ke),Mt=Ee,xe&&Ae)t:{for(ke=xe,z=Ae,U=0,V=ke;V;V=To(V))U++;for(V=0,Ee=z;Ee;Ee=To(Ee))V++;for(;0<U-V;)ke=To(ke),U--;for(;0<V-U;)z=To(z),V--;for(;U--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=To(ke),z=To(z)}ke=null}else ke=null;xe!==null&&i_(ce,re,xe,ke,!1),Ae!==null&&Mt!==null&&i_(ce,Mt,Ae,ke,!0)}}e:{if(re=G?xo(G):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=uF;else if(F2(re))if(U2)Ne=fF;else{Ne=cF;var De=lF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=dF);if(Ne&&(Ne=Ne(i,G))){B2(ce,Ne,l,se);break e}De&&De(i,re,G),i==="focusout"&&(De=re._wrapperState)&&De.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(De=G?xo(G):window,i){case"focusin":(F2(De)||De.contentEditable==="true")&&(yo=De,kp=G,iu=null);break;case"focusout":iu=kp=yo=null;break;case"mousedown":Np=!0;break;case"contextmenu":case"mouseup":case"dragend":Np=!1,W2(ce,l,se);break;case"selectionchange":if(mF)break;case"keydown":case"keyup":W2(ce,l,se)}var Me;if(Sp)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Eo?D2(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(P2&&l.locale!=="ko"&&(Eo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Eo&&(Me=v2()):(ki=se,yp="value"in ki?ki.value:ki.textContent,Eo=!0)),De=gc(G,ze),0<De.length&&(ze=new O2(ze,i,null,l,se),ce.push({event:ze,listeners:De}),Me?ze.data=Me:(Me=M2(l),Me!==null&&(ze.data=Me)))),(Me=rF?iF(i,l):sF(i,l))&&(G=gc(G,"onBeforeInput"),0<G.length&&(se=new O2("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:G}),se.data=Me))}n_(ce,s)})}function au(i,s,l){return{instance:i,listener:s,currentTarget:l}}function gc(i,s){for(var l=s+"Capture",h=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ja(i,l),y!=null&&h.unshift(au(i,y,g)),y=ja(i,s),y!=null&&h.push(au(i,y,g))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function i_(i,s,l,h,g){for(var y=s._reactName,x=[];l!==null&&l!==h;){var I=l,D=I.alternate,G=I.stateNode;if(D!==null&&D===h)break;I.tag===5&&G!==null&&(I=G,g?(D=ja(l,y),D!=null&&x.unshift(au(l,D,I))):g||(D=ja(l,y),D!=null&&x.push(au(l,D,I)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var bF=/\r\n?/g,TF=/\u0000|\uFFFD/g;function s_(i){return(typeof i=="string"?i:""+i).replace(bF,`
29
+ `).replace(TF,"")}function Ec(i,s,l){if(s=s_(s),s_(i)!==s&&l)throw Error(n(425))}function yc(){}var Dp=null,Mp=null;function Fp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Bp=typeof setTimeout=="function"?setTimeout:void 0,_F=typeof clearTimeout=="function"?clearTimeout:void 0,o_=typeof Promise=="function"?Promise:void 0,xF=typeof queueMicrotask=="function"?queueMicrotask:typeof o_!="undefined"?function(i){return o_.resolve(null).then(i).catch(wF)}:Bp;function wF(i){setTimeout(function(){throw i})}function Up(i,s){var l=s,h=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){i.removeChild(g),Xa(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Xa(s)}function Oi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function a_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var _o=Math.random().toString(36).slice(2),Mr="__reactFiber$"+_o,uu="__reactProps$"+_o,ti="__reactContainer$"+_o,Hp="__reactEvents$"+_o,SF="__reactListeners$"+_o,CF="__reactHandles$"+_o;function ps(i){var s=i[Mr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ti]||l[Mr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=a_(i);i!==null;){if(l=i[Mr])return l;i=a_(i)}return s}i=l,l=i.parentNode}return null}function lu(i){return i=i[Mr]||i[ti],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function bc(i){return i[uu]||null}var zp=[],wo=-1;function Ii(i){return{current:i}}function yt(i){0>wo||(i.current=zp[wo],zp[wo]=null,wo--)}function mt(i,s){wo++,zp[wo]=i.current,i.current=s}var Pi={},ln=Ii(Pi),An=Ii(!1),ms=Pi;function So(i,s){var l=i.type.contextTypes;if(!l)return Pi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function Tc(){yt(An),yt(ln)}function u_(i,s,l){if(ln.current!==Pi)throw Error(n(168));mt(ln,s),mt(An,l)}function l_(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in s))throw Error(n(108,Ge(i)||"Unknown",g));return S({},l,h)}function _c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,ms=ln.current,mt(ln,i),mt(An,An.current),!0}function c_(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=l_(i,s,ms),h.__reactInternalMemoizedMergedChildContext=i,yt(An),yt(ln),mt(ln,i)):yt(An),mt(An,l)}var ni=null,xc=!1,jp=!1;function d_(i){ni===null?ni=[i]:ni.push(i)}function AF(i){xc=!0,d_(i)}function Ri(){if(!jp&&ni!==null){jp=!0;var i=0,s=lt;try{var l=ni;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ni=null,xc=!1}catch(g){throw ni!==null&&(ni=ni.slice(i+1)),h2(cp,Ri),g}finally{lt=s,jp=!1}}return null}var Co=[],Ao=0,wc=null,Sc=0,Xn=[],Jn=0,gs=null,ri=1,ii="";function Es(i,s){Co[Ao++]=Sc,Co[Ao++]=wc,wc=i,Sc=s}function f_(i,s,l){Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,gs=i;var h=ri;i=ii;var g=32-hr(h)-1;h&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var x=g-g%5;y=(h&(1<<x)-1).toString(32),h>>=x,g-=x,ri=1<<32-hr(s)+g|l<<g|h,ii=y+i}else ri=1<<y|l<<g|h,ii=i}function $p(i){i.return!==null&&(Es(i,1),f_(i,1,0))}function Vp(i){for(;i===wc;)wc=Co[--Ao],Co[Ao]=null,Sc=Co[--Ao],Co[Ao]=null;for(;i===gs;)gs=Xn[--Jn],Xn[Jn]=null,ii=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,St=!1,mr=null;function h_(i,s){var l=nr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function p_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Un=i,Hn=Oi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=gs!==null?{id:ri,overflow:ii}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function qp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Yp(i){if(St){var s=Hn;if(s){var l=s;if(!p_(i,s)){if(qp(i))throw Error(n(418));s=Oi(l.nextSibling);var h=Un;s&&p_(i,s)?h_(h,l):(i.flags=i.flags&-4097|2,St=!1,Un=i)}}else{if(qp(i))throw Error(n(418));i.flags=i.flags&-4097|2,St=!1,Un=i}}}function m_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Cc(i){if(i!==Un)return!1;if(!St)return m_(i),St=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Fp(i.type,i.memoizedProps)),s&&(s=Hn)){if(qp(i))throw g_(),Error(n(418));for(;s;)h_(i,s),s=Oi(s.nextSibling)}if(m_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Hn=Oi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?Oi(i.stateNode.nextSibling):null;return!0}function g_(){for(var i=Hn;i;)i=Oi(i.nextSibling)}function vo(){Hn=Un=null,St=!1}function Wp(i){mr===null?mr=[i]:mr.push(i)}var vF=W.ReactCurrentBatchConfig;function cu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var g=h,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Ac(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function E_(i){var s=i._init;return s(i._payload)}function y_(i){function s(z,U){if(i){var V=z.deletions;V===null?(z.deletions=[U],z.flags|=16):V.push(U)}}function l(z,U){if(!i)return null;for(;U!==null;)s(z,U),U=U.sibling;return null}function h(z,U){for(z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function g(z,U){return z=zi(z,U),z.index=0,z.sibling=null,z}function y(z,U,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<U?(z.flags|=2,U):V):(z.flags|=2,U)):(z.flags|=1048576,U)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,U,V,Ee){return U===null||U.tag!==6?(U=Bm(V,z.mode,Ee),U.return=z,U):(U=g(U,V),U.return=z,U)}function D(z,U,V,Ee){var Ne=V.type;return Ne===te?se(z,U,V.props.children,Ee,V.key):U!==null&&(U.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&E_(Ne)===U.type)?(Ee=g(U,V.props),Ee.ref=cu(z,U,V),Ee.return=z,Ee):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,Ee)}function G(z,U,V,Ee){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=Um(V,z.mode,Ee),U.return=z,U):(U=g(U,V.children||[]),U.return=z,U)}function se(z,U,V,Ee,Ne){return U===null||U.tag!==7?(U=Cs(V,z.mode,Ee,Ne),U.return=z,U):(U=g(U,V),U.return=z,U)}function ce(z,U,V){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Bm(""+U,z.mode,V),U.return=z,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case X:return V=Qc(U.type,U.key,U.props,null,z.mode,V),V.ref=cu(z,null,U),V.return=z,V;case B:return U=Um(U,z.mode,V),U.return=z,U;case Ce:var Ee=U._init;return ce(z,Ee(U._payload),V)}if(je(U)||ne(U))return U=Cs(U,z.mode,V,null),U.return=z,U;Ac(z,U)}return null}function re(z,U,V,Ee){var Ne=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:I(z,U,""+V,Ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===Ne?D(z,U,V,Ee):null;case B:return V.key===Ne?G(z,U,V,Ee):null;case Ce:return Ne=V._init,re(z,U,Ne(V._payload),Ee)}if(je(V)||ne(V))return Ne!==null?null:se(z,U,V,Ee,null);Ac(z,V)}return null}function xe(z,U,V,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get(V)||null,I(U,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case X:return z=z.get(Ee.key===null?V:Ee.key)||null,D(U,z,Ee,Ne);case B:return z=z.get(Ee.key===null?V:Ee.key)||null,G(U,z,Ee,Ne);case Ce:var De=Ee._init;return xe(z,U,V,De(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return z=z.get(V)||null,se(U,z,Ee,Ne,null);Ac(U,Ee)}return null}function Ae(z,U,V,Ee){for(var Ne=null,De=null,Me=U,ze=U=0,Xt=null;Me!==null&&ze<V.length;ze++){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var it=re(z,Me,V[ze],Ee);if(it===null){Me===null&&(Me=Xt);break}i&&Me&&it.alternate===null&&s(z,Me),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it,Me=Xt}if(ze===V.length)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;ze<V.length;ze++)Me=ce(z,V[ze],Ee),Me!==null&&(U=y(Me,U,ze),De===null?Ne=Me:De.sibling=Me,De=Me);return St&&Es(z,ze),Ne}for(Me=h(z,Me);ze<V.length;ze++)Xt=xe(Me,z,ze,V[ze],Ee),Xt!==null&&(i&&Xt.alternate!==null&&Me.delete(Xt.key===null?ze:Xt.key),U=y(Xt,U,ze),De===null?Ne=Xt:De.sibling=Xt,De=Xt);return i&&Me.forEach(function(ji){return s(z,ji)}),St&&Es(z,ze),Ne}function ke(z,U,V,Ee){var Ne=ne(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=U,ze=U=0,Xt=null,it=V.next();Me!==null&&!it.done;ze++,it=V.next()){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var ji=re(z,Me,it.value,Ee);if(ji===null){Me===null&&(Me=Xt);break}i&&Me&&ji.alternate===null&&s(z,Me),U=y(ji,U,ze),De===null?Ne=ji:De.sibling=ji,De=ji,Me=Xt}if(it.done)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;!it.done;ze++,it=V.next())it=ce(z,it.value,Ee),it!==null&&(U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return St&&Es(z,ze),Ne}for(Me=h(z,Me);!it.done;ze++,it=V.next())it=xe(Me,z,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Me.delete(it.key===null?ze:it.key),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return i&&Me.forEach(function(oB){return s(z,oB)}),St&&Es(z,ze),Ne}function Mt(z,U,V,Ee){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var Ne=V.key,De=U;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),U=g(De,V.props.children),U.return=z,z=U;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&E_(Ne)===De.type){l(z,De.sibling),U=g(De,V.props),U.ref=cu(z,De,V),U.return=z,z=U;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(U=Cs(V.props.children,z.mode,Ee,V.key),U.return=z,z=U):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,z=Ee)}return x(z);case B:e:{for(De=V.key;U!==null;){if(U.key===De)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){l(z,U.sibling),U=g(U,V.children||[]),U.return=z,z=U;break e}else{l(z,U);break}else s(z,U);U=U.sibling}U=Um(V,z.mode,Ee),U.return=z,z=U}return x(z);case Ce:return De=V._init,Mt(z,U,De(V._payload),Ee)}if(je(V))return Ae(z,U,V,Ee);if(ne(V))return ke(z,U,V,Ee);Ac(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,U!==null&&U.tag===6?(l(z,U.sibling),U=g(U,V),U.return=z,z=U):(l(z,U),U=Bm(V,z.mode,Ee),U.return=z,z=U),x(z)):l(z,U)}return Mt}var ko=y_(!0),b_=y_(!1),vc=Ii(null),kc=null,No=null,Gp=null;function Kp(){Gp=No=kc=null}function Qp(i){var s=vc.current;yt(vc),i._currentValue=s}function Xp(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Oo(i,s){kc=i,Gp=No=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(Gp!==i)if(i={context:i,memoizedValue:s,next:null},No===null){if(kc===null)throw Error(n(308));No=i,kc.dependencies={lanes:0,firstContext:i}}else No=No.next=i;return s}var ys=null;function Jp(i){ys===null?ys=[i]:ys.push(i)}function T_(i,s,l,h){var g=s.interleaved;return g===null?(l.next=l,Jp(s)):(l.next=g.next,g.next=l),s.interleaved=l,si(i,h)}function si(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Li=!1;function Zp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function __(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function oi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,si(i,l)}return g=h.interleaved,g===null?(s.next=s,Jp(h)):(s.next=g.next,g.next=s),h.interleaved=s,si(i,l)}function Nc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,hp(i,l)}}function x_(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function Oc(i,s,l,h){var g=i.updateQueue;Li=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,G=D.next;D.next=null,x===null?y=G:x.next=G,x=D;var se=i.alternate;se!==null&&(se=se.updateQueue,I=se.lastBaseUpdate,I!==x&&(I===null?se.firstBaseUpdate=G:I.next=G,se.lastBaseUpdate=D))}if(y!==null){var ce=g.baseState;x=0,se=G=D=null,I=y;do{var re=I.lane,xe=I.eventTime;if((h&re)===re){se!==null&&(se=se.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ae=i,ke=I;switch(re=s,xe=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ce=Ae.call(xe,ce,re);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,re=typeof Ae=="function"?Ae.call(xe,ce,re):Ae,re==null)break e;ce=S({},ce,re);break e;case 2:Li=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[I]:re.push(I))}else xe={eventTime:xe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},se===null?(G=se=xe,D=ce):se=se.next=xe,x|=re;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;re=I,I=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(se===null&&(D=ce),g.baseState=D,g.firstBaseUpdate=G,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);_s|=x,i.lanes=x,i.memoizedState=ce}}function w_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var du={},Fr=Ii(du),fu=Ii(du),hu=Ii(du);function bs(i){if(i===du)throw Error(n(174));return i}function em(i,s){switch(mt(hu,s),mt(fu,i),mt(Fr,du),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=fe(s,i)}yt(Fr),mt(Fr,s)}function Io(){yt(Fr),yt(fu),yt(hu)}function S_(i){bs(hu.current);var s=bs(Fr.current),l=fe(s,i.type);s!==l&&(mt(fu,i),mt(Fr,l))}function tm(i){fu.current===i&&(yt(Fr),yt(fu))}var At=Ii(0);function Ic(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var nm=[];function rm(){for(var i=0;i<nm.length;i++)nm[i]._workInProgressVersionPrimary=null;nm.length=0}var Pc=W.ReactCurrentDispatcher,im=W.ReactCurrentBatchConfig,Ts=0,vt=null,zt=null,Kt=null,Rc=!1,pu=!1,mu=0,kF=0;function cn(){throw Error(n(321))}function sm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function om(i,s,l,h,g,y){if(Ts=y,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Pc.current=i===null||i.memoizedState===null?PF:RF,i=l(h,g),pu){y=0;do{if(pu=!1,mu=0,25<=y)throw Error(n(301));y+=1,Kt=zt=null,s.updateQueue=null,Pc.current=LF,i=l(h,g)}while(pu)}if(Pc.current=Mc,s=zt!==null&&zt.next!==null,Ts=0,Kt=zt=vt=null,Rc=!1,s)throw Error(n(300));return i}function am(){var i=mu!==0;return mu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i,Kt}function er(){if(zt===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var s=Kt===null?vt.memoizedState:Kt.next;if(s!==null)Kt=s,zt=i;else{if(i===null)throw Error(n(310));zt=i,i={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i}return Kt}function gu(i,s){return typeof s=="function"?s(i):s}function um(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=zt,g=h.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}h.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,h=h.baseState;var I=x=null,D=null,G=y;do{var se=G.lane;if((Ts&se)===se)D!==null&&(D=D.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),h=G.hasEagerState?G.eagerState:i(h,G.action);else{var ce={lane:se,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};D===null?(I=D=ce,x=h):D=D.next=ce,vt.lanes|=se,_s|=se}G=G.next}while(G!==null&&G!==y);D===null?x=h:D.next=I,pr(h,s.memoizedState)||(kn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){g=i;do y=g.lane,vt.lanes|=y,_s|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function lm(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,h]}function C_(){}function A_(i,s){var l=vt,h=er(),g=s(),y=!pr(h.memoizedState,g);if(y&&(h.memoizedState=g,kn=!0),h=h.queue,cm(N_.bind(null,l,h,i),[i]),h.getSnapshot!==s||y||Kt!==null&&Kt.memoizedState.tag&1){if(l.flags|=2048,Eu(9,k_.bind(null,l,h,g,s),void 0,null),Qt===null)throw Error(n(349));(Ts&30)!==0||v_(l,s,g)}return g}function v_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function k_(i,s,l,h){s.value=l,s.getSnapshot=h,O_(s)&&I_(i)}function N_(i,s,l){return l(function(){O_(s)&&I_(i)})}function O_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(h){return!0}}function I_(i){var s=si(i,1);s!==null&&br(s,i,1,-1)}function P_(i){var s=Br();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gu,lastRenderedState:i},s.queue=i,i=i.dispatch=IF.bind(null,vt,i),[s.memoizedState,i]}function Eu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function R_(){return er().memoizedState}function Lc(i,s,l,h){var g=Br();vt.flags|=i,g.memoizedState=Eu(1|s,l,void 0,h===void 0?null:h)}function Dc(i,s,l,h){var g=er();h=h===void 0?null:h;var y=void 0;if(zt!==null){var x=zt.memoizedState;if(y=x.destroy,h!==null&&sm(h,x.deps)){g.memoizedState=Eu(s,l,y,h);return}}vt.flags|=i,g.memoizedState=Eu(1|s,l,y,h)}function L_(i,s){return Lc(8390656,8,i,s)}function cm(i,s){return Dc(2048,8,i,s)}function D_(i,s){return Dc(4,2,i,s)}function M_(i,s){return Dc(4,4,i,s)}function F_(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function B_(i,s,l){return l=l!=null?l.concat([i]):null,Dc(4,4,F_.bind(null,s,i),l)}function dm(){}function U_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&sm(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function H_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&sm(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function z_(i,s,l){return(Ts&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=E2(),vt.lanes|=l,_s|=l,i.baseState=!0),s)}function NF(i,s){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=im.transition;im.transition={};try{i(!1),s()}finally{lt=l,im.transition=h}}function j_(){return er().memoizedState}function OF(i,s,l){var h=Ui(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},$_(i))V_(s,l);else if(l=T_(i,s,l,h),l!==null){var g=En();br(l,i,h,g),q_(l,s,h)}}function IF(i,s,l){var h=Ui(i),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if($_(i))V_(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,x)){var D=s.interleaved;D===null?(g.next=g,Jp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(G){}l=T_(i,s,g,h),l!==null&&(g=En(),br(l,i,h,g),q_(l,s,h))}}function $_(i){var s=i.alternate;return i===vt||s!==null&&s===vt}function V_(i,s){pu=Rc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function q_(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,hp(i,l)}}var Mc={readContext:Zn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},PF={readContext:Zn,useCallback:function(i,s){return Br().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:L_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Lc(4194308,4,F_.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Lc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Lc(4,2,i,s)},useMemo:function(i,s){var l=Br();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Br();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=OF.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var s=Br();return i={current:i},s.memoizedState=i},useState:P_,useDebugValue:dm,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=P_(!1),s=i[0];return i=NF.bind(null,i[1]),Br().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=vt,g=Br();if(St){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Qt===null)throw Error(n(349));(Ts&30)!==0||v_(h,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,L_(N_.bind(null,h,y,i),[i]),h.flags|=2048,Eu(9,k_.bind(null,h,y,l,s),void 0,null),l},useId:function(){var i=Br(),s=Qt.identifierPrefix;if(St){var l=ii,h=ri;l=(h&~(1<<32-hr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=mu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=kF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},RF={readContext:Zn,useCallback:U_,useContext:Zn,useEffect:cm,useImperativeHandle:B_,useInsertionEffect:D_,useLayoutEffect:M_,useMemo:H_,useReducer:um,useRef:R_,useState:function(){return um(gu)},useDebugValue:dm,useDeferredValue:function(i){var s=er();return z_(s,zt.memoizedState,i)},useTransition:function(){var i=um(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:C_,useSyncExternalStore:A_,useId:j_,unstable_isNewReconciler:!1},LF={readContext:Zn,useCallback:U_,useContext:Zn,useEffect:cm,useImperativeHandle:B_,useInsertionEffect:D_,useLayoutEffect:M_,useMemo:H_,useReducer:lm,useRef:R_,useState:function(){return lm(gu)},useDebugValue:dm,useDeferredValue:function(i){var s=er();return zt===null?s.memoizedState=i:z_(s,zt.memoizedState,i)},useTransition:function(){var i=lm(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:C_,useSyncExternalStore:A_,useId:j_,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function fm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Fc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),h=Ui(i),g=oi(l,h);g.tag=2,s!=null&&(g.callback=s),s=Di(i,g,h),s!==null&&(br(s,i,h,l),Nc(s,i,h))}};function Y_(i,s,l,h,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,x):s.prototype&&s.prototype.isPureReactComponent?!ru(l,h)||!ru(g,y):!0}function W_(i,s,l){var h=!1,g=Pi,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?ms:ln.current,h=s.contextTypes,y=(h=h!=null)?So(i,g):Pi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Fc,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function G_(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&Fc.enqueueReplaceState(s,s.state,null)}function hm(i,s,l,h){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Zp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?ms:ln.current,g.context=So(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(fm(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Fc.enqueueReplaceState(g,g.state,null),Oc(i,l,g,h),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,s){try{var l="",h=s;do l+=Re(h),h=h.return;while(h);var g=l}catch(y){g=`
27
30
  Error generating stack: `+y.message+`
28
- `+y.stack}return{value:i,source:s,stack:g,digest:null}}function hm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function pm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var vF=typeof WeakMap=="function"?WeakMap:Map;function Y_(i,s,l){l=oi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){Vc||(Vc=!0,Nm=h),pm(i,s)},l}function W_(i,s,l){l=oi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;l.payload=function(){return h(g)},l.callback=function(){pm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){pm(i,s),typeof h!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function G_(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new vF;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(l)||(g.add(l),i=zF.bind(null,i,s,l),s.then(i,i))}function K_(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Q_(i,s,l,h,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=oi(-1,1),s.tag=2,Di(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var kF=W.ReactCurrentOwner,kn=!1;function gn(i,s,l,h){s.child=i===null?g_(s,null,l,h):ko(s,i.child,l,h)}function X_(i,s,l,h,g){l=l.render;var y=s.ref;return Oo(s,g),h=sm(i,s,l,h,y,g),l=om(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&l&&jp(s),s.flags|=1,gn(i,s,h,g),s.child)}function J_(i,s,l,h,g){if(i===null){var y=l.type;return typeof y=="function"&&!Mm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Z_(i,s,y,h,g)):(i=Qc(l.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:ru,l(x,h)&&i.ref===s.ref)return ai(i,s,g)}return s.flags|=1,i=zi(y,h),i.ref=s.ref,i.return=s,s.child=i}function Z_(i,s,l,h,g){if(i!==null){var y=i.memoizedProps;if(ru(y,h)&&i.ref===s.ref)if(kn=!1,s.pendingProps=h=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,ai(i,s,g)}return mm(i,s,l,h,g)}function ex(i,s,l){var h=s.pendingProps,g=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Lo,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,mt(Lo,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,mt(Lo,zn),zn|=h}else y!==null?(h=y.baseLanes|l,s.memoizedState=null):h=l,mt(Lo,zn),zn|=h;return gn(i,s,g,l),s.child}function tx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function mm(i,s,l,h,g){var y=vn(l)?ms:ln.current;return y=So(s,y),Oo(s,g),l=sm(i,s,l,h,y,g),h=om(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&h&&jp(s),s.flags|=1,gn(i,s,l,g),s.child)}function nx(i,s,l,h,g){if(vn(l)){var y=!0;_c(s)}else y=!1;if(Oo(s,g),s.stateNode===null)Uc(i,s),V_(s,l,h),fm(s,l,h,g),h=!0;else if(i===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var D=x.context,G=l.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=vn(l)?ms:ln.current,G=So(s,G));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==h||D!==G)&&q_(s,x,h,G),Li=!1;var re=s.memoizedState;x.state=re,Oc(s,h,x,g),D=s.memoizedState,I!==h||re!==D||An.current||Li?(typeof se=="function"&&(dm(s,l,se,h),D=s.memoizedState),(I=Li||$_(s,l,I,h,re,D,G))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=D),x.props=h,x.state=D,x.context=G,h=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,y_(i,s),I=s.memoizedProps,G=s.type===s.elementType?I:gr(s.type,I),x.props=G,ce=s.pendingProps,re=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=Zn(D):(D=vn(l)?ms:ln.current,D=So(s,D));var xe=l.getDerivedStateFromProps;(se=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==ce||re!==D)&&q_(s,x,h,D),Li=!1,re=s.memoizedState,x.state=re,Oc(s,h,x,g);var Ae=s.memoizedState;I!==ce||re!==Ae||An.current||Li?(typeof xe=="function"&&(dm(s,l,xe,h),Ae=s.memoizedState),(G=Li||$_(s,l,G,h,re,Ae,D)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ae,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ae,D)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ae),x.props=h,x.state=Ae,x.context=D,h=G):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),h=!1)}return gm(i,s,l,h,y,g)}function gm(i,s,l,h,g,y){tx(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return g&&a_(s,l,!1),ai(i,s,y);h=s.stateNode,kF.current=s;var I=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=ko(s,i.child,null,y),s.child=ko(s,null,I,y)):gn(i,s,I,y),s.memoizedState=h.state,g&&a_(s,l,!0),s.child}function rx(i){var s=i.stateNode;s.pendingContext?s_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&s_(i,s.context,!1),Zp(i,s.containerInfo)}function ix(i,s,l,h,g){return vo(),Yp(g),s.flags|=256,gn(i,s,l,h),s.child}var Em={dehydrated:null,treeContext:null,retryLane:0};function ym(i){return{baseLanes:i,cachePool:null,transitions:null}}function sx(i,s,l){var h=s.pendingProps,g=At.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),mt(At,g&1),i===null)return qp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,y?(h=s.mode,y=s.child,x={mode:"hidden",children:x},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Xc(x,h,0,null),i=Cs(i,h,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=ym(l),s.memoizedState=Em,i):bm(s,x));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return NF(i,s,x,h,I,g,l);if(y){y=h.fallback,x=s.mode,g=i.child,I=g.sibling;var D={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==g?(h=s.child,h.childLanes=0,h.pendingProps=D,s.deletions=null):(h=zi(g,D),h.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=zi(I,y):(y=Cs(y,x,l,null),y.flags|=2),y.return=s,h.return=s,h.sibling=y,s.child=h,h=y,y=s.child,x=i.child.memoizedState,x=x===null?ym(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=Em,h}return y=i.child,i=y.sibling,h=zi(y,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function bm(i,s){return s=Xc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Bc(i,s,l,h){return h!==null&&Yp(h),ko(s,i.child,null,l),i=bm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function NF(i,s,l,h,g,y,x){if(l)return s.flags&256?(s.flags&=-257,h=hm(Error(n(422))),Bc(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=h.fallback,g=s.mode,h=Xc({mode:"visible",children:h.children},g,0,null),y=Cs(y,g,x,null),y.flags|=2,h.return=s,y.return=s,h.sibling=y,s.child=h,(s.mode&1)!==0&&ko(s,i.child,null,x),s.child.memoizedState=ym(x),s.memoizedState=Em,y);if((s.mode&1)===0)return Bc(i,s,x,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=hm(y,h,void 0),Bc(i,s,x,h)}if(I=(x&i.childLanes)!==0,kn||I){if(h=Qt,h!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(h.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,si(i,g),br(h,i,g,-1))}return Dm(),h=hm(Error(n(421))),Bc(i,s,x,h)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=jF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=Oi(g.nextSibling),Un=s,St=!0,mr=null,i!==null&&(Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,ri=i.id,ii=i.overflow,gs=s),s=bm(s,h.children),s.flags|=4096,s)}function ox(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Qp(i.return,s,l)}function Tm(i,s,l,h,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=g)}function ax(i,s,l){var h=s.pendingProps,g=h.revealOrder,y=h.tail;if(gn(i,s,h.children,l),h=At.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&ox(i,l,s);else if(i.tag===19)ox(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(mt(At,h),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Ic(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),Tm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ic(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}Tm(s,!0,l,null,y);break;case"together":Tm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Uc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ai(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),_s|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=zi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=zi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function OF(i,s,l){switch(s.tag){case 3:rx(s),vo();break;case 5:__(s);break;case 1:vn(s.type)&&_c(s);break;case 4:Zp(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,g=s.memoizedProps.value;mt(vc,h._currentValue),h._currentValue=g;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(mt(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?sx(i,s,l):(mt(At,At.current&1),i=ai(i,s,l),i!==null?i.sibling:null);mt(At,At.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return ax(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),mt(At,At.current),h)break;return null;case 22:case 23:return s.lanes=0,ex(i,s,l)}return ai(i,s,l)}var ux,_m,lx,cx;ux=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},_m=function(){},lx=function(i,s,l,h){var g=i.memoizedProps;if(g!==h){i=s.stateNode,bs(Fr.current);var y=null;switch(l){case"input":g=_i(i,g),h=_i(i,h),y=[];break;case"select":g=S({},g,{value:void 0}),h=S({},h,{value:void 0}),y=[];break;case"textarea":g=dt(i,g),h=dt(i,h),y=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=yc)}Zt(l,h);var x;l=null;for(G in g)if(!h.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var I=g[G];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in h){var D=h[G];if(I=g!=null?g[G]:void 0,h.hasOwnProperty(G)&&D!==I&&(D!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&I[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(y||(y=[]),y.push(G,l)),l=D;else G==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(y=y||[]).push(G,D)):G==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(G,""+D):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(D!=null&&G==="onScroll"&&Et("scroll",i),y||I===D||(y=[])):(y=y||[]).push(G,D))}l&&(y=y||[]).push("style",l);var G=y;(s.updateQueue=G)&&(s.flags|=4)}},cx=function(i,s,l,h){l!==h&&(s.flags|=4)};function yu(i,s){if(!St)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function IF(i,s,l){var h=s.pendingProps;switch($p(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&Tc(),dn(s),null;case 3:return h=s.stateNode,Io(),yt(An),yt(ln),nm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Cc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(Pm(mr),mr=null))),_m(i,s),dn(s),null;case 5:em(s);var g=bs(hu.current);if(l=s.type,i!==null&&s.stateNode!=null)lx(i,s,l,h,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=bs(Fr.current),Cc(s)){h=s.stateNode,l=s.type;var y=s.memoizedProps;switch(h[Mr]=s,h[uu]=y,i=(s.mode&1)!==0,l){case"dialog":Et("cancel",h),Et("close",h);break;case"iframe":case"object":case"embed":Et("load",h);break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],h);break;case"source":Et("error",h);break;case"img":case"image":case"link":Et("error",h),Et("load",h);break;case"details":Et("toggle",h);break;case"input":ds(h,y),Et("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},Et("invalid",h);break;case"textarea":wt(h,y),Et("invalid",h)}Zt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&Et("scroll",h)}switch(l){case"input":Kn(h),we(h,y,!0);break;case"textarea":Kn(h),st(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=yc)}h=g,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Mr]=s,i[uu]=h,ux(i,s,!1,!1),s.stateNode=i;e:{switch(x=Lr(l,h),l){case"dialog":Et("cancel",i),Et("close",i),g=h;break;case"iframe":case"object":case"embed":Et("load",i),g=h;break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],i);g=h;break;case"source":Et("error",i),g=h;break;case"img":case"image":case"link":Et("error",i),Et("load",i),g=h;break;case"details":Et("toggle",i),g=h;break;case"input":ds(i,h),g=_i(i,h),Et("invalid",i);break;case"option":g=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},g=S({},h,{value:void 0}),Et("invalid",i);break;case"textarea":wt(i,h),g=dt(i,h),Et("invalid",i);break;default:g=h}Zt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var D=I[y];y==="style"?wi(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&Ve(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&tt(i,D):typeof D=="number"&&tt(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&Et("scroll",i):D!=null&&R(i,y,D,x))}switch(l){case"input":Kn(i),we(i,h,!1);break;case"textarea":Kn(i),st(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Xe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=yc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dn(s),null;case 6:if(i&&s.stateNode!=null)cx(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=bs(hu.current),bs(Fr.current),Cc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Mr]=s,(y=h.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:Ec(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Ec(h.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Mr]=s,s.stateNode=h}return dn(s),null;case 13:if(yt(At),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(St&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)h_(),vo(),s.flags|=98560,y=!1;else if(y=Cc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Mr]=s}else vo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else mr!==null&&(Pm(mr),mr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(At.current&1)!==0?jt===0&&(jt=3):Dm())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return Io(),_m(i,s),i===null&&ou(s.stateNode.containerInfo),dn(s),null;case 10:return Kp(s.type._context),dn(s),null;case 17:return vn(s.type)&&Tc(),dn(s),null;case 19:if(yt(At),y=s.memoizedState,y===null)return dn(s),null;if(h=(s.flags&128)!==0,x=y.rendering,x===null)if(h)yu(y,!1);else{if(jt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ic(i),x!==null){for(s.flags|=128,yu(y,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)y=l,i=h,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Dt()>Do&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304)}else{if(!h)if(i=Ic(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),yu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!St)return dn(s),null}else 2*Dt()-y.renderingStartTime>Do&&l!==1073741824&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Dt(),s.sibling=null,l=At.current,mt(At,h?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return Lm(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function PF(i,s){switch($p(s),s.tag){case 1:return vn(s.type)&&Tc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Io(),yt(An),yt(ln),nm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return em(s),null;case 13:if(yt(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));vo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(At),null;case 4:return Io(),null;case 10:return Kp(s.type._context),null;case 22:case 23:return Lm(),null;case 24:return null;default:return null}}var Hc=!1,fn=!1,RF=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Ro(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function xm(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var dx=!1;function LF(i,s){if(Lp=oc,i=$2(),Ap(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,D=-1,G=0,se=0,ce=i,re=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(I=x+g),ce!==y||h!==0&&ce.nodeType!==3||(D=x+h),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)re=ce,ce=xe;for(;;){if(ce===i)break t;if(re===l&&++G===g&&(I=x),re===y&&++se===h&&(D=x),(xe=ce.nextSibling)!==null)break;ce=re,re=ce.parentNode}ce=xe}l=I===-1||D===-1?null:{start:I,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dp={focusedElem:i,selectionRange:l},oc=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Mt=Ae.memoizedState,z=s.stateNode,U=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Mt);z.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return Ae=dx,dx=!1,Ae}function bu(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&xm(s,l,y)}g=g.next}while(g!==h)}}function zc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function wm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function fx(i){var s=i.alternate;s!==null&&(i.alternate=null,fx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Mr],delete s[uu],delete s[Up],delete s[gF],delete s[EF])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function hx(i){return i.tag===5||i.tag===3||i.tag===4}function px(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||hx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=yc));else if(h!==4&&(i=i.child,i!==null))for(Sm(i,s,l),i=i.sibling;i!==null;)Sm(i,s,l),i=i.sibling}function Cm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Cm(i,s,l),i=i.sibling;i!==null;)Cm(i,s,l),i=i.sibling}var en=null,Er=!1;function Mi(i,s,l){for(l=l.child;l!==null;)mx(i,s,l),l=l.sibling}function mx(i,s,l){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ec,l)}catch(I){}switch(l.tag){case 5:fn||Ro(l,s);case 6:var h=en,g=Er;en=null,Mi(i,s,l),en=h,Er=g,en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?Bp(i.parentNode,l):i.nodeType===1&&Bp(i,l),Xa(i)):Bp(en,l.stateNode));break;case 4:h=en,g=Er,en=l.stateNode.containerInfo,Er=!0,Mi(i,s,l),en=h,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&xm(l,s,x),g=g.next}while(g!==h)}Mi(i,s,l);break;case 1:if(!fn&&(Ro(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Ot(l,s,I)}Mi(i,s,l);break;case 21:Mi(i,s,l);break;case 22:l.mode&1?(fn=(h=fn)||l.memoizedState!==null,Mi(i,s,l),fn=h):Mi(i,s,l);break;default:Mi(i,s,l)}}function gx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new RF),s.forEach(function(h){var g=$F.bind(null,i,h);l.has(h)||(l.add(h),h.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var y=i,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:en=I.stateNode,Er=!1;break e;case 3:en=I.stateNode.containerInfo,Er=!0;break e;case 4:en=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(en===null)throw Error(n(160));mx(y,x,g),en=null,Er=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(G){Ot(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Ex(s,i),s=s.sibling}function Ex(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Ur(i),h&4){try{bu(3,i,i.return),zc(3,i)}catch(ke){Ot(i,i.return,ke)}try{bu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return);break;case 5:if(yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return),i.flags&32){var g=i.stateNode;try{tt(g,"")}catch(ke){Ot(i,i.return,ke)}}if(h&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&xi(g,y),Lr(I,x);var G=Lr(I,y);for(x=0;x<D.length;x+=2){var se=D[x],ce=D[x+1];se==="style"?wi(g,ce):se==="dangerouslySetInnerHTML"?Ve(g,ce):se==="children"?tt(g,ce):R(g,se,ce,G)}switch(I){case"input":Zr(g,y);break;case"textarea":mn(g,y);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Xe(g,!!y.multiple,xe,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xe(g,!!y.multiple,y.defaultValue,!0):Xe(g,!!y.multiple,y.multiple?[]:"",!1))}g[uu]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(yr(s,i),Ur(i),h&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(yr(s,i),Ur(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Xa(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:yr(s,i),Ur(i);break;case 13:yr(s,i),Ur(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(km=Dt())),h&4&&gx(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(G=fn)||se,yr(s,i),fn=G):yr(s,i),Ur(i),h&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!se&&(i.mode&1)!==0)for(Se=i,se=i.child;se!==null;){for(ce=Se=se;Se!==null;){switch(re=Se,xe=re.child,re.tag){case 0:case 11:case 14:case 15:bu(4,re,re.return);break;case 1:Ro(re,re.return);var Ae=re.stateNode;if(typeof Ae.componentWillUnmount=="function"){h=re,l=re.return;try{s=h,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){Ot(h,l,ke)}}break;case 5:Ro(re,re.return);break;case 22:if(re.memoizedState!==null){Tx(ce);continue}}xe!==null?(xe.return=re,Se=xe):Tx(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,G?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,D=ce.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=Qn("display",x))}catch(ke){Ot(i,i.return,ke)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=G?"":ce.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Ur(i),h&4&&gx(i);break;case 21:break;default:yr(s,i),Ur(i)}}function Ur(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(hx(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(tt(g,""),h.flags&=-33);var y=px(i);Cm(i,y,g);break;case 3:case 4:var x=h.stateNode.containerInfo,I=px(i);Sm(i,I,x);break;default:throw Error(n(161))}}catch(D){Ot(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function DF(i,s,l){Se=i,yx(i)}function yx(i,s,l){for(var h=(i.mode&1)!==0;Se!==null;){var g=Se,y=g.child;if(g.tag===22&&h){var x=g.memoizedState!==null||Hc;if(!x){var I=g.alternate,D=I!==null&&I.memoizedState!==null||fn;I=Hc;var G=fn;if(Hc=x,(fn=D)&&!G)for(Se=g;Se!==null;)x=Se,D=x.child,x.tag===22&&x.memoizedState!==null?_x(g):D!==null?(D.return=x,Se=D):_x(g);for(;y!==null;)Se=y,yx(y),y=y.sibling;Se=g,Hc=I,fn=G}bx(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Se=y):bx(i)}}function bx(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||zc(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!fn)if(l===null)h.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&T_(s,y,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}T_(s,x,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var se=G.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Xa(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&wm(s)}catch(re){Ot(s,s.return,re)}}if(s===i){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function Tx(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function _x(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{zc(4,s)}catch(D){Ot(s,l,D)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var g=s.return;try{h.componentDidMount()}catch(D){Ot(s,g,D)}}var y=s.return;try{wm(s)}catch(D){Ot(s,y,D)}break;case 5:var x=s.return;try{wm(s)}catch(D){Ot(s,x,D)}}}catch(D){Ot(s,s.return,D)}if(s===i){Se=null;break}var I=s.sibling;if(I!==null){I.return=s.return,Se=I;break}Se=s.return}}var MF=Math.ceil,jc=W.ReactCurrentDispatcher,Am=W.ReactCurrentOwner,tr=W.ReactCurrentBatchConfig,nt=0,Qt=null,Ht=null,tn=0,zn=0,Lo=Ii(0),jt=0,Tu=null,_s=0,$c=0,vm=0,_u=null,Nn=null,km=0,Do=1/0,ui=null,Vc=!1,Nm=null,Fi=null,qc=!1,Bi=null,Yc=0,xu=0,Om=null,Wc=-1,Gc=0;function En(){return(nt&6)!==0?Dt():Wc!==-1?Wc:Wc=Dt()}function Ui(i){return(i.mode&1)===0?1:(nt&2)!==0&&tn!==0?tn&-tn:bF.transition!==null?(Gc===0&&(Gc=p2()),Gc):(i=lt,i!==0||(i=window.event,i=i===void 0?16:w2(i.type)),i)}function br(i,s,l,h){if(50<xu)throw xu=0,Om=null,Error(n(185));Ya(i,l,h),((nt&2)===0||i!==Qt)&&(i===Qt&&((nt&2)===0&&($c|=l),jt===4&&Hi(i,tn)),On(i,h),l===1&&nt===0&&(s.mode&1)===0&&(Do=Dt()+500,xc&&Ri()))}function On(i,s){var l=i.callbackNode;bM(i,s);var h=rc(i,i===Qt?tn:0);if(h===0)l!==null&&d2(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&d2(l),s===1)i.tag===0?yF(wx.bind(null,i)):u_(wx.bind(null,i)),pF(function(){(nt&6)===0&&Ri()}),l=null;else{switch(m2(h)){case 1:l=lp;break;case 4:l=f2;break;case 16:l=Zl;break;case 536870912:l=h2;break;default:l=Zl}l=Ix(l,xx.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function xx(i,s){if(Wc=-1,Gc=0,(nt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Mo()&&i.callbackNode!==l)return null;var h=rc(i,i===Qt?tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Kc(i,h);else{s=h;var g=nt;nt|=2;var y=Cx();(Qt!==i||tn!==s)&&(ui=null,Do=Dt()+500,ws(i,s));do try{UF();break}catch(I){Sx(i,I)}while(!0);Gp(),jc.current=y,nt=g,Ht!==null?s=0:(Qt=null,tn=0,s=jt)}if(s!==0){if(s===2&&(g=cp(i),g!==0&&(h=g,s=Im(i,g))),s===1)throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;if(s===6)Hi(i,h);else{if(g=i.current.alternate,(h&30)===0&&!FF(g)&&(s=Kc(i,h),s===2&&(y=cp(i),y!==0&&(h=y,s=Im(i,y))),s===1))throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;switch(i.finishedWork=g,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Ss(i,Nn,ui);break;case 3:if(Hi(i,h),(h&130023424)===h&&(s=km+500-Dt(),10<s)){if(rc(i,0)!==0)break;if(g=i.suspendedLanes,(g&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Fp(Ss.bind(null,i,Nn,ui),s);break}Ss(i,Nn,ui);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,g=-1;0<h;){var x=31-hr(h);y=1<<x,x=s[x],x>g&&(g=x),h&=~y}if(h=g,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*MF(h/1960))-h,10<h){i.timeoutHandle=Fp(Ss.bind(null,i,Nn,ui),h);break}Ss(i,Nn,ui);break;case 5:Ss(i,Nn,ui);break;default:throw Error(n(329))}}}return On(i,Dt()),i.callbackNode===l?xx.bind(null,i):null}function Im(i,s){var l=_u;return i.current.memoizedState.isDehydrated&&(ws(i,s).flags|=256),i=Kc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Pm(s)),i}function Pm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function FF(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var g=l[h],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Hi(i,s){for(s&=~vm,s&=~$c,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),h=1<<l;i[l]=-1,s&=~h}}function wx(i){if((nt&6)!==0)throw Error(n(327));Mo();var s=rc(i,0);if((s&1)===0)return On(i,Dt()),null;var l=Kc(i,s);if(i.tag!==0&&l===2){var h=cp(i);h!==0&&(s=h,l=Im(i,h))}if(l===1)throw l=Tu,ws(i,0),Hi(i,s),On(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ss(i,Nn,ui),On(i,Dt()),null}function Rm(i,s){var l=nt;nt|=1;try{return i(s)}finally{nt=l,nt===0&&(Do=Dt()+500,xc&&Ri())}}function xs(i){Bi!==null&&Bi.tag===0&&(nt&6)===0&&Mo();var s=nt;nt|=1;var l=tr.transition,h=lt;try{if(tr.transition=null,lt=1,i)return i()}finally{lt=h,tr.transition=l,nt=s,(nt&6)===0&&Ri()}}function Lm(){zn=Lo.current,yt(Lo)}function ws(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,hF(l)),Ht!==null)for(l=Ht.return;l!==null;){var h=l;switch($p(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Tc();break;case 3:Io(),yt(An),yt(ln),nm();break;case 5:em(h);break;case 4:Io();break;case 13:yt(At);break;case 19:yt(At);break;case 10:Kp(h.type._context);break;case 22:case 23:Lm()}l=l.return}if(Qt=i,Ht=i=zi(i.current,null),tn=zn=s,jt=0,Tu=null,vm=$c=_s=0,Nn=_u=null,ys!==null){for(s=0;s<ys.length;s++)if(l=ys[s],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,h.next=x}l.pending=h}ys=null}return i}function Sx(i,s){do{var l=Ht;try{if(Gp(),Pc.current=Mc,Rc){for(var h=vt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Rc=!1}if(Ts=0,Kt=zt=vt=null,pu=!1,mu=0,Am.current=null,l===null||l.return===null){jt=1,Tu=s,Ht=null;break}e:{var y=i,x=l.return,I=l,D=s;if(s=tn,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var G=D,se=I,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var re=se.alternate;re?(se.updateQueue=re.updateQueue,se.memoizedState=re.memoizedState,se.lanes=re.lanes):(se.updateQueue=null,se.memoizedState=null)}var xe=K_(x);if(xe!==null){xe.flags&=-257,Q_(xe,x,I,y,s),xe.mode&1&&G_(y,G,s),s=xe,D=G;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else Ae.add(D);break e}else{if((s&1)===0){G_(y,G,s),Dm();break e}D=Error(n(426))}}else if(St&&I.mode&1){var Mt=K_(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Q_(Mt,x,I,y,s),Yp(Po(D,I));break e}}y=D=Po(D,I),jt!==4&&(jt=2),_u===null?_u=[y]:_u.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=Y_(y,D,s);b_(y,z);break e;case 1:I=D;var U=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Fi===null||!Fi.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=W_(y,I,s);b_(y,Ee);break e}}y=y.return}while(y!==null)}vx(l)}catch(Ne){s=Ne,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function Cx(){var i=jc.current;return jc.current=Mc,i===null?Mc:i}function Dm(){(jt===0||jt===3||jt===2)&&(jt=4),Qt===null||(_s&268435455)===0&&($c&268435455)===0||Hi(Qt,tn)}function Kc(i,s){var l=nt;nt|=2;var h=Cx();(Qt!==i||tn!==s)&&(ui=null,ws(i,s));do try{BF();break}catch(g){Sx(i,g)}while(!0);if(Gp(),nt=l,jc.current=h,Ht!==null)throw Error(n(261));return Qt=null,tn=0,jt}function BF(){for(;Ht!==null;)Ax(Ht)}function UF(){for(;Ht!==null&&!cM();)Ax(Ht)}function Ax(i){var s=Ox(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?vx(i):Ht=s,Am.current=null}function vx(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=IF(l,s,zn),l!==null){Ht=l;return}}else{if(l=PF(l,s),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{jt=6,Ht=null;return}}if(s=s.sibling,s!==null){Ht=s;return}Ht=s=i}while(s!==null);jt===0&&(jt=5)}function Ss(i,s,l){var h=lt,g=tr.transition;try{tr.transition=null,lt=1,HF(i,s,l,h)}finally{tr.transition=g,lt=h}return null}function HF(i,s,l,h){do Mo();while(Bi!==null);if((nt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(TM(i,y),i===Qt&&(Ht=Qt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||qc||(qc=!0,Ix(Zl,function(){return Mo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var x=lt;lt=1;var I=nt;nt|=4,Am.current=null,LF(i,l),Ex(l,i),oF(Dp),oc=!!Lp,Dp=Lp=null,i.current=l,DF(l),dM(),nt=I,lt=x,tr.transition=y}else i.current=l;if(qc&&(qc=!1,Bi=i,Yc=g),y=i.pendingLanes,y===0&&(Fi=null),pM(l.stateNode),On(i,Dt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(Vc)throw Vc=!1,i=Nm,Nm=null,i;return(Yc&1)!==0&&i.tag!==0&&Mo(),y=i.pendingLanes,(y&1)!==0?i===Om?xu++:(xu=0,Om=i):xu=0,Ri(),null}function Mo(){if(Bi!==null){var i=m2(Yc),s=tr.transition,l=lt;try{if(tr.transition=null,lt=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,Yc=0,(nt&6)!==0)throw Error(n(331));var g=nt;for(nt|=4,Se=i.current;Se!==null;){var y=Se,x=y.child;if((Se.flags&16)!==0){var I=y.deletions;if(I!==null){for(var D=0;D<I.length;D++){var G=I[D];for(Se=G;Se!==null;){var se=Se;switch(se.tag){case 0:case 11:case 15:bu(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,Se=ce;else for(;Se!==null;){se=Se;var re=se.sibling,xe=se.return;if(fx(se),se===G){Se=null;break}if(re!==null){re.return=xe,Se=re;break}Se=xe}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}Se=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Se=x;else e:for(;Se!==null;){if(y=Se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:bu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Se=z;break e}Se=y.return}}var U=i.current;for(Se=U;Se!==null;){x=Se;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Se=V;else e:for(x=U;Se!==null;){if(I=Se,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:zc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===x){Se=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Se=Ee;break e}Se=I.return}}if(nt=g,Ri(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ec,i)}catch(Ne){}h=!0}return h}finally{lt=l,tr.transition=s}}return!1}function kx(i,s,l){s=Po(l,s),s=Y_(i,s,1),i=Di(i,s,1),s=En(),i!==null&&(Ya(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)kx(i,i,l);else for(;s!==null;){if(s.tag===3){kx(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Po(l,i),i=W_(s,i,1),s=Di(s,i,1),i=En(),s!==null&&(Ya(s,1,i),On(s,i));break}}s=s.return}}function zF(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Qt===i&&(tn&l)===l&&(jt===4||jt===3&&(tn&130023424)===tn&&500>Dt()-km?ws(i,0):vm|=l),On(i,s)}function Nx(i,s){s===0&&((i.mode&1)===0?s=1:(s=nc,nc<<=1,(nc&130023424)===0&&(nc=4194304)));var l=En();i=si(i,s),i!==null&&(Ya(i,s,l),On(i,l))}function jF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Nx(i,l)}function $F(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),Nx(i,l)}var Ox;Ox=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,OF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,St&&(s.flags&1048576)!==0&&l_(s,Sc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Uc(i,s),i=s.pendingProps;var g=So(s,ln.current);Oo(s,l),g=sm(null,s,h,i,g,l);var y=om();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(h)?(y=!0,_c(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Jp(s),g.updater=Fc,s.stateNode=g,g._reactInternals=s,fm(s,h,i,l),s=gm(null,s,h,!0,y,l)):(s.tag=0,St&&y&&jp(s),gn(null,s,g,l),s=s.child),s;case 16:h=s.elementType;e:{switch(Uc(i,s),i=s.pendingProps,g=h._init,h=g(h._payload),s.type=h,g=s.tag=qF(h),i=gr(h,i),g){case 0:s=mm(null,s,h,i,l);break e;case 1:s=nx(null,s,h,i,l);break e;case 11:s=X_(null,s,h,i,l);break e;case 14:s=J_(null,s,h,gr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),mm(i,s,h,g,l);case 1:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),nx(i,s,h,g,l);case 3:e:{if(rx(s),i===null)throw Error(n(387));h=s.pendingProps,y=s.memoizedState,g=y.element,y_(i,s),Oc(s,h,null,l);var x=s.memoizedState;if(h=x.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Po(Error(n(423)),s),s=ix(i,s,h,l,g);break e}else if(h!==g){g=Po(Error(n(424)),s),s=ix(i,s,h,l,g);break e}else for(Hn=Oi(s.stateNode.containerInfo.firstChild),Un=s,St=!0,mr=null,l=g_(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(vo(),h===g){s=ai(i,s,l);break e}gn(i,s,h,l)}s=s.child}return s;case 5:return __(s),i===null&&qp(s),h=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Mp(h,g)?x=null:y!==null&&Mp(h,y)&&(s.flags|=32),tx(i,s),gn(i,s,x,l),s.child;case 6:return i===null&&qp(s),null;case 13:return sx(i,s,l);case 4:return Zp(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ko(s,null,h,l):gn(i,s,h,l),s.child;case 11:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),X_(i,s,h,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,mt(vc,h._currentValue),h._currentValue=x,y!==null)if(pr(y.value,x)){if(y.children===g.children&&!An.current){s=ai(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var D=I.firstContext;D!==null;){if(D.context===h){if(y.tag===1){D=oi(-1,l&-l),D.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var se=G.pending;se===null?D.next=D:(D.next=se.next,se.next=D),G.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Qp(y.return,l,s),I.lanes|=l;break}D=D.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),Qp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,h=s.pendingProps.children,Oo(s,l),g=Zn(g),h=h(g),s.flags|=1,gn(i,s,h,l),s.child;case 14:return h=s.type,g=gr(h,s.pendingProps),g=gr(h.type,g),J_(i,s,h,g,l);case 15:return Z_(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Uc(i,s),s.tag=1,vn(h)?(i=!0,_c(s)):i=!1,Oo(s,l),V_(s,h,g),fm(s,h,g,l),gm(null,s,h,!0,i,l);case 19:return ax(i,s,l);case 22:return ex(i,s,l)}throw Error(n(156,s.tag))};function Ix(i,s){return c2(i,s)}function VF(i,s,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,s,l,h){return new VF(i,s,l,h)}function Mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function qF(i){if(typeof i=="function")return Mm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===be)return 14}return 2}function zi(i,s){var l=i.alternate;return l===null?(l=nr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Qc(i,s,l,h,g,y){var x=2;if(h=i,typeof i=="function")Mm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return Cs(l.children,g,y,s);case ge:x=8,g|=8;break;case ye:return i=nr(12,l,s,g|2),i.elementType=ye,i.lanes=y,i;case ue:return i=nr(13,l,s,g),i.elementType=ue,i.lanes=y,i;case de:return i=nr(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return Xc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case M:x=10;break e;case ae:x=9;break e;case he:x=11;break e;case be:x=14;break e;case Ce:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(x,l,s,g),s.elementType=i,s.type=h,s.lanes=y,s}function Cs(i,s,l,h){return i=nr(7,i,h,s),i.lanes=l,i}function Xc(i,s,l,h){return i=nr(22,i,h,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function Fm(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function Bm(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function YF(i,s,l,h,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dp(0),this.expirationTimes=dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dp(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Um(i,s,l,h,g,y,x,I,D){return i=new YF(i,s,l,I,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jp(y),i}function WF(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Px(i){if(!i)return Pi;i=i._reactInternals;e:{if(hs(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return o_(i,l,s)}return s}function Rx(i,s,l,h,g,y,x,I,D){return i=Um(l,h,!0,i,g,y,x,I,D),i.context=Px(null),l=i.current,h=En(),g=Ui(l),y=oi(h,g),y.callback=s!=null?s:null,Di(l,y,g),i.current.lanes=g,Ya(i,g,h),On(i,h),i}function Jc(i,s,l,h){var g=s.current,y=En(),x=Ui(g);return l=Px(l),s.context===null?s.context=l:s.pendingContext=l,s=oi(y,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Di(g,s,x),i!==null&&(br(i,g,x,y),Nc(i,g,x)),x}function Zc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Lx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Hm(i,s){Lx(i,s),(i=i.alternate)&&Lx(i,s)}function GF(){return null}var Dx=typeof reportError=="function"?reportError:function(i){console.error(i)};function zm(i){this._internalRoot=i}ed.prototype.render=zm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Jc(i,s,null,null)},ed.prototype.unmount=zm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;xs(function(){Jc(null,i,null,null)}),s[ti]=null}};function ed(i){this._internalRoot=i}ed.prototype.unstable_scheduleHydration=function(i){if(i){var s=y2();i={blockedOn:null,target:i,priority:s};for(var l=0;l<vi.length&&s!==0&&s<vi[l].priority;l++);vi.splice(l,0,i),l===0&&_2(i)}};function jm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function td(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Mx(){}function KF(i,s,l,h,g){if(g){if(typeof h=="function"){var y=h;h=function(){var G=Zc(x);y.call(G)}}var x=Rx(s,h,i,0,null,!1,!1,"",Mx);return i._reactRootContainer=x,i[ti]=x.current,ou(i.nodeType===8?i.parentNode:i),xs(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof h=="function"){var I=h;h=function(){var G=Zc(D);I.call(G)}}var D=Um(i,0,!1,null,null,!1,!1,"",Mx);return i._reactRootContainer=D,i[ti]=D.current,ou(i.nodeType===8?i.parentNode:i),xs(function(){Jc(s,D,l,h)}),D}function nd(i,s,l,h,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var D=Zc(x);I.call(D)}}Jc(s,x,i,g)}else x=KF(l,s,i,g,h);return Zc(x)}g2=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=qa(s.pendingLanes);l!==0&&(fp(s,l|1),On(s,Dt()),(nt&6)===0&&(Do=Dt()+500,Ri()))}break;case 13:xs(function(){var h=si(i,1);if(h!==null){var g=En();br(h,i,1,g)}}),Hm(i,1)}},hp=function(i){if(i.tag===13){var s=si(i,134217728);if(s!==null){var l=En();br(s,i,134217728,l)}Hm(i,134217728)}},E2=function(i){if(i.tag===13){var s=Ui(i),l=si(i,s);if(l!==null){var h=En();br(l,i,s,h)}Hm(i,s)}},y2=function(){return lt},b2=function(i,s){var l=lt;try{return lt=i,s()}finally{lt=l}},sp=function(i,s,l){switch(s){case"input":if(Zr(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var g=bc(h);if(!g)throw Error(n(90));cs(h),Zr(h,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&Xe(i,!!l.multiple,s,!1)}},r2=Rm,i2=xs;var QF={usingClientEntryPoint:!1,Events:[lu,xo,bc,t2,n2,Rm]},wu={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},XF={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=u2(i),i===null?null:i.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||GF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{ec=rd.inject(XF),Dr=rd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QF,Cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jm(s))throw Error(n(200));return WF(i,s,null,l)},Cn.createRoot=function(i,s){if(!jm(i))throw Error(n(299));var l=!1,h="",g=Dx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Um(i,1,!1,null,null,l,!1,h,g),i[ti]=s.current,ou(i.nodeType===8?i.parentNode:i),new zm(s)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=u2(s),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return xs(i)},Cn.hydrate=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!0,l)},Cn.hydrateRoot=function(i,s,l){if(!jm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,g=!1,y="",x=Dx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=Rx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ti]=s.current,ou(i),h)for(i=0;i<h.length;i++)l=h[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new ed(s)},Cn.render=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!1,l)},Cn.unmountComponentAtNode=function(i){if(!td(i))throw Error(n(40));return i._reactRootContainer?(xs(function(){nd(null,null,i,!1,function(){i._reactRootContainer=null,i[ti]=null})}),!0):!1},Cn.unstable_batchedUpdates=Rm,Cn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!td(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return nd(i,s,l,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var eb;function tb(){if(eb)return gh.exports;eb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),gh.exports=WL(),gh.exports}var Ia=tb();function GL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var bh=()=>e=>Array.from(new Set(e)),nb=typeof globalThis.document!="undefined"?$.useLayoutEffect:$.useEffect;function Pl(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=$.useState(t),[o,a]=$.useState(r),u=e().value!==void 0,c=$.useRef(o);c.current=u?e().value:o;const d=$.useRef(c.current);nb(()=>{d.current=c.current},[o,e().value]);const f=b=>{var k,v;const _=d.current,w=Xs(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(v=(k=e()).onChange)==null||v.call(k,w,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(b){(e().sync?Ia.flushSync:qR)(()=>f(b))},invoke(b,_){var w,k;(k=(w=e()).onChange)==null||k.call(w,b,_)},hash(b){var _,w,k;return(k=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?k:String(b)}}}Pl.cleanup=e=>{$.useEffect(()=>e,[])},Pl.ref=e=>{const t=$.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function KL(e){const t=$.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var QL=(e,t)=>{const n=$.useRef(!1),r=$.useRef(!1);$.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),$.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Th(e,t={}){var ae,he,ue,de,be,Ce;const n=$.useMemo(()=>{const{id:oe,ids:q,getRootNode:ne}=t;return VL({id:oe,ids:q,getRootNode:ne})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:sh(t),scope:n}))!=null?he:t,a=XL(o),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Pl,scope:n,flush:ib,getContext(){return d},getComputed(){return X},getRefs(){return w},getEvent(){return b()}}),c=rb(u),d={get(oe){var q;return(q=c.current)==null?void 0:q[oe].ref.current},set(oe,q){var ne;(ne=c.current)==null||ne[oe].set(q)},initial(oe){var q;return(q=c.current)==null?void 0:q[oe].initial},hash(oe){var ne,S;const q=(ne=c.current)==null?void 0:ne[oe].get();return(S=c.current)==null?void 0:S[oe].hash(q)}},f=$.useRef(new Map),p=$.useRef(null),E=$.useRef(null),T=$.useRef({type:""}),b=()=>Te(H({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>Te(H({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(oe))}}),w=KL((be=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?be:{}),k=()=>({state:_(),context:d,event:b(),prop:a,send:M,action:v,guard:F,track:QL,refs:w,computed:X,flush:ib,scope:n,choose:W}),v=oe=>{const q=Xs(oe)?oe(k()):oe;if(!q)return;const ne=q.map(S=>{var K,O;const L=(O=(K=e.implementations)==null?void 0:K.actions)==null?void 0:O[S];return L||oh(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),L});for(const S of ne)S==null||S(k())},F=oe=>{var q,ne;return Xs(oe)?oe(k()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[oe](k())},R=oe=>{const q=Xs(oe)?oe(k()):oe;if(!q)return;const ne=q.map(L=>{var O,_e;const K=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[L];return K||oh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),K}),S=[];for(const L of ne){const K=L==null?void 0:L(k());K&&S.push(K)}return()=>S.forEach(L=>L==null?void 0:L())},W=oe=>DR(oe).find(q=>{let ne=!q.guard;return Cl(q.guard)?ne=!!F(q.guard):Xs(q.guard)&&(ne=q.guard(k())),ne}),X=oe=>{WR(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[oe];return q({context:d,event:b(),prop:a,refs:w,scope:n,computed:X})},B=Pl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,q){var S,L,K,O;if(q){const _e=f.current.get(q);_e==null||_e(),f.current.delete(q)}q&&v((S=e.states[q])==null?void 0:S.exit),v((L=p.current)==null?void 0:L.actions);const ne=R((K=e.states[oe])==null?void 0:K.effects);if(ne&&f.current.set(oe,ne),q===mh){v(e.entry);const _e=R(e.effects);_e&&f.current.set(mh,_e)}v((O=e.states[oe])==null?void 0:O.entry)}})),te=$.useRef(void 0),ge=$.useRef(eo.NotStarted);nb(()=>{queueMicrotask(()=>{var L;const ne=ge.current===eo.Started;ge.current=eo.Started,r(ne?"rehydrating...":"initializing...");const S=(L=te.current)!=null?L:B.initial;B.invoke(S,ne?B.get():mh)});const oe=f.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=eo.Stopped,oe.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const ye=()=>"ref"in B?B.ref.current:B.get(),M=oe=>{queueMicrotask(()=>{var O,_e,Re,Oe,Ge;if(ge.current!==eo.Started)return;E.current=T.current,T.current=oe;let q=ye();const ne=(Re=(O=e.states[q].on)==null?void 0:O[oe.type])!=null?Re:(_e=e.on)==null?void 0:_e[oe.type],S=W(ne);if(!S)return;p.current=S;const L=(Oe=S.target)!=null?Oe:q;r("transition",oe.type,S.target||q,`(${S.actions})`);const K=L!==q;K?Ia.flushSync(()=>B.set(L)):S.reenter&&!K?B.invoke(q,q):v((Ge=S.actions)!=null?Ge:[])})};return(Ce=e.watch)==null||Ce.call(e,k()),{state:_(),send:M,context:d,prop:a,scope:n,refs:w,computed:X,event:b(),getStatus:()=>ge.current}}function rb(e){const t=$.useRef(e);return t.current=e,t}function XL(e){const t=rb(e);return function(r){return t.current[r]}}function ib(e){queueMicrotask(()=>{Ia.flushSync(()=>e())})}var sb=GL(e=>e);function Rl(...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 JL(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const _h=e=>{const t=$.memo($.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=nn(f,["asChild","children"]);if(!o)return $.createElement(e,Te(H({},u),{ref:r}),a);if(!$.isValidElement(a))return null;const c=$.Children.only(a),d=JL(c);return $.cloneElement(c,Te(H({},cr(u,c.props)),{ref:r?Rl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yi=(()=>{const e=new Map;return new Proxy(_h,{apply(t,n,r){return _h(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,_h(r)),e.get(r)}})})();function ZL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function to(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=$.createContext(u);c.displayName=t;function d(){var p;const f=$.useContext(c);if(!f&&n){const E=new Error(a!=null?a:ZL(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return f}return[c.Provider,d,c]}const[e6,xh]=to({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ob,Pa]=to({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ab=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});ab.displayName="PopoverContent";const ub=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(n.getPositionerProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:t}))});ub.displayName="PopoverPositioner";const lb=()=>(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]},[{},H({},e)]),cb=e=>lb()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function t6(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var n6={props({props:e}){return Te(H({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Nl(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"});Sn(()=>{var c,d;const u=Ll(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})=>{Sn(()=>{e.set("prevAnimationName",Ll(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,E,T;((T=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Ll(t.get("styles")))},u=d=>{const f=Ll(t.get("styles"));Yr(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=Il(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),PL(()=>c())}}}}};function Ll(e){return(e==null?void 0:e.animationName)||"none"}bh()(["onExitComplete","present","immediate"]);function r6(e,t={}){const{sync:n=!1}=t,r=i6(e);return $.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 i6(e){const t=$.useRef(e);return t.current=e,t}const wh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=nn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=$.useRef(!1),c=Te(H({},a),{present:r,onExitComplete:r6(e.onExitComplete)}),d=Th(n6,c),f=t6(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,E=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:E,present:f.present,unmounted:p}};var no=(e,t=[])=>({parts:(...n)=>{if(s6(t))return no(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>no(e,[...t,...n]),omit:(...n)=>no(e,t.filter(r=>!n.includes(r))),rename:n=>no(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ro(e)}"][data-part="${ro(r)}"]`,`& [data-scope="${ro(e)}"][data-part="${ro(r)}"]`].join(", "),attrs:{"data-scope":ro(e),"data-part":ro(r)}}}),{})}),ro=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),s6=e=>e.length===0;const o6=["top","right","bottom","left"],bi=Math.min,Dn=Math.max,Dl=Math.round,Ml=Math.floor,kr=e=>({x:e,y:e}),a6={left:"right",right:"left",bottom:"top",top:"bottom"},u6={start:"end",end:"start"};function Sh(e,t,n){return Dn(e,bi(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function io(e){return e.split("-")[1]}function Ch(e){return e==="x"?"y":"x"}function Ah(e){return e==="y"?"height":"width"}const l6=new Set(["top","bottom"]);function Nr(e){return l6.has(Kr(e))?"y":"x"}function vh(e){return Ch(Nr(e))}function c6(e,t,n){n===void 0&&(n=!1);const r=io(e),o=vh(e),a=Ah(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Fl(u)),[u,Fl(u)]}function d6(e){const t=Fl(e);return[kh(e),t,kh(t)]}function kh(e){return e.replace(/start|end/g,t=>u6[t])}const db=["left","right"],fb=["right","left"],f6=["top","bottom"],h6=["bottom","top"];function p6(e,t,n){switch(e){case"top":case"bottom":return n?t?fb:db:t?db:fb;case"left":case"right":return t?f6:h6;default:return[]}}function m6(e,t,n,r){const o=io(e);let a=p6(Kr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(kh)))),a}function Fl(e){return e.replace(/left|right|bottom|top/g,t=>a6[t])}function g6(e){return H({top:0,right:0,bottom:0,left:0},e)}function hb(e){return typeof e!="number"?g6(e):{top:e,right:e,bottom:e,left:e}}function Bl(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 pb(e,t,n){let{reference:r,floating:o}=e;const a=Nr(t),u=vh(t),c=Ah(u),d=Kr(t),f=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:p,y:r.y-o.height};break;case"bottom":b={x:p,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(io(t)){case"start":b[u]-=T*(n&&f?-1:1);break;case"end":b[u]+=T*(n&&f?-1:1);break}return b}const E6=(e,t,n)=>rt(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:E}=pb(f,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:k,fn:v}=c[w],{x:F,y:R,data:W,reset:X}=yield v({x:p,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});p=F!=null?F:p,E=R!=null?R:E,b=Te(H({},b),{[k]:H(H({},b[k]),W)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(T=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:p,y:E}=pb(f,T,d)),w=-1)}return{x:p,y:E,placement:T,strategy:o,middlewareData:b}});function Ra(e,t){return rt(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:E="floating",altBoundary:T=!1,padding:b=0}=Gr(t,e),_=hb(b),k=c[T?E==="floating"?"reference":"floating":E],v=Bl(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})),F=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),W=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},X=Bl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:R,strategy:d}):F);return{top:(v.top-X.top+_.top)/W.y,bottom:(X.bottom-v.bottom+_.bottom)/W.y,left:(v.left-X.left+_.left)/W.x,right:(X.right-v.right+_.right)/W.x}})}const y6=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:E=0}=Gr(e,n)||{};if(p==null)return{};const T=hb(E),b={x:r,y:o},_=vh(a),w=Ah(_),k=yield c.getDimensions(p),v=_==="y",F=v?"top":"left",R=v?"bottom":"right",W=v?"clientHeight":"clientWidth",X=u.reference[w]+u.reference[_]-b[_]-u.floating[w],B=b[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ge=te?te[W]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[W]||u.floating[w]);const ye=X/2-B/2,M=ge/2-k[w]/2-1,ae=bi(T[F],M),he=bi(T[R],M),ue=ae,de=ge-k[w]-he,be=ge/2-k[w]/2+ye,Ce=Sh(ue,be,de),oe=!f.arrow&&io(a)!=null&&be!==Ce&&u.reference[w]/2-(be<ue?ae:he)-k[w]/2<0,q=oe?be<ue?be-ue:be-de:0;return{[_]:b[_]+q,data:H({[_]:Ce,centerOffset:be-Ce-q},oe&&{alignmentOffset:q}),reset:oe}})}}),b6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=Gr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:k=!0}=be,v=nn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Kr(a),R=Nr(d),W=Kr(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),B=b||(W||!k?[Fl(d)]:d6(d)),te=w!=="none";!b&&te&&B.push(...m6(d,k,w,X));const ge=[d,...B],ye=yield Ra(n,v),M=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&M.push(ye[F]),T){const Ce=c6(a,c,X);M.push(ye[Ce[0]],ye[Ce[1]])}if(ae=[...ae,{placement:a,overflows:M}],!M.every(Ce=>Ce<=0)){var he,ue;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=ge[Ce];if(oe&&(!(T==="alignment"?R!==Nr(oe):!1)||ae.every(S=>Nr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ae},reset:{placement:oe}};let q=(ue=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,S)=>ne.overflows[1]-S.overflows[1])[0])==null?void 0:ue.placement;if(!q)switch(_){case"bestFit":{var de;const ne=(de=ae.filter(S=>{if(te){const L=Nr(S.placement);return L===R||L==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(L=>L>0).reduce((L,K)=>L+K,0)]).sort((S,L)=>S[1]-L[1])[0])==null?void 0:de[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function mb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gb(e){return o6.some(t=>e[t]>=0)}const T6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,u=Gr(e,n),{strategy:o="referenceHidden"}=u,a=nn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ra(n,Te(H({},a),{elementContext:"reference"})),d=mb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:gb(d)}}}case"escaped":{const c=yield Ra(n,Te(H({},a),{altBoundary:!0})),d=mb(c,r.floating);return{data:{escapedOffsets:d,escaped:gb(d)}}}default:return{}}})}}},Eb=new Set(["left","top"]);function _6(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Kr(n),c=io(n),d=Nr(n)==="y",f=Eb.has(u)?-1:1,p=a&&d?-1:1,E=Gr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*p,y:T*f}:{x:T*f,y:b*p}})}const x6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield _6(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:Te(H({},f),{placement:c})}})}}},w6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a}=n,v=Gr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:F=>{let{x:R,y:W}=F;return{x:R,y:W}}}}=v,f=nn(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield Ra(n,f),T=Nr(Kr(a)),b=Ch(T);let _=p[b],w=p[T];if(u){const F=b==="y"?"top":"left",R=b==="y"?"bottom":"right",W=_+E[F],X=_-E[R];_=Sh(W,_,X)}if(c){const F=T==="y"?"top":"left",R=T==="y"?"bottom":"right",W=w+E[F],X=w-E[R];w=Sh(W,w,X)}const k=d.fn(Te(H({},n),{[b]:_,[T]:w}));return Te(H({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[b]:u,[T]:c}}})})}}},S6=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}=Gr(e,t),p={x:n,y:r},E=Nr(o),T=Ch(E);let b=p[T],_=p[E];const w=Gr(c,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:H({mainAxis:0,crossAxis:0},w);if(d){const R=T==="y"?"height":"width",W=a.reference[T]-a.floating[R]+k.mainAxis,X=a.reference[T]+a.reference[R]-k.mainAxis;b<W?b=W:b>X&&(b=X)}if(f){var v,F;const R=T==="y"?"width":"height",W=Eb.has(Kr(o)),X=a.reference[E]-a.floating[R]+(W&&((v=u.offset)==null?void 0:v[E])||0)+(W?0:k.crossAxis),B=a.reference[E]+a.reference[R]+(W?0:((F=u.offset)==null?void 0:F[E])||0)-(W?k.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[T]:b,[E]:_}}}},C6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=Gr(e,n),{apply:f=()=>{}}=ae,p=nn(ae,["apply"]),E=yield Ra(n,p),T=Kr(a),b=io(a),_=Nr(a)==="y",{width:w,height:k}=u.floating;let v,F;T==="top"||T==="bottom"?(v=T,F=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(F=T,v=b==="end"?"top":"bottom");const R=k-E.top-E.bottom,W=w-E.left-E.right,X=bi(k-E[v],R),B=bi(w-E[F],W),te=!n.middlewareData.shift;let ge=X,ye=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=W),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=R),te&&!b){const he=Dn(E.left,0),ue=Dn(E.right,0),de=Dn(E.top,0),be=Dn(E.bottom,0);_?ye=w-2*(he!==0||ue!==0?he+ue:Dn(E.left,E.right)):ge=k-2*(de!==0||be!==0?de+be:Dn(E.top,E.bottom))}yield f(Te(H({},n),{availableWidth:ye,availableHeight:ge}));const M=yield c.getDimensions(d.floating);return w!==M.width||k!==M.height?{reset:{rects:!0}}:{}})}}};function Ul(){return typeof window!="undefined"}function so(e){return yb(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(yb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yb(e){return Ul()?e instanceof Node||e instanceof Mn(e).Node:!1}function dr(e){return Ul()?e instanceof Element||e instanceof Mn(e).Element:!1}function Ir(e){return Ul()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function bb(e){return!Ul()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const A6=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!A6.has(o)}const v6=new Set(["table","td","th"]);function k6(e){return v6.has(so(e))}const N6=[":popover-open",":modal"];function Hl(e){return N6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const O6=["transform","translate","scale","rotate","perspective"],I6=["transform","translate","scale","rotate","perspective","filter"],P6=["paint","layout","strict","content"];function Nh(e){const t=Oh(),n=dr(e)?fr(e):e;return O6.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)||I6.some(r=>(n.willChange||"").includes(r))||P6.some(r=>(n.contain||"").includes(r))}function R6(e){let t=Ti(e);for(;Ir(t)&&!oo(t);){if(Nh(t))return t;if(Hl(t))return null;t=Ti(t)}return null}function Oh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const L6=new Set(["html","body","#document"]);function oo(e){return L6.has(so(e))}function fr(e){return Mn(e).getComputedStyle(e)}function zl(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ti(e){if(so(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bb(e)&&e.host||Or(e);return bb(t)?t.host:t}function Tb(e){const t=Ti(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ir(t)&&La(t)?t:Tb(t)}function Da(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Tb(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=Ih(u);return t.concat(u,u.visualViewport||[],La(o)?o:[],c&&n?Da(c):[])}return t.concat(o,Da(o,[],n))}function Ih(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _b(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ir(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Dl(n)!==a||Dl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Ph(e){return dr(e)?e:e.contextElement}function ao(e){const t=Ph(e);if(!Ir(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=_b(t);let u=(a?Dl(n.width):n.width)/r,c=(a?Dl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const D6=kr(0);function xb(e){const t=Mn(e);return!Oh()||!t.visualViewport?D6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function as(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ph(e);let u=kr(1);t&&(r?dr(r)&&(u=ao(r)):u=ao(e));const c=M6(a,n,r)?xb(a):kr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const T=Mn(a),b=r&&dr(r)?Mn(r):r;let _=T,w=Ih(_);for(;w&&r&&b!==_;){const k=ao(w),v=w.getBoundingClientRect(),F=fr(w),R=v.left+(w.clientLeft+parseFloat(F.paddingLeft))*k.x,W=v.top+(w.clientTop+parseFloat(F.paddingTop))*k.y;d*=k.x,f*=k.y,p*=k.x,E*=k.y,d+=R,f+=W,_=Mn(w),w=Ih(_)}}return Bl({width:p,height:E,x:d,y:f})}function jl(e,t){const n=zl(e).scrollLeft;return t?t.left+n:as(Or(e)).left+n}function wb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function F6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Or(r),c=t?Hl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=kr(1);const p=kr(0),E=Ir(r);if((E||!E&&!a)&&((so(r)!=="body"||La(u))&&(d=zl(r)),Ir(r))){const b=as(r);f=ao(r),p.x=b.x+r.clientLeft,p.y=b.y+r.clientTop}const T=u&&!E&&!a?wb(u,d):kr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function B6(e){return Array.from(e.getClientRects())}function U6(e){const t=Or(e),n=zl(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+jl(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Sb=25;function H6(e,t){const n=Mn(e),r=Or(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=Oh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=jl(r);if(f<=0){const p=r.ownerDocument,E=p.body,T=getComputedStyle(E),b=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=Sb&&(a-=_)}else f<=Sb&&(a+=f);return{width:a,height:u,x:c,y:d}}const z6=new Set(["absolute","fixed"]);function j6(e,t){const n=as(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ir(e)?ao(e):kr(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 Cb(e,t,n){let r;if(t==="viewport")r=H6(e,n);else if(t==="document")r=U6(Or(e));else if(dr(t))r=j6(t,n);else{const o=xb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Bl(r)}function Ab(e,t){const n=Ti(e);return n===t||!dr(n)||oo(n)?!1:fr(n).position==="fixed"||Ab(n,t)}function $6(e,t){const n=t.get(e);if(n)return n;let r=Da(e,[],!1).filter(c=>dr(c)&&so(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?Ti(e):e;for(;dr(u)&&!oo(u);){const c=fr(u),d=Nh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&z6.has(o.position)||La(u)&&!d&&Ab(e,u))?r=r.filter(p=>p!==u):o=c,u=Ti(u)}return t.set(e,r),r}function V6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Hl(t)?[]:$6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const E=Cb(t,p,o);return f.top=Dn(E.top,f.top),f.right=bi(E.right,f.right),f.bottom=bi(E.bottom,f.bottom),f.left=Dn(E.left,f.left),f},Cb(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function q6(e){const{width:t,height:n}=_b(e);return{width:t,height:n}}function Y6(e,t,n){const r=Ir(t),o=Or(t),a=n==="fixed",u=as(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=kr(0);function f(){d.x=jl(o)}if(r||!r&&!a)if((so(t)!=="body"||La(o))&&(c=zl(t)),r){const b=as(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?wb(o,c):kr(0),E=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:E,y:T,width:u.width,height:u.height}}function Rh(e){return fr(e).position==="static"}function vb(e,t){if(!Ir(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Or(e)===n&&(n=n.ownerDocument.body),n}function kb(e,t){const n=Mn(e);if(Hl(e))return n;if(!Ir(e)){let o=Ti(e);for(;o&&!oo(o);){if(dr(o)&&!Rh(o))return o;o=Ti(o)}return n}let r=vb(e,t);for(;r&&k6(r)&&Rh(r);)r=vb(r,t);return r&&oo(r)&&Rh(r)&&!Nh(r)?n:r||R6(e)||n}const W6=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||kb,n=this.getDimensions,r=yield n(e.floating);return{reference:Y6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G6(e){return fr(e).direction==="rtl"}const K6={convertOffsetParentRelativeRectToViewportRelativeRect:F6,getDocumentElement:Or,getClippingRect:V6,getOffsetParent:kb,getElementRects:W6,getClientRects:B6,getDimensions:q6,getScale:ao,isElement:dr,isRTL:G6};function Nb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q6(e,t){let n=null,r;const o=Or(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:E,width:T,height:b}=f;if(c||t(),!T||!b)return;const _=Ml(E),w=Ml(o.clientWidth-(p+T)),k=Ml(o.clientHeight-(E+b)),v=Ml(p),R={rootMargin:-_+"px "+-w+"px "+-k+"px "+-v+"px",threshold:Dn(0,bi(1,d))||1};let W=!0;function X(B){const te=B[0].intersectionRatio;if(te!==d){if(!W)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!Nb(f,e.getBoundingClientRect())&&u(),W=!1}try{n=new IntersectionObserver(X,Te(H({},R),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,R)}n.observe(e)}return u(!0),a}function X6(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=Ph(e),p=o||a?[...f?Da(f):[],...Da(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const E=f&&c?Q6(f,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(v=>{let[F]=v;F&&F.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,w=d?as(e):null;d&&k();function k(){const v=as(e);w&&!Nb(w,v)&&n(),w=v,_=requestAnimationFrame(k)}return n(),()=>{var v;p.forEach(F=>{o&&F.removeEventListener("scroll",n),a&&F.removeEventListener("resize",n)}),E==null||E(),(v=b)==null||v.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const J6=x6,Z6=w6,e4=b6,t4=C6,n4=T6,r4=y6,i4=S6,s4=(e,t,n)=>{const r=new Map,o=H({platform:K6},n),a=Te(H({},o.platform),{_c:r});return E6(e,t,Te(H({},o),{platform:a}))};function Ob(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 Te(H({},o),{toJSON:()=>o})}function o4(e){if(!e)return Ob();const{x:t,y:n,width:r,height:o}=e;return Ob(t,n,r,o)}function a4(e,t){return{contextElement:Gt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?o4(r):n.getBoundingClientRect()}}}var Ma=e=>({variable:e,reference:`var(${e})`}),Qr={arrowSize:Ma("--arrow-size"),arrowSizeHalf:Ma("--arrow-size-half"),arrowBg:Ma("--arrow-background"),transformOrigin:Ma("--transform-origin"),arrowOffset:Ma("--arrow-offset")},u4=e=>e==="top"||e==="bottom"?"y":"x";function l4(e,t){return{name:"transformOrigin",fn(n){var ye,M,ae,he,ue;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=u4(d),p=((ye=o.arrow)==null?void 0:ye.x)||0,E=((M=o.arrow)==null?void 0:M.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=E+b/2,k=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),v=u.reference.height/2,F=b/2,R=(ue=(he=e.offset)==null?void 0:he.mainAxis)!=null?ue:e.gutter,W=typeof R=="number"?R+F:R!=null?R:F,X=k>W,B={top:`${_}px calc(100% + ${W}px)`,bottom:`${_}px ${-W}px`,left:`calc(100% + ${W}px) ${w}px`,right:`${-W}px ${w}px`}[d],te=`${_}px ${u.reference.y+v-c}px`,ge=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(Qr.transformOrigin.variable,ge?te:B),{data:{transformOrigin:ge?te:B}}}}}var c4={name:"rects",fn({rects:e}){return{data:e}}},d4=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% + ${Qr.arrowOffset.reference})`}),{}}}};function f4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var h4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Ib(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Lh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function p4(e,t,n){const r=e||t.createElement("div");return r4({element:r,padding:n.arrowPadding})}function m4(e,t){var n;if(!FR((n=t.offset)!=null?n:t.gutter))return J6(({placement:r})=>{var p,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=f4(r),d=c?void 0:t.shift,f=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return sh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function g4(e){if(!e.flip)return;const t=Lh(e.boundary);return e4(Te(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function E4(e){if(!e.slide&&!e.overlap)return;const t=Lh(e.boundary);return Z6(Te(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:i4()}))}function y4(e){return t4({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function b4(e){var t;if(e.hideWhenDetached)return n4({strategy:"referenceHidden",boundary:(t=Lh(e.boundary))!=null?t:"clippingAncestors"})}function T4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function _4(e,t,n={}){const r=a4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},h4,n),a=t.querySelector("[data-part=arrow]"),u=[m4(a,o),g4(o),E4(o),p4(a,t.ownerDocument,o),d4(a),l4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),y4(o),b4(o),c4],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,E=()=>rt(null,null,function*(){var W;if(!r||!t)return;const w=yield s4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const k=Js(t),v=Ib(k,w.x),F=Ib(k,w.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((W=w.middlewareData.hide)==null?void 0:W.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const X=Nl(R);t.style.setProperty("--z-index",X.zIndex)}}),T=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),b=T4(o.listeners),_=o.listeners?X6(r,t,T,b):YR;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function Pb(e,t,n={}){const c=n,{defer:r}=c,o=nn(c,["defer"]),a=r?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(_4(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var x4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function w4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Qr.arrowSize.reference,height:Qr.arrowSize.reference,[Qr.arrowSizeHalf.variable]:`calc(${Qr.arrowSize.reference} / 2)`,[Qr.arrowOffset.variable]:`calc(${Qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?x4[t.split("-")[0]]:void 0,background:Qr.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 uo=new WeakMap,$l=new WeakMap,Vl={},Dh=0,Rb=e=>e&&(e.host||Rb(e.parentNode)),S4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Rb(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),C4=new Set(["script","output","status","next-route-announcer"]),A4=e=>C4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),v4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=S4(n,Array.isArray(e)?e:[e]);Vl[r]||(Vl[r]=new WeakMap);const c=Vl[r],d=[],f=new Set,p=new Set(u),E=b=>{!b||f.has(b)||(f.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Gt(b)&&jy(b,_=>{E(_)})});const T=b=>{!b||p.has(b)||Array.prototype.forEach.call(b.children,_=>{if(f.has(_))T(_);else try{if(A4(_))return;const k=_.getAttribute(o)==="true",v=(uo.get(_)||0)+1,F=(c.get(_)||0)+1;uo.set(_,v),c.set(_,F),d.push(_),v===1&&k&&$l.set(_,!0),F===1&&_.setAttribute(r,""),k||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Dh++,()=>{d.forEach(b=>{const _=uo.get(b)-1,w=c.get(b)-1;uo.set(b,_),c.set(b,w),_||($l.has(b)||b.removeAttribute(o),$l.delete(b)),w||b.removeAttribute(r)}),Dh--,Dh||(uo=new WeakMap,uo=new WeakMap,$l=new WeakMap,Vl={})}},k4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,N4=(e,t=k4(e),n="data-aria-hidden",r=!0)=>{if(t)return v4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},O4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Lb(e,t={}){const{defer:n=!0}=t,r=n?O4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(N4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function I4(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 P4(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 Db="pointerdown.outside",Mb="focus.outside";function R4(e){for(const t of e)if(Gt(t)&&Wr(t))return!0;return!1}var Fb=e=>"clientY"in e;function L4(e,t){if(!Fb(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 D4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Bb(e,t){if(!t||!Fb(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 D4(u,c)?r||a:!1}function M4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=vr(e),f=Js(e),p=I4(f),E=P4(f);function T(R,W){if(!Gt(W)||!W.isConnected||kl(e,W)||L4(e,R)||c&&zy(e,W))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=ph(X);if(Bb(R,te))return!1}const B=ph(e);return Bb(R,B)?!1:!(n!=null&&n(W))}const b=new Set,_=ss(e==null?void 0:e.getRootNode());function w(R){function W(X){var ye,M;const B=u&&!$y()?Sn:ae=>ae(),te=X!=null?X:R,ge=(M=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?M:[te==null?void 0:te.target];B(()=>{const ae=_?ge[0]:Yr(R);if(!(!e||!T(R,ae))){if(o||a){const he=ih(o,a);e.addEventListener(Db,he,{once:!0})}Ub(e,Db,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:SL(te),focusable:R4(ge),target:ae}})}})}R.pointerType==="touch"?(b.forEach(X=>X()),b.add(lr(d,"click",W,{once:!0})),b.add(E.addEventListener("click",W,{once:!0})),b.add(p.addEventListener("click",W,{once:!0}))):W()}const k=new Set,v=setTimeout(()=>{k.add(lr(d,"pointerdown",w,!0)),k.add(E.addEventListener("pointerdown",w,!0)),k.add(p.addEventListener("pointerdown",w,!0))},0);function F(R){(u?Sn:X=>X())(()=>{var te,ge;const X=(ge=(te=R==null?void 0:R.composedPath)==null?void 0:te.call(R))!=null?ge:[R==null?void 0:R.target],B=_?X[0]:Yr(R);if(!(!e||!T(R,B))){if(r||a){const ye=ih(r,a);e.addEventListener(Mb,ye,{once:!0})}Ub(e,Mb,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:Wr(B),target:B}})}})}return $y()||(k.add(lr(d,"focusin",F,!0)),k.add(E.addEventListener("focusin",F,!0)),k.add(p.addEventListener("focusin",F,!0))),()=>{clearTimeout(v),b.forEach(R=>R()),k.forEach(R=>R())}}function F4(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(M4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Ub(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function B4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return lr(vr(e),"keydown",n,{capture:!0})}var Hb="layer:request-dismiss",Gn={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=>kl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>kl(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=>Gn.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];H4(e,Hb,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),U4(e,Hb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function U4(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 H4(e,t,n){e.addEventListener(t,n,{once:!0})}var zb;function jb(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function z4(e){e.style.pointerEvents=""}function j4(e,t){const n=vr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=HL(()=>{const c=o();return Gt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Il(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function $4(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){oh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Gn.add(f),jb();function p(w){var v,F;const k=Yr(w.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(k)||((v=t.onPointerDownOutside)==null||v.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var v,F;const k=Yr(w.detail.originalEvent);Gn.isInBranch(k)||((v=t.onFocusOutside)==null||v.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var k;Gn.isTopMost(e)&&((k=t.onEscapeKeyDown)==null||k.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var R;if(!e)return!1;const k=typeof u=="function"?u():u,v=Array.isArray(k)?k:[k],F=(R=t.persistentElements)==null?void 0:R.map(W=>W()).filter(Gt);return F&&v.push(...F),v.some(W=>kl(W,w))||Gn.isInNestedLayer(e,w)}const _=[a?j4(e,t.persistentElements):void 0,B4(e,T),F4(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Gn.remove(e),jb(),z4(e),_.forEach(w=>w==null?void 0:w())}}function $b(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=Xs(e)?e():e;o.push($4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var V4=Object.defineProperty,q4=(e,t,n)=>t in e?V4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>q4(e,typeof t!="symbol"?t+"":t,n),Vb={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()}},Y4=[],W4=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const o=Yr(r),a=this.findContainerIndex(o,r)>=0;if(a||vl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Oa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(E=>E===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=>Oa(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}),xt(this,"handlePointerDown",r=>{const o=Yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Ba(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ba(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const o=Yr(r);this.findContainerIndex(o,r)>=0||Ba(this.config.clickOutsideDeactivates,r)||Ba(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Fa(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{G4(r)&&Ba(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(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 pL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?mL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(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)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Wr(r)){const o=Zs(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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,K4(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const o=H({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Vb.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=()=>{qb(()=>{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}),xt(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}),xt(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}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),xt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),xt(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}),xt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Yr(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:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||Y4;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Fa(r)&&!r.shiftKey},isKeyBackward(r){return Fa(r)&&r.shiftKey}},t);this.doc=n.document||vr(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=>{dL(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?zy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Na(e,{getShadowRoot:this.config.getShadowRoot}),n=Gy(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(Oa(t[f])>0){c=!0;break}function d(f,p=!0){const E=t.indexOf(f);if(E>=0)return t[E+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let b=T+1;b<n.length;b++)if(os(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(os(n[b]))return n[b]}}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 Vb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?qb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(lr(this.doc,"focusin",this.handleFocus,!0),lr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Zs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Fa=e=>e.key==="Tab",Ba=(e,...t)=>typeof e=="function"?e(...t):e,G4=e=>!e.isComposing&&e.key==="Escape",qb=e=>setTimeout(e,0),K4=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Yb(e,t={}){let n;const r=Sn(()=>{const o=typeof e=="function"?e():e;if(o){n=new W4(o,Te(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:vr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Mh="data-scroll-lock";function Q4(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Wb(e){const t=Nl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Gb(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Mh))return;const u=Wb(r)||Wb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Mh,"");const d=()=>BL(r,"--scrollbar-width",`${c}px`),f=Q4(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Il(o,_)},E=()=>{var X,B;const{scrollX:_,scrollY:w,visualViewport:k}=n,v=(X=k==null?void 0:k.offsetLeft)!=null?X:0,F=(B=k==null?void 0:k.offsetTop)!=null?B:0,R={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(F))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const W=Il(o,R);return()=>{W==null||W(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Vy()?E():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Mh)}}var X4=no("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=X4.build(),Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Fh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},J4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},Z4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Jb=e=>e.getById(Kb(e)),lo=e=>e.getById(Qb(e)),co=e=>e.getById(Fh(e)),Zb=e=>e.getById(Xb(e)),eD=e=>e.getById(Bh(e)),tD=e=>e.getById(Uh(e));function nD(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"),E=r.get("renderedElements"),T=w4(Te(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(Te(H({id:J4(c)},Pr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(Te(H({},Pr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(Te(H({},Pr.anchor.attrs),{dir:u("dir"),id:Kb(c)}))},getTriggerProps(){return t.button(Te(H({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Qb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Fh(c),onPointerDown(b){wL(b)&&_L()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(H({},Pr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({id:Xb(c)},Pr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(Te(H({},Pr.content.attrs),{dir:u("dir"),id:Fh(c),tabIndex:-1,role:"dialog","aria-modal":XR(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":QR(d),"aria-labelledby":E.title?Bh(c):void 0,"aria-describedby":E.description?Uh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(Te(H({},Pr.title.attrs),{id:Bh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(Te(H({},Pr.description.attrs),{id:Uh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Te(H({},Pr.closeTrigger.attrs),{dir:u("dir"),id:Z4(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var rD={props({props:e}){return Te(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Jb(n))!=null?a:lo(n);return Pb(r,()=>Zb(n),Te(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>co(n);let o=!0;return $b(r,{type:"popover",pointerBlocking:t("modal"),exclude:lo(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:FL(()=>co(t),{triggerElement:lo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Lb(()=>[co(t),lo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Gb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Yb(()=>co(t),{initialFocus:()=>Ky({root:co(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=Jb(n))!=null?u:lo(n);Pb(o,()=>Zb(n),Te(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Sn(()=>{Object.assign(e.get("renderedElements"),{title:!!eD(t),description:!!tD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Sn(()=>{const n=Ky({root:co(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||Sn(()=>{const a=lo(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})}}}};bh()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[VB,Hh]=to({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[qB,eT]=to({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),iD=e=>{const t=$.useId(),{getRootNode:n}=Hh(),{dir:r}=eT(),o=H({id:t,dir:r,getRootNode:n},e),a=Th(rD,o);return nD(a,sb)},sD=e=>{const[t,u]=cb(e),c=u,{children:n}=c,r=nn(c,["children"]),o=iD(r),a=wh(cr({present:o.open},t));return C.jsx(e6,{value:o,children:C.jsx(ob,{value:a,children:n})})},tT=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(Te(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return C.jsx(yi.button,Te(H({},o),{ref:t}))});tT.displayName="PopoverTrigger";function oD(e){return qt({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 aD(e){return qt({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 uD(e){return qt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function nT(e){return qt({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 lD=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=wr(),r=()=>{n(),e()};return C.jsxs("button",{className:J(`${Y}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[C.jsx(nT,{}),"Clear chat"]})},cD=({className:e,componentType:t,children:n})=>{const[r,o]=$.useState(!1),{globalClassName:a}=Rt(),u=()=>{o(!1)},c=d=>{o(d.open)};return C.jsxs(sD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[C.jsx(tT,{"aria-label":`Overflow menu for ${t}`,className:J(`${Y}-overflow-menu-button-trigger`,`${Y}-icon-button`,a,e,t),children:C.jsx(uD,{})}),C.jsx(ub,{children:C.jsxs(ab,{className:J(`${Y}-overflow-menu-list`,a,t),children:[n,C.jsx(lD,{componentType:t,onClearChat:u})]})})]})};function rT(e){return qt({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 iT(e){return qt({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 sT=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=nn(o,["onClearChat","componentType"]);const{globalClassName:a}=Rt(),{resetConversation:u}=wr(),c=()=>{u(),e==null||e()};return C.jsx(Vr,H({icon:C.jsx(nT,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:J(a,`${Y}-clear-chat-icon-button`,t),onClick:c},n))},oT=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Rt();if(!r)return null;const o=()=>{Qi(!1),Jd(!0)};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:C.jsx(Gg,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-minimize-button`,e),onClick:o,children:[C.jsx(Gg,{}),"Minimize"]})},aT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),r=()=>{Qu("modal")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:C.jsx(iT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-modal-button`,e),onClick:r,children:[C.jsx(iT,{}),"Show modal"]})},dD=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=Rt();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),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return C.jsxs("div",{className:J(r,`${Y}-product-tile`,{embedded:!e,standalone:e}),children:[C.jsx("img",{className:J(r,`${Y}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),C.jsxs("div",{className:J(r,`${Y}-product-tile-details`,{embedded:!e,standalone:e}),children:[C.jsxs("div",{className:J(r,`${Y}-product-tile-content`),children:[u&&C.jsx("p",{className:`${Y}-product-tile-brand`,children:u}),E?C.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:J(r,`${Y}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",C.jsx("span",{className:J(r,`${Y}-product-tile-pdp-arrow`),children:"→"})]}):C.jsx("p",{className:J(r,`${Y}-product-tile-name`),title:a,children:a})]}),C.jsx("div",{className:J(r,`${Y}-product-tile-footer`),children:C.jsx("p",{className:J(r,`${Y}-product-tile-price`),children:c})})]})]})},fD=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=Rt(),o=t;return n?C.jsxs("div",{className:J(r,`${Y}-display-products widget-message`),children:[C.jsx("p",{children:o.message}),o.products&&o.products.length>0&&C.jsx("div",{className:J(r,`${Y}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return C.jsx(dD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},hD=({globalClassName:e,message:t,isWidgetStandalone:n})=>C.jsx("div",{className:J(e,`${Y}-error-message`,{standalone:n,embedded:!n}),children:C.jsxs("p",{className:J(e,`${Y}-error-message-text`,{standalone:n,embedded:!n}),children:[C.jsx(YA,{})," ",t.message||"An error occurred while processing your request."]})});function pD(e){return qt({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const mD=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>C.jsx("div",{className:J(e,`${Y}-suggestion-container standalone`),children:o.map(u=>C.jsxs(rf,{disabled:r,className:J(e,`${Y}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[C.jsx(pD,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),gD=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=wr();return C.jsxs("div",{className:J(e,`${Y}-follow-up`),children:[C.jsx("p",{className:J(e,`${Y}-text`),children:t.message}),n&&C.jsx(mD,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&C.jsx("div",{className:J(e,`${Y}-suggestion-container embedded`),children:t.suggestions.map(a=>C.jsx("button",{disabled:o,className:J(e,`${Y}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function uT(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 ED(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yD(e,t,n){const o=dl((n||{}).ignore||[]),a=bD(t);let u=-1;for(;++u<a.length;)oE(e,"text",c);function c(f,p){let E=-1,T;for(;++E<p.length;){const b=p[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(f,p)}function d(f,p){const E=p[p.length-1],T=a[u][0],b=a[u][1];let _=0;const k=E.children.indexOf(f);let v=!1,F=[];T.lastIndex=0;let R=T.exec(f.value);for(;R;){const W=R.index,X={index:R.index,input:R.input,stack:[...p,f]};let B=b(...R,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?T.lastIndex=W+1:(_!==W&&F.push({type:"text",value:f.value.slice(_,W)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=W+R[0].length,v=!0),!T.global)break;R=T.exec(f.value)}return v?(_<f.value.length&&F.push({type:"text",value:f.value.slice(_)}),E.children.splice(k,1,...F)):F=[f],k+F.length}}function bD(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([TD(o[0]),_D(o[1])])}return t}function TD(e){return typeof e=="string"?new RegExp(ED(e),"g"):e}function _D(e){return typeof e=="function"?e:function(){return e}}const zh="phrasing",jh=["autolink","link","image","label"];function xD(){return{transforms:[ND],enter:{literalAutolink:SD,literalAutolinkEmail:$h,literalAutolinkHttp:$h,literalAutolinkWww:$h},exit:{literalAutolink:kD,literalAutolinkEmail:vD,literalAutolinkHttp:CD,literalAutolinkWww:AD}}}function wD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zh,notInConstruct:jh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zh,notInConstruct:jh},{character:":",before:"[ps]",after:"\\/",inConstruct:zh,notInConstruct:jh}]}}function SD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $h(e){this.config.enter.autolinkProtocol.call(this,e)}function CD(e){this.config.exit.autolinkProtocol.call(this,e)}function AD(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 vD(e){this.config.exit.autolinkEmail.call(this,e)}function kD(e){this.exit(e)}function ND(e){yD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ID]],{ignore:["link","linkReference"]})}function OD(e,t,n,r,o){let a="";if(!lT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PD(n)))return!1;const u=RD(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 ID(e,t,n,r){return!lT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PD(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function RD(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=uT(e,"(");let a=uT(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 lT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ji(n)||il(n))&&(!t||n!==47)}cT.peek=jD;function LD(){this.buffer()}function DD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MD(){this.buffer()}function FD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function BD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UD(e){this.exit(e)}function HD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zD(e){this.exit(e)}function jD(){return"["}function cT(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 $D(){return{enter:{gfmFootnoteCallString:LD,gfmFootnoteCall:DD,gfmFootnoteDefinitionLabelString:MD,gfmFootnoteDefinition:FD},exit:{gfmFootnoteCallString:BD,gfmFootnoteCall:UD,gfmFootnoteDefinitionLabelString:HD,gfmFootnoteDefinition:zD}}}function VD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cT},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?`
29
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?dT:qD))),f(),d}}function qD(e,t,n){return t===0?e:dT(e,t,n)}function dT(e,t,n){return(n?"":" ")+e}const YD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fT.peek=XD;function WD(){return{canContainEols:["delete"],enter:{strikethrough:KD},exit:{strikethrough:QD}}}function GD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:YD}],handlers:{delete:fT}}}function KD(e){this.enter({type:"delete",children:[]},e)}function QD(e){this.exit(e)}function fT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,Te(H({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function XD(){return"~"}function JD(e){return e.length}function ZD(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||JD,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],k=[];let v=-1;for(e[p].length>f&&(f=e[p].length);++v<e[p].length;){const F=e5(e[p][v]);if(n.alignDelimiters!==!1){const R=o(F);k[v]=R,(d[v]===void 0||R>d[v])&&(d[v]=R)}w.push(F)}u[p]=w,c[p]=k}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<f;)a[E]=hT(r[E]);else{const w=hT(r);for(;++E<f;)a[E]=w}E=-1;const T=[],b=[];for(;++E<f;){const w=a[E];let k="",v="";w===99?(k=":",v=":"):w===108?k=":":w===114&&(v=":");let F=n.alignDelimiters===!1?1:Math.max(1,d[E]-k.length-v.length);const R=k+"-".repeat(F)+v;n.alignDelimiters!==!1&&(F=k.length+F+v.length,F>d[E]&&(d[E]=F),b[E]=F),T[E]=R}u.splice(1,0,T),c.splice(1,0,b),p=-1;const _=[];for(;++p<u.length;){const w=u[p],k=c[p];E=-1;const v=[];for(;++E<f;){const F=w[E]||"";let R="",W="";if(n.alignDelimiters!==!1){const X=d[E]-(k[E]||0),B=a[E];B===114?R=" ".repeat(X):B===99?X%2?(R=" ".repeat(X/2+.5),W=" ".repeat(X/2-.5)):(R=" ".repeat(X/2),W=R):W=" ".repeat(X)}n.delimiterStart!==!1&&!E&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||E)&&v.push(" "),n.alignDelimiters!==!1&&v.push(R),v.push(F),n.alignDelimiters!==!1&&v.push(W),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||E!==f-1)&&v.push("|")}_.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return _.join(`
30
- `)}function e5(e){return e==null?"":String(e)}function hT(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 t5(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()),n5);return o(),u}function n5(e,t,n){return">"+(n?"":" ")+e}function r5(e,t){return pT(e,t.inConstruct,!0)&&!pT(e,t.notInConstruct,!1)}function pT(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 mT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
31
- `&&r5(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
32
- `}function i5(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function s5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function o5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function a5(e,t,n,r){const o=o5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(s5(e,n)){const E=n.enter("codeIndented"),T=n.indentLines(a,u5);return E(),T}const c=n.createTracker(r),d=o.repeat(Math.max(i5(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,H({before:p,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,H({before:p,after:`
31
+ `+y.stack}return{value:i,source:s,stack:g,digest:null}}function pm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function mm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var DF=typeof WeakMap=="function"?WeakMap:Map;function K_(i,s,l){l=oi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){Vc||(Vc=!0,Om=h),mm(i,s)},l}function Q_(i,s,l){l=oi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;l.payload=function(){return h(g)},l.callback=function(){mm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){mm(i,s),typeof h!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function X_(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new DF;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(l)||(g.add(l),i=KF.bind(null,i,s,l),s.then(i,i))}function J_(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Z_(i,s,l,h,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=oi(-1,1),s.tag=2,Di(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var MF=W.ReactCurrentOwner,kn=!1;function gn(i,s,l,h){s.child=i===null?b_(s,null,l,h):ko(s,i.child,l,h)}function ex(i,s,l,h,g){l=l.render;var y=s.ref;return Oo(s,g),h=om(i,s,l,h,y,g),l=am(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&l&&$p(s),s.flags|=1,gn(i,s,h,g),s.child)}function tx(i,s,l,h,g){if(i===null){var y=l.type;return typeof y=="function"&&!Fm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,nx(i,s,y,h,g)):(i=Qc(l.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:ru,l(x,h)&&i.ref===s.ref)return ai(i,s,g)}return s.flags|=1,i=zi(y,h),i.ref=s.ref,i.return=s,s.child=i}function nx(i,s,l,h,g){if(i!==null){var y=i.memoizedProps;if(ru(y,h)&&i.ref===s.ref)if(kn=!1,s.pendingProps=h=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,ai(i,s,g)}return gm(i,s,l,h,g)}function rx(i,s,l){var h=s.pendingProps,g=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Lo,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,mt(Lo,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,mt(Lo,zn),zn|=h}else y!==null?(h=y.baseLanes|l,s.memoizedState=null):h=l,mt(Lo,zn),zn|=h;return gn(i,s,g,l),s.child}function ix(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function gm(i,s,l,h,g){var y=vn(l)?ms:ln.current;return y=So(s,y),Oo(s,g),l=om(i,s,l,h,y,g),h=am(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&h&&$p(s),s.flags|=1,gn(i,s,l,g),s.child)}function sx(i,s,l,h,g){if(vn(l)){var y=!0;_c(s)}else y=!1;if(Oo(s,g),s.stateNode===null)Uc(i,s),W_(s,l,h),hm(s,l,h,g),h=!0;else if(i===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var D=x.context,G=l.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=vn(l)?ms:ln.current,G=So(s,G));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==h||D!==G)&&G_(s,x,h,G),Li=!1;var re=s.memoizedState;x.state=re,Oc(s,h,x,g),D=s.memoizedState,I!==h||re!==D||An.current||Li?(typeof se=="function"&&(fm(s,l,se,h),D=s.memoizedState),(I=Li||Y_(s,l,I,h,re,D,G))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=D),x.props=h,x.state=D,x.context=G,h=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,__(i,s),I=s.memoizedProps,G=s.type===s.elementType?I:gr(s.type,I),x.props=G,ce=s.pendingProps,re=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=Zn(D):(D=vn(l)?ms:ln.current,D=So(s,D));var xe=l.getDerivedStateFromProps;(se=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==ce||re!==D)&&G_(s,x,h,D),Li=!1,re=s.memoizedState,x.state=re,Oc(s,h,x,g);var Ae=s.memoizedState;I!==ce||re!==Ae||An.current||Li?(typeof xe=="function"&&(fm(s,l,xe,h),Ae=s.memoizedState),(G=Li||Y_(s,l,G,h,re,Ae,D)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ae,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ae,D)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ae),x.props=h,x.state=Ae,x.context=D,h=G):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),h=!1)}return Em(i,s,l,h,y,g)}function Em(i,s,l,h,g,y){ix(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return g&&c_(s,l,!1),ai(i,s,y);h=s.stateNode,MF.current=s;var I=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=ko(s,i.child,null,y),s.child=ko(s,null,I,y)):gn(i,s,I,y),s.memoizedState=h.state,g&&c_(s,l,!0),s.child}function ox(i){var s=i.stateNode;s.pendingContext?u_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&u_(i,s.context,!1),em(i,s.containerInfo)}function ax(i,s,l,h,g){return vo(),Wp(g),s.flags|=256,gn(i,s,l,h),s.child}var ym={dehydrated:null,treeContext:null,retryLane:0};function bm(i){return{baseLanes:i,cachePool:null,transitions:null}}function ux(i,s,l){var h=s.pendingProps,g=At.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),mt(At,g&1),i===null)return Yp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=h.children,i=h.fallback,y?(h=s.mode,y=s.child,x={mode:"hidden",children:x},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Xc(x,h,0,null),i=Cs(i,h,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=bm(l),s.memoizedState=ym,i):Tm(s,x));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return FF(i,s,x,h,I,g,l);if(y){y=h.fallback,x=s.mode,g=i.child,I=g.sibling;var D={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==g?(h=s.child,h.childLanes=0,h.pendingProps=D,s.deletions=null):(h=zi(g,D),h.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=zi(I,y):(y=Cs(y,x,l,null),y.flags|=2),y.return=s,h.return=s,h.sibling=y,s.child=h,h=y,y=s.child,x=i.child.memoizedState,x=x===null?bm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=ym,h}return y=i.child,i=y.sibling,h=zi(y,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function Tm(i,s){return s=Xc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Bc(i,s,l,h){return h!==null&&Wp(h),ko(s,i.child,null,l),i=Tm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function FF(i,s,l,h,g,y,x){if(l)return s.flags&256?(s.flags&=-257,h=pm(Error(n(422))),Bc(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=h.fallback,g=s.mode,h=Xc({mode:"visible",children:h.children},g,0,null),y=Cs(y,g,x,null),y.flags|=2,h.return=s,y.return=s,h.sibling=y,s.child=h,(s.mode&1)!==0&&ko(s,i.child,null,x),s.child.memoizedState=bm(x),s.memoizedState=ym,y);if((s.mode&1)===0)return Bc(i,s,x,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=pm(y,h,void 0),Bc(i,s,x,h)}if(I=(x&i.childLanes)!==0,kn||I){if(h=Qt,h!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(h.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,si(i,g),br(h,i,g,-1))}return Mm(),h=pm(Error(n(421))),Bc(i,s,x,h)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=QF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=Oi(g.nextSibling),Un=s,St=!0,mr=null,i!==null&&(Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,ri=i.id,ii=i.overflow,gs=s),s=Tm(s,h.children),s.flags|=4096,s)}function lx(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Xp(i.return,s,l)}function _m(i,s,l,h,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=g)}function cx(i,s,l){var h=s.pendingProps,g=h.revealOrder,y=h.tail;if(gn(i,s,h.children,l),h=At.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&lx(i,l,s);else if(i.tag===19)lx(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(mt(At,h),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Ic(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),_m(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ic(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}_m(s,!0,l,null,y);break;case"together":_m(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Uc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ai(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),_s|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=zi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=zi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function BF(i,s,l){switch(s.tag){case 3:ox(s),vo();break;case 5:S_(s);break;case 1:vn(s.type)&&_c(s);break;case 4:em(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,g=s.memoizedProps.value;mt(vc,h._currentValue),h._currentValue=g;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(mt(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?ux(i,s,l):(mt(At,At.current&1),i=ai(i,s,l),i!==null?i.sibling:null);mt(At,At.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return cx(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),mt(At,At.current),h)break;return null;case 22:case 23:return s.lanes=0,rx(i,s,l)}return ai(i,s,l)}var dx,xm,fx,hx;dx=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},xm=function(){},fx=function(i,s,l,h){var g=i.memoizedProps;if(g!==h){i=s.stateNode,bs(Fr.current);var y=null;switch(l){case"input":g=_i(i,g),h=_i(i,h),y=[];break;case"select":g=S({},g,{value:void 0}),h=S({},h,{value:void 0}),y=[];break;case"textarea":g=dt(i,g),h=dt(i,h),y=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=yc)}Zt(l,h);var x;l=null;for(G in g)if(!h.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var I=g[G];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in h){var D=h[G];if(I=g!=null?g[G]:void 0,h.hasOwnProperty(G)&&D!==I&&(D!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&I[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(y||(y=[]),y.push(G,l)),l=D;else G==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(y=y||[]).push(G,D)):G==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(G,""+D):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(D!=null&&G==="onScroll"&&Et("scroll",i),y||I===D||(y=[])):(y=y||[]).push(G,D))}l&&(y=y||[]).push("style",l);var G=y;(s.updateQueue=G)&&(s.flags|=4)}},hx=function(i,s,l,h){l!==h&&(s.flags|=4)};function yu(i,s){if(!St)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function UF(i,s,l){var h=s.pendingProps;switch(Vp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&Tc(),dn(s),null;case 3:return h=s.stateNode,Io(),yt(An),yt(ln),rm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Cc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(Rm(mr),mr=null))),xm(i,s),dn(s),null;case 5:tm(s);var g=bs(hu.current);if(l=s.type,i!==null&&s.stateNode!=null)fx(i,s,l,h,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=bs(Fr.current),Cc(s)){h=s.stateNode,l=s.type;var y=s.memoizedProps;switch(h[Mr]=s,h[uu]=y,i=(s.mode&1)!==0,l){case"dialog":Et("cancel",h),Et("close",h);break;case"iframe":case"object":case"embed":Et("load",h);break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],h);break;case"source":Et("error",h);break;case"img":case"image":case"link":Et("error",h),Et("load",h);break;case"details":Et("toggle",h);break;case"input":ds(h,y),Et("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},Et("invalid",h);break;case"textarea":wt(h,y),Et("invalid",h)}Zt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&Et("scroll",h)}switch(l){case"input":Kn(h),we(h,y,!0);break;case"textarea":Kn(h),st(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=yc)}h=g,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Mr]=s,i[uu]=h,dx(i,s,!1,!1),s.stateNode=i;e:{switch(x=Lr(l,h),l){case"dialog":Et("cancel",i),Et("close",i),g=h;break;case"iframe":case"object":case"embed":Et("load",i),g=h;break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],i);g=h;break;case"source":Et("error",i),g=h;break;case"img":case"image":case"link":Et("error",i),Et("load",i),g=h;break;case"details":Et("toggle",i),g=h;break;case"input":ds(i,h),g=_i(i,h),Et("invalid",i);break;case"option":g=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},g=S({},h,{value:void 0}),Et("invalid",i);break;case"textarea":wt(i,h),g=dt(i,h),Et("invalid",i);break;default:g=h}Zt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var D=I[y];y==="style"?wi(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&Ve(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&tt(i,D):typeof D=="number"&&tt(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&Et("scroll",i):D!=null&&R(i,y,D,x))}switch(l){case"input":Kn(i),we(i,h,!1);break;case"textarea":Kn(i),st(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Xe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=yc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dn(s),null;case 6:if(i&&s.stateNode!=null)hx(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=bs(hu.current),bs(Fr.current),Cc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Mr]=s,(y=h.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:Ec(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Ec(h.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Mr]=s,s.stateNode=h}return dn(s),null;case 13:if(yt(At),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(St&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)g_(),vo(),s.flags|=98560,y=!1;else if(y=Cc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Mr]=s}else vo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else mr!==null&&(Rm(mr),mr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(At.current&1)!==0?jt===0&&(jt=3):Mm())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return Io(),xm(i,s),i===null&&ou(s.stateNode.containerInfo),dn(s),null;case 10:return Qp(s.type._context),dn(s),null;case 17:return vn(s.type)&&Tc(),dn(s),null;case 19:if(yt(At),y=s.memoizedState,y===null)return dn(s),null;if(h=(s.flags&128)!==0,x=y.rendering,x===null)if(h)yu(y,!1);else{if(jt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ic(i),x!==null){for(s.flags|=128,yu(y,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)y=l,i=h,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Dt()>Do&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304)}else{if(!h)if(i=Ic(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),yu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!St)return dn(s),null}else 2*Dt()-y.renderingStartTime>Do&&l!==1073741824&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Dt(),s.sibling=null,l=At.current,mt(At,h?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return Dm(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function HF(i,s){switch(Vp(s),s.tag){case 1:return vn(s.type)&&Tc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Io(),yt(An),yt(ln),rm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return tm(s),null;case 13:if(yt(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));vo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(At),null;case 4:return Io(),null;case 10:return Qp(s.type._context),null;case 22:case 23:return Dm(),null;case 24:return null;default:return null}}var Hc=!1,fn=!1,zF=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Ro(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function wm(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var px=!1;function jF(i,s){if(Dp=oc,i=Y2(),vp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,D=-1,G=0,se=0,ce=i,re=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(I=x+g),ce!==y||h!==0&&ce.nodeType!==3||(D=x+h),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)re=ce,ce=xe;for(;;){if(ce===i)break t;if(re===l&&++G===g&&(I=x),re===y&&++se===h&&(D=x),(xe=ce.nextSibling)!==null)break;ce=re,re=ce.parentNode}ce=xe}l=I===-1||D===-1?null:{start:I,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Mp={focusedElem:i,selectionRange:l},oc=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Mt=Ae.memoizedState,z=s.stateNode,U=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Mt);z.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return Ae=px,px=!1,Ae}function bu(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&wm(s,l,y)}g=g.next}while(g!==h)}}function zc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Sm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function mx(i){var s=i.alternate;s!==null&&(i.alternate=null,mx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Mr],delete s[uu],delete s[Hp],delete s[SF],delete s[CF])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function gx(i){return i.tag===5||i.tag===3||i.tag===4}function Ex(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||gx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Cm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=yc));else if(h!==4&&(i=i.child,i!==null))for(Cm(i,s,l),i=i.sibling;i!==null;)Cm(i,s,l),i=i.sibling}function Am(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Am(i,s,l),i=i.sibling;i!==null;)Am(i,s,l),i=i.sibling}var en=null,Er=!1;function Mi(i,s,l){for(l=l.child;l!==null;)yx(i,s,l),l=l.sibling}function yx(i,s,l){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ec,l)}catch(I){}switch(l.tag){case 5:fn||Ro(l,s);case 6:var h=en,g=Er;en=null,Mi(i,s,l),en=h,Er=g,en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?Up(i.parentNode,l):i.nodeType===1&&Up(i,l),Xa(i)):Up(en,l.stateNode));break;case 4:h=en,g=Er,en=l.stateNode.containerInfo,Er=!0,Mi(i,s,l),en=h,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&wm(l,s,x),g=g.next}while(g!==h)}Mi(i,s,l);break;case 1:if(!fn&&(Ro(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Ot(l,s,I)}Mi(i,s,l);break;case 21:Mi(i,s,l);break;case 22:l.mode&1?(fn=(h=fn)||l.memoizedState!==null,Mi(i,s,l),fn=h):Mi(i,s,l);break;default:Mi(i,s,l)}}function bx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new zF),s.forEach(function(h){var g=XF.bind(null,i,h);l.has(h)||(l.add(h),h.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var y=i,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:en=I.stateNode,Er=!1;break e;case 3:en=I.stateNode.containerInfo,Er=!0;break e;case 4:en=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(en===null)throw Error(n(160));yx(y,x,g),en=null,Er=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(G){Ot(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Tx(s,i),s=s.sibling}function Tx(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Ur(i),h&4){try{bu(3,i,i.return),zc(3,i)}catch(ke){Ot(i,i.return,ke)}try{bu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return);break;case 5:if(yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return),i.flags&32){var g=i.stateNode;try{tt(g,"")}catch(ke){Ot(i,i.return,ke)}}if(h&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&xi(g,y),Lr(I,x);var G=Lr(I,y);for(x=0;x<D.length;x+=2){var se=D[x],ce=D[x+1];se==="style"?wi(g,ce):se==="dangerouslySetInnerHTML"?Ve(g,ce):se==="children"?tt(g,ce):R(g,se,ce,G)}switch(I){case"input":Zr(g,y);break;case"textarea":mn(g,y);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Xe(g,!!y.multiple,xe,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xe(g,!!y.multiple,y.defaultValue,!0):Xe(g,!!y.multiple,y.multiple?[]:"",!1))}g[uu]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(yr(s,i),Ur(i),h&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(yr(s,i),Ur(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Xa(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:yr(s,i),Ur(i);break;case 13:yr(s,i),Ur(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(Nm=Dt())),h&4&&bx(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(G=fn)||se,yr(s,i),fn=G):yr(s,i),Ur(i),h&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!se&&(i.mode&1)!==0)for(Se=i,se=i.child;se!==null;){for(ce=Se=se;Se!==null;){switch(re=Se,xe=re.child,re.tag){case 0:case 11:case 14:case 15:bu(4,re,re.return);break;case 1:Ro(re,re.return);var Ae=re.stateNode;if(typeof Ae.componentWillUnmount=="function"){h=re,l=re.return;try{s=h,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){Ot(h,l,ke)}}break;case 5:Ro(re,re.return);break;case 22:if(re.memoizedState!==null){wx(ce);continue}}xe!==null?(xe.return=re,Se=xe):wx(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,G?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,D=ce.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=Qn("display",x))}catch(ke){Ot(i,i.return,ke)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=G?"":ce.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Ur(i),h&4&&bx(i);break;case 21:break;default:yr(s,i),Ur(i)}}function Ur(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(gx(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(tt(g,""),h.flags&=-33);var y=Ex(i);Am(i,y,g);break;case 3:case 4:var x=h.stateNode.containerInfo,I=Ex(i);Cm(i,I,x);break;default:throw Error(n(161))}}catch(D){Ot(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function $F(i,s,l){Se=i,_x(i)}function _x(i,s,l){for(var h=(i.mode&1)!==0;Se!==null;){var g=Se,y=g.child;if(g.tag===22&&h){var x=g.memoizedState!==null||Hc;if(!x){var I=g.alternate,D=I!==null&&I.memoizedState!==null||fn;I=Hc;var G=fn;if(Hc=x,(fn=D)&&!G)for(Se=g;Se!==null;)x=Se,D=x.child,x.tag===22&&x.memoizedState!==null?Sx(g):D!==null?(D.return=x,Se=D):Sx(g);for(;y!==null;)Se=y,_x(y),y=y.sibling;Se=g,Hc=I,fn=G}xx(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Se=y):xx(i)}}function xx(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||zc(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!fn)if(l===null)h.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&w_(s,y,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}w_(s,x,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var se=G.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Xa(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&Sm(s)}catch(re){Ot(s,s.return,re)}}if(s===i){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function wx(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function Sx(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{zc(4,s)}catch(D){Ot(s,l,D)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var g=s.return;try{h.componentDidMount()}catch(D){Ot(s,g,D)}}var y=s.return;try{Sm(s)}catch(D){Ot(s,y,D)}break;case 5:var x=s.return;try{Sm(s)}catch(D){Ot(s,x,D)}}}catch(D){Ot(s,s.return,D)}if(s===i){Se=null;break}var I=s.sibling;if(I!==null){I.return=s.return,Se=I;break}Se=s.return}}var VF=Math.ceil,jc=W.ReactCurrentDispatcher,vm=W.ReactCurrentOwner,tr=W.ReactCurrentBatchConfig,nt=0,Qt=null,Ht=null,tn=0,zn=0,Lo=Ii(0),jt=0,Tu=null,_s=0,$c=0,km=0,_u=null,Nn=null,Nm=0,Do=1/0,ui=null,Vc=!1,Om=null,Fi=null,qc=!1,Bi=null,Yc=0,xu=0,Im=null,Wc=-1,Gc=0;function En(){return(nt&6)!==0?Dt():Wc!==-1?Wc:Wc=Dt()}function Ui(i){return(i.mode&1)===0?1:(nt&2)!==0&&tn!==0?tn&-tn:vF.transition!==null?(Gc===0&&(Gc=E2()),Gc):(i=lt,i!==0||(i=window.event,i=i===void 0?16:A2(i.type)),i)}function br(i,s,l,h){if(50<xu)throw xu=0,Im=null,Error(n(185));Ya(i,l,h),((nt&2)===0||i!==Qt)&&(i===Qt&&((nt&2)===0&&($c|=l),jt===4&&Hi(i,tn)),On(i,h),l===1&&nt===0&&(s.mode&1)===0&&(Do=Dt()+500,xc&&Ri()))}function On(i,s){var l=i.callbackNode;vM(i,s);var h=rc(i,i===Qt?tn:0);if(h===0)l!==null&&p2(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&p2(l),s===1)i.tag===0?AF(Ax.bind(null,i)):d_(Ax.bind(null,i)),xF(function(){(nt&6)===0&&Ri()}),l=null;else{switch(y2(h)){case 1:l=cp;break;case 4:l=m2;break;case 16:l=Zl;break;case 536870912:l=g2;break;default:l=Zl}l=Lx(l,Cx.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Cx(i,s){if(Wc=-1,Gc=0,(nt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Mo()&&i.callbackNode!==l)return null;var h=rc(i,i===Qt?tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Kc(i,h);else{s=h;var g=nt;nt|=2;var y=kx();(Qt!==i||tn!==s)&&(ui=null,Do=Dt()+500,ws(i,s));do try{WF();break}catch(I){vx(i,I)}while(!0);Kp(),jc.current=y,nt=g,Ht!==null?s=0:(Qt=null,tn=0,s=jt)}if(s!==0){if(s===2&&(g=dp(i),g!==0&&(h=g,s=Pm(i,g))),s===1)throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;if(s===6)Hi(i,h);else{if(g=i.current.alternate,(h&30)===0&&!qF(g)&&(s=Kc(i,h),s===2&&(y=dp(i),y!==0&&(h=y,s=Pm(i,y))),s===1))throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;switch(i.finishedWork=g,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Ss(i,Nn,ui);break;case 3:if(Hi(i,h),(h&130023424)===h&&(s=Nm+500-Dt(),10<s)){if(rc(i,0)!==0)break;if(g=i.suspendedLanes,(g&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Bp(Ss.bind(null,i,Nn,ui),s);break}Ss(i,Nn,ui);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,g=-1;0<h;){var x=31-hr(h);y=1<<x,x=s[x],x>g&&(g=x),h&=~y}if(h=g,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*VF(h/1960))-h,10<h){i.timeoutHandle=Bp(Ss.bind(null,i,Nn,ui),h);break}Ss(i,Nn,ui);break;case 5:Ss(i,Nn,ui);break;default:throw Error(n(329))}}}return On(i,Dt()),i.callbackNode===l?Cx.bind(null,i):null}function Pm(i,s){var l=_u;return i.current.memoizedState.isDehydrated&&(ws(i,s).flags|=256),i=Kc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Rm(s)),i}function Rm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function qF(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var g=l[h],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Hi(i,s){for(s&=~km,s&=~$c,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),h=1<<l;i[l]=-1,s&=~h}}function Ax(i){if((nt&6)!==0)throw Error(n(327));Mo();var s=rc(i,0);if((s&1)===0)return On(i,Dt()),null;var l=Kc(i,s);if(i.tag!==0&&l===2){var h=dp(i);h!==0&&(s=h,l=Pm(i,h))}if(l===1)throw l=Tu,ws(i,0),Hi(i,s),On(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ss(i,Nn,ui),On(i,Dt()),null}function Lm(i,s){var l=nt;nt|=1;try{return i(s)}finally{nt=l,nt===0&&(Do=Dt()+500,xc&&Ri())}}function xs(i){Bi!==null&&Bi.tag===0&&(nt&6)===0&&Mo();var s=nt;nt|=1;var l=tr.transition,h=lt;try{if(tr.transition=null,lt=1,i)return i()}finally{lt=h,tr.transition=l,nt=s,(nt&6)===0&&Ri()}}function Dm(){zn=Lo.current,yt(Lo)}function ws(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,_F(l)),Ht!==null)for(l=Ht.return;l!==null;){var h=l;switch(Vp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Tc();break;case 3:Io(),yt(An),yt(ln),rm();break;case 5:tm(h);break;case 4:Io();break;case 13:yt(At);break;case 19:yt(At);break;case 10:Qp(h.type._context);break;case 22:case 23:Dm()}l=l.return}if(Qt=i,Ht=i=zi(i.current,null),tn=zn=s,jt=0,Tu=null,km=$c=_s=0,Nn=_u=null,ys!==null){for(s=0;s<ys.length;s++)if(l=ys[s],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,h.next=x}l.pending=h}ys=null}return i}function vx(i,s){do{var l=Ht;try{if(Kp(),Pc.current=Mc,Rc){for(var h=vt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Rc=!1}if(Ts=0,Kt=zt=vt=null,pu=!1,mu=0,vm.current=null,l===null||l.return===null){jt=1,Tu=s,Ht=null;break}e:{var y=i,x=l.return,I=l,D=s;if(s=tn,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var G=D,se=I,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var re=se.alternate;re?(se.updateQueue=re.updateQueue,se.memoizedState=re.memoizedState,se.lanes=re.lanes):(se.updateQueue=null,se.memoizedState=null)}var xe=J_(x);if(xe!==null){xe.flags&=-257,Z_(xe,x,I,y,s),xe.mode&1&&X_(y,G,s),s=xe,D=G;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else Ae.add(D);break e}else{if((s&1)===0){X_(y,G,s),Mm();break e}D=Error(n(426))}}else if(St&&I.mode&1){var Mt=J_(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Z_(Mt,x,I,y,s),Wp(Po(D,I));break e}}y=D=Po(D,I),jt!==4&&(jt=2),_u===null?_u=[y]:_u.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=K_(y,D,s);x_(y,z);break e;case 1:I=D;var U=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Fi===null||!Fi.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=Q_(y,I,s);x_(y,Ee);break e}}y=y.return}while(y!==null)}Ox(l)}catch(Ne){s=Ne,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function kx(){var i=jc.current;return jc.current=Mc,i===null?Mc:i}function Mm(){(jt===0||jt===3||jt===2)&&(jt=4),Qt===null||(_s&268435455)===0&&($c&268435455)===0||Hi(Qt,tn)}function Kc(i,s){var l=nt;nt|=2;var h=kx();(Qt!==i||tn!==s)&&(ui=null,ws(i,s));do try{YF();break}catch(g){vx(i,g)}while(!0);if(Kp(),nt=l,jc.current=h,Ht!==null)throw Error(n(261));return Qt=null,tn=0,jt}function YF(){for(;Ht!==null;)Nx(Ht)}function WF(){for(;Ht!==null&&!yM();)Nx(Ht)}function Nx(i){var s=Rx(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?Ox(i):Ht=s,vm.current=null}function Ox(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=UF(l,s,zn),l!==null){Ht=l;return}}else{if(l=HF(l,s),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{jt=6,Ht=null;return}}if(s=s.sibling,s!==null){Ht=s;return}Ht=s=i}while(s!==null);jt===0&&(jt=5)}function Ss(i,s,l){var h=lt,g=tr.transition;try{tr.transition=null,lt=1,GF(i,s,l,h)}finally{tr.transition=g,lt=h}return null}function GF(i,s,l,h){do Mo();while(Bi!==null);if((nt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(kM(i,y),i===Qt&&(Ht=Qt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||qc||(qc=!0,Lx(Zl,function(){return Mo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var x=lt;lt=1;var I=nt;nt|=4,vm.current=null,jF(i,l),Tx(l,i),pF(Mp),oc=!!Dp,Mp=Dp=null,i.current=l,$F(l),bM(),nt=I,lt=x,tr.transition=y}else i.current=l;if(qc&&(qc=!1,Bi=i,Yc=g),y=i.pendingLanes,y===0&&(Fi=null),xM(l.stateNode),On(i,Dt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(Vc)throw Vc=!1,i=Om,Om=null,i;return(Yc&1)!==0&&i.tag!==0&&Mo(),y=i.pendingLanes,(y&1)!==0?i===Im?xu++:(xu=0,Im=i):xu=0,Ri(),null}function Mo(){if(Bi!==null){var i=y2(Yc),s=tr.transition,l=lt;try{if(tr.transition=null,lt=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,Yc=0,(nt&6)!==0)throw Error(n(331));var g=nt;for(nt|=4,Se=i.current;Se!==null;){var y=Se,x=y.child;if((Se.flags&16)!==0){var I=y.deletions;if(I!==null){for(var D=0;D<I.length;D++){var G=I[D];for(Se=G;Se!==null;){var se=Se;switch(se.tag){case 0:case 11:case 15:bu(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,Se=ce;else for(;Se!==null;){se=Se;var re=se.sibling,xe=se.return;if(mx(se),se===G){Se=null;break}if(re!==null){re.return=xe,Se=re;break}Se=xe}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}Se=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Se=x;else e:for(;Se!==null;){if(y=Se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:bu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Se=z;break e}Se=y.return}}var U=i.current;for(Se=U;Se!==null;){x=Se;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Se=V;else e:for(x=U;Se!==null;){if(I=Se,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:zc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===x){Se=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Se=Ee;break e}Se=I.return}}if(nt=g,Ri(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ec,i)}catch(Ne){}h=!0}return h}finally{lt=l,tr.transition=s}}return!1}function Ix(i,s,l){s=Po(l,s),s=K_(i,s,1),i=Di(i,s,1),s=En(),i!==null&&(Ya(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)Ix(i,i,l);else for(;s!==null;){if(s.tag===3){Ix(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Po(l,i),i=Q_(s,i,1),s=Di(s,i,1),i=En(),s!==null&&(Ya(s,1,i),On(s,i));break}}s=s.return}}function KF(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Qt===i&&(tn&l)===l&&(jt===4||jt===3&&(tn&130023424)===tn&&500>Dt()-Nm?ws(i,0):km|=l),On(i,s)}function Px(i,s){s===0&&((i.mode&1)===0?s=1:(s=nc,nc<<=1,(nc&130023424)===0&&(nc=4194304)));var l=En();i=si(i,s),i!==null&&(Ya(i,s,l),On(i,l))}function QF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Px(i,l)}function XF(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),Px(i,l)}var Rx;Rx=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,BF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,St&&(s.flags&1048576)!==0&&f_(s,Sc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Uc(i,s),i=s.pendingProps;var g=So(s,ln.current);Oo(s,l),g=om(null,s,h,i,g,l);var y=am();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(h)?(y=!0,_c(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Zp(s),g.updater=Fc,s.stateNode=g,g._reactInternals=s,hm(s,h,i,l),s=Em(null,s,h,!0,y,l)):(s.tag=0,St&&y&&$p(s),gn(null,s,g,l),s=s.child),s;case 16:h=s.elementType;e:{switch(Uc(i,s),i=s.pendingProps,g=h._init,h=g(h._payload),s.type=h,g=s.tag=ZF(h),i=gr(h,i),g){case 0:s=gm(null,s,h,i,l);break e;case 1:s=sx(null,s,h,i,l);break e;case 11:s=ex(null,s,h,i,l);break e;case 14:s=tx(null,s,h,gr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),gm(i,s,h,g,l);case 1:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),sx(i,s,h,g,l);case 3:e:{if(ox(s),i===null)throw Error(n(387));h=s.pendingProps,y=s.memoizedState,g=y.element,__(i,s),Oc(s,h,null,l);var x=s.memoizedState;if(h=x.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Po(Error(n(423)),s),s=ax(i,s,h,l,g);break e}else if(h!==g){g=Po(Error(n(424)),s),s=ax(i,s,h,l,g);break e}else for(Hn=Oi(s.stateNode.containerInfo.firstChild),Un=s,St=!0,mr=null,l=b_(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(vo(),h===g){s=ai(i,s,l);break e}gn(i,s,h,l)}s=s.child}return s;case 5:return S_(s),i===null&&Yp(s),h=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Fp(h,g)?x=null:y!==null&&Fp(h,y)&&(s.flags|=32),ix(i,s),gn(i,s,x,l),s.child;case 6:return i===null&&Yp(s),null;case 13:return ux(i,s,l);case 4:return em(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ko(s,null,h,l):gn(i,s,h,l),s.child;case 11:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),ex(i,s,h,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,mt(vc,h._currentValue),h._currentValue=x,y!==null)if(pr(y.value,x)){if(y.children===g.children&&!An.current){s=ai(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var D=I.firstContext;D!==null;){if(D.context===h){if(y.tag===1){D=oi(-1,l&-l),D.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var se=G.pending;se===null?D.next=D:(D.next=se.next,se.next=D),G.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Xp(y.return,l,s),I.lanes|=l;break}D=D.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),Xp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,h=s.pendingProps.children,Oo(s,l),g=Zn(g),h=h(g),s.flags|=1,gn(i,s,h,l),s.child;case 14:return h=s.type,g=gr(h,s.pendingProps),g=gr(h.type,g),tx(i,s,h,g,l);case 15:return nx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Uc(i,s),s.tag=1,vn(h)?(i=!0,_c(s)):i=!1,Oo(s,l),W_(s,h,g),hm(s,h,g,l),Em(null,s,h,!0,i,l);case 19:return cx(i,s,l);case 22:return rx(i,s,l)}throw Error(n(156,s.tag))};function Lx(i,s){return h2(i,s)}function JF(i,s,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,s,l,h){return new JF(i,s,l,h)}function Fm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ZF(i){if(typeof i=="function")return Fm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===be)return 14}return 2}function zi(i,s){var l=i.alternate;return l===null?(l=nr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Qc(i,s,l,h,g,y){var x=2;if(h=i,typeof i=="function")Fm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return Cs(l.children,g,y,s);case ge:x=8,g|=8;break;case ye:return i=nr(12,l,s,g|2),i.elementType=ye,i.lanes=y,i;case ue:return i=nr(13,l,s,g),i.elementType=ue,i.lanes=y,i;case de:return i=nr(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return Xc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case M:x=10;break e;case ae:x=9;break e;case he:x=11;break e;case be:x=14;break e;case Ce:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(x,l,s,g),s.elementType=i,s.type=h,s.lanes=y,s}function Cs(i,s,l,h){return i=nr(7,i,h,s),i.lanes=l,i}function Xc(i,s,l,h){return i=nr(22,i,h,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function Bm(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function Um(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function eB(i,s,l,h,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fp(0),this.expirationTimes=fp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fp(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Hm(i,s,l,h,g,y,x,I,D){return i=new eB(i,s,l,I,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zp(y),i}function tB(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Dx(i){if(!i)return Pi;i=i._reactInternals;e:{if(hs(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return l_(i,l,s)}return s}function Mx(i,s,l,h,g,y,x,I,D){return i=Hm(l,h,!0,i,g,y,x,I,D),i.context=Dx(null),l=i.current,h=En(),g=Ui(l),y=oi(h,g),y.callback=s!=null?s:null,Di(l,y,g),i.current.lanes=g,Ya(i,g,h),On(i,h),i}function Jc(i,s,l,h){var g=s.current,y=En(),x=Ui(g);return l=Dx(l),s.context===null?s.context=l:s.pendingContext=l,s=oi(y,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Di(g,s,x),i!==null&&(br(i,g,x,y),Nc(i,g,x)),x}function Zc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Fx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function zm(i,s){Fx(i,s),(i=i.alternate)&&Fx(i,s)}function nB(){return null}var Bx=typeof reportError=="function"?reportError:function(i){console.error(i)};function jm(i){this._internalRoot=i}ed.prototype.render=jm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Jc(i,s,null,null)},ed.prototype.unmount=jm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;xs(function(){Jc(null,i,null,null)}),s[ti]=null}};function ed(i){this._internalRoot=i}ed.prototype.unstable_scheduleHydration=function(i){if(i){var s=_2();i={blockedOn:null,target:i,priority:s};for(var l=0;l<vi.length&&s!==0&&s<vi[l].priority;l++);vi.splice(l,0,i),l===0&&S2(i)}};function $m(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function td(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Ux(){}function rB(i,s,l,h,g){if(g){if(typeof h=="function"){var y=h;h=function(){var G=Zc(x);y.call(G)}}var x=Mx(s,h,i,0,null,!1,!1,"",Ux);return i._reactRootContainer=x,i[ti]=x.current,ou(i.nodeType===8?i.parentNode:i),xs(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof h=="function"){var I=h;h=function(){var G=Zc(D);I.call(G)}}var D=Hm(i,0,!1,null,null,!1,!1,"",Ux);return i._reactRootContainer=D,i[ti]=D.current,ou(i.nodeType===8?i.parentNode:i),xs(function(){Jc(s,D,l,h)}),D}function nd(i,s,l,h,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var D=Zc(x);I.call(D)}}Jc(s,x,i,g)}else x=rB(l,s,i,g,h);return Zc(x)}b2=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=qa(s.pendingLanes);l!==0&&(hp(s,l|1),On(s,Dt()),(nt&6)===0&&(Do=Dt()+500,Ri()))}break;case 13:xs(function(){var h=si(i,1);if(h!==null){var g=En();br(h,i,1,g)}}),zm(i,1)}},pp=function(i){if(i.tag===13){var s=si(i,134217728);if(s!==null){var l=En();br(s,i,134217728,l)}zm(i,134217728)}},T2=function(i){if(i.tag===13){var s=Ui(i),l=si(i,s);if(l!==null){var h=En();br(l,i,s,h)}zm(i,s)}},_2=function(){return lt},x2=function(i,s){var l=lt;try{return lt=i,s()}finally{lt=l}},op=function(i,s,l){switch(s){case"input":if(Zr(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var g=bc(h);if(!g)throw Error(n(90));cs(h),Zr(h,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&Xe(i,!!l.multiple,s,!1)}},o2=Lm,a2=xs;var iB={usingClientEntryPoint:!1,Events:[lu,xo,bc,i2,s2,Lm]},wu={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sB={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=d2(i),i===null?null:i.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||nB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{ec=rd.inject(sB),Dr=rd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iB,Cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$m(s))throw Error(n(200));return tB(i,s,null,l)},Cn.createRoot=function(i,s){if(!$m(i))throw Error(n(299));var l=!1,h="",g=Bx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Hm(i,1,!1,null,null,l,!1,h,g),i[ti]=s.current,ou(i.nodeType===8?i.parentNode:i),new jm(s)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=d2(s),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return xs(i)},Cn.hydrate=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!0,l)},Cn.hydrateRoot=function(i,s,l){if(!$m(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,g=!1,y="",x=Bx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=Mx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ti]=s.current,ou(i),h)for(i=0;i<h.length;i++)l=h[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new ed(s)},Cn.render=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!1,l)},Cn.unmountComponentAtNode=function(i){if(!td(i))throw Error(n(40));return i._reactRootContainer?(xs(function(){nd(null,null,i,!1,function(){i._reactRootContainer=null,i[ti]=null})}),!0):!1},Cn.unstable_batchedUpdates=Lm,Cn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!td(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return nd(i,s,l,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var rb;function ib(){if(rb)return Eh.exports;rb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=t6(),Eh.exports}var Ia=ib();function n6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Th=()=>e=>Array.from(new Set(e)),sb=typeof globalThis.document!="undefined"?$.useLayoutEffect:$.useEffect;function Pl(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=$.useState(t),[o,a]=$.useState(r),u=e().value!==void 0,c=$.useRef(o);c.current=u?e().value:o;const d=$.useRef(c.current);sb(()=>{d.current=c.current},[o,e().value]);const f=b=>{var A,k;const _=d.current,w=Xs(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(k=(A=e()).onChange)==null||k.call(A,w,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(b){(e().sync?Ia.flushSync:ZR)(()=>f(b))},invoke(b,_){var w,A;(A=(w=e()).onChange)==null||A.call(w,b,_)},hash(b){var _,w,A;return(A=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?A:String(b)}}}Pl.cleanup=e=>{$.useEffect(()=>e,[])},Pl.ref=e=>{const t=$.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function r6(e){const t=$.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var i6=(e,t)=>{const n=$.useRef(!1),r=$.useRef(!1);$.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),$.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function _h(e,t={}){var ae,he,ue,de,be,Ce;const n=$.useMemo(()=>{const{id:oe,ids:q,getRootNode:ne}=t;return JL({id:oe,ids:q,getRootNode:ne})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:oh(t),scope:n}))!=null?he:t,a=s6(o),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Pl,scope:n,flush:ab,getContext(){return d},getComputed(){return X},getRefs(){return w},getEvent(){return b()}}),c=ob(u),d={get(oe){var q;return(q=c.current)==null?void 0:q[oe].ref.current},set(oe,q){var ne;(ne=c.current)==null||ne[oe].set(q)},initial(oe){var q;return(q=c.current)==null?void 0:q[oe].initial},hash(oe){var ne,S;const q=(ne=c.current)==null?void 0:ne[oe].get();return(S=c.current)==null?void 0:S[oe].hash(q)}},f=$.useRef(new Map),p=$.useRef(null),E=$.useRef(null),T=$.useRef({type:""}),b=()=>Te(H({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>Te(H({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(oe))}}),w=r6((be=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:_(),context:d,event:b(),prop:a,send:M,action:k,guard:F,track:i6,refs:w,computed:X,flush:ab,scope:n,choose:W}),k=oe=>{const q=Xs(oe)?oe(A()):oe;if(!q)return;const ne=q.map(S=>{var Q,O;const L=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[S];return L||ah(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),L});for(const S of ne)S==null||S(A())},F=oe=>{var q,ne;return Xs(oe)?oe(A()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[oe](A())},R=oe=>{const q=Xs(oe)?oe(A()):oe;if(!q)return;const ne=q.map(L=>{var O,_e;const Q=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[L];return Q||ah(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),Q}),S=[];for(const L of ne){const Q=L==null?void 0:L(A());Q&&S.push(Q)}return()=>S.forEach(L=>L==null?void 0:L())},W=oe=>$R(oe).find(q=>{let ne=!q.guard;return Cl(q.guard)?ne=!!F(q.guard):Xs(q.guard)&&(ne=q.guard(A())),ne}),X=oe=>{tL(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[oe];return q({context:d,event:b(),prop:a,refs:w,scope:n,computed:X})},B=Pl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,q){var S,L,Q,O;if(q){const _e=f.current.get(q);_e==null||_e(),f.current.delete(q)}q&&k((S=e.states[q])==null?void 0:S.exit),k((L=p.current)==null?void 0:L.actions);const ne=R((Q=e.states[oe])==null?void 0:Q.effects);if(ne&&f.current.set(oe,ne),q===gh){k(e.entry);const _e=R(e.effects);_e&&f.current.set(gh,_e)}k((O=e.states[oe])==null?void 0:O.entry)}})),te=$.useRef(void 0),ge=$.useRef(eo.NotStarted);sb(()=>{queueMicrotask(()=>{var L;const ne=ge.current===eo.Started;ge.current=eo.Started,r(ne?"rehydrating...":"initializing...");const S=(L=te.current)!=null?L:B.initial;B.invoke(S,ne?B.get():gh)});const oe=f.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=eo.Stopped,oe.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,p.current=null,queueMicrotask(()=>{k(e.exit)})}},[]);const ye=()=>"ref"in B?B.ref.current:B.get(),M=oe=>{queueMicrotask(()=>{var O,_e,Re,Oe,Ge;if(ge.current!==eo.Started)return;E.current=T.current,T.current=oe;let q=ye();const ne=(Re=(O=e.states[q].on)==null?void 0:O[oe.type])!=null?Re:(_e=e.on)==null?void 0:_e[oe.type],S=W(ne);if(!S)return;p.current=S;const L=(Oe=S.target)!=null?Oe:q;r("transition",oe.type,S.target||q,`(${S.actions})`);const Q=L!==q;Q?Ia.flushSync(()=>B.set(L)):S.reenter&&!Q?B.invoke(q,q):k((Ge=S.actions)!=null?Ge:[])})};return(Ce=e.watch)==null||Ce.call(e,A()),{state:_(),send:M,context:d,prop:a,scope:n,refs:w,computed:X,event:b(),getStatus:()=>ge.current}}function ob(e){const t=$.useRef(e);return t.current=e,t}function s6(e){const t=ob(e);return function(r){return t.current[r]}}function ab(e){queueMicrotask(()=>{Ia.flushSync(()=>e())})}var ub=n6(e=>e);function Rl(...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 o6(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 xh=e=>{const t=$.memo($.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=nn(f,["asChild","children"]);if(!o)return $.createElement(e,Te(H({},u),{ref:r}),a);if(!$.isValidElement(a))return null;const c=$.Children.only(a),d=o6(c);return $.cloneElement(c,Te(H({},cr(u,c.props)),{ref:r?Rl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yi=(()=>{const e=new Map;return new Proxy(xh,{apply(t,n,r){return xh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,xh(r)),e.get(r)}})})();function a6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function to(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=$.createContext(u);c.displayName=t;function d(){var p;const f=$.useContext(c);if(!f&&n){const E=new Error(a!=null?a:a6(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return f}return[c.Provider,d,c]}const[u6,wh]=to({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[lb,Pa]=to({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),cb=$.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});cb.displayName="PopoverContent";const db=$.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=cr(n.getPositionerProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:t}))});db.displayName="PopoverPositioner";const fb=()=>(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]},[{},H({},e)]),hb=e=>fb()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function l6(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 c6={props({props:e}){return Te(H({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Nl(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"});Sn(()=>{var c,d;const u=Ll(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})=>{Sn(()=>{e.set("prevAnimationName",Ll(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,E,T;((T=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Ll(t.get("styles")))},u=d=>{const f=Ll(t.get("styles"));Yr(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=Il(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),HL(()=>c())}}}}};function Ll(e){return(e==null?void 0:e.animationName)||"none"}Th()(["onExitComplete","present","immediate"]);function d6(e,t={}){const{sync:n=!1}=t,r=f6(e);return $.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 f6(e){const t=$.useRef(e);return t.current=e,t}const Sh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=nn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=$.useRef(!1),c=Te(H({},a),{present:r,onExitComplete:d6(e.onExitComplete)}),d=_h(c6,c),f=l6(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,E=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:E,present:f.present,unmounted:p}};var no=(e,t=[])=>({parts:(...n)=>{if(h6(t))return no(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>no(e,[...t,...n]),omit:(...n)=>no(e,t.filter(r=>!n.includes(r))),rename:n=>no(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ro(e)}"][data-part="${ro(r)}"]`,`& [data-scope="${ro(e)}"][data-part="${ro(r)}"]`].join(", "),attrs:{"data-scope":ro(e),"data-part":ro(r)}}}),{})}),ro=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),h6=e=>e.length===0;const p6=["top","right","bottom","left"],bi=Math.min,Dn=Math.max,Dl=Math.round,Ml=Math.floor,kr=e=>({x:e,y:e}),m6={left:"right",right:"left",bottom:"top",top:"bottom"},g6={start:"end",end:"start"};function Ch(e,t,n){return Dn(e,bi(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function io(e){return e.split("-")[1]}function Ah(e){return e==="x"?"y":"x"}function vh(e){return e==="y"?"height":"width"}const E6=new Set(["top","bottom"]);function Nr(e){return E6.has(Kr(e))?"y":"x"}function kh(e){return Ah(Nr(e))}function y6(e,t,n){n===void 0&&(n=!1);const r=io(e),o=kh(e),a=vh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Fl(u)),[u,Fl(u)]}function b6(e){const t=Fl(e);return[Nh(e),t,Nh(t)]}function Nh(e){return e.replace(/start|end/g,t=>g6[t])}const pb=["left","right"],mb=["right","left"],T6=["top","bottom"],_6=["bottom","top"];function x6(e,t,n){switch(e){case"top":case"bottom":return n?t?mb:pb:t?pb:mb;case"left":case"right":return t?T6:_6;default:return[]}}function w6(e,t,n,r){const o=io(e);let a=x6(Kr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Nh)))),a}function Fl(e){return e.replace(/left|right|bottom|top/g,t=>m6[t])}function S6(e){return H({top:0,right:0,bottom:0,left:0},e)}function gb(e){return typeof e!="number"?S6(e):{top:e,right:e,bottom:e,left:e}}function Bl(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 Eb(e,t,n){let{reference:r,floating:o}=e;const a=Nr(t),u=kh(t),c=vh(u),d=Kr(t),f=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:p,y:r.y-o.height};break;case"bottom":b={x:p,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(io(t)){case"start":b[u]-=T*(n&&f?-1:1);break;case"end":b[u]+=T*(n&&f?-1:1);break}return b}const C6=(e,t,n)=>rt(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:E}=Eb(f,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:A,fn:k}=c[w],{x:F,y:R,data:W,reset:X}=yield k({x:p,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});p=F!=null?F:p,E=R!=null?R:E,b=Te(H({},b),{[A]:H(H({},b[A]),W)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(T=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:p,y:E}=Eb(f,T,d)),w=-1)}return{x:p,y:E,placement:T,strategy:o,middlewareData:b}});function Ra(e,t){return rt(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:E="floating",altBoundary:T=!1,padding:b=0}=Gr(t,e),_=gb(b),A=c[T?E==="floating"?"reference":"floating":E],k=Bl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),F=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),W=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},X=Bl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:R,strategy:d}):F);return{top:(k.top-X.top+_.top)/W.y,bottom:(X.bottom-k.bottom+_.bottom)/W.y,left:(k.left-X.left+_.left)/W.x,right:(X.right-k.right+_.right)/W.x}})}const A6=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:E=0}=Gr(e,n)||{};if(p==null)return{};const T=gb(E),b={x:r,y:o},_=kh(a),w=vh(_),A=yield c.getDimensions(p),k=_==="y",F=k?"top":"left",R=k?"bottom":"right",W=k?"clientHeight":"clientWidth",X=u.reference[w]+u.reference[_]-b[_]-u.floating[w],B=b[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ge=te?te[W]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[W]||u.floating[w]);const ye=X/2-B/2,M=ge/2-A[w]/2-1,ae=bi(T[F],M),he=bi(T[R],M),ue=ae,de=ge-A[w]-he,be=ge/2-A[w]/2+ye,Ce=Ch(ue,be,de),oe=!f.arrow&&io(a)!=null&&be!==Ce&&u.reference[w]/2-(be<ue?ae:he)-A[w]/2<0,q=oe?be<ue?be-ue:be-de:0;return{[_]:b[_]+q,data:H({[_]:Ce,centerOffset:be-Ce-q},oe&&{alignmentOffset:q}),reset:oe}})}}),v6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=Gr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0}=be,k=nn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Kr(a),R=Nr(d),W=Kr(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),B=b||(W||!A?[Fl(d)]:b6(d)),te=w!=="none";!b&&te&&B.push(...w6(d,A,w,X));const ge=[d,...B],ye=yield Ra(n,k),M=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&M.push(ye[F]),T){const Ce=y6(a,c,X);M.push(ye[Ce[0]],ye[Ce[1]])}if(ae=[...ae,{placement:a,overflows:M}],!M.every(Ce=>Ce<=0)){var he,ue;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=ge[Ce];if(oe&&(!(T==="alignment"?R!==Nr(oe):!1)||ae.every(S=>Nr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ae},reset:{placement:oe}};let q=(ue=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,S)=>ne.overflows[1]-S.overflows[1])[0])==null?void 0:ue.placement;if(!q)switch(_){case"bestFit":{var de;const ne=(de=ae.filter(S=>{if(te){const L=Nr(S.placement);return L===R||L==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(L=>L>0).reduce((L,Q)=>L+Q,0)]).sort((S,L)=>S[1]-L[1])[0])==null?void 0:de[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function yb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bb(e){return p6.some(t=>e[t]>=0)}const k6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,u=Gr(e,n),{strategy:o="referenceHidden"}=u,a=nn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ra(n,Te(H({},a),{elementContext:"reference"})),d=yb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:bb(d)}}}case"escaped":{const c=yield Ra(n,Te(H({},a),{altBoundary:!0})),d=yb(c,r.floating);return{data:{escapedOffsets:d,escaped:bb(d)}}}default:return{}}})}}},Tb=new Set(["left","top"]);function N6(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Kr(n),c=io(n),d=Nr(n)==="y",f=Tb.has(u)?-1:1,p=a&&d?-1:1,E=Gr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*p,y:T*f}:{x:T*f,y:b*p}})}const O6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield N6(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:Te(H({},f),{placement:c})}})}}},I6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a}=n,k=Gr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:F=>{let{x:R,y:W}=F;return{x:R,y:W}}}}=k,f=nn(k,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield Ra(n,f),T=Nr(Kr(a)),b=Ah(T);let _=p[b],w=p[T];if(u){const F=b==="y"?"top":"left",R=b==="y"?"bottom":"right",W=_+E[F],X=_-E[R];_=Ch(W,_,X)}if(c){const F=T==="y"?"top":"left",R=T==="y"?"bottom":"right",W=w+E[F],X=w-E[R];w=Ch(W,w,X)}const A=d.fn(Te(H({},n),{[b]:_,[T]:w}));return Te(H({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[b]:u,[T]:c}}})})}}},P6=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}=Gr(e,t),p={x:n,y:r},E=Nr(o),T=Ah(E);let b=p[T],_=p[E];const w=Gr(c,t),A=typeof w=="number"?{mainAxis:w,crossAxis:0}:H({mainAxis:0,crossAxis:0},w);if(d){const R=T==="y"?"height":"width",W=a.reference[T]-a.floating[R]+A.mainAxis,X=a.reference[T]+a.reference[R]-A.mainAxis;b<W?b=W:b>X&&(b=X)}if(f){var k,F;const R=T==="y"?"width":"height",W=Tb.has(Kr(o)),X=a.reference[E]-a.floating[R]+(W&&((k=u.offset)==null?void 0:k[E])||0)+(W?0:A.crossAxis),B=a.reference[E]+a.reference[R]+(W?0:((F=u.offset)==null?void 0:F[E])||0)-(W?A.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[T]:b,[E]:_}}}},R6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=Gr(e,n),{apply:f=()=>{}}=ae,p=nn(ae,["apply"]),E=yield Ra(n,p),T=Kr(a),b=io(a),_=Nr(a)==="y",{width:w,height:A}=u.floating;let k,F;T==="top"||T==="bottom"?(k=T,F=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(F=T,k=b==="end"?"top":"bottom");const R=A-E.top-E.bottom,W=w-E.left-E.right,X=bi(A-E[k],R),B=bi(w-E[F],W),te=!n.middlewareData.shift;let ge=X,ye=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=W),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=R),te&&!b){const he=Dn(E.left,0),ue=Dn(E.right,0),de=Dn(E.top,0),be=Dn(E.bottom,0);_?ye=w-2*(he!==0||ue!==0?he+ue:Dn(E.left,E.right)):ge=A-2*(de!==0||be!==0?de+be:Dn(E.top,E.bottom))}yield f(Te(H({},n),{availableWidth:ye,availableHeight:ge}));const M=yield c.getDimensions(d.floating);return w!==M.width||A!==M.height?{reset:{rects:!0}}:{}})}}};function Ul(){return typeof window!="undefined"}function so(e){return _b(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(_b(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _b(e){return Ul()?e instanceof Node||e instanceof Mn(e).Node:!1}function dr(e){return Ul()?e instanceof Element||e instanceof Mn(e).Element:!1}function Ir(e){return Ul()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function xb(e){return!Ul()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const L6=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!L6.has(o)}const D6=new Set(["table","td","th"]);function M6(e){return D6.has(so(e))}const F6=[":popover-open",":modal"];function Hl(e){return F6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const B6=["transform","translate","scale","rotate","perspective"],U6=["transform","translate","scale","rotate","perspective","filter"],H6=["paint","layout","strict","content"];function Oh(e){const t=Ih(),n=dr(e)?fr(e):e;return B6.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)||U6.some(r=>(n.willChange||"").includes(r))||H6.some(r=>(n.contain||"").includes(r))}function z6(e){let t=Ti(e);for(;Ir(t)&&!oo(t);){if(Oh(t))return t;if(Hl(t))return null;t=Ti(t)}return null}function Ih(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j6=new Set(["html","body","#document"]);function oo(e){return j6.has(so(e))}function fr(e){return Mn(e).getComputedStyle(e)}function zl(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ti(e){if(so(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xb(e)&&e.host||Or(e);return xb(t)?t.host:t}function wb(e){const t=Ti(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ir(t)&&La(t)?t:wb(t)}function Da(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wb(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=Ph(u);return t.concat(u,u.visualViewport||[],La(o)?o:[],c&&n?Da(c):[])}return t.concat(o,Da(o,[],n))}function Ph(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sb(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ir(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Dl(n)!==a||Dl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Rh(e){return dr(e)?e:e.contextElement}function ao(e){const t=Rh(e);if(!Ir(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Sb(t);let u=(a?Dl(n.width):n.width)/r,c=(a?Dl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const $6=kr(0);function Cb(e){const t=Mn(e);return!Ih()||!t.visualViewport?$6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function as(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Rh(e);let u=kr(1);t&&(r?dr(r)&&(u=ao(r)):u=ao(e));const c=V6(a,n,r)?Cb(a):kr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const T=Mn(a),b=r&&dr(r)?Mn(r):r;let _=T,w=Ph(_);for(;w&&r&&b!==_;){const A=ao(w),k=w.getBoundingClientRect(),F=fr(w),R=k.left+(w.clientLeft+parseFloat(F.paddingLeft))*A.x,W=k.top+(w.clientTop+parseFloat(F.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,E*=A.y,d+=R,f+=W,_=Mn(w),w=Ph(_)}}return Bl({width:p,height:E,x:d,y:f})}function jl(e,t){const n=zl(e).scrollLeft;return t?t.left+n:as(Or(e)).left+n}function Ab(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function q6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Or(r),c=t?Hl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=kr(1);const p=kr(0),E=Ir(r);if((E||!E&&!a)&&((so(r)!=="body"||La(u))&&(d=zl(r)),Ir(r))){const b=as(r);f=ao(r),p.x=b.x+r.clientLeft,p.y=b.y+r.clientTop}const T=u&&!E&&!a?Ab(u,d):kr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function Y6(e){return Array.from(e.getClientRects())}function W6(e){const t=Or(e),n=zl(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+jl(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const vb=25;function G6(e,t){const n=Mn(e),r=Or(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=Ih();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=jl(r);if(f<=0){const p=r.ownerDocument,E=p.body,T=getComputedStyle(E),b=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=vb&&(a-=_)}else f<=vb&&(a+=f);return{width:a,height:u,x:c,y:d}}const K6=new Set(["absolute","fixed"]);function Q6(e,t){const n=as(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ir(e)?ao(e):kr(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 kb(e,t,n){let r;if(t==="viewport")r=G6(e,n);else if(t==="document")r=W6(Or(e));else if(dr(t))r=Q6(t,n);else{const o=Cb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Bl(r)}function Nb(e,t){const n=Ti(e);return n===t||!dr(n)||oo(n)?!1:fr(n).position==="fixed"||Nb(n,t)}function X6(e,t){const n=t.get(e);if(n)return n;let r=Da(e,[],!1).filter(c=>dr(c)&&so(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?Ti(e):e;for(;dr(u)&&!oo(u);){const c=fr(u),d=Oh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&K6.has(o.position)||La(u)&&!d&&Nb(e,u))?r=r.filter(p=>p!==u):o=c,u=Ti(u)}return t.set(e,r),r}function J6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Hl(t)?[]:X6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const E=kb(t,p,o);return f.top=Dn(E.top,f.top),f.right=bi(E.right,f.right),f.bottom=bi(E.bottom,f.bottom),f.left=Dn(E.left,f.left),f},kb(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Z6(e){const{width:t,height:n}=Sb(e);return{width:t,height:n}}function e4(e,t,n){const r=Ir(t),o=Or(t),a=n==="fixed",u=as(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=kr(0);function f(){d.x=jl(o)}if(r||!r&&!a)if((so(t)!=="body"||La(o))&&(c=zl(t)),r){const b=as(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?Ab(o,c):kr(0),E=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:E,y:T,width:u.width,height:u.height}}function Lh(e){return fr(e).position==="static"}function Ob(e,t){if(!Ir(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Or(e)===n&&(n=n.ownerDocument.body),n}function Ib(e,t){const n=Mn(e);if(Hl(e))return n;if(!Ir(e)){let o=Ti(e);for(;o&&!oo(o);){if(dr(o)&&!Lh(o))return o;o=Ti(o)}return n}let r=Ob(e,t);for(;r&&M6(r)&&Lh(r);)r=Ob(r,t);return r&&oo(r)&&Lh(r)&&!Oh(r)?n:r||z6(e)||n}const t4=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||Ib,n=this.getDimensions,r=yield n(e.floating);return{reference:e4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function n4(e){return fr(e).direction==="rtl"}const r4={convertOffsetParentRelativeRectToViewportRelativeRect:q6,getDocumentElement:Or,getClippingRect:J6,getOffsetParent:Ib,getElementRects:t4,getClientRects:Y6,getDimensions:Z6,getScale:ao,isElement:dr,isRTL:n4};function Pb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function i4(e,t){let n=null,r;const o=Or(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:E,width:T,height:b}=f;if(c||t(),!T||!b)return;const _=Ml(E),w=Ml(o.clientWidth-(p+T)),A=Ml(o.clientHeight-(E+b)),k=Ml(p),R={rootMargin:-_+"px "+-w+"px "+-A+"px "+-k+"px",threshold:Dn(0,bi(1,d))||1};let W=!0;function X(B){const te=B[0].intersectionRatio;if(te!==d){if(!W)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!Pb(f,e.getBoundingClientRect())&&u(),W=!1}try{n=new IntersectionObserver(X,Te(H({},R),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,R)}n.observe(e)}return u(!0),a}function s4(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=Rh(e),p=o||a?[...f?Da(f):[],...Da(t)]:[];p.forEach(k=>{o&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const E=f&&c?i4(f,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(k=>{let[F]=k;F&&F.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,w=d?as(e):null;d&&A();function A(){const k=as(e);w&&!Pb(w,k)&&n(),w=k,_=requestAnimationFrame(A)}return n(),()=>{var k;p.forEach(F=>{o&&F.removeEventListener("scroll",n),a&&F.removeEventListener("resize",n)}),E==null||E(),(k=b)==null||k.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const o4=O6,a4=I6,u4=v6,l4=R6,c4=k6,d4=A6,f4=P6,h4=(e,t,n)=>{const r=new Map,o=H({platform:r4},n),a=Te(H({},o.platform),{_c:r});return C6(e,t,Te(H({},o),{platform:a}))};function Rb(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 Te(H({},o),{toJSON:()=>o})}function p4(e){if(!e)return Rb();const{x:t,y:n,width:r,height:o}=e;return Rb(t,n,r,o)}function m4(e,t){return{contextElement:Gt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?p4(r):n.getBoundingClientRect()}}}var Ma=e=>({variable:e,reference:`var(${e})`}),Qr={arrowSize:Ma("--arrow-size"),arrowSizeHalf:Ma("--arrow-size-half"),arrowBg:Ma("--arrow-background"),transformOrigin:Ma("--transform-origin"),arrowOffset:Ma("--arrow-offset")},g4=e=>e==="top"||e==="bottom"?"y":"x";function E4(e,t){return{name:"transformOrigin",fn(n){var ye,M,ae,he,ue;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=g4(d),p=((ye=o.arrow)==null?void 0:ye.x)||0,E=((M=o.arrow)==null?void 0:M.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=E+b/2,A=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),k=u.reference.height/2,F=b/2,R=(ue=(he=e.offset)==null?void 0:he.mainAxis)!=null?ue:e.gutter,W=typeof R=="number"?R+F:R!=null?R:F,X=A>W,B={top:`${_}px calc(100% + ${W}px)`,bottom:`${_}px ${-W}px`,left:`calc(100% + ${W}px) ${w}px`,right:`${-W}px ${w}px`}[d],te=`${_}px ${u.reference.y+k-c}px`,ge=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(Qr.transformOrigin.variable,ge?te:B),{data:{transformOrigin:ge?te:B}}}}}var y4={name:"rects",fn({rects:e}){return{data:e}}},b4=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% + ${Qr.arrowOffset.reference})`}),{}}}};function T4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var _4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Lb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Dh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function x4(e,t,n){const r=e||t.createElement("div");return d4({element:r,padding:n.arrowPadding})}function w4(e,t){var n;if(!qR((n=t.offset)!=null?n:t.gutter))return o4(({placement:r})=>{var p,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=T4(r),d=c?void 0:t.shift,f=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return oh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function S4(e){if(!e.flip)return;const t=Dh(e.boundary);return u4(Te(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function C4(e){if(!e.slide&&!e.overlap)return;const t=Dh(e.boundary);return a4(Te(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:f4()}))}function A4(e){return l4({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 v4(e){var t;if(e.hideWhenDetached)return c4({strategy:"referenceHidden",boundary:(t=Dh(e.boundary))!=null?t:"clippingAncestors"})}function k4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function N4(e,t,n={}){const r=m4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},_4,n),a=t.querySelector("[data-part=arrow]"),u=[w4(a,o),S4(o),C4(o),x4(a,t.ownerDocument,o),b4(a),E4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),A4(o),v4(o),y4],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,E=()=>rt(null,null,function*(){var W;if(!r||!t)return;const w=yield h4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const A=Js(t),k=Lb(A,w.x),F=Lb(A,w.y);t.style.setProperty("--x",`${k}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((W=w.middlewareData.hide)==null?void 0:W.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const X=Nl(R);t.style.setProperty("--z-index",X.zIndex)}}),T=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),b=k4(o.listeners),_=o.listeners?s4(r,t,T,b):eL;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function Db(e,t,n={}){const c=n,{defer:r}=c,o=nn(c,["defer"]),a=r?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(N4(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var O4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function I4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Qr.arrowSize.reference,height:Qr.arrowSize.reference,[Qr.arrowSizeHalf.variable]:`calc(${Qr.arrowSize.reference} / 2)`,[Qr.arrowOffset.variable]:`calc(${Qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?O4[t.split("-")[0]]:void 0,background:Qr.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 uo=new WeakMap,$l=new WeakMap,Vl={},Mh=0,Mb=e=>e&&(e.host||Mb(e.parentNode)),P4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Mb(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),R4=new Set(["script","output","status","next-route-announcer"]),L4=e=>R4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),D4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=P4(n,Array.isArray(e)?e:[e]);Vl[r]||(Vl[r]=new WeakMap);const c=Vl[r],d=[],f=new Set,p=new Set(u),E=b=>{!b||f.has(b)||(f.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Gt(b)&&qy(b,_=>{E(_)})});const T=b=>{!b||p.has(b)||Array.prototype.forEach.call(b.children,_=>{if(f.has(_))T(_);else try{if(L4(_))return;const A=_.getAttribute(o)==="true",k=(uo.get(_)||0)+1,F=(c.get(_)||0)+1;uo.set(_,k),c.set(_,F),d.push(_),k===1&&A&&$l.set(_,!0),F===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Mh++,()=>{d.forEach(b=>{const _=uo.get(b)-1,w=c.get(b)-1;uo.set(b,_),c.set(b,w),_||($l.has(b)||b.removeAttribute(o),$l.delete(b)),w||b.removeAttribute(r)}),Mh--,Mh||(uo=new WeakMap,uo=new WeakMap,$l=new WeakMap,Vl={})}},M4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,F4=(e,t=M4(e),n="data-aria-hidden",r=!0)=>{if(t)return D4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},B4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Fb(e,t={}){const{defer:n=!0}=t,r=n?B4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(F4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function U4(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 H4(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 Bb="pointerdown.outside",Ub="focus.outside";function z4(e){for(const t of e)if(Gt(t)&&Wr(t))return!0;return!1}var Hb=e=>"clientY"in e;function j4(e,t){if(!Hb(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 $4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function zb(e,t){if(!t||!Hb(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 $4(u,c)?r||a:!1}function V4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=vr(e),f=Js(e),p=U4(f),E=H4(f);function T(R,W){if(!Gt(W)||!W.isConnected||kl(e,W)||j4(e,R)||c&&Vy(e,W))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=mh(X);if(zb(R,te))return!1}const B=mh(e);return zb(R,B)?!1:!(n!=null&&n(W))}const b=new Set,_=ss(e==null?void 0:e.getRootNode());function w(R){function W(X){var ye,M;const B=u&&!Yy()?Sn:ae=>ae(),te=X!=null?X:R,ge=(M=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?M:[te==null?void 0:te.target];B(()=>{const ae=_?ge[0]:Yr(R);if(!(!e||!T(R,ae))){if(o||a){const he=sh(o,a);e.addEventListener(Bb,he,{once:!0})}jb(e,Bb,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:PL(te),focusable:z4(ge),target:ae}})}})}R.pointerType==="touch"?(b.forEach(X=>X()),b.add(lr(d,"click",W,{once:!0})),b.add(E.addEventListener("click",W,{once:!0})),b.add(p.addEventListener("click",W,{once:!0}))):W()}const A=new Set,k=setTimeout(()=>{A.add(lr(d,"pointerdown",w,!0)),A.add(E.addEventListener("pointerdown",w,!0)),A.add(p.addEventListener("pointerdown",w,!0))},0);function F(R){(u?Sn:X=>X())(()=>{var te,ge;const X=(ge=(te=R==null?void 0:R.composedPath)==null?void 0:te.call(R))!=null?ge:[R==null?void 0:R.target],B=_?X[0]:Yr(R);if(!(!e||!T(R,B))){if(r||a){const ye=sh(r,a);e.addEventListener(Ub,ye,{once:!0})}jb(e,Ub,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:Wr(B),target:B}})}})}return Yy()||(A.add(lr(d,"focusin",F,!0)),A.add(E.addEventListener("focusin",F,!0)),A.add(p.addEventListener("focusin",F,!0))),()=>{clearTimeout(k),b.forEach(R=>R()),A.forEach(R=>R())}}function q4(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(V4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function jb(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function Y4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return lr(vr(e),"keydown",n,{capture:!0})}var $b="layer:request-dismiss",Gn={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=>kl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>kl(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=>Gn.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];G4(e,$b,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),W4(e,$b,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function W4(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 G4(e,t,n){e.addEventListener(t,n,{once:!0})}var Vb;function qb(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function K4(e){e.style.pointerEvents=""}function Q4(e,t){const n=vr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Vb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=GL(()=>{const c=o();return Gt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Il(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Vb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function X4(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){ah("[@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};Gn.add(f),qb();function p(w){var k,F;const A=Yr(w.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(A)||((k=t.onPointerDownOutside)==null||k.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var k,F;const A=Yr(w.detail.originalEvent);Gn.isInBranch(A)||((k=t.onFocusOutside)==null||k.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var A;Gn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var R;if(!e)return!1;const A=typeof u=="function"?u():u,k=Array.isArray(A)?A:[A],F=(R=t.persistentElements)==null?void 0:R.map(W=>W()).filter(Gt);return F&&k.push(...F),k.some(W=>kl(W,w))||Gn.isInNestedLayer(e,w)}const _=[a?Q4(e,t.persistentElements):void 0,Y4(e,T),q4(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Gn.remove(e),qb(),K4(e),_.forEach(w=>w==null?void 0:w())}}function Yb(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=Xs(e)?e():e;o.push(X4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var J4=Object.defineProperty,Z4=(e,t,n)=>t in e?J4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>Z4(e,typeof t!="symbol"?t+"":t,n),Wb={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()}},eD=[],tD=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const o=Yr(r),a=this.findContainerIndex(o,r)>=0;if(a||vl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Oa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(E=>E===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=>Oa(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}),xt(this,"handlePointerDown",r=>{const o=Yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Ba(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ba(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const o=Yr(r);this.findContainerIndex(o,r)>=0||Ba(this.config.clickOutsideDeactivates,r)||Ba(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Fa(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{nD(r)&&Ba(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(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 xL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?wL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(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)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Wr(r)){const o=Zs(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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,rD(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const o=H({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Wb.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=()=>{Gb(()=>{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}),xt(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}),xt(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}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),xt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),xt(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}),xt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Yr(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:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||eD;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Fa(r)&&!r.shiftKey},isKeyBackward(r){return Fa(r)&&r.shiftKey}},t);this.doc=n.document||vr(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=>{bL(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?Vy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Na(e,{getShadowRoot:this.config.getShadowRoot}),n=Xy(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(Oa(t[f])>0){c=!0;break}function d(f,p=!0){const E=t.indexOf(f);if(E>=0)return t[E+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let b=T+1;b<n.length;b++)if(os(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(os(n[b]))return n[b]}}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 Wb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Gb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(lr(this.doc,"focusin",this.handleFocus,!0),lr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Zs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Fa=e=>e.key==="Tab",Ba=(e,...t)=>typeof e=="function"?e(...t):e,nD=e=>!e.isComposing&&e.key==="Escape",Gb=e=>setTimeout(e,0),rD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Kb(e,t={}){let n;const r=Sn(()=>{const o=typeof e=="function"?e():e;if(o){n=new tD(o,Te(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:vr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Fh="data-scroll-lock";function iD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Qb(e){const t=Nl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Xb(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Fh))return;const u=Qb(r)||Qb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Fh,"");const d=()=>YL(r,"--scrollbar-width",`${c}px`),f=iD(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Il(o,_)},E=()=>{var X,B;const{scrollX:_,scrollY:w,visualViewport:A}=n,k=(X=A==null?void 0:A.offsetLeft)!=null?X:0,F=(B=A==null?void 0:A.offsetTop)!=null?B:0,R={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(F))}px`,left:`${-(_-Math.floor(k))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const W=Il(o,R);return()=>{W==null||W(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Wy()?E():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Fh)}}var sD=no("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=sD.build(),Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},eT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},oD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},aD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},tT=e=>e.getById(Jb(e)),lo=e=>e.getById(Zb(e)),co=e=>e.getById(Bh(e)),nT=e=>e.getById(eT(e)),uD=e=>e.getById(Uh(e)),lD=e=>e.getById(Hh(e));function cD(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"),E=r.get("renderedElements"),T=I4(Te(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(Te(H({id:oD(c)},Pr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(Te(H({},Pr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(Te(H({},Pr.anchor.attrs),{dir:u("dir"),id:Jb(c)}))},getTriggerProps(){return t.button(Te(H({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Zb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Bh(c),onPointerDown(b){IL(b)&&NL()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(H({},Pr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({id:eT(c)},Pr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(Te(H({},Pr.content.attrs),{dir:u("dir"),id:Bh(c),tabIndex:-1,role:"dialog","aria-modal":sL(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":iL(d),"aria-labelledby":E.title?Uh(c):void 0,"aria-describedby":E.description?Hh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(Te(H({},Pr.title.attrs),{id:Uh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(Te(H({},Pr.description.attrs),{id:Hh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Te(H({},Pr.closeTrigger.attrs),{dir:u("dir"),id:aD(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var dD={props({props:e}){return Te(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=tT(n))!=null?a:lo(n);return Db(r,()=>nT(n),Te(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>co(n);let o=!0;return Yb(r,{type:"popover",pointerBlocking:t("modal"),exclude:lo(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:qL(()=>co(t),{triggerElement:lo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Fb(()=>[co(t),lo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Xb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Kb(()=>co(t),{initialFocus:()=>Jy({root:co(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=tT(n))!=null?u:lo(n);Db(o,()=>nT(n),Te(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Sn(()=>{Object.assign(e.get("renderedElements"),{title:!!uD(t),description:!!lD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Sn(()=>{const n=Jy({root:co(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||Sn(()=>{const a=lo(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})}}}};Th()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[JB,zh]=to({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[ZB,rT]=to({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),fD=e=>{const t=$.useId(),{getRootNode:n}=zh(),{dir:r}=rT(),o=H({id:t,dir:r,getRootNode:n},e),a=_h(dD,o);return cD(a,ub)},hD=e=>{const[t,u]=hb(e),c=u,{children:n}=c,r=nn(c,["children"]),o=fD(r),a=Sh(cr({present:o.open},t));return C.jsx(u6,{value:o,children:C.jsx(lb,{value:a,children:n})})},iT=$.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=cr(Te(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return C.jsx(yi.button,Te(H({},o),{ref:t}))});iT.displayName="PopoverTrigger";function pD(e){return qt({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 mD(e){return qt({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 gD(e){return qt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function sT(e){return qt({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 ED=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=wr(),r=()=>{n(),e()};return C.jsxs("button",{className:J(`${Y}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[C.jsx(sT,{}),"Clear chat"]})},yD=({className:e,componentType:t,children:n})=>{const[r,o]=$.useState(!1),{globalClassName:a}=Rt(),u=()=>{o(!1)},c=d=>{o(d.open)};return C.jsxs(hD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[C.jsx(iT,{"aria-label":`Overflow menu for ${t}`,className:J(`${Y}-overflow-menu-button-trigger`,`${Y}-icon-button`,a,e,t),children:C.jsx(gD,{})}),C.jsx(db,{children:C.jsxs(cb,{className:J(`${Y}-overflow-menu-list`,a,t),children:[n,C.jsx(ED,{componentType:t,onClearChat:u})]})})]})};function oT(e){return qt({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 aT(e){return qt({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 uT=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=nn(o,["onClearChat","componentType"]);const{globalClassName:a}=Rt(),{resetConversation:u}=wr(),c=()=>{u(),e==null||e()};return C.jsx(Vr,H({icon:C.jsx(sT,{size:"16px"}),ariaLabel:"Clear Chat",className:J(a,`${Y}-clear-chat-icon-button`,t),onClick:c},n))},lT=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Rt();if(!r)return null;const o=()=>{Qi(!1),Zd(!0)};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:C.jsx(Xg,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-minimize-button`,e),onClick:o,children:[C.jsx(Xg,{}),"Minimize"]})},cT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),r=()=>{Qu("modal")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:C.jsx(aT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-modal-button`,e),onClick:r,children:[C.jsx(aT,{}),"Show modal"]})},bD=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=Rt();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),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return C.jsxs("div",{className:J(r,`${Y}-product-tile`,{embedded:!e,standalone:e}),children:[C.jsx("img",{className:J(r,`${Y}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),C.jsxs("div",{className:J(r,`${Y}-product-tile-details`,{embedded:!e,standalone:e}),children:[C.jsxs("div",{className:J(r,`${Y}-product-tile-content`),children:[u&&C.jsx("p",{className:`${Y}-product-tile-brand`,children:u}),E?C.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:J(r,`${Y}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",C.jsx("span",{className:J(r,`${Y}-product-tile-pdp-arrow`),children:"→"})]}):C.jsx("p",{className:J(r,`${Y}-product-tile-name`),title:a,children:a})]}),C.jsx("div",{className:J(r,`${Y}-product-tile-footer`),children:C.jsx("p",{className:J(r,`${Y}-product-tile-price`),children:c})})]})]})},TD=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=Rt(),o=t;return n?C.jsxs("div",{className:J(r,`${Y}-display-products widget-message`),children:[C.jsx("p",{children:o.message}),o.products&&o.products.length>0&&C.jsx("div",{className:J(r,`${Y}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return C.jsx(bD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},_D=({globalClassName:e,message:t,isWidgetStandalone:n})=>C.jsx("div",{className:J(e,`${Y}-error-message`,{standalone:n,embedded:!n}),children:C.jsxs("p",{className:J(e,`${Y}-error-message-text`,{standalone:n,embedded:!n}),children:[C.jsx(ev,{})," ",t.message||"An error occurred while processing your request."]})});function xD(e){return qt({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const wD=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>C.jsx("div",{className:J(e,`${Y}-suggestion-container standalone`),children:o.map(u=>C.jsxs(sf,{disabled:r,className:J(e,`${Y}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[C.jsx(xD,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),SD=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=wr();return C.jsxs("div",{className:J(e,`${Y}-follow-up`),children:[C.jsx("p",{className:J(e,`${Y}-text`),children:t.message}),n&&C.jsx(wD,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&C.jsx("div",{className:J(e,`${Y}-suggestion-container embedded`),children:t.suggestions.map(a=>C.jsx("button",{disabled:o,className:J(e,`${Y}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function dT(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 CD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function AD(e,t,n){const o=dl((n||{}).ignore||[]),a=vD(t);let u=-1;for(;++u<a.length;)lE(e,"text",c);function c(f,p){let E=-1,T;for(;++E<p.length;){const b=p[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(f,p)}function d(f,p){const E=p[p.length-1],T=a[u][0],b=a[u][1];let _=0;const A=E.children.indexOf(f);let k=!1,F=[];T.lastIndex=0;let R=T.exec(f.value);for(;R;){const W=R.index,X={index:R.index,input:R.input,stack:[...p,f]};let B=b(...R,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?T.lastIndex=W+1:(_!==W&&F.push({type:"text",value:f.value.slice(_,W)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=W+R[0].length,k=!0),!T.global)break;R=T.exec(f.value)}return k?(_<f.value.length&&F.push({type:"text",value:f.value.slice(_)}),E.children.splice(A,1,...F)):F=[f],A+F.length}}function vD(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([kD(o[0]),ND(o[1])])}return t}function kD(e){return typeof e=="string"?new RegExp(CD(e),"g"):e}function ND(e){return typeof e=="function"?e:function(){return e}}const jh="phrasing",$h=["autolink","link","image","label"];function OD(){return{transforms:[FD],enter:{literalAutolink:PD,literalAutolinkEmail:Vh,literalAutolinkHttp:Vh,literalAutolinkWww:Vh},exit:{literalAutolink:MD,literalAutolinkEmail:DD,literalAutolinkHttp:RD,literalAutolinkWww:LD}}}function ID(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jh,notInConstruct:$h},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jh,notInConstruct:$h},{character:":",before:"[ps]",after:"\\/",inConstruct:jh,notInConstruct:$h}]}}function PD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vh(e){this.config.enter.autolinkProtocol.call(this,e)}function RD(e){this.config.exit.autolinkProtocol.call(this,e)}function LD(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 DD(e){this.config.exit.autolinkEmail.call(this,e)}function MD(e){this.exit(e)}function FD(e){AD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),UD]],{ignore:["link","linkReference"]})}function BD(e,t,n,r,o){let a="";if(!fT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!HD(n)))return!1;const u=zD(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 UD(e,t,n,r){return!fT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HD(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 zD(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=dT(e,"(");let a=dT(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 fT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ji(n)||il(n))&&(!t||n!==47)}hT.peek=QD;function jD(){this.buffer()}function $D(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VD(){this.buffer()}function qD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WD(e){this.exit(e)}function GD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KD(e){this.exit(e)}function QD(){return"["}function hT(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 XD(){return{enter:{gfmFootnoteCallString:jD,gfmFootnoteCall:$D,gfmFootnoteDefinitionLabelString:VD,gfmFootnoteDefinition:qD},exit:{gfmFootnoteCallString:YD,gfmFootnoteCall:WD,gfmFootnoteDefinitionLabelString:GD,gfmFootnoteDefinition:KD}}}function JD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hT},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
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?pT:ZD))),f(),d}}function ZD(e,t,n){return t===0?e:pT(e,t,n)}function pT(e,t,n){return(n?"":" ")+e}const e5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mT.peek=s5;function t5(){return{canContainEols:["delete"],enter:{strikethrough:r5},exit:{strikethrough:i5}}}function n5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:e5}],handlers:{delete:mT}}}function r5(e){this.enter({type:"delete",children:[]},e)}function i5(e){this.exit(e)}function mT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,Te(H({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function s5(){return"~"}function o5(e){return e.length}function a5(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||o5,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],A=[];let k=-1;for(e[p].length>f&&(f=e[p].length);++k<e[p].length;){const F=u5(e[p][k]);if(n.alignDelimiters!==!1){const R=o(F);A[k]=R,(d[k]===void 0||R>d[k])&&(d[k]=R)}w.push(F)}u[p]=w,c[p]=A}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<f;)a[E]=gT(r[E]);else{const w=gT(r);for(;++E<f;)a[E]=w}E=-1;const T=[],b=[];for(;++E<f;){const w=a[E];let A="",k="";w===99?(A=":",k=":"):w===108?A=":":w===114&&(k=":");let F=n.alignDelimiters===!1?1:Math.max(1,d[E]-A.length-k.length);const R=A+"-".repeat(F)+k;n.alignDelimiters!==!1&&(F=A.length+F+k.length,F>d[E]&&(d[E]=F),b[E]=F),T[E]=R}u.splice(1,0,T),c.splice(1,0,b),p=-1;const _=[];for(;++p<u.length;){const w=u[p],A=c[p];E=-1;const k=[];for(;++E<f;){const F=w[E]||"";let R="",W="";if(n.alignDelimiters!==!1){const X=d[E]-(A[E]||0),B=a[E];B===114?R=" ".repeat(X):B===99?X%2?(R=" ".repeat(X/2+.5),W=" ".repeat(X/2-.5)):(R=" ".repeat(X/2),W=R):W=" ".repeat(X)}n.delimiterStart!==!1&&!E&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||E)&&k.push(" "),n.alignDelimiters!==!1&&k.push(R),k.push(F),n.alignDelimiters!==!1&&k.push(W),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||E!==f-1)&&k.push("|")}_.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return _.join(`
33
+ `)}function u5(e){return e==null?"":String(e)}function gT(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 l5(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()),c5);return o(),u}function c5(e,t,n){return">"+(n?"":" ")+e}function d5(e,t){return ET(e,t.inConstruct,!0)&&!ET(e,t.notInConstruct,!1)}function ET(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 yT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
+ `&&d5(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function f5(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function h5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function p5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function m5(e,t,n,r){const o=p5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(h5(e,n)){const E=n.enter("codeIndented"),T=n.indentLines(a,g5);return E(),T}const c=n.createTracker(r),d=o.repeat(Math.max(f5(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,H({before:p,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,H({before:p,after:`
33
36
  `,encode:["`"]},c.current()))),E()}return p+=c.move(`
34
37
  `),a&&(p+=c.move(a+`
35
- `)),p+=c.move(d),f(),p}function u5(e,t,n){return(n?"":" ")+e}function Vh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function l5(e,t,n,r){const o=Vh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
36
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function c5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ua(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ql(e,t,n){const r=js(e),o=js(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gT.peek=d5;function gT(e,t,n,r){const o=c5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=ql(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=ql(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+b}function d5(e,t,n){return n.options.emphasis||"*"}function f5(e,t){let n=!1;return hl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,vf}),!!((!e.depth||e.depth<3)&&gf(e)&&(t.options.setext||n))}function h5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(f5(e,n)){const p=n.enter("headingSetext"),E=n.enter("phrasing"),T=n.containerPhrasing(e,Te(H({},a.current()),{before:`
38
+ `)),p+=c.move(d),f(),p}function g5(e,t,n){return(n?"":" ")+e}function qh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function E5(e,t,n,r){const o=qh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
39
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function y5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ua(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ql(e,t,n){const r=js(e),o=js(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}bT.peek=b5;function bT(e,t,n,r){const o=y5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=ql(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=ql(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+b}function b5(e,t,n){return n.options.emphasis||"*"}function T5(e,t){let n=!1;return hl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,kf}),!!((!e.depth||e.depth<3)&&Ef(e)&&(t.options.setext||n))}function _5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(T5(e,n)){const p=n.enter("headingSetext"),E=n.enter("phrasing"),T=n.containerPhrasing(e,Te(H({},a.current()),{before:`
37
40
  `,after:`
38
41
  `}));return E(),p(),T+`
39
42
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
40
43
  `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
41
- `},a.current()));return/^[\t ]/.test(f)&&(f=Ua(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}ET.peek=p5;function ET(e){return e.value||""}function p5(){return"<"}yT.peek=m5;function yT(e,t,n,r){const o=Vh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,H({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function m5(){return"!"}bT.peek=g5;function bT(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function g5(){return"!"}TT.peek=E5;function TT(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function E5(){return"`"}function _T(e,t){const n=gf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}xT.peek=y5;function xT(e,t,n,r){const o=Vh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(_T(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,H({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=p,E}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,H({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function y5(e,t,n){return _T(e,n)?"<":"["}wT.peek=b5;function wT(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function b5(){return"["}function qh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function T5(e){const t=qh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ST(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function x5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?_5(n):qh(n);const c=e.ordered?u==="."?")":".":T5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),ST(n)===u&&p){let E=-1;for(;++E<e.children.length;){const T=e.children[E];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function w5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function S5(e,t,n,r){const o=w5(n);let a=n.bulletCurrent||qh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(E,T,b){return T?(b?"":" ".repeat(u))+E:(b?a:a+" ".repeat(u-a.length))+E}}function C5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const A5=dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function v5(e,t,n,r){return(e.children.some(function(u){return A5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function k5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}CT.peek=N5;function CT(e,t,n,r){const o=k5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=ql(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=ql(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+b}function N5(e,t,n){return n.options.strong||"*"}function O5(e,t,n,r){return n.safe(e.value,r)}function I5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function P5(e,t,n){const r=(ST(n)+(n.options.ruleSpaces?" ":"")).repeat(I5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const AT={blockquote:t5,break:mT,code:a5,definition:l5,emphasis:gT,hardBreak:mT,heading:h5,html:ET,image:yT,imageReference:bT,inlineCode:TT,link:xT,linkReference:wT,list:x5,listItem:S5,paragraph:C5,root:v5,strong:CT,text:O5,thematicBreak:P5};function R5(){return{enter:{table:L5,tableData:vT,tableHeader:vT,tableRow:M5},exit:{codeText:F5,table:D5,tableData:Yh,tableHeader:Yh,tableRow:Yh}}}function L5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function D5(e){this.exit(e),this.data.inTable=void 0}function M5(e){this.enter({type:"tableRow",children:[]},e)}function Yh(e){this.exit(e)}function vT(e){this.enter({type:"tableCell",children:[]},e)}function F5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,B5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function B5(e,t){return t==="|"?t:e}function U5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(b,_,w,k){return f(p(b,w,k),b.align)}function c(b,_,w,k){const v=E(b,w,k),F=f([v]);return F.slice(0,F.indexOf(`
43
- `))}function d(b,_,w,k){const v=w.enter("tableCell"),F=w.enter("phrasing"),R=w.containerPhrasing(b,Te(H({},k),{before:a,after:a}));return F(),v(),R}function f(b,_){return ZD(b,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(b,_,w){const k=b.children;let v=-1;const F=[],R=_.enter("table");for(;++v<k.length;)F[v]=E(k[v],_,w);return R(),F}function E(b,_,w){const k=b.children;let v=-1;const F=[],R=_.enter("tableRow");for(;++v<k.length;)F[v]=d(k[v],b,_,w);return R(),F}function T(b,_,w){let k=AT.inlineCode(b,_,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function H5(){return{exit:{taskListCheckValueChecked:kT,taskListCheckValueUnchecked:kT,paragraph:j5}}}function z5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$5}}}function kT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function j5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function $5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=AT.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function V5(){return[xD(),$D(),WD(),R5(),H5()]}function q5(e){return{extensions:[wD(),VD(e),GD(),U5(e),z5()]}}const Y5={tokenize:J5,partial:!0},NT={tokenize:Z5,partial:!0},OT={tokenize:e8,partial:!0},IT={tokenize:t8,partial:!0},W5={tokenize:n8,partial:!0},PT={name:"wwwAutolink",tokenize:Q5,previous:LT},RT={name:"protocolAutolink",tokenize:X5,previous:DT},Xr={name:"emailAutolink",tokenize:K5,previous:MT},Rr={};function G5(){return{text:Rr}}let us=48;for(;us<123;)Rr[us]=Xr,us++,us===58?us=65:us===91&&(us=97);Rr[43]=Xr,Rr[45]=Xr,Rr[46]=Xr,Rr[95]=Xr,Rr[72]=[Xr,RT],Rr[104]=[Xr,RT],Rr[87]=[Xr,PT],Rr[119]=[Xr,PT];function K5(e,t,n){const r=this;let o,a;return u;function u(E){return!Wh(E)||!MT.call(r,r.previous)||Gh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Wh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(W5,p,f)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):p(E)}function f(E){return e.consume(E),o=!0,d}function p(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function Q5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!LT.call(r,r.previous)||Gh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Y5,e.attempt(NT,e.attempt(OT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function X5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&DT.call(r,r.previous)&&!Gh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?f:(a=!0,d)):n(E)}function f(E){return E===null||rl(E)||ft(E)||Ji(E)||il(E)?n(E):e.attempt(NT,e.attempt(OT,p),n)(E)}function p(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function J5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function Z5(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(IT,d,c)(f):f===null||ft(f)||Ji(f)||f!==45&&il(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function e8(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(IT,t,a)(u):u===null||ft(u)||Ji(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function t8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ft(c)||Ji(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ft(c)||Ji(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function n8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function LT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function DT(e){return!pn(e)}function MT(e){return!(e===47||Wh(e))}function Wh(e){return e===43||e===45||e===46||e===95||an(e)}function Gh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const r8={tokenize:d8,partial:!0};function i8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:u8,continuation:{tokenize:l8},exit:c8}},text:{91:{name:"gfmFootnoteCall",tokenize:a8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:s8,resolveTo:o8}}}}function s8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=ar(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function o8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function a8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(E){if(a>999||E===93&&!u||E===null||E===91||ft(E))return n(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ft(E)||(u=!0),a++,e.consume(E),E===92?p:f}function p(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}}function u8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ft(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=ar(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ft(_)||(c=!0),u++,e.consume(_),_===92?E:p}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):n(_)}function b(_){return t(_)}}function l8(e,t,n){return e.check(la,t,e.attempt(r8,t,n))}function c8(e){e.exit("gfmFootnoteDefinition")}function d8(e,t,n){const r=this;return Ze(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function f8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",E,c]],b=c.parser.constructs.insideSpan.null;b&&Rn(T,T.length,0,sl(b,u.slice(f+1,d),c)),Rn(T,T.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Rn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let E=0;return T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),b(_))}function b(_){const w=js(f);if(_===126)return E>1?d(_):(u.consume(_),E++,b);if(E<2&&!n)return d(_);const k=u.exit("strikethroughSequenceTemporary"),v=js(_);return k._open=!v||v===2&&!!w,k._close=!w||w===2&&!!v,c(_)}}}class h8{constructor(){this.map=[]}add(t,n,r){p8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function p8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function m8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function g8(){return{flow:{null:{name:"table",tokenize:E8,resolveAll:y8}}}}function E8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(M){let ae=r.events.length-1;for(;ae>-1;){const de=r.events[ae][1].type;if(de==="lineEnding"||de==="linePrefix")ae--;else break}const he=ae>-1?r.events[ae][1].type:null,ue=he==="tableHead"||he==="tableRow"?B:d;return ue===B&&r.parser.lazy[r.now().line]?n(M):ue(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(u=!0,a+=1),p(M)}function p(M){return M===null?n(M):Le(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),b):n(M):Qe(M)?Ze(e,p,"whitespace")(M):(a+=1,u&&(u=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||ft(M)?(e.exit("data"),p(M)):(e.consume(M),M===92?T:E)}function T(M){return M===92||M===124?(e.consume(M),E):E(M)}function b(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),u=!1,Qe(M)?Ze(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?k(M):M===124?(u=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),w):X(M)}function w(M){return Qe(M)?Ze(e,k,"whitespace")(M):k(M)}function k(M){return M===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):M===45?(a+=1,v(M)):M===null||Le(M)?W(M):X(M)}function v(M){return M===45?(e.enter("tableDelimiterFiller"),F(M)):X(M)}function F(M){return M===45?(e.consume(M),F):M===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(M))}function R(M){return Qe(M)?Ze(e,W,"whitespace")(M):W(M)}function W(M){return M===124?_(M):M===null||Le(M)?!u||o!==a?X(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):X(M)}function X(M){return n(M)}function B(M){return e.enter("tableRow"),te(M)}function te(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),te):M===null||Le(M)?(e.exit("tableRow"),t(M)):Qe(M)?Ze(e,te,"whitespace")(M):(e.enter("data"),ge(M))}function ge(M){return M===null||M===124||ft(M)?(e.exit("data"),te(M)):(e.consume(M),M===92?ye:ge)}function ye(M){return M===92||M===124?(e.consume(M),ge):ge(M)}}function y8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,E;const T=new h8;for(;++n<e.length;){const b=e[n],_=b[1];b[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(FT(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Yl(T,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Yl(T,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],E=Yl(T,t,a,o,n,E)):u[1]!==0&&(E=Yl(T,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&FT(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=m8(t.events,n))}return e}function Yl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=fo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=fo(t.events,n[2]),p=fo(t.events,n[3]),E={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const T=t.events[n[2]],b=t.events[n[3]];if(T[1].end=Object.assign({},b[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,w=n[3]-n[2]-1;e.add(_,w,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function FT(e,t,n,r,o){const a=[],u=fo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b8={name:"tasklistCheck",tokenize:_8};function T8(){return{text:{91:b8}}}function _8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Qe(d)?e.check({tokenize:x8},t,n)(d):n(d)}}function x8(e,t,n){return Ze(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function w8(e){return v1([G5(),i8(),f8(e),g8(),T8()])}const S8={};function C8(e){const t=this,n=e||S8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(w8(n)),a.push(V5()),u.push(q5(n))}const Wl=()=>C.jsx("span",{className:`${Y}-blinking-cursor`,children:C.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),BT=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=wr(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return C.jsx(EE,{remarkPlugins:[C8],rehypePlugins:[Ny],components:{h1:({children:u})=>C.jsx("h1",{className:J(e,`${Y}-header h1`),children:u}),h2:({children:u})=>C.jsx("h2",{className:J(e,`${Y}-header h2`),children:u}),h3:({children:u})=>C.jsx("h3",{className:J(e,`${Y}-header h3`),children:u}),ul:({children:u})=>C.jsx("ul",{className:J(e,`${Y}-ul`),children:u}),ol:({children:u})=>C.jsx("ol",{className:J(e,`${Y}-ol`),children:u}),li:({children:u})=>C.jsx("li",{className:J(e,`${Y}-li`),children:u}),a:({href:u,children:c})=>C.jsx(My,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>C.jsx("table",{className:J(e,`${Y}-table`),children:u}),thead:({children:u})=>C.jsx("thead",{className:J(e,`${Y}-thead`),children:u}),tbody:({children:u})=>C.jsx("tbody",{className:J(e,`${Y}-tbody`),children:u}),tr:({children:u})=>C.jsx("tr",{className:J(e,`${Y}-tr`),children:u}),th:({children:u})=>C.jsx("th",{className:J(e,`${Y}-th`),children:u}),td:({children:u})=>C.jsx("td",{className:J(e,`${Y}-td`),children:u}),span:({className:u,children:c})=>u===`${Y}-blinking-cursor`?C.jsx(Wl,{}):C.jsx("span",{children:c})},children:n.message+(a?`<span className='${Y}-blinking-cursor'></span>`:"")})},A8=({globalClassName:e,message:t})=>{const[n,r]=$.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-progress-message`,"standalone"),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","standalone"),children:C.jsx(Wg,{})}),C.jsx("p",{className:J(e,`${Y}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&C.jsxs(C.Fragment,{children:[C.jsx(rf,{className:J(e,`${Y}-thought-context-button`),onClick:c,children:n?C.jsxs(C.Fragment,{children:["Hide ",C.jsx(WA,{})]}):C.jsxs(C.Fragment,{children:["Context ",C.jsx(GA,{})]})}),n&&C.jsx("div",{className:J(e,`${Y}-thought-container`),children:a&&C.jsx("p",{className:J(e,`${Y}-progress-thought`),children:t.thought})})]})]})},v8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?C.jsx(A8,{globalClassName:e,message:t}):C.jsxs("div",{className:J(e,`${Y}-progress-message`,"embedded"),title:t.message,children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","embedded"),children:C.jsx(Wg,{})}),C.jsx("i",{className:J(e,`${Y}-progress-text`,"embedded"),children:t.message})]}),k8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return C.jsxs("div",{className:J(e,`${Y}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&C.jsxs("div",{className:J(e,`${Y}-refined-event-query`,{embedded:!n,standalone:n}),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,`${Y}-refined-event-icon`,{embedded:!n,standalone:n}),children:C.jsx(na,{role:"img"})}),C.jsx("p",{className:J(e,`${Y}-text`,`${Y}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),C.jsx(BT,{message:t})]})},UT=e=>{var d,f;const{configModule:t}=Rt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,E)=>p+E.length,0);return{facetFiltersList:u,filterCount:c}},Gl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>C.jsx("span",{className:J(t,`${Y}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),HT=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return C.jsxs("div",{className:J(e,`${Y}-facets`),children:[C.jsx("p",{className:J(e,`${Y}-facet-category`),children:c}),C.jsx("p",{className:J(e,`${Y}-facet-values`),children:d})]},c)})},Ha=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>C.jsx("span",{className:J(e,`${Y}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),N8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=UT(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?C.jsxs("div",{className:J(e,`${Y}-user-message standalone`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon standalone`),children:C.jsx(Kg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),C.jsx(HT,{globalClassName:e,facetFiltersList:a,message:t}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):C.jsxs("div",{className:J(e,`${Y}-user-message embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row embedded`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon embedded`),children:C.jsx(Kg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:u})]}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},O8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>C.jsxs("div",{className:J(e,`${Y}-user-search standalone`),children:[C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon standalone`),children:C.jsx(na,{})}),C.jsx("p",{className:J(e,`${Y}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),C.jsx(HT,{globalClassName:e,facetFiltersList:u,message:a})]}),C.jsx(Ha,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),I8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var b;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=UT(t),d=new Date(a).toLocaleString(),f=(b=r==null?void 0:r.attachments)==null?void 0:b.image,{actionLabel:p,query:E,queryLabel:T}=$.useMemo(()=>{var _;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(_=r==null?void 0:r.browseParams)==null?void 0:_.categoryId,queryLabel:(r==null?void 0:r.label)||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:(r==null?void 0:r.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return E?n?C.jsx(O8,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:E,queryLabel:T,facetFiltersList:u,filterCount:c}):C.jsxs("div",{className:J(e,`${Y}-user-search embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query embedded`),children:[f?C.jsx("img",{className:J(e,`${Y}-user-search-image embedded`),src:f,alt:T||E,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon embedded`),children:C.jsx(na,{})}),C.jsx("p",{children:T||E}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:c})]}),C.jsx(Ha,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},zT=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return c?C.jsx(N8,{globalClassName:t,isWidgetStandalone:o,message:e}):C.jsx(I8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return C.jsx(k8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return C.jsx(gD,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return C.jsx(BT,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return C.jsx(hD,{message:e,isWidgetStandalone:o});case"display_products":return C.jsx(fD,{message:e,isWidgetStandalone:o});case"progress":return C.jsx(v8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:J(t,`${Y}-reset-message`),children:"This conversation has been reset."}),C.jsx("p",{className:J(t,`${Y}-start-search-message`),children:r})]});default:return null}},Kh=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:o,resetConversationMessage:a}=Rt(),{groupedMessages:u,entryType:c}=Ms(),d=typeof r=="string"?r:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return C.jsxs(C.Fragment,{children:[c==="ask_cim"&&C.jsx("div",{className:J(n,`${Y}-ask-cim-entry-message`,`${Y}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let p=new Date(f.createdAt).toLocaleString();const E=f.messages[f.messages.length-1];return E&&(p=new Date(E.createdAt).toLocaleString()),C.jsxs("div",{className:J(n,`${Y}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(T=>C.jsx("div",{className:`${Y}-message-group-child`,children:C.jsx(zT,{id:T.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:T,resetConversationMessage:a,handleSuggestionClick:t})},T.id)),C.jsx(Ha,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return C.jsx("div",{className:J(n,`${Y}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:C.jsx(zT,{id:f.message.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},jT=()=>{const{globalClassName:e,themeVariables:t}=Rt(),{copilot:n,messages:r,isLoading:o,handleUserInput:a,handleSuggestion:u}=wr(),c=$.useRef(null),d=tf();return $.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?C.jsxs("div",{className:J(e,`${Y}-container`,`${Y}-embedded-chat`),style:t,children:[C.jsxs("div",{className:J(e,`${Y}-message-container`,"embedded"),children:[C.jsx(Kh,{isWidgetStandalone:!1,handleSuggestionClick:u}),o&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:c})]}),C.jsx(rh,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),C.jsx("div",{className:J(`${Y}-embedded-chat-menu`),children:C.jsx(cD,{componentType:"chat",children:C.jsx(aT,{componentType:"chat"})})})]}):C.jsx("div",{children:"Loading Copilot..."}):null},[P8,R8]=to({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),L8=e=>lb()(e,["lazyMount","unmountOnExit"]),[D8,za]=to({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),$T=$.forwardRef((e,t)=>{const n=za(),r=R8(),o=wh(Te(H({},r),{present:n.open})),a=cr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:C.jsx(yi.div,Te(H({},a),{ref:Rl(o.ref,t)}))});$T.displayName="DialogBackdrop";const Qh=$.forwardRef((e,t)=>{const n=za(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});Qh.displayName="DialogContent";const Xh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getDescriptionProps(),e);return C.jsx(yi.div,Te(H({},r),{ref:t}))});Xh.displayName="DialogDescription";const Jh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getPositionerProps(),e);return Pa().unmounted?null:C.jsx(yi.div,Te(H({},r),{ref:t}))});Jh.displayName="DialogPositioner";var M8=no("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ls=M8.build(),VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},YT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},WT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Kl=e=>e.getById(Zh(e)),F8=e=>e.getById(VT(e)),B8=e=>e.getById(qT(e)),U8=e=>e.getById(YT(e)),H8=e=>e.getById(ep(e)),z8=e=>e.getById(tp(e)),j8=e=>e.getById(WT(e));function $8(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(Te(H({},ls.trigger.attrs),{dir:a("dir"),id:YT(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Zh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Te(H({},ls.backdrop.attrs),{dir:a("dir"),hidden:!d,id:qT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({},ls.positioner.attrs),{dir:a("dir"),id:VT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(Te(H({},ls.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Zh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:ep(u),"aria-describedby":f.description?tp(u):void 0}))},getTitleProps(){return t.element(Te(H({},ls.title.attrs),{dir:a("dir"),id:ep(u)}))},getDescriptionProps(){return t.element(Te(H({},ls.description.attrs),{dir:a("dir"),id:tp(u)}))},getCloseTriggerProps(){return t.button(Te(H({},ls.closeTrigger.attrs),{dir:a("dir"),id:WT(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var V8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>j8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return H({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 $b(()=>Kl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[U8(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 Gb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Yb(()=>Kl(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")?Lb(()=>[Kl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Sn(()=>{e.set("rendered",{title:!!H8(t),description:!!z8(t)})})},syncZIndex({scope:e}){Sn(()=>{const t=Kl(e);if(!t)return;const n=Nl(t);[F8(e),B8(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})}}}};bh()(["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 q8=e=>{const t=$.useId(),{getRootNode:n}=Hh(),{dir:r}=eT(),o=H({id:t,getRootNode:n,dir:r},e),a=Th(V8,o);return $8(a,sb)},GT=e=>{const[t,c]=cb(e),d=c,{children:n}=d,r=nn(d,["children"]),[o]=L8(t),a=q8(r),u=wh(cr({present:a.open},t));return C.jsx(D8,{value:a,children:C.jsx(P8,{value:o,children:C.jsx(ob,{value:u,children:n})})})},np=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getTitleProps(),e);return C.jsx(yi.h2,Te(H({},r),{ref:t}))});np.displayName="DialogTitle";const KT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=$.useState((d=e.container)==null?void 0:d.current),a=$.useSyncExternalStore(W8,()=>!1,()=>!0),{getRootNode:u}=Hh();if($.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return C.jsx(C.Fragment,{children:t});const c=r!=null?r:Y8(u);return C.jsx(C.Fragment,{children:$.Children.map(t,f=>Ia.createPortal(f,c))})},Y8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ss(n)?n:vr(t).body},W8=()=>()=>{},G8=()=>{const{globalClassName:e}=Rt(),{dialogPosition:t}=di(),n=t==="bottom-left",r=()=>{ef(n?"bottom-right":"bottom-left")},o=n?aD:oD,a=n?"Move right":"Move left";return C.jsx(Vr,{className:J(e,`${Y}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:C.jsx(o,{})})},QT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,dialogPosition:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),b=tf(),{isOpen:_}=a||{},w=o==="standalone";$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const k=()=>{Qi(!1)};return b?c?C.jsx(GT,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:C.jsx(KT,{children:C.jsx(Jh,{className:J(n,`${Y}-container`,`${Y}-dialog`,u),style:r,children:C.jsxs(Qh,{className:J(n,`${Y}-dialog-content`,{standalone:w,embedded:!w}),children:[C.jsxs("div",{className:J(n,`${Y}-dialog-header`,{standalone:w,embedded:!w}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-dialog-logo`,{standalone:w,embedded:!w}),src:e}),C.jsx(np,{className:J(n,`${Y}-dialog-title`,{standalone:w,embedded:!w}),children:t}),C.jsxs("div",{className:J(n,`${Y}-dialog-controls`),children:[C.jsx(aT,{componentType:"dialog",isIcon:!0}),C.jsx(G8,{}),C.jsx(oT,{componentType:"dialog",isIcon:!0}),C.jsx(sT,{componentType:"dialog"}),C.jsx(nf,{className:`dialog ${n}`,onClick:k})]})]}),C.jsxs(Xh,{className:J(n,`${Y}-message-container`,{standalone:w,embedded:!w}),children:[C.jsx(Kh,{isWidgetStandalone:w,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(rh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):C.jsx("div",{children:"Loading Copilot..."}):null},K8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),{previousComponentType:r}=di(),o=()=>{Qu(r||"dialog")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:o,icon:C.jsx(rT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-dialog-button`,e),onClick:o,children:[C.jsx(rT,{}),"Show ",r||"dialog"]})},Q8=()=>{const{globalClassName:e}=Rt(),{isModalFullscreen:t}=di(),n=()=>{Zd(!t)},r=t?KA:QA,o=`${t?"Exit":"Enter"} Fullscreen`;return C.jsx(Vr,{ariaLabel:o,title:o,className:J(e,`${Y}-modal-fullscreen-button`),icon:C.jsx(r,{}),onClick:n})},XT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,isModalFullscreen:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),{isOpen:b}=a||{},_=o==="standalone",w=tf();$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const k=({open:F})=>{Qi(F)},v=()=>{Qi(!1)};return w?c?C.jsx(GT,{lazyMount:!0,open:b,onOpenChange:k,children:C.jsx(KT,{children:C.jsxs("div",{className:J(n,`${Y}-modal-container`),style:r,children:[C.jsx($T,{className:J(n,`${Y}-modal-backdrop`)}),C.jsx(Jh,{className:J(n,`${Y}-container`,`${Y}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:C.jsxs(Qh,{className:J(n,`${Y}-modal-content`,{standalone:_,embedded:!_}),children:[C.jsxs("div",{className:J(n,`${Y}-modal-header`,{standalone:_,embedded:!_}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-modal-logo`,{standalone:_,embedded:!_}),src:e}),C.jsx(np,{className:J(n,`${Y}-modal-title`,{standalone:_,embedded:!_}),children:t}),C.jsxs("div",{className:J(n,`${Y}-modal-controls`),children:[C.jsx(Q8,{}),C.jsx(K8,{componentType:"modal",isIcon:!0}),C.jsx(oT,{componentType:"modal",isIcon:!0}),C.jsx(sT,{componentType:"modal"}),C.jsx(nf,{className:`modal ${n}`,onClick:v})]})]}),C.jsxs(Xh,{className:J(n,`${Y}-message-container`,{standalone:_,embedded:!_}),children:[C.jsx(Kh,{isWidgetStandalone:_,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(rh,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):C.jsx("div",{children:"Loading Copilot..."}):null},X8="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",J8=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=Rt(),r=()=>{Jd(!1),Qi(!0)};return Ia.createPortal(C.jsx("div",{className:J(e,`${Y}-minimized-container`),style:n,children:C.jsx(Vr,{className:J(e,`${Y}-minimized-button`),ariaLabel:"Open Copilot",icon:C.jsx("img",{src:t||X8,alt:"Copilot",className:J(e,`${Y}-minimized-icon-img`)}),onClick:r})}),document.body)},Z8=()=>{const e=di(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?C.jsx(J8,{}):t==="dialog"?C.jsx(QT,{}):t==="modal"?C.jsx(XT,{}):C.jsx(jT,{})},rp=e=>C.jsx(zg,Te(H({},e),{children:C.jsx(Z8,{})}));var Ql={},JT;function eM(){if(JT)return Ql;JT=1;var e=tb();return Ql.createRoot=e.createRoot,Ql.hydrateRoot=e.hydrateRoot,Ql}var ZT=eM();const tM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=nn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const T of E.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ds(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=ZT.createRoot(T))==null||p.render(C.jsx(rp,H({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ds(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},nM=r=>{var o=r,{timeout:e,elementId:t}=o,n=nn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ds(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ds(!0,"warn","Container element not found for id:",t),Ds(!0,"warn","Beginning observation for element"),tM(H({elementId:t,timeout:e},n));return}ZT.createRoot(a).render(C.jsx(rp,H({},n)))},rM={search:SA,browse:pA,pdp:{setPdpContext:Ig,updatePdpProductId:gA,updatePdpLink:EA},components:{setEntryType:ea,toggleWidgetOpen:Qi,toggleModalFullscreen:Zd,setWidgetType:Qu,setWidgetDialogPosition:ef},session:yA},iM=()=>Object.freeze({search:Object.freeze(gt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(or.state),isConnected:at.state.connected,isOpen:at.isOpen,entryType:at.entryType});Ie.CopilotDialog=QT,Ie.CopilotEmbed=jT,Ie.CopilotModal=XT,Ie.CopilotWidget=rp,Ie.WidgetProvider=zg,Ie.eventHandlers=rM,Ie.injectCopilotWidget=nM,Ie.state=iM,Ie.useCopilot=wr,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Ua(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}TT.peek=x5;function TT(e){return e.value||""}function x5(){return"<"}_T.peek=w5;function _T(e,t,n,r){const o=qh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,H({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function w5(){return"!"}xT.peek=S5;function xT(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function S5(){return"!"}wT.peek=C5;function wT(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function C5(){return"`"}function ST(e,t){const n=Ef(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}CT.peek=A5;function CT(e,t,n,r){const o=qh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(ST(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,H({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=p,E}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,H({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function A5(e,t,n){return ST(e,n)?"<":"["}AT.peek=v5;function AT(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function v5(){return"["}function Yh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function k5(e){const t=Yh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function N5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function vT(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function O5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?N5(n):Yh(n);const c=e.ordered?u==="."?")":".":k5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),vT(n)===u&&p){let E=-1;for(;++E<e.children.length;){const T=e.children[E];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function I5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function P5(e,t,n,r){const o=I5(n);let a=n.bulletCurrent||Yh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(E,T,b){return T?(b?"":" ".repeat(u))+E:(b?a:a+" ".repeat(u-a.length))+E}}function R5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const L5=dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function D5(e,t,n,r){return(e.children.some(function(u){return L5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function M5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}kT.peek=F5;function kT(e,t,n,r){const o=M5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=ql(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=ql(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+b}function F5(e,t,n){return n.options.strong||"*"}function B5(e,t,n,r){return n.safe(e.value,r)}function U5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function H5(e,t,n){const r=(vT(n)+(n.options.ruleSpaces?" ":"")).repeat(U5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const NT={blockquote:l5,break:yT,code:m5,definition:E5,emphasis:bT,hardBreak:yT,heading:_5,html:TT,image:_T,imageReference:xT,inlineCode:wT,link:CT,linkReference:AT,list:O5,listItem:P5,paragraph:R5,root:D5,strong:kT,text:B5,thematicBreak:H5};function z5(){return{enter:{table:j5,tableData:OT,tableHeader:OT,tableRow:V5},exit:{codeText:q5,table:$5,tableData:Wh,tableHeader:Wh,tableRow:Wh}}}function j5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $5(e){this.exit(e),this.data.inTable=void 0}function V5(e){this.enter({type:"tableRow",children:[]},e)}function Wh(e){this.exit(e)}function OT(e){this.enter({type:"tableCell",children:[]},e)}function q5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Y5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Y5(e,t){return t==="|"?t:e}function W5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(b,_,w,A){return f(p(b,w,A),b.align)}function c(b,_,w,A){const k=E(b,w,A),F=f([k]);return F.slice(0,F.indexOf(`
46
+ `))}function d(b,_,w,A){const k=w.enter("tableCell"),F=w.enter("phrasing"),R=w.containerPhrasing(b,Te(H({},A),{before:a,after:a}));return F(),k(),R}function f(b,_){return a5(b,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(b,_,w){const A=b.children;let k=-1;const F=[],R=_.enter("table");for(;++k<A.length;)F[k]=E(A[k],_,w);return R(),F}function E(b,_,w){const A=b.children;let k=-1;const F=[],R=_.enter("tableRow");for(;++k<A.length;)F[k]=d(A[k],b,_,w);return R(),F}function T(b,_,w){let A=NT.inlineCode(b,_,w);return w.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function G5(){return{exit:{taskListCheckValueChecked:IT,taskListCheckValueUnchecked:IT,paragraph:Q5}}}function K5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X5}}}function IT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Q5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function X5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=NT.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function J5(){return[OD(),XD(),t5(),z5(),G5()]}function Z5(e){return{extensions:[ID(),JD(e),n5(),W5(e),K5()]}}const e8={tokenize:o8,partial:!0},PT={tokenize:a8,partial:!0},RT={tokenize:u8,partial:!0},LT={tokenize:l8,partial:!0},t8={tokenize:c8,partial:!0},DT={name:"wwwAutolink",tokenize:i8,previous:FT},MT={name:"protocolAutolink",tokenize:s8,previous:BT},Xr={name:"emailAutolink",tokenize:r8,previous:UT},Rr={};function n8(){return{text:Rr}}let us=48;for(;us<123;)Rr[us]=Xr,us++,us===58?us=65:us===91&&(us=97);Rr[43]=Xr,Rr[45]=Xr,Rr[46]=Xr,Rr[95]=Xr,Rr[72]=[Xr,MT],Rr[104]=[Xr,MT],Rr[87]=[Xr,DT],Rr[119]=[Xr,DT];function r8(e,t,n){const r=this;let o,a;return u;function u(E){return!Gh(E)||!UT.call(r,r.previous)||Kh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Gh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(t8,p,f)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):p(E)}function f(E){return e.consume(E),o=!0,d}function p(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function i8(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!FT.call(r,r.previous)||Kh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(e8,e.attempt(PT,e.attempt(RT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function s8(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&BT.call(r,r.previous)&&!Kh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?f:(a=!0,d)):n(E)}function f(E){return E===null||rl(E)||ft(E)||Ji(E)||il(E)?n(E):e.attempt(PT,e.attempt(RT,p),n)(E)}function p(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function o8(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function a8(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(LT,d,c)(f):f===null||ft(f)||Ji(f)||f!==45&&il(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function u8(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(LT,t,a)(u):u===null||ft(u)||Ji(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function l8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ft(c)||Ji(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ft(c)||Ji(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function c8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function FT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function BT(e){return!pn(e)}function UT(e){return!(e===47||Gh(e))}function Gh(e){return e===43||e===45||e===46||e===95||an(e)}function Kh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const d8={tokenize:b8,partial:!0};function f8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:g8,continuation:{tokenize:E8},exit:y8}},text:{91:{name:"gfmFootnoteCall",tokenize:m8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:h8,resolveTo:p8}}}}function h8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=ar(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function p8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function m8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(E){if(a>999||E===93&&!u||E===null||E===91||ft(E))return n(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ft(E)||(u=!0),a++,e.consume(E),E===92?p:f}function p(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}}function g8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ft(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=ar(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ft(_)||(c=!0),u++,e.consume(_),_===92?E:p}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):n(_)}function b(_){return t(_)}}function E8(e,t,n){return e.check(la,t,e.attempt(d8,t,n))}function y8(e){e.exit("gfmFootnoteDefinition")}function b8(e,t,n){const r=this;return Ze(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function T8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",E,c]],b=c.parser.constructs.insideSpan.null;b&&Rn(T,T.length,0,sl(b,u.slice(f+1,d),c)),Rn(T,T.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Rn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let E=0;return T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),b(_))}function b(_){const w=js(f);if(_===126)return E>1?d(_):(u.consume(_),E++,b);if(E<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),k=js(_);return A._open=!k||k===2&&!!w,A._close=!w||w===2&&!!k,c(_)}}}class _8{constructor(){this.map=[]}add(t,n,r){x8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function x8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function w8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function S8(){return{flow:{null:{name:"table",tokenize:C8,resolveAll:A8}}}}function C8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(M){let ae=r.events.length-1;for(;ae>-1;){const de=r.events[ae][1].type;if(de==="lineEnding"||de==="linePrefix")ae--;else break}const he=ae>-1?r.events[ae][1].type:null,ue=he==="tableHead"||he==="tableRow"?B:d;return ue===B&&r.parser.lazy[r.now().line]?n(M):ue(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(u=!0,a+=1),p(M)}function p(M){return M===null?n(M):Le(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),b):n(M):Qe(M)?Ze(e,p,"whitespace")(M):(a+=1,u&&(u=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||ft(M)?(e.exit("data"),p(M)):(e.consume(M),M===92?T:E)}function T(M){return M===92||M===124?(e.consume(M),E):E(M)}function b(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),u=!1,Qe(M)?Ze(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?A(M):M===124?(u=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),w):X(M)}function w(M){return Qe(M)?Ze(e,A,"whitespace")(M):A(M)}function A(M){return M===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),k):M===45?(a+=1,k(M)):M===null||Le(M)?W(M):X(M)}function k(M){return M===45?(e.enter("tableDelimiterFiller"),F(M)):X(M)}function F(M){return M===45?(e.consume(M),F):M===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(M))}function R(M){return Qe(M)?Ze(e,W,"whitespace")(M):W(M)}function W(M){return M===124?_(M):M===null||Le(M)?!u||o!==a?X(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):X(M)}function X(M){return n(M)}function B(M){return e.enter("tableRow"),te(M)}function te(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),te):M===null||Le(M)?(e.exit("tableRow"),t(M)):Qe(M)?Ze(e,te,"whitespace")(M):(e.enter("data"),ge(M))}function ge(M){return M===null||M===124||ft(M)?(e.exit("data"),te(M)):(e.consume(M),M===92?ye:ge)}function ye(M){return M===92||M===124?(e.consume(M),ge):ge(M)}}function A8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,E;const T=new _8;for(;++n<e.length;){const b=e[n],_=b[1];b[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(HT(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Yl(T,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Yl(T,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],E=Yl(T,t,a,o,n,E)):u[1]!==0&&(E=Yl(T,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&HT(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=w8(t.events,n))}return e}function Yl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=fo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=fo(t.events,n[2]),p=fo(t.events,n[3]),E={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const T=t.events[n[2]],b=t.events[n[3]];if(T[1].end=Object.assign({},b[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,w=n[3]-n[2]-1;e.add(_,w,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function HT(e,t,n,r,o){const a=[],u=fo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const v8={name:"tasklistCheck",tokenize:N8};function k8(){return{text:{91:v8}}}function N8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Qe(d)?e.check({tokenize:O8},t,n)(d):n(d)}}function O8(e,t,n){return Ze(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function I8(e){return O1([n8(),f8(),T8(e),S8(),k8()])}const P8={};function R8(e){const t=this,n=e||P8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(I8(n)),a.push(J5()),u.push(Z5(n))}const Wl=()=>C.jsx("span",{className:`${Y}-blinking-cursor`,children:C.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),zT=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=wr(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return C.jsx(TE,{remarkPlugins:[R8],rehypePlugins:[Py],components:{h1:({children:u})=>C.jsx("h1",{className:J(e,`${Y}-header h1`),children:u}),h2:({children:u})=>C.jsx("h2",{className:J(e,`${Y}-header h2`),children:u}),h3:({children:u})=>C.jsx("h3",{className:J(e,`${Y}-header h3`),children:u}),ul:({children:u})=>C.jsx("ul",{className:J(e,`${Y}-ul`),children:u}),ol:({children:u})=>C.jsx("ol",{className:J(e,`${Y}-ol`),children:u}),li:({children:u})=>C.jsx("li",{className:J(e,`${Y}-li`),children:u}),a:({href:u,children:c})=>C.jsx(Uy,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>C.jsx("table",{className:J(e,`${Y}-table`),children:u}),thead:({children:u})=>C.jsx("thead",{className:J(e,`${Y}-thead`),children:u}),tbody:({children:u})=>C.jsx("tbody",{className:J(e,`${Y}-tbody`),children:u}),tr:({children:u})=>C.jsx("tr",{className:J(e,`${Y}-tr`),children:u}),th:({children:u})=>C.jsx("th",{className:J(e,`${Y}-th`),children:u}),td:({children:u})=>C.jsx("td",{className:J(e,`${Y}-td`),children:u}),span:({className:u,children:c})=>u===`${Y}-blinking-cursor`?C.jsx(Wl,{}):C.jsx("span",{children:c})},children:n.message+(a?`<span className='${Y}-blinking-cursor'></span>`:"")})},L8=({globalClassName:e,message:t})=>{const[n,r]=$.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-progress-message`,"standalone"),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","standalone"),children:C.jsx(Qg,{})}),C.jsx("p",{className:J(e,`${Y}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&C.jsxs(C.Fragment,{children:[C.jsx(sf,{className:J(e,`${Y}-thought-context-button`),onClick:c,children:n?C.jsxs(C.Fragment,{children:["Hide ",C.jsx(tv,{})]}):C.jsxs(C.Fragment,{children:["Context ",C.jsx(nv,{})]})}),n&&C.jsx("div",{className:J(e,`${Y}-thought-container`),children:a&&C.jsx("p",{className:J(e,`${Y}-progress-thought`),children:t.thought})})]})]})},D8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?C.jsx(L8,{globalClassName:e,message:t}):C.jsxs("div",{className:J(e,`${Y}-progress-message`,"embedded"),title:t.message,children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","embedded"),children:C.jsx(Qg,{})}),C.jsx("i",{className:J(e,`${Y}-progress-text`,"embedded"),children:t.message})]}),M8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return C.jsxs("div",{className:J(e,`${Y}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&C.jsxs("div",{className:J(e,`${Y}-refined-event-query`,{embedded:!n,standalone:n}),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,`${Y}-refined-event-icon`,{embedded:!n,standalone:n}),children:C.jsx(na,{role:"img"})}),C.jsx("p",{className:J(e,`${Y}-text`,`${Y}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),C.jsx(zT,{message:t})]})},jT=e=>{var d,f;const{configModule:t}=Rt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,E)=>p+E.length,0);return{facetFiltersList:u,filterCount:c}},Gl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>C.jsx("span",{className:J(t,`${Y}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),$T=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return C.jsxs("div",{className:J(e,`${Y}-facets`),children:[C.jsx("p",{className:J(e,`${Y}-facet-category`),children:c}),C.jsx("p",{className:J(e,`${Y}-facet-values`),children:d})]},c)})},Ha=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>C.jsx("span",{className:J(e,`${Y}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),F8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=jT(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?C.jsxs("div",{className:J(e,`${Y}-user-message standalone`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon standalone`),children:C.jsx(Jg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),C.jsx($T,{globalClassName:e,facetFiltersList:a,message:t}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):C.jsxs("div",{className:J(e,`${Y}-user-message embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row embedded`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon embedded`),children:C.jsx(Jg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:u})]}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},B8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>C.jsxs("div",{className:J(e,`${Y}-user-search standalone`),children:[C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon standalone`),children:C.jsx(na,{})}),C.jsx("p",{className:J(e,`${Y}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),C.jsx($T,{globalClassName:e,facetFiltersList:u,message:a})]}),C.jsx(Ha,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),U8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var b;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=jT(t),d=new Date(a).toLocaleString(),f=(b=r==null?void 0:r.attachments)==null?void 0:b.image,{actionLabel:p,query:E,queryLabel:T}=$.useMemo(()=>{var _;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(_=r==null?void 0:r.browseParams)==null?void 0:_.categoryId,queryLabel:(r==null?void 0:r.label)||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:(r==null?void 0:r.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return E?n?C.jsx(B8,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:E,queryLabel:T,facetFiltersList:u,filterCount:c}):C.jsxs("div",{className:J(e,`${Y}-user-search embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query embedded`),children:[f?C.jsx("img",{className:J(e,`${Y}-user-search-image embedded`),src:f,alt:T||E,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon embedded`),children:C.jsx(na,{})}),C.jsx("p",{children:T||E}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:c})]}),C.jsx(Ha,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},VT=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return c?C.jsx(F8,{globalClassName:t,isWidgetStandalone:o,message:e}):C.jsx(U8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return C.jsx(M8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return C.jsx(SD,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return C.jsx(zT,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return C.jsx(_D,{message:e,isWidgetStandalone:o});case"display_products":return C.jsx(TD,{message:e,isWidgetStandalone:o});case"progress":return C.jsx(D8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:J(t,`${Y}-reset-message`),children:"This conversation has been reset."}),C.jsx("p",{className:J(t,`${Y}-start-search-message`),children:r})]});default:return null}},Qh=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:o,resetConversationMessage:a}=Rt(),{groupedMessages:u,entryType:c}=Ms(),d=typeof r=="string"?r:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return C.jsxs(C.Fragment,{children:[c==="ask_cim"&&C.jsx("div",{className:J(n,`${Y}-ask-cim-entry-message`,`${Y}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let p=new Date(f.createdAt).toLocaleString();const E=f.messages[f.messages.length-1];return E&&(p=new Date(E.createdAt).toLocaleString()),C.jsxs("div",{className:J(n,`${Y}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(T=>C.jsx("div",{className:`${Y}-message-group-child`,children:C.jsx(VT,{id:T.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:T,resetConversationMessage:a,handleSuggestionClick:t})},T.id)),C.jsx(Ha,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return C.jsx("div",{className:J(n,`${Y}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:C.jsx(VT,{id:f.message.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},qT=()=>{const{globalClassName:e,themeVariables:t}=Rt(),{copilot:n,messages:r,isLoading:o,handleUserInput:a,handleSuggestion:u}=wr(),c=$.useRef(null),d=nf();return $.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?C.jsxs("div",{className:J(e,`${Y}-container`,`${Y}-embedded-chat`),style:t,children:[C.jsxs("div",{className:J(e,`${Y}-message-container`,"embedded"),children:[C.jsx(Qh,{isWidgetStandalone:!1,handleSuggestionClick:u}),o&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:c})]}),C.jsx(ih,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),C.jsx("div",{className:J(`${Y}-embedded-chat-menu`),children:C.jsx(yD,{componentType:"chat",children:C.jsx(cT,{componentType:"chat"})})})]}):C.jsx("div",{children:"Loading Copilot..."}):null},[H8,z8]=to({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),j8=e=>fb()(e,["lazyMount","unmountOnExit"]),[$8,za]=to({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),YT=$.forwardRef((e,t)=>{const n=za(),r=z8(),o=Sh(Te(H({},r),{present:n.open})),a=cr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:C.jsx(yi.div,Te(H({},a),{ref:Rl(o.ref,t)}))});YT.displayName="DialogBackdrop";const Xh=$.forwardRef((e,t)=>{const n=za(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});Xh.displayName="DialogContent";const Jh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getDescriptionProps(),e);return C.jsx(yi.div,Te(H({},r),{ref:t}))});Jh.displayName="DialogDescription";const Zh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getPositionerProps(),e);return Pa().unmounted?null:C.jsx(yi.div,Te(H({},r),{ref:t}))});Zh.displayName="DialogPositioner";var V8=no("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ls=V8.build(),WT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},GT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Kl=e=>e.getById(ep(e)),q8=e=>e.getById(WT(e)),Y8=e=>e.getById(GT(e)),W8=e=>e.getById(KT(e)),G8=e=>e.getById(tp(e)),K8=e=>e.getById(np(e)),Q8=e=>e.getById(QT(e));function X8(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(Te(H({},ls.trigger.attrs),{dir:a("dir"),id:KT(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Te(H({},ls.backdrop.attrs),{dir:a("dir"),hidden:!d,id:GT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({},ls.positioner.attrs),{dir:a("dir"),id:WT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(Te(H({},ls.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:tp(u),"aria-describedby":f.description?np(u):void 0}))},getTitleProps(){return t.element(Te(H({},ls.title.attrs),{dir:a("dir"),id:tp(u)}))},getDescriptionProps(){return t.element(Te(H({},ls.description.attrs),{dir:a("dir"),id:np(u)}))},getCloseTriggerProps(){return t.button(Te(H({},ls.closeTrigger.attrs),{dir:a("dir"),id:QT(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var J8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>Q8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return H({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 Yb(()=>Kl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[W8(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 Xb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Kb(()=>Kl(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")?Fb(()=>[Kl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Sn(()=>{e.set("rendered",{title:!!G8(t),description:!!K8(t)})})},syncZIndex({scope:e}){Sn(()=>{const t=Kl(e);if(!t)return;const n=Nl(t);[q8(e),Y8(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})}}}};Th()(["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 Z8=e=>{const t=$.useId(),{getRootNode:n}=zh(),{dir:r}=rT(),o=H({id:t,getRootNode:n,dir:r},e),a=_h(J8,o);return X8(a,ub)},XT=e=>{const[t,c]=hb(e),d=c,{children:n}=d,r=nn(d,["children"]),[o]=j8(t),a=Z8(r),u=Sh(cr({present:a.open},t));return C.jsx($8,{value:a,children:C.jsx(H8,{value:o,children:C.jsx(lb,{value:u,children:n})})})},rp=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getTitleProps(),e);return C.jsx(yi.h2,Te(H({},r),{ref:t}))});rp.displayName="DialogTitle";const JT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=$.useState((d=e.container)==null?void 0:d.current),a=$.useSyncExternalStore(tM,()=>!1,()=>!0),{getRootNode:u}=zh();if($.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return C.jsx(C.Fragment,{children:t});const c=r!=null?r:eM(u);return C.jsx(C.Fragment,{children:$.Children.map(t,f=>Ia.createPortal(f,c))})},eM=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ss(n)?n:vr(t).body},tM=()=>()=>{},nM=()=>{const{globalClassName:e}=Rt(),{dialogPosition:t}=di(),n=t==="bottom-left",r=()=>{tf(n?"bottom-right":"bottom-left")},o=n?mD:pD,a=n?"Move right":"Move left";return C.jsx(Vr,{className:J(e,`${Y}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:C.jsx(o,{})})},ZT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,dialogPosition:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),b=nf(),{isOpen:_}=a||{},w=o==="standalone";$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const A=()=>{Qi(!1)};return b?c?C.jsx(XT,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:C.jsx(JT,{children:C.jsx(Zh,{className:J(n,`${Y}-container`,`${Y}-dialog`,u),style:r,children:C.jsxs(Xh,{className:J(n,`${Y}-dialog-content`,{standalone:w,embedded:!w}),children:[C.jsxs("div",{className:J(n,`${Y}-dialog-header`,{standalone:w,embedded:!w}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-dialog-logo`,{standalone:w,embedded:!w}),src:e}),C.jsx(rp,{className:J(n,`${Y}-dialog-title`,{standalone:w,embedded:!w}),children:t}),C.jsxs("div",{className:J(n,`${Y}-dialog-controls`),children:[C.jsx(cT,{componentType:"dialog",isIcon:!0}),C.jsx(nM,{}),C.jsx(lT,{componentType:"dialog",isIcon:!0}),C.jsx(uT,{componentType:"dialog"}),C.jsx(rf,{className:`dialog ${n}`,onClick:A})]})]}),C.jsxs(Jh,{className:J(n,`${Y}-message-container`,{standalone:w,embedded:!w}),children:[C.jsx(Qh,{isWidgetStandalone:w,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(ih,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):C.jsx("div",{children:"Loading Copilot..."}):null},rM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),{previousComponentType:r}=di(),o=()=>{Qu(r||"dialog")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:o,icon:C.jsx(oT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-dialog-button`,e),onClick:o,children:[C.jsx(oT,{}),"Show ",r||"dialog"]})},iM=()=>{const{globalClassName:e}=Rt(),{isModalFullscreen:t}=di(),n=()=>{ef(!t)},r=t?rv:iv,o=`${t?"Exit":"Enter"} Fullscreen`;return C.jsx(Vr,{ariaLabel:o,title:o,className:J(e,`${Y}-modal-fullscreen-button`),icon:C.jsx(r,{}),onClick:n})},e2=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,isModalFullscreen:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),{isOpen:b}=a||{},_=o==="standalone",w=nf();$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const A=({open:F})=>{Qi(F)},k=()=>{Qi(!1)};return w?c?C.jsx(XT,{lazyMount:!0,open:b,onOpenChange:A,children:C.jsx(JT,{children:C.jsxs("div",{className:J(n,`${Y}-modal-container`),style:r,children:[C.jsx(YT,{className:J(n,`${Y}-modal-backdrop`)}),C.jsx(Zh,{className:J(n,`${Y}-container`,`${Y}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:C.jsxs(Xh,{className:J(n,`${Y}-modal-content`,{standalone:_,embedded:!_}),children:[C.jsxs("div",{className:J(n,`${Y}-modal-header`,{standalone:_,embedded:!_}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-modal-logo`,{standalone:_,embedded:!_}),src:e}),C.jsx(rp,{className:J(n,`${Y}-modal-title`,{standalone:_,embedded:!_}),children:t}),C.jsxs("div",{className:J(n,`${Y}-modal-controls`),children:[C.jsx(iM,{}),C.jsx(rM,{componentType:"modal",isIcon:!0}),C.jsx(lT,{componentType:"modal",isIcon:!0}),C.jsx(uT,{componentType:"modal"}),C.jsx(rf,{className:`modal ${n}`,onClick:k})]})]}),C.jsxs(Jh,{className:J(n,`${Y}-message-container`,{standalone:_,embedded:!_}),children:[C.jsx(Qh,{isWidgetStandalone:_,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(ih,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):C.jsx("div",{children:"Loading Copilot..."}):null},sM="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",oM=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=Rt(),r=()=>{Zd(!1),Qi(!0)};return Ia.createPortal(C.jsx("div",{className:J(e,`${Y}-minimized-container`),style:n,children:C.jsx(Vr,{className:J(e,`${Y}-minimized-button`),ariaLabel:"Open Copilot",icon:C.jsx("img",{src:t||sM,alt:"Copilot",className:J(e,`${Y}-minimized-icon-img`)}),onClick:r})}),document.body)},aM=()=>{const e=di(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?C.jsx(oM,{}):t==="dialog"?C.jsx(ZT,{}):t==="modal"?C.jsx(e2,{}):C.jsx(qT,{})},ip=e=>C.jsx(Vg,Te(H({},e),{children:C.jsx(aM,{})}));var Ql={},t2;function uM(){if(t2)return Ql;t2=1;var e=ib();return Ql.createRoot=e.createRoot,Ql.hydrateRoot=e.hydrateRoot,Ql}var n2=uM();const lM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=nn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const T of E.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ds(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=n2.createRoot(T))==null||p.render(C.jsx(ip,H({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ds(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},cM=r=>{var o=r,{timeout:e,elementId:t}=o,n=nn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ds(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ds(!0,"warn","Container element not found for id:",t),Ds(!0,"warn","Beginning observation for element"),lM(H({elementId:t,timeout:e},n));return}n2.createRoot(a).render(C.jsx(ip,H({},n)))},dM={search:PA,browse:xA,pdp:{setPdpContext:Lg,updatePdpProductId:SA,updatePdpLink:CA},components:{setEntryType:ea,toggleWidgetOpen:Qi,toggleModalFullscreen:ef,setWidgetType:Qu,setWidgetDialogPosition:tf},session:AA},fM=()=>Object.freeze({search:Object.freeze(gt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(or.state),isConnected:at.state.connected,isOpen:at.isOpen,entryType:at.entryType});Ie.CopilotDialog=ZT,Ie.CopilotEmbed=qT,Ie.CopilotModal=e2,Ie.CopilotWidget=ip,Ie.WidgetProvider=Vg,Ie.eventHandlers=dM,Ie.injectCopilotWidget=cM,Ie.state=fM,Ie.useCopilot=wr,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));