@cimulate/copilot-widget 1.5.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- (function(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(`
1
+ (function(Pe,He){typeof exports=="object"&&typeof module!="undefined"?He(exports):typeof define=="function"&&define.amd?define(["exports"],He):(Pe=typeof globalThis!="undefined"?globalThis:Pe||self,He(Pe["cimulate-copilot-widget"]={}))})(this,(function(Pe){"use strict";var F9=Object.defineProperty,B9=Object.defineProperties;var U9=Object.getOwnPropertyDescriptors;var dd=Object.getOwnPropertySymbols;var QS=Object.prototype.hasOwnProperty,JS=Object.prototype.propertyIsEnumerable;var qo=(Pe,He)=>(He=Symbol[Pe])?He:Symbol.for("Symbol."+Pe),H9=Pe=>{throw TypeError(Pe)},fd=Math.pow,Qm=(Pe,He,Xe)=>He in Pe?F9(Pe,He,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Pe[He]=Xe,F=(Pe,He)=>{for(var Xe in He||(He={}))QS.call(He,Xe)&&Qm(Pe,Xe,He[Xe]);if(dd)for(var Xe of dd(He))JS.call(He,Xe)&&Qm(Pe,Xe,He[Xe]);return Pe},be=(Pe,He)=>B9(Pe,U9(He));var sn=(Pe,He)=>{var Xe={};for(var lt in Pe)QS.call(Pe,lt)&&He.indexOf(lt)<0&&(Xe[lt]=Pe[lt]);if(Pe!=null&&dd)for(var lt of dd(Pe))He.indexOf(lt)<0&&JS.call(Pe,lt)&&(Xe[lt]=Pe[lt]);return Xe};var Se=(Pe,He,Xe)=>Qm(Pe,typeof He!="symbol"?He+"":He,Xe);var Ze=(Pe,He,Xe)=>new Promise((lt,Ot)=>{var bt=Rt=>{try{Wt(Xe.next(Rt))}catch(bn){Ot(bn)}},Ie=Rt=>{try{Wt(Xe.throw(Rt))}catch(bn){Ot(bn)}},Wt=Rt=>Rt.done?lt(Rt.value):Promise.resolve(Rt.value).then(bt,Ie);Wt((Xe=Xe.apply(Pe,He)).next())}),Vr=function(Pe,He){this[0]=Pe,this[1]=He},hd=(Pe,He,Xe)=>{var lt=(Ie,Wt,Rt,bn)=>{try{var Ns=Xe[Ie](Wt),Yo=(Wt=Ns.value)instanceof Vr,pd=Ns.done;Promise.resolve(Yo?Wt[0]:Wt).then(or=>Yo?lt(Ie==="return"?Ie:"next",Wt[1]?{done:or.done,value:or.value}:or,Rt,bn):Rt({value:or,done:pd})).catch(or=>lt("throw",or,Rt,bn))}catch(or){bn(or)}},Ot=Ie=>bt[Ie]=Wt=>new Promise((Rt,bn)=>lt(Ie,Wt,Rt,bn)),bt={};return Xe=Xe.apply(Pe,He),bt[qo("asyncIterator")]=()=>bt,Ot("next"),Ot("throw"),Ot("return"),bt},Jm=Pe=>{var He=Pe[qo("asyncIterator")],Xe=!1,lt,Ot={};return He==null?(He=Pe[qo("iterator")](),lt=bt=>Ot[bt]=Ie=>He[bt](Ie)):(He=He.call(Pe),lt=bt=>Ot[bt]=Ie=>{if(Xe){if(Xe=!1,bt==="throw")throw Ie;return Ie}return Xe=!0,{done:!1,value:new Vr(new Promise(Wt=>{var Rt=He[bt](Ie);Rt instanceof Object||H9("Object expected"),Wt(Rt)}),1)}}),Ot[qo("iterator")]=()=>Ot,lt("next"),"throw"in He?lt("throw"):Ot.throw=bt=>{throw bt},"return"in He&&lt("return"),Ot},ZS=(Pe,He,Xe)=>(He=Pe[qo("asyncIterator")])?He.call(Pe):(Pe=Pe[qo("iterator")](),He={},Xe=(lt,Ot)=>(Ot=Pe[lt])&&(He[lt]=bt=>new Promise((Ie,Wt,Rt)=>(bt=Ot.call(Pe,bt),Rt=bt.done,Promise.resolve(bt.value).then(bn=>Ie({value:bn,done:Rt}),Wt)))),Xe("next"),Xe("return"),He);var He=document.createElement("style");He.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)}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.cim-widget-prompts-input{width:100%;border-color:transparent;border-bottom-width:1px;outline:none;background-color:transparent;font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%;max-height:40%;scrollbar-gutter:stable}
2
+ /*$vite$:1*/`,document.head.appendChild(He);function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},Ot={},bt={exports:{}},Ie={};var Wt;function Rt(){if(Wt)return Ie;Wt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=g&&L[g]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function w(L,Q,O){this.props=L,this.context=Q,this.refs=S,this.updater=O||y}w.prototype.isReactComponent={},w.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")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=w.prototype;function M(L,Q,O){this.props=L,this.context=Q,this.refs=S,this.updater=O||y}var I=M.prototype=new A;I.constructor=M,_(I,w.prototype),I.isPureReactComponent=!0;var q=Array.isArray,Z=Object.prototype.hasOwnProperty,U={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function he(L,Q,O){var _e,Le={},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)Z.call(Q,_e)&&!te.hasOwnProperty(_e)&&(Le[_e]=Q[_e]);var Ye=arguments.length-2;if(Ye===1)Le.children=O;else if(1<Ye){for(var nt=Array(Ye),Pt=0;Pt<Ye;Pt++)nt[Pt]=arguments[Pt+2];Le.children=nt}if(L&&L.defaultProps)for(_e in Ye=L.defaultProps,Ye)Le[_e]===void 0&&(Le[_e]=Ye[_e]);return{$$typeof:e,type:L,key:Oe,ref:Ge,props:Le,_owner:U.current}}function ye(L,Q){return{$$typeof:e,type:L.type,key:Q,ref:L.ref,props:L.props,_owner:L._owner}}function B(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function se(L){var Q={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return Q[O]})}var pe=/\/+/g;function le(L,Q){return typeof L=="object"&&L!==null&&L.key!=null?se(""+L.key):Q.toString(36)}function fe(L,Q,O,_e,Le){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,Le=Le(Ge),L=_e===""?"."+le(Ge,0):_e,q(Le)?(O="",L!=null&&(O=L.replace(pe,"$&/")+"/"),fe(Le,Q,O,"",function(Pt){return Pt})):Le!=null&&(B(Le)&&(Le=ye(Le,O+(!Le.key||Ge&&Ge.key===Le.key?"":(""+Le.key).replace(pe,"$&/")+"/")+L)),Q.push(Le)),1;if(Ge=0,_e=_e===""?".":_e+":",q(L))for(var Ye=0;Ye<L.length;Ye++){Oe=L[Ye];var nt=_e+le(Oe,Ye);Ge+=fe(Oe,Q,O,nt,Le)}else if(nt=b(L),typeof nt=="function")for(L=nt.call(L),Ye=0;!(Oe=L.next()).done;)Oe=Oe.value,nt=_e+le(Oe,Ye++),Ge+=fe(Oe,Q,O,nt,Le);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 Te(L,Q,O){if(L==null)return L;var _e=[],Le=0;return fe(L,_e,"","",function(Oe){return Q.call(O,Oe,Le++)}),_e}function Ae(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 ue={current:null},W={transition:null},ne={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:W,ReactCurrentOwner:U};function v(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:Te,forEach:function(L,Q,O){Te(L,function(){Q.apply(this,arguments)},O)},count:function(L){var Q=0;return Te(L,function(){Q++}),Q},toArray:function(L){return Te(L,function(Q){return Q})||[]},only:function(L){if(!B(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Ie.Component=w,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=M,Ie.StrictMode=r,Ie.Suspense=d,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Ie.act=v,Ie.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),Le=L.key,Oe=L.ref,Ge=L._owner;if(Q!=null){if(Q.ref!==void 0&&(Oe=Q.ref,Ge=U.current),Q.key!==void 0&&(Le=""+Q.key),L.type&&L.type.defaultProps)var Ye=L.type.defaultProps;for(nt in Q)Z.call(Q,nt)&&!te.hasOwnProperty(nt)&&(_e[nt]=Q[nt]===void 0&&Ye!==void 0?Ye[nt]:Q[nt])}var nt=arguments.length-2;if(nt===1)_e.children=O;else if(1<nt){Ye=Array(nt);for(var Pt=0;Pt<nt;Pt++)Ye[Pt]=arguments[Pt+2];_e.children=Ye}return{$$typeof:e,type:L.type,key:Le,ref:Oe,props:_e,_owner:Ge}},Ie.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},Ie.createElement=he,Ie.createFactory=function(L){var Q=he.bind(null,L);return Q.type=L,Q},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(L){return{$$typeof:c,render:L}},Ie.isValidElement=B,Ie.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Ae}},Ie.memo=function(L,Q){return{$$typeof:f,type:L,compare:Q===void 0?null:Q}},Ie.startTransition=function(L){var Q=W.transition;W.transition={};try{L()}finally{W.transition=Q}},Ie.unstable_act=v,Ie.useCallback=function(L,Q){return ue.current.useCallback(L,Q)},Ie.useContext=function(L){return ue.current.useContext(L)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(L){return ue.current.useDeferredValue(L)},Ie.useEffect=function(L,Q){return ue.current.useEffect(L,Q)},Ie.useId=function(){return ue.current.useId()},Ie.useImperativeHandle=function(L,Q,O){return ue.current.useImperativeHandle(L,Q,O)},Ie.useInsertionEffect=function(L,Q){return ue.current.useInsertionEffect(L,Q)},Ie.useLayoutEffect=function(L,Q){return ue.current.useLayoutEffect(L,Q)},Ie.useMemo=function(L,Q){return ue.current.useMemo(L,Q)},Ie.useReducer=function(L,Q,O){return ue.current.useReducer(L,Q,O)},Ie.useRef=function(L){return ue.current.useRef(L)},Ie.useState=function(L){return ue.current.useState(L)},Ie.useSyncExternalStore=function(L,Q,O){return ue.current.useSyncExternalStore(L,Q,O)},Ie.useTransition=function(){return ue.current.useTransition()},Ie.version="18.3.1",Ie}var bn;function Ns(){return bn||(bn=1,bt.exports=Rt()),bt.exports}var Yo;function pd(){if(Yo)return Ot;Yo=1;var e=Ns(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,g={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:g,_owner:s.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var or;function rx(){return or||(or=1,lt.exports=pd()),lt.exports}var C=rx();const xr=Object.create(null);xr.open="0",xr.close="1",xr.ping="2",xr.pong="3",xr.message="4",xr.upgrade="5",xr.noop="6";const Ou=Object.create(null);Object.keys(xr).forEach(e=>{Ou[xr[e]]=e});const md={type:"error",data:"parser error"},Zm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",e0=typeof ArrayBuffer=="function",t0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,gd=({type:e,data:t},n,r)=>Zm&&t instanceof Blob?n?r(t):n0(t,r):e0&&(t instanceof ArrayBuffer||t0(t))?n?r(t):n0(new Blob([t]),r):r(xr[e]+(t||"")),n0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function r0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ed;function ix(e,t){if(Zm&&e.data instanceof Blob)return e.data.arrayBuffer().then(r0).then(t);if(e0&&(e.data instanceof ArrayBuffer||t0(e.data)))return t(r0(e.data));gd(e,!1,n=>{Ed||(Ed=new TextEncoder),t(Ed.encode(n))})}const i0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<i0.length;e++)Wo[i0.charCodeAt(e)]=e;const sx=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Wo[e.charCodeAt(r)],u=Wo[e.charCodeAt(r+1)],c=Wo[e.charCodeAt(r+2)],d=Wo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},ox=typeof ArrayBuffer=="function",yd=(e,t)=>{if(typeof e!="string")return{type:"message",data:s0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ax(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:md},ax=(e,t)=>{if(ox){const n=sx(e);return s0(n,t)}else return{base64:!0,data:e}},s0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,o0="",ux=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{gd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(o0))})})},lx=(e,t)=>{const n=e.split(o0),r=[];for(let s=0;s<n.length;s++){const a=yd(n[s],t);if(r.push(a),a.type==="error")break}return r};function cx(){return new TransformStream({transform(e,t){ix(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Td;function Pu(e){return e.reduce((t,n)=>t+n.length,0)}function Iu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function dx(e,t){Td||(Td=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Pu(n)<1)break;const d=Iu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Pu(n)<2)break;const d=Iu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Pu(n)<8)break;const d=Iu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(md);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Pu(n)<s)break;const d=Iu(n,s);c.enqueue(yd(a?d:Td.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(md);break}}}})}const a0=4;function Bt(e){if(e)return fx(e)}function fx(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ru=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Vn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),hx="arraybuffer";function z9(){}function u0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const px=Vn.setTimeout,mx=Vn.clearTimeout;function Lu(e,t){t.useNativeTimers?(e.setTimeoutFn=px.bind(Vn),e.clearTimeoutFn=mx.bind(Vn)):(e.setTimeoutFn=Vn.setTimeout.bind(Vn),e.clearTimeoutFn=Vn.clearTimeout.bind(Vn))}const gx=1.33;function Ex(e){return typeof e=="string"?yx(e):Math.ceil((e.byteLength||e.size)*gx)}function yx(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function l0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Tx(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function bx(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class _x extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bd extends Bt{constructor(t){super(),this.writable=!1,Lu(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 _x(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=yd(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=Tx(t);return n.length?"?"+n:""}}class Sx extends bd{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)};lx(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,ux(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]=l0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let c0=!1;try{c0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const xx=c0;function wx(){}class Cx extends Sx{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class wr extends Bt{constructor(t,n,r){super(),this.createRequest=t,Lu(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=u0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=wr.requestsCount++,wr.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=wx,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete wr.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(wr.requestsCount=0,wr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",d0);else if(typeof addEventListener=="function"){const e="onpagehide"in Vn?"pagehide":"unload";addEventListener(e,d0,!1)}}function d0(){for(let e in wr.requests)wr.requests.hasOwnProperty(e)&&wr.requests[e].abort()}const Ax=(function(){const e=f0({xdomain:!1});return e&&e.responseType!==null})();class vx extends Cx{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Ax&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new wr(f0,this.uri(),t)}}function f0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||xx))return new XMLHttpRequest}catch(n){}if(!t)try{return new Vn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const h0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kx extends bd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=h0?{}:u0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;gd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Ru(()=>{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]=l0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const _d=Vn.WebSocket||Vn.MozWebSocket;class Nx extends kx{createSocket(t,n,r){return h0?new _d(t,n,r):n?new _d(t,n):new _d(t)}doWrite(t,n){this.ws.send(n)}}class Ox extends bd{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=dx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=cx();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Ru(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Px={websocket:Nx,webtransport:Ox,polling:vx},Ix=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Rx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=Ix.exec(e||""),a={},u=14;for(;u--;)a[Rx[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Lx(a,a.path),a.queryKey=Dx(a,a.query),a}function Lx(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 Dx(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const xd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Du=[];xd&&addEventListener("offline",()=>{Du.forEach(e=>e())},!1);class fi extends Bt{constructor(t,n){if(super(),this.binaryType=hx,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=Sd(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=Sd(n.host).host);Lu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bx(this.opts.query)),xd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=a0,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&&fi.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",fi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=Ex(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ru(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(fi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Du.indexOf(this._offlineEventListener);r!==-1&&Du.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}fi.protocol=a0;class Mx extends fi{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;fi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;fi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const b=new Error("probe error: "+g);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Fx=class extends Mx{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(s=>Px[s]).filter(s=>!!s)),super(t,r)}};function Bx(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=Sd(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 Ux=typeof ArrayBuffer=="function",Hx=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,p0=Object.prototype.toString,zx=typeof Blob=="function"||typeof Blob!="undefined"&&p0.call(Blob)==="[object BlobConstructor]",jx=typeof File=="function"||typeof File!="undefined"&&p0.call(File)==="[object FileConstructor]";function wd(e){return Ux&&(e instanceof ArrayBuffer||Hx(e))||zx&&e instanceof Blob||jx&&e instanceof File}function Mu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mu(e[n]))return!0;return!1}if(wd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mu(e[n]))return!0;return!1}function $x(e){const t=[],n=e.data,r=e;return r.data=Cd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Cd(e,t){if(!e)return e;if(wd(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]=Cd(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]=Cd(e[r],t));return n}return e}function Vx(e,t){return e.data=Ad(e.data,t),delete e.attachments,e}function Ad(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]=Ad(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ad(e[n],t));return e}const qx=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));class Yx{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&Mu(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=$x(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class vd extends Bt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new Wx(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Gx(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 s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(vd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return m0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||m0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&qx.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Wx{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=Vx(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Gx=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function m0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Xx=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vd,Encoder:Yx,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function ar(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Kx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class g0 extends Bt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ar(t,"open",this.onopen.bind(this)),ar(t,"packet",this.onpacket.bind(this)),ar(t,"error",this.onerror.bind(this)),ar(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(Kx.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.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:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Os(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Os.prototype.reset=function(){this.attempts=0},Os.prototype.setMin=function(e){this.ms=e},Os.prototype.setMax=function(e){this.max=e},Os.prototype.setJitter=function(e){this.jitter=e};class kd extends Bt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Lu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Os({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Xx;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Fx(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ar(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ar(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ar(t,"ping",this.onping.bind(this)),ar(t,"data",this.ondata.bind(this)),ar(t,"error",this.onerror.bind(this)),ar(t,"close",this.onclose.bind(this)),ar(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){Ru(()=>{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 g0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Go={};function Fu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Bx(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Go[s]&&a in Go[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new kd(r,t):(Go[s]||(Go[s]=new kd(r,t)),d=Go[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Fu,{Manager:kd,Socket:g0,io:Fu,connect:Fu});var Qx=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===Jx})(t)})(e)},Jx=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Xo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ps((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Zx(e,t,n){return e.concat(t).map((function(r){return Xo(r,n)}))}function E0(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 y0(e,t){try{return t in e}catch(n){return!1}}function ew(e,t,n){var r={};return n.isMergeableObject(e)&&E0(e).forEach((function(s){r[s]=Xo(e[s],n)})),E0(t).forEach((function(s){(function(a,u){return y0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(y0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Ps;var c=u.customMerge(a);return typeof c=="function"?c:Ps})(s,n)(e[s],t[s],n):r[s]=Xo(t[s],n))})),r}function Ps(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Zx,n.isMergeableObject=n.isMergeableObject||Qx,n.cloneUnlessOtherwiseSpecified=Xo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ew(e,t,n):Xo(t,n)}Ps.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Ps(n,r,t)}),{})};var tw=Ps;let nw=class{constructor(t){Object.assign(this,t)}};function mn(e){if(e)return(function(t){for(var n in mn.prototype)t[n]=mn.prototype[n];return t})(e)}mn.prototype.on=mn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},mn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},mn.prototype.off=mn.prototype.removeListener=mn.prototype.removeAllListeners=mn.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 s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},mn.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 s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},mn.prototype.emitReserved=mn.prototype.emit,mn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},mn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const rw=typeof ArrayBuffer=="function",T0=Object.prototype.toString,iw=typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob)==="[object BlobConstructor]",sw=typeof File=="function"||typeof File!="undefined"&&T0.call(File)==="[object FileConstructor]";function Nd(e){return rw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||iw&&e instanceof Blob||sw&&e instanceof File}function Bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Bu(e[n]))return!0;return!1}if(Nd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Bu(e[n]))return!0;return!1}function ow(e){const t=[],n=e.data,r=e;return r.data=Od(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Od(e,t){if(!e)return e;if(Nd(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]=Od(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]=Od(e[r],t));return n}return e}function aw(e,t){return e.data=Pd(e.data,t),delete e.attachments,e}function Pd(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]=Pd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Pd(e[n],t));return e}const uw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var At;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(At||(At={}));class lw{constructor(t){this.replacer=t}encode(t){return t.type!==At.EVENT&&t.type!==At.ACK||!Bu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===At.EVENT?At.BINARY_EVENT:At.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==At.BINARY_EVENT&&t.type!==At.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=ow(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Id extends mn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===At.BINARY_EVENT;r||n.type===At.BINARY_ACK?(n.type=r?At.EVENT:At.ACK,this.reconstructor=new cw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Nd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(At[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===At.BINARY_EVENT||r.type===At.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!dw(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 s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Id.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case At.CONNECT:return b0(n);case At.DISCONNECT:return n===void 0;case At.CONNECT_ERROR:return typeof n=="string"||b0(n);case At.EVENT:case At.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&uw.indexOf(n[0])===-1);case At.ACK:case At.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cw{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=aw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function b0(e){return Object.prototype.toString.call(e)==="[object Object]"}const _0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],S0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).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(s)?u.map((c=>c[1])):Object.fromEntries(u)},x0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),fw=S0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),_0),w0=S0(x0,x0,_0),hw={Encoder:class extends lw{encode(e){var t,n;return super.encode(be(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],fw(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 Id{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?w0(r):r)):n instanceof Object?w0(n):n)):t))}}},pw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class mw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/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+)['"]/),g=p==null?void 0:p[1];g&&["InvalidApiKey","InvalidToken","BadRequest"].includes(g)?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}${s}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[pw,a,{parser:hw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Fu(u,tw.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*fd(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 Ze(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ze(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 Ze(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ze(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ze(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}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 Ze(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return hd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Vr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Vr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Vr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ze(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 nw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var z=Ns();const Yi=Xe(z);var C0=Symbol.for("immer-nothing"),A0=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Is=Object.getPrototypeOf;function Rs(e){return!!e&&!!e[st]}function qr(e){var t;return e?v0(e)||Array.isArray(e)||!!e[A0]||!!((t=e.constructor)!=null&&t[A0])||Hu(e)||zu(e):!1}var gw=Object.prototype.constructor.toString();function v0(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)===gw}function Ko(e,t){Uu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Uu(e){const t=e[st];return t?t.type_:Array.isArray(e)?1:Hu(e)?2:zu(e)?3:0}function Rd(e,t){return Uu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function k0(e,t,n){const r=Uu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ew(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Hu(e){return e instanceof Map}function zu(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function Ld(e,t){if(Hu(e))return new Map(e);if(zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=v0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[st];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Is(e),r)}else{const r=Is(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function Dd(e,t=!1){return ju(e)||Rs(e)||!qr(e)||(Uu(e)>1&&(e.set=e.add=e.clear=e.delete=yw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Dd(r,!0))),e}function yw(){qn(2)}function ju(e){return Object.isFrozen(e)}var Md={};function Wi(e){const t=Md[e];return t||qn(0,e),t}function Tw(e,t){Md[e]||(Md[e]=t)}var Qo;function $u(){return Qo}function bw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function N0(e,t){t&&(Wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Fd(e){Bd(e),e.drafts_.forEach(_w),e.drafts_=null}function Bd(e){e===Qo&&(Qo=e.parent_)}function O0(e){return Qo=bw(Qo,e)}function _w(e){const t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function P0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[st].modified_&&(Fd(t),qn(4)),qr(e)&&(e=Vu(t,e),t.parent_||qu(t,e)),t.patches_&&Wi("Patches").generateReplacementPatches_(n[st].base_,e,t.patches_,t.inversePatches_)):e=Vu(t,n,[]),Fd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==C0?e:void 0}function Vu(e,t,n){if(ju(t))return t;const r=t[st];if(!r)return Ko(t,(s,a)=>I0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return qu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Ko(a,(c,d)=>I0(e,r,s,c,d,n,u)),qu(e,s,!1),n&&e.patches_&&Wi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function I0(e,t,n,r,s,a,u){if(Rs(s)){const c=a&&t&&t.type_!==3&&!Rd(t.assigned_,r)?a.concat(r):void 0,d=Vu(e,s,c);if(k0(n,r,d),Rs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(qr(s)&&!ju(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Vu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&qu(e,s)}}function qu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dd(t,n)}function Sw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:$u(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Ud;n&&(s=[r],a=Jo);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Ud={get(e,t){if(t===st)return e;const n=Gt(e);if(!Rd(n,t))return xw(e,n,t);const r=n[t];return e.finalized_||!qr(r)?r:r===Hd(e.base_,t)?(zd(e),e.copy_[t]=Zo(r,e)):r},has(e,t){return t in Gt(e)},ownKeys(e){return Reflect.ownKeys(Gt(e))},set(e,t,n){const r=R0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Hd(Gt(e),t),a=s==null?void 0:s[st];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ew(n,s)&&(n!==void 0||Rd(e.base_,t)))return!0;zd(e),Yr(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 Hd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,zd(e),Yr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){qn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){qn(12)}},Jo={};Ko(Ud,(e,t)=>{Jo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Jo.deleteProperty=function(e,t){return Jo.set.call(this,e,t,void 0)},Jo.set=function(e,t,n){return Ud.set.call(this,e[0],t,n,e[0])};function Hd(e,t){const n=e[st];return(n?Gt(n):e)[t]}function xw(e,t,n){var s;const r=R0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function R0(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 Yr(e){e.modified_||(e.modified_=!0,e.parent_&&Yr(e.parent_))}function zd(e){e.copy_||(e.copy_=Ld(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ww=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&qn(6),r!==void 0&&typeof r!="function"&&qn(7);let s;if(qr(t)){const a=O0(this),u=Zo(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Fd(a):Bd(a)}return N0(a,r),P0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===C0&&(s=void 0),this.autoFreeze_&&Dd(s,!0),r){const a=[],u=[];Wi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){qr(e)||qn(8),Rs(e)&&(e=Cw(e));const t=O0(this),n=Zo(e,void 0);return n[st].isManual_=!0,Bd(t),n}finishDraft(e,t){const n=e&&e[st];(!n||!n.isManual_)&&qn(9);const{scope_:r}=n;return N0(r,t),P0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Wi("Patches").applyPatches_;return Rs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Zo(e,t){const n=Hu(e)?Wi("MapSet").proxyMap_(e,t):zu(e)?Wi("MapSet").proxySet_(e,t):Sw(e,t);return(t?t.scope_:$u()).drafts_.push(n),n}function Cw(e){return Rs(e)||qn(10,e),L0(e)}function L0(e){if(!qr(e)||ju(e))return e;const t=e[st];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ld(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ld(e,!0);return Ko(n,(r,s)=>{k0(n,r,L0(s))}),t&&(t.finalized_=!1),n}function Aw(){class e extends Map{constructor(d,f){super(),this[st]={type_:2,parent_:f,scope_:f?f.scope_:$u(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Gt(this[st]).size}has(d){return Gt(this[st]).has(d)}set(d,f){const p=this[st];return u(p),(!Gt(p).has(d)||Gt(p).get(d)!==f)&&(n(p),Yr(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[st];return u(f),n(f),Yr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[st];u(d),Gt(d).size&&(n(d),Yr(d),d.assigned_=new Map,Ko(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[st];Gt(p).forEach((g,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[st];u(f);const p=Gt(f).get(d);if(f.finalized_||!qr(p)||p!==f.base_.get(d))return p;const g=Zo(p,f);return n(f),f.copy_.set(d,g),g}keys(){return Gt(this[st]).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[st]={type_:3,parent_:f,scope_:f?f.scope_:$u(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Gt(this[st]).size}has(d){const f=this[st];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[st];return u(f),this.has(d)||(a(f),Yr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),a(f),Yr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[st];u(d),Gt(d).size&&(a(d),Yr(d),d.copy_.clear())}values(){const d=this[st];return u(d),a(d),d.copy_.values()}entries(){const d=this[st];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let g=p.next();for(;!g.done;)d.call(f,g.value,g.value,this),g=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(qr(d)){const f=Zo(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&qn(3,JSON.stringify(Gt(c)))}Tw("MapSet",{proxyMap_:t,proxySet_:s})}var Rn=new ww,vw=Rn.produce;Rn.produceWithPatches.bind(Rn),Rn.setAutoFreeze.bind(Rn),Rn.setUseStrictShallowCopy.bind(Rn),Rn.applyPatches.bind(Rn),Rn.createDraft.bind(Rn),Rn.finishDraft.bind(Rn);function D0(e,t,n){var r=z.useMemo(function(){return vw(e)},[e]);return z.useReducer(r,t,n)}const M0={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"},_t={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"},Ls={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},kw=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(s=>t.some(a=>s.name.includes(a)))||null},Nw=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"}},Ds="cimulate",jd=`${Ds}:pdp-update`,$d=`${Ds}:browse-update`,Vd=`${Ds}:search-update`,qd=`${Ds}:ui-state-update`,Yd=`${Ds}:prompts-state-update`,Wd=`${Ds}:session-state`,Cr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},M0),Ow={"browse-context":Cr.CONTEXT_UPDATED,categoryId:Cr.CATEGORY_ID_CHANGED,categoryName:Cr.CATEGORY_NAME_CHANGED,page:Cr.PAGE_CHANGED,pageSize:Cr.PAGE_SIZE_CHANGED,includeFacets:Cr.FACET_FILTERS_CHANGED,facetFilters:Cr.FACET_FILTERS_CHANGED,rangeFilters:Cr.RANGE_FILTERS_CHANGED,catalogSegment:Cr.CATALOG_SEGMENT_CHANGED,pricebooks:Cr.PRICEBOOKS_CHANGED},Wr=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},M0),Pw={"search-context":Wr.SEARCH_CONTEXT_UPDATED,query:Wr.QUERY_CHANGED,page:Wr.PAGE_CHANGED,pageSize:Wr.PAGE_SIZE_CHANGED,includeFacets:Wr.FACET_FILTERS_CHANGED,facetFilters:Wr.FACET_FILTERS_CHANGED,rangeFilters:Wr.RANGE_FILTERS_CHANGED,catalogSegment:Wr.CATALOG_SEGMENT_CHANGED,pricebooks:Wr.PRICEBOOKS_CHANGED},j="cim-widget",Ms=`--${j}`,Gi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},Iw=(e=Gi)=>({[`${Ms}-primary-color`]:e.primaryColor||Gi.primaryColor,[`${Ms}-secondary-color`]:e.secondaryColor||Gi.secondaryColor,[`${Ms}-font-color`]:e.fontColor||Gi.fontColor,[`${Ms}-font-family`]:e.fontFamily||Gi.fontFamily,[`${Ms}-background-color`]:e.backgroundColor||Gi.backgroundColor,[`${Ms}-border-color`]:e.borderColor||Gi.borderColor}),hi={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},F0=z.createContext(null),B0=z.createContext(null);function U0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rw}=Object.prototype,{getPrototypeOf:Yu}=Object,{iterator:Wu,toStringTag:H0}=Symbol,Gu=(e=>t=>{const n=Rw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ur=e=>(e=e.toLowerCase(),t=>Gu(t)===e),Xu=e=>t=>typeof t===e,{isArray:Fs}=Array,Bs=Xu("undefined");function ea(e){return e!==null&&!Bs(e)&&e.constructor!==null&&!Bs(e.constructor)&&_n(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const z0=ur("ArrayBuffer");function Lw(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&z0(e.buffer),t}const Dw=Xu("string"),_n=Xu("function"),j0=Xu("number"),ta=e=>e!==null&&typeof e=="object",Mw=e=>e===!0||e===!1,Ku=e=>{if(Gu(e)!=="object")return!1;const t=Yu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(H0 in e)&&!(Wu in e)},Fw=e=>{if(!ta(e)||ea(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},Bw=ur("Date"),Uw=ur("File"),Hw=e=>!!(e&&typeof e.uri!="undefined"),zw=e=>e&&typeof e.getParts!="undefined",jw=ur("Blob"),$w=ur("FileList"),Vw=e=>ta(e)&&_n(e.pipe);function qw(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const $0=qw(),V0=typeof $0.FormData!="undefined"?$0.FormData:void 0,Yw=e=>{if(!e)return!1;if(V0&&e instanceof V0)return!0;const t=Yu(e);if(!t||t===Object.prototype||!_n(e.append))return!1;const n=Gu(e);return n==="formdata"||n==="object"&&_n(e.toString)&&e.toString()==="[object FormData]"},Ww=ur("URLSearchParams"),[Gw,Xw,Kw,Qw]=["ReadableStream","Request","Response","Headers"].map(ur),Jw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function na(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fs(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ea(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 q0(e,t){if(ea(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Xi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Y0=e=>!Bs(e)&&e!==Xi;function Gd(){const{caseless:e,skipUndefined:t}=Y0(this)&&this||{},n={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&q0(n,a)||a;Ku(n[u])&&Ku(s)?n[u]=Gd(n[u],s):Ku(s)?n[u]=Gd({},s):Fs(s)?n[u]=s.slice():(!t||!Bs(s))&&(n[u]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&na(arguments[s],r);return n}const Zw=(e,t,n,{allOwnKeys:r}={})=>(na(t,(s,a)=>{n&&_n(s)?Object.defineProperty(e,a,{value:U0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),eC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tC=(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)},nC=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Yu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rC=(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},iC=e=>{if(!e)return null;if(Fs(e))return e;let t=e.length;if(!j0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Yu(Uint8Array)),oC=(e,t)=>{const r=(e&&e[Wu]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},aC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},uC=ur("HTMLFormElement"),lC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),W0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cC=ur("RegExp"),G0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};na(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},dC=e=>{G0(e,(t,n)=>{if(_n(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_n(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+"'")})}})},fC=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fs(e)?r(e):r(String(e).split(t)),n},hC=()=>{},pC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mC(e){return!!(e&&_n(e.append)&&e[H0]==="FormData"&&e[Wu])}const gC=e=>{const t=new Array(10),n=(r,s)=>{if(ta(r)){if(t.indexOf(r)>=0)return;if(ea(r))return r;if(!("toJSON"in r)){t[s]=r;const a=Fs(r)?[]:{};return na(r,(u,c)=>{const d=n(u,s+1);!Bs(d)&&(a[c]=d)}),t[s]=void 0,a}}return r};return n(e,0)},EC=ur("AsyncFunction"),yC=e=>e&&(ta(e)||_n(e))&&_n(e.then)&&_n(e.catch),X0=((e,t)=>e?setImmediate:t?((n,r)=>(Xi.addEventListener("message",({source:s,data:a})=>{s===Xi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Xi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_n(Xi.postMessage)),TC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Xi):typeof process!="undefined"&&process.nextTick||X0,G={isArray:Fs,isArrayBuffer:z0,isBuffer:ea,isFormData:Yw,isArrayBufferView:Lw,isString:Dw,isNumber:j0,isBoolean:Mw,isObject:ta,isPlainObject:Ku,isEmptyObject:Fw,isReadableStream:Gw,isRequest:Xw,isResponse:Kw,isHeaders:Qw,isUndefined:Bs,isDate:Bw,isFile:Uw,isReactNativeBlob:Hw,isReactNative:zw,isBlob:jw,isRegExp:cC,isFunction:_n,isStream:Vw,isURLSearchParams:Ww,isTypedArray:sC,isFileList:$w,forEach:na,merge:Gd,extend:Zw,trim:Jw,stripBOM:eC,inherits:tC,toFlatObject:nC,kindOf:Gu,kindOfTest:ur,endsWith:rC,toArray:iC,forEachEntry:oC,matchAll:aC,isHTMLForm:uC,hasOwnProperty:W0,hasOwnProp:W0,reduceDescriptors:G0,freezeMethods:dC,toObjectSet:fC,toCamelCase:lC,noop:hC,toFiniteNumber:pC,findKey:q0,global:Xi,isContextDefined:Y0,isSpecCompliantForm:mC,toJSONObject:gC,isAsyncFn:EC,isThenable:yC,setImmediate:X0,asap:TC,isIterable:e=>e!=null&&_n(e[Wu])};let Be=class ex extends Error{static from(t,n,r,s,a,u){const c=new ex(t.message,n||t.code,r,s,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,s,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),s&&(this.request=s),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:G.toJSONObject(this.config),code:this.code,status:this.status}}};Be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Be.ERR_BAD_OPTION="ERR_BAD_OPTION",Be.ECONNABORTED="ECONNABORTED",Be.ETIMEDOUT="ETIMEDOUT",Be.ERR_NETWORK="ERR_NETWORK",Be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Be.ERR_DEPRECATED="ERR_DEPRECATED",Be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Be.ERR_CANCELED="ERR_CANCELED",Be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Be.ERR_INVALID_URL="ERR_INVALID_URL",Be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const bC=null;function Xd(e){return G.isPlainObject(e)||G.isArray(e)}function K0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Kd(e,t,n){return e?e.concat(t).map(function(s,a){return s=K0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function _C(e){return G.isArray(e)&&!e.some(Xd)}const SC=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Qu(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,A){return!G.isUndefined(A[w])});const r=n.metaTokens,s=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&G.isSpecCompliantForm(t);if(!G.isFunction(s))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(G.isDate(S))return S.toISOString();if(G.isBoolean(S))return S.toString();if(!f&&G.isBlob(S))throw new Be("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(S)||G.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,w,A){let M=S;if(G.isReactNative(t)&&G.isReactNativeBlob(S))return t.append(Kd(A,w,a),p(S)),!1;if(S&&!A&&typeof S=="object"){if(G.endsWith(w,"{}"))w=r?w:w.slice(0,-2),S=JSON.stringify(S);else if(G.isArray(S)&&_C(S)||(G.isFileList(S)||G.endsWith(w,"[]"))&&(M=G.toArray(S)))return w=K0(w),M.forEach(function(q,Z){!(G.isUndefined(q)||q===null)&&t.append(u===!0?Kd([w],Z,a):u===null?w:w+"[]",p(q))}),!1}return Xd(S)?!0:(t.append(Kd(A,w,a),p(S)),!1)}const b=[],y=Object.assign(SC,{defaultVisitor:g,convertValue:p,isVisitable:Xd});function _(S,w,A=0){if(!G.isUndefined(S)){if(A>d)throw new Be("Object is too deeply nested ("+A+" levels). Max depth: "+d,Be.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+w.join("."));b.push(S),G.forEach(S,function(I,q){(!(G.isUndefined(I)||I===null)&&s.call(t,I,G.isString(q)?q.trim():q,w,y))===!0&&_(I,w?w.concat(q):[q],A+1)}),b.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Q0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Qd(e,t){this._pairs=[],e&&Qu(e,this,t)}const J0=Qd.prototype;J0.append=function(t,n){this._pairs.push([t,n])},J0.toString=function(t){const n=t?function(r){return t.call(this,r,Q0)}:Q0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Z0(e,t,n){if(!t)return e;const r=n&&n.encode||xC,s=G.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let u;if(a?u=a(t,s):u=G.isURLSearchParams(t)?t.toString():new Qd(t,s).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class eg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Jd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},wC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Qd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Zd=typeof window!="undefined"&&typeof document!="undefined",ef=typeof navigator=="object"&&navigator||void 0,CC=Zd&&(!ef||["ReactNative","NativeScript","NS"].indexOf(ef.product)<0),AC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vC=Zd&&window.location.href||"http://localhost",on=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zd,hasStandardBrowserEnv:CC,hasStandardBrowserWebWorkerEnv:AC,navigator:ef,origin:vC},Symbol.toStringTag,{value:"Module"}))),wC);function kC(e,t){return Qu(e,new on.classes.URLSearchParams,F({visitor:function(n,r,s,a){return on.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function NC(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function OC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function tg(e){function t(n,r,s,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&G.isArray(s)?s.length:u,d?(G.hasOwnProp(s,u)?s[u]=G.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!s[u]||!G.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&G.isArray(s[u])&&(s[u]=OC(s[u])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,s)=>{t(NC(r),s,n,0)}),n}return null}const Us=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function PC(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ra={transitional:Jd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return s?JSON.stringify(tg(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Us(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return kC(t,d).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Us(this,"env"),p=f&&f.FormData;return Qu(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),PC(t)):t}],transformResponse:[function(t){const n=Us(this,"transitional")||ra.transitional,r=n&&n.forcedJSONParsing,s=Us(this,"responseType"),a=s==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Us(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Be.from(d,Be.ERR_BAD_RESPONSE,this,null,Us(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:on.classes.FormData,Blob:on.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{ra.headers[e]={}});const IC=G.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"]),RC=e=>{const t={};let n,r,s;return e&&e.split(`
3
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&IC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ng=Symbol("internals"),LC=/[^\x09\x20-\x7E\x80-\xFF]/g;function DC(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function ia(e){return e&&String(e).trim().toLowerCase()}function MC(e){return DC(e.replace(LC,""))}function Ju(e){return e===!1||e==null?e:G.isArray(e)?e.map(Ju):MC(String(e))}function FC(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 BC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tf(e,t,n,r,s){if(G.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function UC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function HC(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let Sn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=ia(d);if(!p)throw new Error("header name must be a non-empty string");const g=G.findKey(s,p);(!g||s[g]===void 0||f===!0||f===void 0&&s[g]!==!1)&&(s[g||d]=Ju(c))}const u=(c,d)=>G.forEach(c,(f,p)=>a(f,p,d));if(G.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(G.isString(t)&&(t=t.trim())&&!BC(t))u(RC(t),n);else if(G.isObject(t)&&G.isIterable(t)){let c={},d,f;for(const p of t){if(!G.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?G.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=ia(t),t){const r=G.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return FC(s);if(G.isFunction(n))return n.call(this,s,r);if(G.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ia(t),t){const r=G.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||tf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=ia(u),u){const c=G.findKey(r,u);c&&(!n||tf(r,r[c],c,n))&&(delete r[c],s=!0)}}return G.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||tf(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return G.forEach(this,(s,a)=>{const u=G.findKey(r,a);if(u){n[u]=Ju(s),delete n[a];return}const c=t?UC(a):String(a).trim();c!==a&&delete n[a],n[c]=Ju(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&G.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(s=>r.set(s)),r}static accessor(t){const r=(this[ng]=this[ng]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ia(u);r[c]||(HC(s,u),r[c]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(Sn);function nf(e,t){const n=this||ra,r=t||n,s=Sn.from(r.headers);let a=r.data;return G.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function rg(e){return!!(e&&e.__CANCEL__)}let sa=class extends Be{constructor(t,n,r){super(t==null?"canceled":t,Be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ig(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Be("Request failed with status code "+n.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let g=a,b=0;for(;g!==s;)b+=n[g++],g=g%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function $C(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),g=p-n;g>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-g)))},()=>s&&u(s)]}const Zu=(e,t,n=3)=>{let r=0;const s=jC(50,250);return $C(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},sg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},og=e=>(...t)=>G.asap(()=>e(...t)),VC=on.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,on.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(on.origin),on.navigator&&/(msie|trident)/i.test(on.navigator.userAgent)):()=>!0,qC=on.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&c.push(`path=${r}`),G.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),G.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 YC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function WC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ag(e,t,n){let r=!YC(t);return e&&(r||n===!1)?WC(e,t):t}const ug=e=>e instanceof Sn?F({},e):e;function Ki(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,b){return G.isPlainObject(f)&&G.isPlainObject(p)?G.merge.call({caseless:b},f,p):G.isPlainObject(p)?G.merge({},p):G.isArray(p)?p.slice():p}function s(f,p,g,b){if(G.isUndefined(p)){if(!G.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}function a(f,p){if(!G.isUndefined(p))return r(void 0,p)}function u(f,p){if(G.isUndefined(p)){if(!G.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,g){if(G.hasOwnProp(t,g))return r(f,p);if(G.hasOwnProp(e,g))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>s(ug(f),ug(p),g,!0)};return G.forEach(Object.keys(F(F({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=G.hasOwnProp(d,p)?d[p]:s,b=G.hasOwnProp(e,p)?e[p]:void 0,y=G.hasOwnProp(t,p)?t[p]:void 0,_=g(b,y,p);G.isUndefined(_)&&g!==c||(n[p]=_)}),n}const lg=e=>{const t=Ki({},e),n=b=>G.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=Sn.from(c),t.url=Z0(ag(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),G.isFormData(r)){if(on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(G.isFunction(r.getHeaders)){const b=r.getHeaders(),y=["content-type","content-length"];Object.entries(b).forEach(([_,S])=>{y.includes(_.toLowerCase())&&c.set(_,S)})}}if(on.hasStandardBrowserEnv&&(G.isFunction(s)&&(s=s(t)),s===!0||s==null&&VC(t.url))){const y=a&&u&&qC.read(u);y&&c.set(a,y)}return t},GC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=lg(e);let a=s.data;const u=Sn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,g,b,y,_;function S(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function A(){if(!w)return;const I=Sn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),Z={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:I,config:e,request:w};ig(function(te){n(te),S()},function(te){r(te),S()},Z),w=null}"onloadend"in w?w.onloadend=A:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(A)},w.onabort=function(){w&&(r(new Be("Request aborted",Be.ECONNABORTED,e,w)),w=null)},w.onerror=function(q){const Z=q&&q.message?q.message:"Network Error",U=new Be(Z,Be.ERR_NETWORK,e,w);U.event=q||null,r(U),w=null},w.ontimeout=function(){let q=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Z=s.transitional||Jd;s.timeoutErrorMessage&&(q=s.timeoutErrorMessage),r(new Be(q,Z.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,w)),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&G.forEach(u.toJSON(),function(q,Z){w.setRequestHeader(Z,q)}),G.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),c&&c!=="json"&&(w.responseType=s.responseType),f&&([b,_]=Zu(f,!0),w.addEventListener("progress",b)),d&&w.upload&&([g,y]=Zu(d),w.upload.addEventListener("progress",g),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{w&&(r(!I||I.type?new sa(null,e,w):I),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const M=zC(s.url);if(M&&on.protocols.indexOf(M)===-1){r(new Be("Unsupported protocol "+M+":",Be.ERR_BAD_REQUEST,e));return}w.send(a||null)})},XC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const a=function(f){if(!s){s=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof Be?p:new sa(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new Be(`timeout of ${t}ms exceeded`,Be.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=()=>G.asap(c),d}},KC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},QC=function(e,t){return hd(this,null,function*(){try{for(var n=ZS(JC(e)),r,s,a;r=!(s=yield new Vr(n.next())).done;r=!1){const u=s.value;yield*Jm(KC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Vr(s.call(n)))}finally{if(a)throw a[0]}}})},JC=function(e){return hd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Jm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Vr(t.read());if(n)break;yield r}}finally{yield new Vr(t.cancel())}})},cg=(e,t,n,r)=>{const s=QC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ze(this,null,function*(){try{const{done:p,value:g}=yield s.next();if(p){c(),f.close();return}let b=g.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},dg=64*1024,{isFunction:el}=G,ZC=(({Request:e,Response:t})=>({Request:e,Response:t}))(G.global),{ReadableStream:fg,TextEncoder:hg}=G.global,pg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},eA=e=>{e=G.merge.call({skipUndefined:!0},ZC,e);const{fetch:t,Request:n,Response:r}=e,s=t?el(t):typeof fetch=="function",a=el(n),u=el(r);if(!s)return!1;const c=s&&el(fg),d=s&&(typeof hg=="function"?(_=>S=>_.encode(S))(new hg):_=>Ze(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&pg(()=>{let _=!1;const S=new n(on.origin,{body:new fg,method:"POST",get duplex(){return _=!0,"half"}}),w=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),_&&!w}),p=u&&c&&pg(()=>G.isReadableStream(new r("").body)),g={stream:p&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!g[_]&&(g[_]=(S,w)=>{let A=S&&S[_];if(A)return A.call(S);throw new Be(`Response type '${_}' is not supported`,Be.ERR_NOT_SUPPORT,w)})});const b=_=>Ze(null,null,function*(){if(_==null)return 0;if(G.isBlob(_))return _.size;if(G.isSpecCompliantForm(_))return(yield new n(on.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(G.isArrayBufferView(_)||G.isArrayBuffer(_))return _.byteLength;if(G.isURLSearchParams(_)&&(_=_+""),G.isString(_))return(yield d(_)).byteLength}),y=(_,S)=>Ze(null,null,function*(){const w=G.toFiniteNumber(_.getContentLength());return w==null?b(S):w});return _=>Ze(null,null,function*(){let{url:S,method:w,data:A,signal:M,cancelToken:I,timeout:q,onDownloadProgress:Z,onUploadProgress:U,responseType:te,headers:he,withCredentials:ye="same-origin",fetchOptions:B}=lg(_),se=t||fetch;te=te?(te+"").toLowerCase():"text";let pe=XC([M,I&&I.toAbortSignal()],q),le=null;const fe=pe&&pe.unsubscribe&&(()=>{pe.unsubscribe()});let Te;try{if(U&&f&&w!=="get"&&w!=="head"&&(Te=yield y(he,A))!==0){let L=new n(S,{method:"POST",body:A,duplex:"half"}),Q;if(G.isFormData(A)&&(Q=L.headers.get("content-type"))&&he.setContentType(Q),L.body){const[O,_e]=sg(Te,Zu(og(U)));A=cg(L.body,dg,O,_e)}}G.isString(ye)||(ye=ye?"include":"omit");const Ae=a&&"credentials"in n.prototype;if(G.isFormData(A)){const L=he.getContentType();L&&/^multipart\/form-data/i.test(L)&&!/boundary=/i.test(L)&&he.delete("content-type")}const ue=be(F({},B),{signal:pe,method:w.toUpperCase(),headers:he.normalize().toJSON(),body:A,duplex:"half",credentials:Ae?ye:void 0});le=a&&new n(S,ue);let W=yield a?se(le,B):se(S,ue);const ne=p&&(te==="stream"||te==="response");if(p&&(Z||ne&&fe)){const L={};["status","statusText","headers"].forEach(Le=>{L[Le]=W[Le]});const Q=G.toFiniteNumber(W.headers.get("content-length")),[O,_e]=Z&&sg(Q,Zu(og(Z),!0))||[];W=new r(cg(W.body,dg,O,()=>{_e&&_e(),fe&&fe()}),L)}te=te||"text";let v=yield g[G.findKey(g,te)||"text"](W,_);return!ne&&fe&&fe(),yield new Promise((L,Q)=>{ig(L,Q,{data:v,headers:Sn.from(W.headers),status:W.status,statusText:W.statusText,config:_,request:le})})}catch(Ae){throw fe&&fe(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,_,le,Ae&&Ae.response),{cause:Ae.cause||Ae}):Be.from(Ae,Ae&&Ae.code,_,le,Ae&&Ae.response)}})},tA=new Map,mg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=tA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:eA(t)),p=f;return f};mg();const rf={http:bC,xhr:GC,fetch:{get:mg}};G.forEach(rf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const gg=e=>`- ${e}`,nA=e=>G.isFunction(e)||e===null||e===!1;function rA(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!nA(r)&&(s=rf[(c=String(r)).toLowerCase()],s===void 0))throw new Be(`Unknown adapter '${c}'`);if(s&&(G.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
+ `+u.map(gg).join(`
6
+ `):" "+gg(u[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Eg={getAdapter:rA,adapters:rf};function sf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sa(null,e)}function yg(e){return sf(e),e.headers=Sn.from(e.headers),e.data=nf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Eg.getAdapter(e.adapter||ra.adapter,e)(e).then(function(r){return sf(e),r.data=nf.call(e,e.transformResponse,r),r.headers=Sn.from(r.headers),r},function(r){return rg(r)||(sf(e),r&&r.response&&(r.response.data=nf.call(e,e.transformResponse,r.response),r.response.headers=Sn.from(r.response.headers))),Promise.reject(r)})}const Tg="1.15.2",tl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const bg={};tl.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Tg+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Be(s(u," has been removed"+(n?" in "+n:"")),Be.ERR_DEPRECATED);return n&&!bg[u]&&(bg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},tl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function iA(e,t,n){if(typeof e!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Be("option "+a+" must be "+d,Be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Be("Unknown option "+a,Be.ERR_BAD_OPTION)}}const nl={assertOptions:iA,validators:tl},Yn=nl.validators;let Qi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new eg,response:new eg}}request(t,n){return Ze(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
7
+ `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
8
  `),c=u===-1?-1:a.indexOf(`
9
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=`
10
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ki(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&nl.assertOptions(r,{silentJSONParsing:Yn.transitional(Yn.boolean),forcedJSONParsing:Yn.transitional(Yn.boolean),clarifyTimeoutError:Yn.transitional(Yn.boolean),legacyInterceptorReqResOrdering:Yn.transitional(Yn.boolean)},!1),s!=null&&(G.isFunction(s)?n.paramsSerializer={serialize:s}:nl.assertOptions(s,{encode:Yn.function,serialize:Yn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),nl.assertOptions(n,{baseUrl:Yn.spelling("baseURL"),withXsrfToken:Yn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&G.merge(a.common,a[n.method]);a&&G.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Sn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const w=n.transitional||Jd;w&&w.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,g=0,b;if(!d){const _=[yg.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);g<b;)p=p.then(_[g++],_[g++]);return p}b=c.length;let y=n;for(;g<b;){const _=c[g++],S=c[g++];try{y=_(y)}catch(w){S.call(this,w);break}}try{p=yg.call(this,y)}catch(_){return Promise.reject(_)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=Ki(this.defaults,t);const n=ag(t.baseURL,t.url,t.allowAbsoluteUrls);return Z0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Qi.prototype[t]=function(n,r){return this.request(Ki(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(Ki(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Qi.prototype[t]=n(),Qi.prototype[t+"Form"]=n(!0)});let sA=class tx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new sa(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 tx(function(s){t=s}),cancel:t}}};function oA(e){return function(n){return e.apply(null,n)}}function aA(e){return G.isObject(e)&&e.isAxiosError===!0}const of={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(of).forEach(([e,t])=>{of[t]=e});function _g(e){const t=new Qi(e),n=U0(Qi.prototype.request,t);return G.extend(n,Qi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _g(Ki(e,s))},n}const Lt=_g(ra);Lt.Axios=Qi,Lt.CanceledError=sa,Lt.CancelToken=sA,Lt.isCancel=rg,Lt.VERSION=Tg,Lt.toFormData=Qu,Lt.AxiosError=Be,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=oA,Lt.isAxiosError=aA,Lt.mergeConfig=Ki,Lt.AxiosHeaders=Sn,Lt.formToJSON=e=>tg(G.isHTMLForm(e)?new FormData(e):e),Lt.getAdapter=Eg.getAdapter,Lt.HttpStatusCode=of,Lt.default=Lt;const{Axios:G9,AxiosError:X9,CanceledError:K9,isCancel:Q9,CancelToken:J9,VERSION:Z9,all:eB,Cancel:tB,isAxiosError:nB,spread:rB,toFormData:iB,AxiosHeaders:sB,HttpStatusCode:oB,formToJSON:aB,getAdapter:uB,mergeConfig:lB}=Lt;class uA{constructor(t,n,r,s=!1){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>Ze(this,null,function*(){try{const t=yield Lt.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}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t).hostname,[,a]=s.split(".");return`https://api.${a}.${this.CIMULATE_SEARCH_API_HOST}.io`}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class lA{constructor(t,n,r,s=!1){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>Ze(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}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new uA(t,n,r,s)}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 Hs=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class cA{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Hs(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 Sg=z.createContext(null),dA=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:s=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,componentConfig:p,conversationHistory:g,resetConversationMessage:b="What products would you like to explore today?",apiKey:y,apiToken:_,baseUrl:S,theme:w,isDevelopment:A,__features:M,children:I})=>{const q=z.useMemo(()=>new lA(S,y,_,A),[S,y,_,A]),Z=z.useMemo(()=>new cA(A),[A]);z.useEffect(()=>{q.config||q.getConfig()},[q]);const U=z.useMemo(()=>Iw(w),[w]),te=z.useMemo(()=>{const ye=(f==null?void 0:f.placeholder)||c,B=(f==null?void 0:f.buttonLabel)||d;let se="icon";return f!=null&&f.buttonType?se=f.buttonType:d&&(se="text"),be(F({},f||{}),{placeholder:ye,buttonLabel:B,buttonType:se})},[f,c,d]),he=z.useMemo(()=>({configModule:q,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:s,disclaimerText:a,disclaimerMarkdown:u,themeVariables:U,logger:Z,searchConfig:te,enableMinimize:!!(p!=null&&p.enableMinimize),resetConversationMessage:b,conversationHistory:{sinceHours:typeof(g==null?void 0:g.sinceHours)=="number"?g.sinceHours:1,limit:g==null?void 0:g.limit},features:M}),[q,e,t,r,n,a,u,s,te,p,b,Z,U,g,M]);return C.jsx(Sg.Provider,{value:he,children:I})},ft=()=>{const e=z.useContext(Sg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class fA{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return mA(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 ot=new fA,Ji=()=>ot.connected,oa=()=>ot.isOpen,hA=e=>{window.addEventListener(qd,e)},pA=e=>{window.removeEventListener(qd,e)},mA=(e,t)=>{const n=new CustomEvent(qd,{detail:{property:e,value:t}});window.dispatchEvent(n)},gA=e=>{ot.connectedProxy.connected=e},aa=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);ot.entryTypeProxy.entryType=e},Zi=e=>{const t=ot.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;ot.statusProxy.isOpen=n,n&&(ot.statusProxy.isMinimized=!1)},rl=e=>{const t=ot.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;ot.statusProxy.isMinimized=n,n&&(ot.statusProxy.isOpen=!1)},af=e=>{ot.modalProxy.isFullscreen=e},il=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);ot.statusProxy.type=e,e==="dialog"||e==="chat"?ot.modeProxy.mode="embedded":ot.modeProxy.mode="standalone"},uf=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(", ")}.`);ot.dialogProxy.position=e},EA=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=ft(),s=z.useCallback(A=>{n({type:_t.SET_COPILOT,payload:A})},[n]),a=z.useCallback(A=>{gA(A),n({type:_t.SET_CONNECTED,payload:A})},[n]),u=z.useCallback(A=>{n({type:_t.SET_ENTRY_TYPE,payload:A})},[n]),c=z.useCallback(()=>{n({type:_t.RESET_COPILOT,payload:{}})},[n]),d=z.useCallback(()=>{n({type:_t.RESET_STATE,payload:{}})},[n]),f=z.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:_t.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),p=z.useCallback(A=>{n({type:_t.ADD_LOADING_MESSAGE,payload:A})},[n]),g=z.useCallback(A=>{n({type:_t.REMOVE_LOADING_MESSAGE,payload:A})},[n]),b=z.useCallback(A=>{n({type:_t.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=z.useCallback(A=>{n({type:_t.ADD_CONVERSATION_ID,payload:A})},[n]),_=z.useCallback(A=>{n({type:_t.SET_CONVERSATION_IDS,payload:A})},[n]),S=z.useCallback(A=>{n({type:_t.SET_IMAGE_FILE,payload:A})},[n]),w=z.useMemo(()=>({setCopilot:s,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:g,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:S}),[s,a,u,c,d,f,p,g,b,y,_,S]);return C.jsx(B0.Provider,{value:w,children:t})};Aw();const yA=(e,t)=>{const{type:n,payload:r}=t;if(n===_t.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case _t.RESET_STATE:e.messages=Ls.messages,e.groupedMessages=Ls.groupedMessages,e.loadingMessages=Ls.loadingMessages,e.entryType=Ls.entryType;break;case _t.RESET_COPILOT:e.copilot=null;break;case _t.SET_COPILOT:e.copilot=r;break;case _t.SET_CONNECTED:e.connected=r;break;case _t.SET_ENTRY_TYPE:e.entryType=r;break;case _t.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case _t.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case _t.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case _t.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case _t.SET_CONVERSATION_IDS:e.conversationIds=r;break;case _t.SET_IMAGE_FILE:e.imageFile=r;break}},TA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?be(F({},Ls),{entryType:e}):Ls,[s,a]=D0(yA,r);return C.jsx(F0.Provider,{value:s,children:C.jsx(EA,{onCopilotEvent:t,dispatch:a,children:n})})};function bA(){var e=z.useRef(!0);return e.current?(e.current=!1,!0):e.current}var sl=function(e){z.useEffect(e,[])},_A=function(e,t){return e===t};function SA(e,t){t===void 0&&(t=_A);var n=z.useRef(),r=z.useRef(e),s=bA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class xA{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(an.size).fill(1).forEach(()=>{const r=an.first();r&&(t(r),an.remove())})})}get size(){return this.items.length}}const an=new xA,xg=e=>{window.addEventListener(Vd,e)},wg=e=>{window.removeEventListener(Vd,e)},wA=(e,t,n)=>{const r=new CustomEvent(Vd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Cg=e=>{window.addEventListener($d,e)},Ag=e=>{window.removeEventListener($d,e)},CA=(e,t,n)=>{const r=new CustomEvent($d,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},vg=e=>{window.addEventListener(jd,e)},kg=e=>{window.removeEventListener(jd,e)},Ng=(e,t,n)=>{const r=new CustomEvent(jd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},AA=e=>{window.addEventListener(Wd,e)},vA=e=>{window.removeEventListener(Wd,e)},ol=(e,t,n)=>{const r=new CustomEvent(Wd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class kA{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=Ow[n];return CA(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 at=new kA,Og=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Pg=(e,t,n)=>{var u,c;const r=F({},((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},Ig=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Rg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="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:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Lg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Dg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},NA=e=>{if(!Ji()||!oa()){Ji()&&an.clear(),an.add({context:"browse",payload:be(F({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Mg=e=>{Og(e,at)},OA=(e,t)=>{Pg(e,t,at)},Fg=e=>{Ig(e,at)},PA=({field:e,value:t})=>{Rg({field:e,value:t},at)},IA=e=>{Lg(e,at)},Bg=e=>{Dg(e,at)},Ug=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ji(),n=oa();if(!t||!n){t&&an.clear(),an.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Mg(e.facetFilters||{}),"rangeFilters"in e&&Fg(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Bg(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},RA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Ug,updateBrowseCategoryId:NA,updateCatalogSegment:IA,updateFacetFilter:OA,updateFacetFilters:Mg,updatePricebooks:Bg,updateRangeFilter:PA,updateRangeFilters:Fg},Symbol.toStringTag,{value:"Module"}));class LA{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(Ng(n,r),Reflect.set(t,n,r)));Se(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 lr=new LA,Hg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ji(),n=oa();if(!t||!n){t&&an.clear(),an.add({context:"pdp",payload:F({},e)});return}lr.updateProxy(e),Ng("pdp-context",e)},DA=e=>{lr.proxy.productId=e,Ji()||an.add({context:"pdp",payload:F({},lr.state)})},MA=e=>{lr.proxy.pdpLink=e},St={SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},zg={isOpen:!1,isInline:!1,elementId:null,placeholder:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null};class FA{constructor(){Se(this,"initialState",zg);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ua(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ut=new FA,BA=e=>{window.addEventListener(Yd,e)},UA=e=>{window.removeEventListener(Yd,e)},ua=(e,t)=>{const n=new CustomEvent(Yd,{detail:{property:e,value:t}});window.dispatchEvent(n)},jg=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},$g=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},HA=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ua("params",e),Ut.promptsStateProxy.entryType="ask_cim"},zA=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ua("params",e),Ut.promptsStateProxy.entryType="search"},jA=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ua("params",e),Ut.promptsStateProxy.entryType="browse"},$A=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ua("params",e),Ut.promptsStateProxy.entryType="pdp"},VA=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&$g(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||jg(!0)},qA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{ol("getConversationMessages",{payload:e,callback:t},hi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ol("getSessionInformation",{callback:e},hi.GET_SESSION_INFORMATION)},loadConversation:e=>{ol("loadConversation",e,hi.LOAD_CONVERSATION)},resetConversation:()=>{ol("resetConversation",!0,hi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class YA{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=Pw[n];return wA(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 YA,WA=e=>{const t=oa(),n=Ji();if(!n||!t){n&&an.clear(),an.add({context:"search",payload:be(F({},gt.state),{query:e})});return}gt.queryProxy.query=e},Vg=e=>{Og(e,gt)},GA=(e,t)=>{Pg(e,t,gt)},qg=e=>{Ig(e,gt)},XA=({field:e,value:t})=>{Rg({field:e,value:t},gt)},KA=e=>{Lg(e,gt)},Yg=e=>{Dg(e,gt)},Wg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=oa(),n=Ji();if(!n||!t){n&&an.clear(),an.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&Vg(e.facetFilters||{}),"rangeFilters"in e&&qg(e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Yg(e.pricebooks||[]),gt.queryProxy.query=e.query},QA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Wg,updateCatalogSegment:KA,updateFacetFilter:GA,updateFacetFilters:Vg,updatePricebooks:Yg,updateRangeFilter:XA,updateRangeFilters:qg,updateSearchQuery:WA},Symbol.toStringTag,{value:"Module"})),JA={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},Gg=z.createContext(JA),ZA=({children:e})=>{const[t,n]=z.useState(at.categoryId),[r,s]=z.useState(at.categoryIdProxy.categoryName||""),[a,u]=z.useState(at.facetFilters||{}),[c,d]=z.useState(at.rangeFilters||[]),[f,p]=z.useState(at.catalogSegment||null),[g,b]=z.useState(at.pricebooks||null);z.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&s(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&b(S.value)};return Cg(_),()=>{Ag(_)}},[]);const y=z.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:g}),[t,r,a,c,f,g]);return C.jsx(Gg.Provider,{value:y,children:e})},ev=()=>{const e=z.useContext(Gg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},tv={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},Xg=z.createContext(tv),nv=({children:e})=>{const[t,n]=z.useState(gt.query),[r,s]=z.useState(gt.facetFilters),[a,u]=z.useState(gt.rangeFilters),[c,d]=z.useState(gt.catalogSegment),[f,p]=z.useState(gt.pricebooks);z.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return xg(b),()=>{wg(b)}},[]);const g=z.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return C.jsx(Xg.Provider,{value:g,children:e})},rv=()=>{const e=z.useContext(Xg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},iv={productId:lr.productId,pdpLink:lr.pdpLink},Kg=z.createContext(iv),sv=({children:e})=>{const[t,n]=z.useState(lr.productId),[r,s]=z.useState(lr.pdpLink);z.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return vg(u),()=>{kg(u)}},[]);const a=z.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return C.jsx(Kg.Provider,{value:a,children:e})},ov=()=>{const e=z.useContext(Kg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},la=()=>{const e=z.useContext(B0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Gr=()=>{const e=z.useContext(F0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Ar=()=>{const e=z.useContext(Jg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},lf=()=>{const{status:e}=pi(),{entryType:t,messages:n}=Gr(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},Qg=z.createContext({mode:ot.modeProxy.mode,status:ot.statusProxy,dialogPosition:ot.dialogProxy.position,isModalFullscreen:ot.modalProxy.isFullscreen,previousComponentType:ot.statusProxy.type}),av=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:s}=la(),[a,u]=z.useState(ot.modeProxy.mode),[c,d]=z.useState({type:n||ot.statusProxy.type,isOpen:ot.statusProxy.isOpen,isMinimized:ot.statusProxy.isMinimized}),[f,p]=z.useState(ot.dialogProxy.position),[g,b]=z.useState(ot.modalProxy.isFullscreen),y=SA(c.type);z.useEffect(()=>{const S=w=>{const{property:A,value:M}=w.detail||{};if(!(!A||M===void 0)){if(A==="mode"){u(M);return}if(A==="entryType"){s(M);return}if(A==="isMinimized"){d(I=>be(F({},I),{isMinimized:M}));return}if(A==="isOpen"){d(I=>be(F({},I),{isOpen:M}));return}if(A==="type"){d(I=>be(F({},I),{type:M}));return}if(A==="position"){p(M);return}if(A==="isFullscreen"){b(M);return}}};return hA(S),()=>{pA(S)}},[s]),sl(()=>{e&&aa(e)}),sl(()=>{const S=n||(t==null?void 0:t.type);S&&il(S),t&&"isOpen"in t&&Zi(!!t.isOpen),t&&"isMinimized"in t&&rl(!!t.isMinimized)}),sl(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:S}=t.options;S&&uf(S),"isModalFullscreen"in t.options&&af(!!t.options.isModalFullscreen)});const _=z.useMemo(()=>({mode:a,status:c,previousComponentType:y||"dialog",dialogPosition:f,isModalFullscreen:g}),[a,c,y,f,g]);return C.jsx(Qg.Provider,{value:_,children:r})},pi=()=>{const e=z.useContext(Qg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},uv=({copilot:e})=>{const{logger:t,conversationHistory:n}=ft(),{addCopilotEvent:r,setEntryType:s}=la(),{activeConversationId:a}=Gr(),u=z.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=z.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 z.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,g=>{g.forEach(y=>{y.bypassHandlers=!0,r(y)});const b=kw(g);if(b!=null&&b.name){const y=Nw(b.name);s(y)}})},[t,a,c,r,s,n]),{getSessionInformation:u,getConversationMessages:c}},Jg=z.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),lv=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=ft(),Ci=rv(),{searchQuery:f}=Ci,p=sn(Ci,["searchQuery"]),ri=ev(),{categoryId:g}=ri,b=sn(ri,["categoryId"]),{productId:y,pdpLink:_}=ov(),{setCopilot:S,setConnected:w,resetCopilot:A,resetCopilotState:M,addCopilotEvent:I,addLoadingMessage:q,removeLoadingMessage:Z,setActiveConversationId:U,setConversationIds:te}=la(),{connected:he,entryType:ye,copilot:B,messages:se,groupedMessages:pe,loadingMessages:le}=Gr(),{status:fe}=pi(),Te=z.useRef(!1),Ae=z.useRef(!1),{getConversationMessages:ue,getSessionInformation:W}=uv({copilot:B}),ne=z.useMemo(()=>le.size>0,[le]),v=z.useCallback(we=>le.has(we),[le]),L=z.useCallback(we=>{I(we),q(we.id)},[I,q]),Q=z.useCallback(({query:we,facetFilters:Ue,rangeFilters:je,catalogSegment:Qe,pricebooks:ct,userPrompt:Et,imageFile:En})=>{if(!B){d==null||d.error("Copilot is not initialized");return}if(!we)return;const vt={searchParams:{query:we}};Et&&(vt.userPrompt=Et),En&&(vt.attachments={image:En}),Ue&&Object.keys(Ue).length>0&&(vt.searchParams.facetFilters=Ue),je&&je.length>0&&(vt.searchParams.rangeFilters=je),Qe&&(vt.searchParams.catalogSegment=Qe),ct&&(vt.searchParams.pricebooks=ct),aa("search"),B.search(vt,J=>{const oe=F({},J);Te.current=!0,L(oe)})},[d,L,B]),O=z.useCallback(({categoryId:we,categoryName:Ue,facetFilters:je,rangeFilters:Qe,catalogSegment:ct,pricebooks:Et,userPrompt:En,imageFile:vt})=>{if(!B){d==null||d.error("Copilot is not initialized");return}const J=je&&Object.keys(je).length>0;if(we===""&&!J){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const oe={browseParams:{categoryId:we||""}};En&&(oe.userPrompt=En),vt&&(oe.attachments={image:vt}),J&&(oe.browseParams.facetFilters=je),Qe&&Qe.length>0&&(oe.browseParams.rangeFilters=Qe),ct&&(oe.browseParams.catalogSegment=ct),Array.isArray(Et)&&Et.length>0&&(oe.browseParams.pricebooks=Et),Ue&&(oe.clientContext={label:Ue}),aa("browse"),B.browse(oe,Re=>{var Jn;const $e=F({},Re),Je=((Jn=$e.request)==null?void 0:Jn.clientContext)||{},jt=(Je==null?void 0:Je.label)||Ue;jt&&$e.request&&($e.request.label=jt),Ae.current=!0,L($e)})},[d,L,B]),_e=z.useCallback(({productId:we,productName:Ue,pdpLink:je,userPrompt:Qe,imageFile:ct})=>{if(!B){d==null||d.error("Copilot is not initialized");return}if(!we)return;const Et={productId:we};Qe&&(Et.userPrompt=Qe),je&&(Et.pdpLink=je),ct&&(Et.attachments={image:ct}),Ue&&(Et.clientContext={label:Ue}),aa("pdp"),B.productView(Et,En=>{var Re;const vt=F({},En),J=((Re=vt.request)==null?void 0:Re.clientContext)||{},oe=(J==null?void 0:J.label)||Ue;oe&&vt.request&&(vt.request.label=oe),L(vt)})},[d,B,L]),Le=z.useCallback(({userPrompt:we,imageFile:Ue})=>{if(!B){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Ue&&(je.attachments={image:Ue}),B.askCim(je,Qe=>{const ct=F({},Qe);L(ct)})},[d,B,L]),Oe=z.useCallback(we=>{const Ue=be(F({},we),{id:we.inquiryLinkId||we.id});I(Ue)},[I]),Ge=z.useCallback(we=>{I(we),a==null||a(we)},[I,a]),Ye=z.useCallback(we=>{I(we),u==null||u(we)},[I,u]),nt=z.useCallback(we=>{s==null||s(we),w(!0)},[s,w]);z.useEffect(()=>{!B||!he||!fe.isOpen||an.size>0&&an.processQueue(we=>{if(we.context==="search"){const Ue=F({},we.payload);Wg(Ue)}if(we.context==="browse"){const Ue=F({},we.payload);Ug(Ue)}if(we.context==="pdp"){const Ue=F({},we.payload);Hg(Ue)}})},[fe.isOpen,B,he]);const Pt=z.useCallback(we=>{we.on("connect_ack",nt),we.on("follow_up",I),we.on("inquiry",Oe),we.on("partial_inquiry",Oe),we.on("display_products",I),we.on("progress",I),we.on("refined_search",Ge),we.on("refined_browse",Ye),we.on("done",Ue=>{Z(Ue.eventSourceId)}),we.on("error",Ue=>{I(Ue),Z(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)){w(!1);return}d==null||d.log("De-registering event listeners");const Qe=new Date().toISOString();I({name:"error",message:"Connection was lost. Please try again.",createdAt:Qe,id:`error-${Qe}`,sessionId:"session"}),we.off()})},[d,w,Z,Oe,Ge,Ye,I,nt]);sl(()=>{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 mw(Ue);return S(je),Pt(je),je.connect(),je.requestSessionInformation(Qe=>{d==null||d.log("Session Information: ",Qe);const{activeConversationId:ct,conversationIds:Et}=Qe.data||{};ct&&U(ct),Et!=null&&Et.length&&te(Et)}),()=>{je.disconnect(),je.off(),A()}});const Qn=z.useCallback(we=>{if(!B)return;const Ue={eventId:we,reason:"User cancelled the request"};B.cancelRequest(Ue,je=>{I(je),Z(we)})},[I,Z,B]),hs=z.useCallback(()=>{B&&B.conversationReset({},we=>{M(),I(we),B.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Qe}=Ue.data||{};je&&U(je),Qe!=null&&Qe.length&&te(Qe)})})},[B,d,I,M,U,te]),ni=z.useCallback((we,Ue)=>{if(!we)return;const je={userPrompt:we};switch(Ue&&(je.imageFile=Ue),ye){case"ask_cim":Le(je);return;case"search":Q(F(F({query:f},p),je));return;case"browse":O(F(F({categoryId:g},b),je));return;case"pdp":_e(F({productId:y,pdpLink:_||""},je));return}},[ye,f,p,Q,Le,g,b,O,_e,y,_]),wi=z.useCallback((we,Ue)=>{var Et,En,vt;const Qe=we.params.userPrompt||"";if(!Qe)return;const ct=se.find(J=>J.id===Ue);if(ct){if(ct.name==="ask_cim"){Le({userPrompt:Qe});return}if(ct.name==="copilot_search"){const J=((Et=ct.request)==null?void 0:Et.searchParams)||{};J.query&&Q(be(F({},J),{userPrompt:Qe}));return}if(ct.name==="copilot_browse"){const J=ct.request,oe=J.browseParams||{},Re=((En=J.clientContext)==null?void 0:En.label)||"";O(be(F({},oe),{categoryName:Re,userPrompt:Qe}));return}if(ct.name==="product_view"){const J=ct.request||{},oe=((vt=J.clientContext)==null?void 0:vt.label)||"";J.productId&&_e(be(F({},J),{productName:oe,userPrompt:Qe}))}}},[se,Q,Le,O,_e]),ps=z.useMemo(()=>({copilot:B,messages:se,groupedMessages:pe,isLoading:ne,isResponseLoading:v,handleAskCim:Le,handleSearch:Q,handleBrowse:O,handlePdp:_e,handleUserInput:ni,handleSuggestion:wi,handleCancel:Qn,resetConversation:hs,getSessionInformation:W,getConversationMessages:ue}),[B,se,pe,ne,v,Le,Q,O,_e,ni,wi,Qn,hs,W,ue]);return C.jsx(Jg.Provider,{value:ps,children:c})},cv=()=>{const{resetCopilotState:e,addCopilotEvent:t}=la(),{copilot:n,handleSearch:r,handleBrowse:s,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=Ar(),f=z.useCallback(({query:b})=>{if(!n||!b)return;const{facetFilters:y}=gt.facetFiltersProxy,{rangeFilters:_}=gt.rangeFiltersProxy,{catalogSegment:S}=gt.catalogSegmentProxy,{pricebooks:w}=gt.pricebooksProxy,A={query:b};A.facetFilters=y||{},A.rangeFilters=_||[],A.catalogSegment=S||"",A.pricebooks=w||[],r(F({},A))},[n,r]),p=z.useCallback(({categoryId:b})=>{if(!n)return;const y=at.categoryIdProxy.categoryName,{facetFilters:_}=at.facetFiltersProxy,{rangeFilters:S}=at.rangeFiltersProxy,{catalogSegment:w}=at.catalogSegmentProxy,{pricebooks:A}=at.pricebooksProxy,M={categoryId:b};M.categoryName=y||"",M.facetFilters=_||{},M.rangeFilters=S||[],M.catalogSegment=w||"",M.pricebooks=A||[],s(F({},M))},[n,s]),g=z.useCallback(({productId:b})=>{if(!n||!b)return;const y={productId:b,pdpLink:lr.pdpLink,productName:lr.proxy.productName||""};a(y)},[n,a]);return z.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&f({query:y.value})};return xg(b),()=>{wg(b)}},[f]),z.useEffect(()=>{const b=({detail:y})=>{if((y==null?void 0:y.property)==="pdp-context"){const _=y.value;g({productId:_.productId});return}(y==null?void 0:y.property)==="productId"&&g({productId:y.value})};return vg(b),()=>{kg(b)}},[g]),z.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="categoryId"&&p({categoryId:y.value})};return Cg(b),()=>{Ag(b)}},[p]),z.useEffect(()=>{const b=({detail:y})=>{if((y==null?void 0:y.event)==hi.RESET_CONVERSATION&&u(),(y==null?void 0:y.event)==hi.GET_SESSION_INFORMATION){const _=y.value.callback;c(_)}if((y==null?void 0:y.event)==hi.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=y.value;if(!_.conversationId||typeof S!="function")return;d(_,S)}if((y==null?void 0:y.event)==hi.LOAD_CONVERSATION){const _=y.value;if(!_.conversationId)return;d(_,w=>{e(),w.forEach(A=>{t(A)})})}};return AA(b),()=>{vA(b)}},[u,c,d,e,t]),null},dv=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>C.jsxs(lv,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:[C.jsx(cv,{}),c]}),Zg=z.createContext(null),e1=z.createContext(null),fv=({children:e,dispatch:t})=>{const n=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_OPEN,payload:y})},[t]),r=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_INLINE,payload:y})},[t]),s=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:y})},[t]),a=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:y})},[t]),u=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:y})},[t]),c=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:y})},[t]),d=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_PARAMS,payload:y})},[t]),f=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:y})},[t]),p=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:y})},[t]),g=z.useCallback(y=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:y})},[t]),b=z.useMemo(()=>({setIsOpen:n,setIsInline:r,setElementId:s,setEntryType:a,setActivePromptsId:u,setUserPrompt:c,setParams:d,setPromptsMessage:f,setResponseMessage:p,setIsResponseLoading:g}),[n,r,s,a,u,c,d,f,p,g]);return C.jsx(e1.Provider,{value:b,children:e})},hv=(e,t)=>{const{type:n,payload:r}=t;switch(n){case St.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case St.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case St.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case St.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case St.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case St.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case St.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case St.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case St.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case St.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},pv=({promptsConfig:e,children:t})=>{const[n,r]=D0(hv,F(F({},zg),e||{}));return C.jsx(Zg.Provider,{value:n,children:C.jsx(fv,{dispatch:r,children:t})})},t1=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:s,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,componentConfig:p,entryType:g,entryMessage:b,disclaimerText:y,disclaimerMarkdown:_,searchPlaceholder:S,searchButtonLabel:w,searchConfig:A,promptsConfig:M,resetConversationMessage:I,conversationHistory:q,onConnect:Z,onCopilotEvent:U,onRefinedSearch:te,onRefinedBrowse:he,__features:ye,children:B})=>C.jsx(dA,{baseUrl:n,apiKey:e,apiToken:t,logoUrl:r,headerText:s,entryMessage:b,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:S,searchButtonLabel:w,searchConfig:A,componentConfig:p,disclaimerMarkdown:_,disclaimerText:y,resetConversationMessage:I,conversationHistory:q,isDevelopment:d,__features:ye,children:C.jsx(TA,{entryType:g,onCopilotEvent:U,children:C.jsx(sv,{children:C.jsx(ZA,{children:C.jsx(nv,{children:C.jsx(av,{entryType:g,componentConfig:p,componentType:f,children:C.jsx(pv,{promptsConfig:M,children:C.jsx(dv,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:g,onConnect:Z,onRefinedSearch:te,onRefinedBrowse:he,onCopilotEvent:U,children:B})})})})})})})});function n1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=n1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function K(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=n1(e))&&(r&&(r+=" "),r+=t);return r}var r1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i1=Yi.createContext&&Yi.createContext(r1),mv=["attr","size","title"];function gv(e,t){if(e==null)return{};var n=Ev(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ev(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 al(){return al=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},al.apply(this,arguments)}function s1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ul(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(n),!0).forEach(function(r){yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yv(e,t,n){return t=Tv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tv(e){var t=bv(e,"string");return typeof t=="symbol"?t:t+""}function bv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o1(e){return e&&e.map((t,n)=>Yi.createElement(t.tag,ul({key:n},t.attr),o1(t.child)))}function Vt(e){return t=>Yi.createElement(_v,al({attr:ul({},e.attr)},t),o1(e.child))}function _v(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=gv(e,mv),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Yi.createElement("svg",al({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:ul(ul({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Yi.createElement("title",null,a),e.children)};return i1!==void 0?Yi.createElement(i1.Consumer,null,n=>t(n)):t(r1)}function a1(e){return Vt({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 u1(e){return Vt({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 zs(e){return Vt({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 Sv(e){return Vt({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 l1(e){return Vt({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 xv(e){return Vt({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 wv(e){return Vt({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 Cv(e){return Vt({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 Av(e){return Vt({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 vv(e){return Vt({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 cf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>C.jsx("button",{"aria-label":t,className:K(e,`${j}-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"})})}),df=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>C.jsx("button",{className:K(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),vr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:C.jsx("button",{className:K(e,`${j}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?C.jsx("img",{className:K(`${j}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),kv=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?C.jsx("img",{className:K(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):C.jsx(zs,{size:"16px"})},Nv=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return C.jsx(vr,{className:K(e,n,r,`${j}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:C.jsx(zs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return C.jsxs(df,{className:K(e,n,r,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&C.jsx(kv,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Ov(e){return Vt({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 Pv=()=>{const{messages:e}=Gr(),{handleCancel:t}=Ar();return{cancelRequest:z.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},Iv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=ft(),{cancelRequest:r}=Pv();return n!=null&&n.enableCancelSearch?C.jsx(vr,{className:K(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:C.jsx(Ov,{}),disabled:!e,onClick:r}):null};function pB(){}function mB(){}function c1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function d1(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,Lv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dv={};function f1(e,t){return(Dv.jsx?Lv:Rv).test(e)}const Mv=/[ \t\n\f\r]/g;function Fv(e){return typeof e=="object"?e.type==="text"?h1(e.value):!1:h1(e)}function h1(e){return e.replace(Mv,"")===""}let ca=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ca.prototype.normal={},ca.prototype.property={},ca.prototype.space=void 0;function p1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ca(n,r,t)}function da(e){return e.toLowerCase()}let xn=class{constructor(t,n){this.attribute=n,this.property=t}};xn.prototype.attribute="",xn.prototype.booleanish=!1,xn.prototype.boolean=!1,xn.prototype.commaOrSpaceSeparated=!1,xn.prototype.commaSeparated=!1,xn.prototype.defined=!1,xn.prototype.mustUseProperty=!1,xn.prototype.number=!1,xn.prototype.overloadedBoolean=!1,xn.prototype.property="",xn.prototype.spaceSeparated=!1,xn.prototype.space=void 0;let Bv=0;const qe=es(),Ht=es(),ff=es(),me=es(),ht=es(),js=es(),Ln=es();function es(){return fd(2,++Bv)}const hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Ht,commaOrSpaceSeparated:Ln,commaSeparated:js,number:me,overloadedBoolean:ff,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),pf=Object.keys(hf);let mf=class extends xn{constructor(t,n,r,s){let a=-1;if(super(t,n),m1(this,"space",s),typeof r=="number")for(;++a<pf.length;){const u=pf[a];m1(this,pf[a],(r&hf[u])===hf[u])}}};mf.prototype.defined=!0;function m1(e,t,n){n&&(e[t]=n)}function $s(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new mf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[da(r)]=r,n[da(a.attribute)]=r}return new ca(t,n,e.space)}const g1=$s({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:ht,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:me,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:ht,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ht,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E1(e,t){return t in e?e[t]:t}function y1(e,t){return E1(e,t.toLowerCase())}const Uv=$s({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,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:me,colSpan:null,content:null,contentEditable:Ht,controls:qe,controlsList:ht,coords:me|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:ff,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ht,height:me,hidden:ff,high:me,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:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,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:me,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:me,rowSpan:me,sandbox:ht,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ht,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:qe,useMap:null,value:Ht,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,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:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ht,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:qe,disableRemotePlayback:qe,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:y1}),Hv=$s({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: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: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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:qe,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:js,g2:js,glyphName:js,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:ht,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},space:"svg",transform:E1}),T1=$s({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()}}),b1=$s({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:y1}),_1=$s({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zv={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"},jv=/[A-Z]/g,S1=/-[a-z]/g,$v=/^data[-\w.:]+$/i;function gf(e,t){const n=da(t);let r=t,s=xn;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(S1,qv);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!S1.test(a)){let u=a.replace(jv,Vv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=mf}return new s(r,t)}function Vv(e){return"-"+e.toLowerCase()}function qv(e){return e.charAt(1).toUpperCase()}const ll=p1([g1,Uv,T1,b1,_1],"html"),Vs=p1([g1,Hv,T1,b1,_1],"svg");function x1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function w1(e){return e.join(" ").trim()}var qs={},Ef,C1;function Yv(){if(C1)return Ef;C1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
11
+ `,f="/",p="*",g="",b="comment",y="declaration";Ef=function(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var A=1,M=1;function I(le){var fe=le.match(t);fe&&(A+=fe.length);var Te=le.lastIndexOf(d);M=~Te?le.length-Te:M+le.length}function q(){var le={line:A,column:M};return function(fe){return fe.position=new Z(le),he(),fe}}function Z(le){this.start=le,this.end={line:A,column:M},this.source=w.source}Z.prototype.content=S;function U(le){var fe=new Error(w.source+":"+A+":"+M+": "+le);if(fe.reason=le,fe.filename=w.source,fe.line=A,fe.column=M,fe.source=S,!w.silent)throw fe}function te(le){var fe=le.exec(S);if(fe){var Te=fe[0];return I(Te),S=S.slice(Te.length),fe}}function he(){te(n)}function ye(le){var fe;for(le=le||[];fe=B();)fe!==!1&&le.push(fe);return le}function B(){var le=q();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var fe=2;g!=S.charAt(fe)&&(p!=S.charAt(fe)||f!=S.charAt(fe+1));)++fe;if(fe+=2,g===S.charAt(fe-1))return U("End of comment missing");var Te=S.slice(2,fe-2);return M+=2,I(Te),S=S.slice(fe),M+=2,le({type:b,comment:Te})}}function se(){var le=q(),fe=te(r);if(fe){if(B(),!te(s))return U("property missing ':'");var Te=te(a),Ae=le({type:y,property:_(fe[0].replace(e,g)),value:Te?_(Te[0].replace(e,g)):g});return te(u),Ae}}function pe(){var le=[];ye(le);for(var fe;fe=se();)fe!==!1&&(le.push(fe),ye(le));return le}return he(),pe()};function _(S){return S?S.replace(c,g):g}return Ef}var A1;function Wv(){if(A1)return qs;A1=1;var e=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=n;var t=e(Yv());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof s=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?s(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return qs}var fa={},v1;function Gv(){if(v1)return fa;v1=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return fa.camelCase=d,fa}var ha,k1;function Xv(){if(k1)return ha;k1=1;var e=ha&&ha.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Wv()),n=Gv();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ha=r,ha}var Kv=Xv();const Qv=Xe(Kv),cl=N1("end"),kr=N1("start");function N1(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 O1(e){const t=kr(e),n=cl(e);if(t&&n)return{start:t,end:n}}function pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?P1(e.position):"start"in e||"end"in e?P1(e):"line"in e||"column"in e?yf(e):""}function yf(e){return I1(e&&e.line)+":"+I1(e&&e.column)}function P1(e){return yf(e&&e.start)+"-"+yf(e&&e.end)}function I1(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=pa(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}}un.prototype.file="",un.prototype.name="",un.prototype.reason="",un.prototype.message="",un.prototype.stack="",un.prototype.column=void 0,un.prototype.line=void 0,un.prototype.ancestors=void 0,un.prototype.cause=void 0,un.prototype.fatal=void 0,un.prototype.place=void 0,un.prototype.ruleId=void 0,un.prototype.source=void 0;const Tf={}.hasOwnProperty,Jv=new Map,Zv=/[A-Z]/g,ek=new Set(["table","tbody","thead","tfoot","tr"]),tk=new Set(["td","th"]),R1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nk(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=ck(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=lk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vs:ll,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=L1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function L1(e,t,n){if(t.type==="element")return rk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ik(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ok(e,t,n);if(t.type==="mdxjsEsm")return sk(e,t);if(t.type==="root")return ak(e,t,n);if(t.type==="text")return uk(e,t)}function rk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Vs,e.schema=s),e.ancestors.push(t);const a=M1(e,t.tagName,!1),u=dk(e,t);let c=_f(e,t);return ek.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Fv(d):!0})),D1(e,u,a,t),bf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function ik(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)}ma(e,t.position)}function sk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ma(e,t.position)}function ok(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Vs,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:M1(e,t.name,!0),u=fk(e,t),c=_f(e,t);return D1(e,u,a,t),bf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function ak(e,t,n){const r={};return bf(r,_f(e,t)),e.create(t,e.Fragment,r,n)}function uk(e,t){return t.value}function D1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function ck(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=kr(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function dk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Tf.call(t.properties,s)){const a=hk(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&tk.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 fk(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 ma(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ma(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function _f(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Jv;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=L1(e,a,u);c!==void 0&&n.push(c)}return n}function hk(e,t,n){const r=gf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?d1(n):w1(n)),r.property==="style"){let s=typeof n=="object"?n:pk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=mk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?zv[r.property]||r.property:r.attribute,n]}}function pk(e,t){try{return Qv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=R1+"#cannot-parse-style-attribute",s}}function M1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=f1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=f1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Tf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ma(e)}function ma(e,t){const n=new un("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=R1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function mk(e){const t={};let n;for(n in e)Tf.call(e,n)&&(t[gk(n)]=e[n]);return t}function gk(e){let t=e.replace(Zv,Ek);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ek(e){return"-"+e.toLowerCase()}const Sf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},yk={};function xf(e,t){const n=yk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F1(e,r,s)}function F1(e,t,n){if(Tk(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 B1(e.children,t,n)}return Array.isArray(e)?B1(e,t,n):""}function B1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=F1(e[s],t,n);return r.join("")}function Tk(e){return!!(e&&typeof e=="object")}const U1=document.createElement("i");function wf(e){const t="&"+e+";";U1.innerHTML=t;const n=U1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Wn(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}const H1={}.hasOwnProperty;function z1(e){const t={};let n=-1;for(;++n<e.length;)bk(t,e[n]);return t}function bk(e,t){let n;for(n in t){const s=(H1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){H1.call(s,u)||(s[u]=[]);const c=a[u];_k(s[u],Array.isArray(c)?c:c?[c]:[])}}}function _k(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dn(e,0,0,r)}function j1(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 cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gn=mi(/[A-Za-z]/),ln=mi(/[\dA-Za-z]/),Sk=mi(/[#-'*+\--9=?A-Z^-~]/);function dl(e){return e!==null&&(e<32||e===127)}const Cf=mi(/\d/),xk=mi(/[\dA-Fa-f]/),wk=mi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const fl=mi(new RegExp("\\p{P}|\\p{S}","u")),ts=mi(/\s/);function mi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ke(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ke(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Ck={tokenize:Ak};function Ak(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return De(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const vk={tokenize:kk},$1={tokenize:Nk};function kk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(I){if(r<n.length){const q=n[r];return t.containerState=q[1],e.attempt(q[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const q=t.events.length;let Z=q,U;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){U=t.events[Z][1].end;break}A(r);let te=q;for(;te<t.events.length;)t.events[te][1].end=F({},U),te++;return Dn(t.events,Z+1,0,t.events.slice(q)),t.events.length=te,f(I)}return c(I)}function f(I){if(r===n.length){if(!s)return b(I);if(s.currentConstruct&&s.currentConstruct.concrete)return _(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($1,p,g)(I)}function p(I){return s&&M(),A(r),b(I)}function g(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(I)}function b(I){return t.containerState={},e.attempt($1,y,_)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),b(I)}function _(I){if(I===null){s&&M(),A(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(I)}function S(I){if(I===null){w(e.exit("chunkFlow"),!0),A(0),e.consume(I);return}return De(I)?(e.consume(I),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(I),S)}function w(I,q){const Z=t.sliceStream(I);if(q&&Z.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(Z),t.parser.lazy[I.start.line]){let U=s.events.length;for(;U--;)if(s.events[U][1].start.offset<u&&(!s.events[U][1].end||s.events[U][1].end.offset>u))return;const te=t.events.length;let he=te,ye,B;for(;he--;)if(t.events[he][0]==="exit"&&t.events[he][1].type==="chunkFlow"){if(ye){B=t.events[he][1].end;break}ye=!0}for(A(r),U=te;U<t.events.length;)t.events[U][1].end=F({},B),U++;Dn(t.events,he+1,0,t.events.slice(te)),t.events.length=U}}function A(I){let q=n.length;for(;q-- >I;){const Z=n[q];t.containerState=Z[1],Z[0].exit.call(t,e)}n.length=I}function M(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Nk(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||dt(e)||ts(e))return 1;if(fl(e))return 2}function hl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Af={name:"attention",resolveAll:Ok,tokenize:Pk};function Ok(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=F({},e[r][1].end),b=F({},e[n][1].start);V1(g,-d),V1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Wn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Wn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Wn(f,hl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Wn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Wn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Dn(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 Pk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Ws(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=Ws(d),g=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?g:g&&(s||!b)),f._close=!!(a===42?b:b&&(p||!g)),t(d)}}function V1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ik={name:"autolink",tokenize:Rk};function Rk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return gn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||ln(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||ln(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||dl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Sk(y)?(e.consume(y),f):n(y)}function p(y){return ln(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||ln(y))&&r++<63){const _=y===45?b:g;return e.consume(y),_}return n(y)}}const ga={partial:!0,tokenize:Lk};function Lk(e,t,n){return r;function r(a){return Ke(a)?tt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||De(a)?t(a):n(a)}}const q1={continuation:{tokenize:Mk},exit:Fk,name:"blockQuote",tokenize:Dk};function Dk(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Mk(e,t,n){const r=this;return s;function s(u){return Ke(u)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(q1,t,n)(u)}}function Fk(e){e.exit("blockQuote")}const Y1={name:"characterEscape",tokenize:Bk};function Bk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return wk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const W1={name:"characterReference",tokenize:Uk};function Uk(e,t,n){const r=this;let s=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=ln,p(g))}function f(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=xk,p):(e.enter("characterReferenceValue"),a=7,u=Cf,p(g))}function p(g){if(g===59&&s){const b=e.exit("characterReferenceValue");return u===ln&&!wf(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&s++<a?(e.consume(g),p):n(g)}}const G1={partial:!0,tokenize:zk},X1={concrete:!0,name:"codeFenced",tokenize:Hk};function Hk(e,t,n){const r=this,s={partial:!0,tokenize:Z};let a=0,u=0,c;return d;function d(U){return f(U)}function f(U){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=U,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(U)}function p(U){return U===c?(u++,e.consume(U),p):u<3?n(U):(e.exit("codeFencedFenceSequence"),Ke(U)?tt(e,g,"whitespace")(U):g(U))}function g(U){return U===null||De(U)?(e.exit("codeFencedFence"),r.interrupt?t(U):e.check(G1,S,q)(U)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(U))}function b(U){return U===null||De(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(U)):Ke(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,y,"whitespace")(U)):U===96&&U===c?n(U):(e.consume(U),b)}function y(U){return U===null||De(U)?g(U):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(U))}function _(U){return U===null||De(U)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(U)):U===96&&U===c?n(U):(e.consume(U),_)}function S(U){return e.attempt(s,q,w)(U)}function w(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),A}function A(U){return a>0&&Ke(U)?tt(e,M,"linePrefix",a+1)(U):M(U)}function M(U){return U===null||De(U)?e.check(G1,S,q)(U):(e.enter("codeFlowValue"),I(U))}function I(U){return U===null||De(U)?(e.exit("codeFlowValue"),M(U)):(e.consume(U),I)}function q(U){return e.exit("codeFenced"),t(U)}function Z(U,te,he){let ye=0;return B;function B(Te){return U.enter("lineEnding"),U.consume(Te),U.exit("lineEnding"),se}function se(Te){return U.enter("codeFencedFence"),Ke(Te)?tt(U,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):pe(Te)}function pe(Te){return Te===c?(U.enter("codeFencedFenceSequence"),le(Te)):he(Te)}function le(Te){return Te===c?(ye++,U.consume(Te),le):ye>=u?(U.exit("codeFencedFenceSequence"),Ke(Te)?tt(U,fe,"whitespace")(Te):fe(Te)):he(Te)}function fe(Te){return Te===null||De(Te)?(U.exit("codeFencedFence"),te(Te)):he(Te)}}}function zk(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const vf={name:"codeIndented",tokenize:$k},jk={partial:!0,tokenize:Vk};function $k(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):De(f)?e.attempt(jk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||De(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function Vk(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):tt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):De(u)?s(u):n(u)}}const qk={name:"codeText",previous:Wk,resolve:Yk,tokenize:Gk};function Yk(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function Wk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Gk(e,t,n){let r=0,s,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),s=0,p(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(g))}function f(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),f)}function p(g){return g===96?(e.consume(g),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",f(g))}}class Xk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Ea(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),Ea(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ea(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);Ea(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ea(this.left,n.reverse())}}}function Ea(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function K1(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new Xk(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,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=F({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Dn(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 s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,g,b=-1,y=n,_=0,S=0;const w=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,w.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):w.pop(),b=w.length;b--;){const A=c.slice(w[b],w[b+1]),M=a.pop();d.push([M,M+A.length-1]),e.splice(M,2,A)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const Qk={resolve:Zk,tokenize:eN},Jk={partial:!0,tokenize:tN};function Zk(e){return K1(e),e}function eN(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):De(c)?e.check(Jk,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function tN(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(u){if(u===null||De(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 Q1(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(A){return A===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(A),e.exit(a),b):A===null||A===32||A===41||dl(A)?n(A):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(A))}function b(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===62?(e.exit("chunkString"),e.exit(c),b(A)):A===null||A===60||De(A)?n(A):(e.consume(A),A===92?_:y)}function _(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function S(A){return!p&&(A===null||A===41||dt(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<f&&A===40?(e.consume(A),p++,S):A===41?(e.consume(A),p--,S):A===null||A===32||A===40||dl(A)?n(A):(e.consume(A),A===92?w:S)}function w(A){return A===40||A===41||A===92?(e.consume(A),S):S(A)}}function J1(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):De(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||De(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ke(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function Z1(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):De(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),tt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||De(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?g:p)}function g(b){return b===u||b===92?(e.consume(b),p):p(b)}}function ya(e,t){let n;return r;function r(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ke(s)?tt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const nN={name:"definition",tokenize:iN},rN={partial:!0,tokenize:sN};function iN(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return J1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return dt(y)?ya(e,f)(y):f(y)}function f(y){return Q1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(rN,g,g)(y)}function g(y){return Ke(y)?tt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||De(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function sN(e,t,n){return r;function r(c){return dt(c)?ya(e,s)(c):n(c)}function s(c){return Z1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ke(c)?tt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||De(c)?t(c):n(c)}}const oN={name:"hardBreakEscape",tokenize:aN};function aN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const uN={name:"headingAtx",resolve:lN,tokenize:cN};function lN(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function cN(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||dt(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||De(p)?(e.exit("atxHeading"),t(p)):Ke(p)?tt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||dt(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const dN=["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"],eE=["pre","script","style","textarea"],fN={concrete:!0,name:"htmlFlow",resolveTo:mN,tokenize:gN},hN={partial:!0,tokenize:yN},pN={partial:!0,tokenize:EN};function mN(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 gN(e,t,n){const r=this;let s,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),g}function g(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,S):O===63?(e.consume(O),s=3,r.interrupt?t:v):gn(O)?(e.consume(O),u=String.fromCharCode(O),w):n(O)}function b(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,_):gn(O)?(e.consume(O),s=4,r.interrupt?t:v):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:v):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:pe:_):n(O)}function S(O){return gn(O)?(e.consume(O),u=String.fromCharCode(O),w):n(O)}function w(O){if(O===null||O===47||O===62||dt(O)){const _e=O===47,Le=u.toLowerCase();return!_e&&!a&&eE.includes(Le)?(s=1,r.interrupt?t(O):pe(O)):dN.includes(u.toLowerCase())?(s=6,_e?(e.consume(O),A):r.interrupt?t(O):pe(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?M(O):I(O))}return O===45||ln(O)?(e.consume(O),u+=String.fromCharCode(O),w):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:pe):n(O)}function M(O){return Ke(O)?(e.consume(O),M):B(O)}function I(O){return O===47?(e.consume(O),B):O===58||O===95||gn(O)?(e.consume(O),q):Ke(O)?(e.consume(O),I):B(O)}function q(O){return O===45||O===46||O===58||O===95||ln(O)?(e.consume(O),q):Z(O)}function Z(O){return O===61?(e.consume(O),U):Ke(O)?(e.consume(O),Z):I(O)}function U(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Ke(O)?(e.consume(O),U):he(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||De(O)?n(O):(e.consume(O),te)}function he(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||dt(O)?Z(O):(e.consume(O),he)}function ye(O){return O===47||O===62||Ke(O)?I(O):n(O)}function B(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||De(O)?pe(O):Ke(O)?(e.consume(O),se):n(O)}function pe(O){return O===45&&s===2?(e.consume(O),Ae):O===60&&s===1?(e.consume(O),ue):O===62&&s===4?(e.consume(O),L):O===63&&s===3?(e.consume(O),v):O===93&&s===5?(e.consume(O),ne):De(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(hN,Q,le)(O)):O===null||De(O)?(e.exit("htmlFlowData"),le(O)):(e.consume(O),pe)}function le(O){return e.check(pN,fe,Q)(O)}function fe(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Te}function Te(O){return O===null||De(O)?le(O):(e.enter("htmlFlowData"),pe(O))}function Ae(O){return O===45?(e.consume(O),v):pe(O)}function ue(O){return O===47?(e.consume(O),u="",W):pe(O)}function W(O){if(O===62){const _e=u.toLowerCase();return eE.includes(_e)?(e.consume(O),L):pe(O)}return gn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),W):pe(O)}function ne(O){return O===93?(e.consume(O),v):pe(O)}function v(O){return O===62?(e.consume(O),L):O===45&&s===2?(e.consume(O),v):pe(O)}function L(O){return O===null||De(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),L)}function Q(O){return e.exit("htmlFlow"),t(O)}}function EN(e,t,n){const r=this;return s;function s(u){return De(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 yN(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ga,t,n)}}const TN={name:"htmlText",tokenize:bN};function bN(e,t,n){const r=this;let s,a,u;return c;function c(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),d}function d(v){return v===33?(e.consume(v),f):v===47?(e.consume(v),Z):v===63?(e.consume(v),I):gn(v)?(e.consume(v),he):n(v)}function f(v){return v===45?(e.consume(v),p):v===91?(e.consume(v),a=0,_):gn(v)?(e.consume(v),M):n(v)}function p(v){return v===45?(e.consume(v),y):n(v)}function g(v){return v===null?n(v):v===45?(e.consume(v),b):De(v)?(u=g,ue(v)):(e.consume(v),g)}function b(v){return v===45?(e.consume(v),y):g(v)}function y(v){return v===62?Ae(v):v===45?b(v):g(v)}function _(v){const L="CDATA[";return v===L.charCodeAt(a++)?(e.consume(v),a===L.length?S:_):n(v)}function S(v){return v===null?n(v):v===93?(e.consume(v),w):De(v)?(u=S,ue(v)):(e.consume(v),S)}function w(v){return v===93?(e.consume(v),A):S(v)}function A(v){return v===62?Ae(v):v===93?(e.consume(v),A):S(v)}function M(v){return v===null||v===62?Ae(v):De(v)?(u=M,ue(v)):(e.consume(v),M)}function I(v){return v===null?n(v):v===63?(e.consume(v),q):De(v)?(u=I,ue(v)):(e.consume(v),I)}function q(v){return v===62?Ae(v):I(v)}function Z(v){return gn(v)?(e.consume(v),U):n(v)}function U(v){return v===45||ln(v)?(e.consume(v),U):te(v)}function te(v){return De(v)?(u=te,ue(v)):Ke(v)?(e.consume(v),te):Ae(v)}function he(v){return v===45||ln(v)?(e.consume(v),he):v===47||v===62||dt(v)?ye(v):n(v)}function ye(v){return v===47?(e.consume(v),Ae):v===58||v===95||gn(v)?(e.consume(v),B):De(v)?(u=ye,ue(v)):Ke(v)?(e.consume(v),ye):Ae(v)}function B(v){return v===45||v===46||v===58||v===95||ln(v)?(e.consume(v),B):se(v)}function se(v){return v===61?(e.consume(v),pe):De(v)?(u=se,ue(v)):Ke(v)?(e.consume(v),se):ye(v)}function pe(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),s=v,le):De(v)?(u=pe,ue(v)):Ke(v)?(e.consume(v),pe):(e.consume(v),fe)}function le(v){return v===s?(e.consume(v),s=void 0,Te):v===null?n(v):De(v)?(u=le,ue(v)):(e.consume(v),le)}function fe(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||dt(v)?ye(v):(e.consume(v),fe)}function Te(v){return v===47||v===62||dt(v)?ye(v):n(v)}function Ae(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function ue(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),W}function W(v){return Ke(v)?tt(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):ne(v)}function ne(v){return e.enter("htmlTextData"),u(v)}}const kf={name:"labelEnd",resolveAll:wN,resolveTo:CN,tokenize:AN},_N={tokenize:vN},SN={tokenize:kN},xN={tokenize:NN};function wN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Dn(e,0,e.length,n),e}function CN(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=Wn(c,e.slice(a+1,a+r+3)),c=Wn(c,[["enter",p,t]]),c=Wn(c,hl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Wn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=Wn(c,e.slice(u+1)),c=Wn(c,[["exit",d,t]]),Dn(e,a,e.length,c),e}function AN(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?g(b):(u=r.parser.defined.includes(cr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(_N,p,u?p:g)(b):b===91?e.attempt(SN,p,u?f:g)(b):u?p(b):g(b)}function f(b){return e.attempt(xN,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function vN(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return dt(g)?ya(e,a)(g):a(g)}function a(g){return g===41?p(g):Q1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return dt(g)?ya(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?Z1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function f(g){return dt(g)?ya(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function kN(e,t,n){const r=this;return s;function s(c){return J1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function NN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const ON={name:"labelStartImage",resolveAll:kf.resolveAll,tokenize:PN};function PN(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const IN={name:"labelStartLink",resolveAll:kf.resolveAll,tokenize:RN};function RN(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Nf={name:"lineEnding",tokenize:LN};function LN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const pl={name:"thematicBreak",tokenize:DN};function DN(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||De(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?tt(e,c,"whitespace")(f):c(f))}}const wn={continuation:{tokenize:UN},exit:zN,name:"list",tokenize:BN},MN={partial:!0,tokenize:jN},FN={partial:!0,tokenize:HN};function BN(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Cf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(pl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Cf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ga,r.interrupt?n:p,e.attempt(MN,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return Ke(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function UN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ga,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ke(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(FN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(wn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function HN(e,t,n){const r=this;return tt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function zN(e){e.exit(this.containerState.type)}function jN(e,t,n){const r=this;return tt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const tE={name:"setextUnderline",resolveTo:$N,tokenize:VN};function $N(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function VN(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ke(f)?tt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||De(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const qN={tokenize:YN};function YN(e){const t=this,n=e.attempt(ga,r,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Qk,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WN={resolveAll:rE()},GN=nE("string"),XN=nE("text");function nE(e){return{resolveAll:rE(e==="text"?KN:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const g=s[p];let b=-1;if(g)for(;++b<g.length;){const y=g[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function rE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function 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],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},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 QN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:nN},disable:{null:[]},document:{42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:q1},flow:{35:uN,42:pl,45:[tE,pl],60:fN,61:tE,95:pl,96:X1,126:X1},flowInitial:{[-2]:vf,[-1]:vf,32:vf},insideSpan:{null:[Af,WN]},string:{38:W1,92:Y1},text:{[-5]:Nf,[-4]:Nf,[-3]:Nf,33:ON,38:W1,42:Af,60:[Ik,TN],91:IN,92:[oN,Y1],93:kf,95:Af,96:qk}},Symbol.toStringTag,{value:"Module"}));function JN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:te(Z),check:te(U),consume:M,enter:I,exit:q,interrupt:te(U,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:g};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function g(se){return u=Wn(u,se),w(),u[u.length-1]!==null?[]:(he(t,0),f.events=hl(a,f.events,f),f.events)}function b(se,pe){return eO(y(se),pe)}function y(se){return ZN(u,se)}function _(){const{_bufferIndex:se,_index:pe,line:le,column:fe,offset:Te}=r;return{_bufferIndex:se,_index:pe,line:le,column:fe,offset:Te}}function S(se){s[se.line]=se.column,B()}function w(){let se;for(;r._index<u.length;){const pe=u[r._index];if(typeof pe=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<pe.length;)A(pe.charCodeAt(r._bufferIndex));else A(pe)}}function A(se){p=p(se)}function M(se){De(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,B()):se!==-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=se}function I(se,pe){const le=pe||{};return le.type=se,le.start=_(),f.events.push(["enter",le,f]),c.push(le),le}function q(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function Z(se,pe){he(se,pe.from)}function U(se,pe){pe.restore()}function te(se,pe){return le;function le(fe,Te,Ae){let ue,W,ne,v;return Array.isArray(fe)?Q(fe):"tokenize"in fe?Q([fe]):L(fe);function L(Oe){return Ge;function Ge(Ye){const nt=Ye!==null&&Oe[Ye],Pt=Ye!==null&&Oe.null,Qn=[...Array.isArray(nt)?nt:nt?[nt]:[],...Array.isArray(Pt)?Pt:Pt?[Pt]:[]];return Q(Qn)(Ye)}}function Q(Oe){return ue=Oe,W=0,Oe.length===0?Ae:O(Oe[W])}function O(Oe){return Ge;function Ge(Ye){return v=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Le():Oe.tokenize.call(pe?Object.assign(Object.create(f),pe):f,d,_e,Le)(Ye)}}function _e(Oe){return se(ne,v),Te}function Le(Oe){return v.restore(),++W<ue.length?O(ue[W]):Ae}}}function he(se,pe){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Dn(f.events,pe,f.events.length-pe,se.resolve(f.events.slice(pe),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function ye(){const se=_(),pe=f.previous,le=f.currentConstruct,fe=f.events.length,Te=Array.from(c);return{from:fe,restore:Ae};function Ae(){r=se,f.previous=pe,f.currentConstruct=le,f.events.length=fe,c=Te,B()}}function B(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function ZN(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function eO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
12
12
  `;break}case-3:{u=`\r
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:`
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:`
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:`
13
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function tO(e){const r={constructs:z1([QN,...(e||{}).extensions||[]]),content:s(Ck),defined:[],document:s(vk),flow:s(qN),lazy:{},string:s(GN),text:s(XN)};return r;function s(a){return u;function u(c){return JN(r,a,c)}}}function nO(e){for(;!K1(e););return e}const iE=/[\0\t\n\r]/g;function rO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,g,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(iE.lastIndex=g,f=iE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(g);break}if(y===10&&g===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<b&&(d.push(a.slice(g,b)),e+=b-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const iO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sO(e){return e.replace(iO,oO)}function oO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return j1(n.slice(a?2:1),a?16:10)}return wf(n)||e}const sE={}.hasOwnProperty;function aO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),uO(n)(nO(tO(n).document().write(rO()(e,t,!0))))}function uO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(ps),blockQuote:a(Pt),characterEscape:ye,characterReference:ye,codeFenced:a(Qn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Qn,u),codeText:a(hs,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(ni),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(wi),hardBreakEscape:a(Ci),hardBreakTrailing:a(Ci),htmlFlow:a(ri,u),htmlFlowData:ye,htmlText:a(ri,u),htmlTextData:ye,image:a(we),label:u,link:a(Ue),listItem:a(Qe),listItemValue:b,listOrdered:a(je,g),listUnordered:a(je),paragraph:a(ct),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ps),strong:a(Et),thematicBreak:a(vt)},exit:{atxHeading:d(),atxHeadingSequence:Z,autolink:d(),autolinkEmail:nt,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:Le,characterReferenceMarkerNumeric:Le,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(w),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:B,codeIndented:d(A),codeText:d(Te),codeTextData:B,data:B,definition:d(),definitionDestinationString:q,definitionLabelString:M,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(le),htmlFlowData:B,htmlText:d(fe),htmlTextData:B,image:d(ue),label:ne,labelText:W,lineEnding:se,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:v,resourceTitleString:L,resource:Q,setextHeading:d(he),setextHeadingLineSequence:te,setextHeadingText:U,strong:d(),thematicBreak:d()}};oE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let oe={type:"root",children:[]};const Re={stack:[oe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},$e=[];let Je=-1;for(;++Je<J.length;)if(J[Je][1].type==="listOrdered"||J[Je][1].type==="listUnordered")if(J[Je][0]==="enter")$e.push(Je);else{const jt=$e.pop();Je=s(J,jt,Je)}for(Je=-1;++Je<J.length;){const jt=t[J[Je][0]];sE.call(jt,J[Je][1].type)&&jt[J[Je][1].type].call(Object.assign({sliceSerialize:J[Je][2].sliceSerialize},Re),J[Je][1])}if(Re.tokenStack.length>0){const jt=Re.tokenStack[Re.tokenStack.length-1];(jt[1]||aE).call(Re,void 0,jt[0])}for(oe.position={start:gi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:gi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)oe=t.transforms[Je](oe)||oe;return oe}function s(J,oe,Re){let $e=oe-1,Je=-1,jt=!1,Jn,Zn,Ai,ms;for(;++$e<=Re;){const tn=J[$e];switch(tn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tn[0]==="enter"?Je++:Je--,ms=void 0;break}case"lineEndingBlank":{tn[0]==="enter"&&(Jn&&!ms&&!Je&&!Ai&&(Ai=$e),ms=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ms=void 0}if(!Je&&tn[0]==="enter"&&tn[1].type==="listItemPrefix"||Je===-1&&tn[0]==="exit"&&(tn[1].type==="listUnordered"||tn[1].type==="listOrdered")){if(Jn){let Br=$e;for(Zn=void 0;Br--;){const Un=J[Br];if(Un[1].type==="lineEnding"||Un[1].type==="lineEndingBlank"){if(Un[0]==="exit")continue;Zn&&(J[Zn][1].type="lineEndingBlank",jt=!0),Un[1].type="lineEnding",Zn=Br}else if(!(Un[1].type==="linePrefix"||Un[1].type==="blockQuotePrefix"||Un[1].type==="blockQuotePrefixWhitespace"||Un[1].type==="blockQuoteMarker"||Un[1].type==="listItemIndent"))break}Ai&&(!Zn||Ai<Zn)&&(Jn._spread=!0),Jn.end=Object.assign({},Zn?J[Zn][1].start:tn[1].end),J.splice(Zn||$e,0,["exit",Jn,tn[2]]),$e++,Re++}if(tn[1].type==="listItemPrefix"){const Br={type:"listItem",_spread:!1,start:Object.assign({},tn[1].start),end:void 0};Jn=Br,J.splice($e,0,["enter",Br,tn[2]]),$e++,Re++,Ai=void 0,ms=!0}}}return J[oe][1]._spread=jt,Re}function a(J,oe){return Re;function Re($e){c.call(this,J($e),$e),oe&&oe.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,oe,Re){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([oe,Re||void 0]),J.position={start:gi(oe.start),end:void 0}}function d(J){return oe;function oe(Re){J&&J.call(this,Re),f.call(this,Re)}}function f(J,oe){const Re=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==J.type&&(oe?oe.call(this,J,$e[0]):($e[1]||aE).call(this,J,$e[0]));else throw new Error("Cannot close `"+J.type+"` ("+pa({start:J.start,end:J.end})+"): it’s not open");Re.position.end=gi(J.end)}function p(){return xf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=J}function _(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J.replace(/(\r?\n|\r)$/g,"")}function M(J){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=cr(this.sliceSerialize(J)).toLowerCase()}function I(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.title=J}function q(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.url=J}function Z(J){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Re=this.sliceSerialize(J).length;oe.depth=Re}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function te(J){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function he(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(J){const Re=this.stack[this.stack.length-1].children;let $e=Re[Re.length-1];(!$e||$e.type!=="text")&&($e=En(),$e.position={start:gi(J.start),end:void 0},Re.push($e)),this.stack.push($e)}function B(J){const oe=this.stack.pop();oe.value+=this.sliceSerialize(J),oe.position.end=gi(J.end)}function se(J){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=oe.children[oe.children.length-1];Re.position.end=gi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(ye.call(this,J),B.call(this,J))}function pe(){this.data.atHardBreak=!0}function le(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function fe(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function Te(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function Ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=oe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ue(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=oe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(J){const oe=this.sliceSerialize(J),Re=this.stack[this.stack.length-2];Re.label=sO(oe),Re.identifier=cr(oe).toLowerCase()}function ne(){const J=this.stack[this.stack.length-1],oe=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const $e=J.children;Re.children=$e}else Re.alt=oe}function v(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.url=J}function L(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.title=J}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(J){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=cr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Le(J){this.data.characterReferenceType=J.type}function Oe(J){const oe=this.sliceSerialize(J),Re=this.data.characterReferenceType;let $e;Re?($e=j1(oe,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=wf(oe);const Je=this.stack[this.stack.length-1];Je.value+=$e}function Ge(J){const oe=this.stack.pop();oe.position.end=gi(J.end)}function Ye(J){B.call(this,J);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(J)}function nt(J){B.call(this,J);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(J)}function Pt(){return{type:"blockquote",children:[]}}function Qn(){return{type:"code",lang:null,meta:null,value:""}}function hs(){return{type:"inlineCode",value:""}}function ni(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wi(){return{type:"emphasis",children:[]}}function ps(){return{type:"heading",depth:0,children:[]}}function Ci(){return{type:"break"}}function ri(){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(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Qe(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function ct(){return{type:"paragraph",children:[]}}function Et(){return{type:"strong",children:[]}}function En(){return{type:"text",value:""}}function vt(){return{type:"thematicBreak"}}}function gi(e){return{line:e.line,column:e.column,offset:e.offset}}function oE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?oE(e,r):lO(e,r)}}function lO(e,t){let n;for(n in t)if(sE.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 aE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pa({start:t.start,end:t.end})+") is still open")}function cO(e){const t=this;t.parser=n;function n(r){return aO(r,be(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function dO(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 fO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
14
+ `}]}function hO(e,t){const n=t.value?t.value+`
15
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function pO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ys(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function EO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function TO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uE(e,t);const s={src:Ys(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function bO(e,t){const n={src:Ys(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 _O(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function SO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uE(e,t);const s={href:Ys(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function xO(e,t){const n={href:Ys(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wO(e,t,n){const r=e.all(t),s=n?CO(n):lE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
16
+ `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
17
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function CO(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=lE(n[r])}return t}function lE(e){const t=e.spread;return t==null?e.children.length>1:t}function AO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function vO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function NO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=kr(t.children[1]),d=cl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function PO(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 g=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};g&&(_.children=e.all(g),e.patch(g,_),_=e.applyData(g,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function IO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cE=9,dE=32;function RO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(fE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(fE(t.slice(s),s>0,!1)),a.join("")}function fE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===cE||a===dE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===cE||a===dE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function LO(e,t){const n={type:"text",value:RO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function DO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const MO={blockquote:dO,break:fO,code:hO,delete:pO,emphasis:mO,footnoteReference:gO,heading:EO,html:yO,imageReference:TO,image:bO,inlineCode:_O,linkReference:SO,link:xO,listItem:wO,list:AO,paragraph:vO,root:kO,strong:NO,table:OO,tableCell:IO,tableRow:PO,text:LO,thematicBreak:DO,toml:ml,yaml:ml,definition:ml,footnoteDefinition:ml};function ml(){}const hE=-1,gl=0,Ta=1,El=2,Of=3,Pf=4,If=5,Rf=6,pE=7,mE=8,gE=typeof self=="object"?self:globalThis,FO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case gl:case hE:return n(u,s);case Ta:{const c=n([],s);for(const d of u)c.push(r(d));return c}case El:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case Of:return n(new Date(u),s);case Pf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case If:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Rf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case pE:{const{name:c,message:d}=u;return n(new gE[c](d),s)}case mE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new gE[a](u),s)};return r},EE=e=>FO(new Map,e)(0),Gs="",{toString:BO}={},{keys:UO}=Object,ba=e=>{const t=typeof e;if(t!=="object"||!e)return[gl,t];const n=BO.call(e).slice(8,-1);switch(n){case"Array":return[Ta,Gs];case"Object":return[El,Gs];case"Date":return[Of,Gs];case"RegExp":return[Pf,Gs];case"Map":return[If,Gs];case"Set":return[Rf,Gs];case"DataView":return[Ta,n]}return n.includes("Array")?[Ta,n]:n.includes("Error")?[pE,n]:[El,n]},yl=([e,t])=>e===gl&&(t==="function"||t==="symbol"),HO=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ba(u);switch(c){case gl:{let p=u;switch(d){case"bigint":c=mE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([hE],u)}return s([c,p],u)}case Ta:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],g=s([c,p],u);for(const b of u)p.push(a(b));return g}case El:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],g=s([c,p],u);for(const b of UO(u))(e||!yl(ba(u[b])))&&p.push([a(b),a(u[b])]);return g}case Of:return s([c,u.toISOString()],u);case Pf:{const{source:p,flags:g}=u;return s([c,{source:p,flags:g}],u)}case If:{const p=[],g=s([c,p],u);for(const[b,y]of u)(e||!(yl(ba(b))||yl(ba(y))))&&p.push([a(b),a(y)]);return g}case Rf:{const p=[],g=s([c,p],u);for(const b of u)(e||!yl(ba(b)))&&p.push(a(b));return g}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},yE=(e,{json:t,lossy:n}={})=>{const r=[];return HO(!(t||n),!!t,new Map,r)(e),r},ns=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?EE(yE(e,t)):structuredClone(e):(e,t)=>EE(yE(e,t));function zO(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 jO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $O(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||zO,r=e.options.footnoteBackLabel||jO,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),g=String(f.identifier).toUpperCase(),b=Ys(g.toLowerCase());let y=0;const _=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++y<=S;){_.length>0&&_.push({type:"text",value:" "});let M=typeof n=="string"?n:n(d,y);typeof M=="string"&&(M={type:"text",value:M}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const w=p[p.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const M=w.children[w.children.length-1];M&&M.type==="text"?M.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(..._)}else p.push(..._);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:be(F({},ns(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
18
18
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{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:`
19
+ `}]}}const Tl=(function(e){if(e==null)return WO;if(typeof e=="function")return bl(e);if(typeof e=="object")return Array.isArray(e)?VO(e):qO(e);if(typeof e=="string")return YO(e);throw new Error("Expected function, string, or object as test")});function VO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tl(e[n]);return bl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function qO(e){const t=e;return bl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function YO(e){return bl(t);function t(n){return n&&n.type===e}}function bl(e){return t;function t(n,r,s){return!!(GO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function WO(){return!0}function GO(e){return e!==null&&typeof e=="object"&&"type"in e}function CB(e){return e}const TE=[],XO=!0,Lf=!1,KO="skip";function bE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Tl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const y=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=TE,_,S,w;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=QO(n(d,p)),y[0]===Lf))return y;if("children"in d&&d.children){const A=d;if(A.children&&y[0]!==KO)for(S=(r?A.children.length:-1)+u,w=p.concat(A);S>-1&&S<A.children.length;){const M=A.children[S];if(_=c(M,S,w)(),_[0]===Lf)return _;S=typeof _[1]=="number"?_[1]:S+u}}return y}}}function QO(e){return Array.isArray(e)?e:typeof e=="number"?[XO,e]:e==null?TE:[e]}function _l(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),bE(e,a,c,s);function c(d,f){const p=f[f.length-1],g=p?p.children.indexOf(d):void 0;return u(d,g,p)}}const Df={}.hasOwnProperty,JO={};function ZO(e,t){const n=t||JO,r=new Map,s=new Map,a=new Map,u=F(F({},MO),n.handlers),c={all:f,applyData:t3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:e3,wrap:r3};return _l(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();g.has(b)||g.set(b,p)}}),c;function d(p,g){const b=p.type,y=c.handlers[b];if(Df.call(c.handlers,b)&&y)return y(c,p,g);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const S=p,{children:w}=S,A=sn(S,["children"]),M=ns(A);return M.children=c.all(p),M}return ns(p)}return(c.options.unknownHandler||n3)(c,p,g)}function f(p){const g=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=_E(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=_E(S.value))}Array.isArray(_)?g.push(..._):g.push(_)}}}return g}}function e3(e,t){e.position&&(t.position=O1(e))}function t3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ns(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function n3(e,t){const n=t.data||{},r="value"in t&&!(Df.call(n,"hProperties")||Df.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 r3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
20
20
  `});++r<e.length;)r&&n.push({type:"text",value:`
21
21
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
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`
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(`
26
- `),y=h.stack.split(`
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=`
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=`
30
- Error generating stack: `+y.message+`
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:`
36
- `,encode:["`"]},c.current()))),E()}return p+=c.move(`
22
+ `}),n}function _E(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function SE(e,t){const n=ZO(e,t),r=n.one(e,void 0),s=$O(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
23
+ `},s),a}function i3(e,t){return e&&"run"in e?function(n,r){return Ze(this,null,function*(){const s=SE(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return SE(n,F({file:r},e||t))}}function xE(e){if(e)throw e}var Mf,wE;function s3(){if(wE)return Mf;wE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!g)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Mf=function d(){var f,p,g,b,y,_,S=arguments[0],w=1,A=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<A;++w)if(f=arguments[w],f!=null)for(p in f)g=c(S,p),b=c(f,p),S!==b&&(M&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=g&&s(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(M,_,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},Mf}var o3=s3();const Ff=Xe(o3);function Bf(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 a3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<s.length;)(f[g]===null||f[g]===void 0)&&(f[g]=s[g]);s=f,p?u3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function u3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Nr={basename:l3,dirname:c3,extname:d3,join:f3,sep:"/"};function l3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_a(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function c3(e){if(_a(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){_a(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function f3(...e){let t=-1,n;for(;++t<e.length;)_a(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":h3(n)}function h3(e){_a(e);const t=e.codePointAt(0)===47;let n=p3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function p3(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function _a(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const m3={cwd:g3};function g3(){return"/"}function Uf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function E3(e){if(typeof e=="string")e=new URL(e);else if(!Uf(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 y3(e)}function y3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Hf=["history","path","basename","stem","extname","dirname"];class CE{constructor(t){let n;t?Uf(t)?n={path:t}:typeof t=="string"||T3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":m3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Hf.length;){const a=Hf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Hf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Nr.basename(this.path):void 0}set basename(t){jf(t,"basename"),zf(t,"basename"),this.path=Nr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nr.dirname(this.path):void 0}set dirname(t){AE(this.basename,"dirname"),this.path=Nr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nr.extname(this.path):void 0}set extname(t){if(zf(t,"extname"),AE(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=Nr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uf(t)&&(t=E3(t)),jf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nr.basename(this.path,this.extname):void 0}set stem(t){jf(t,"stem"),zf(t,"stem"),this.path=Nr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new un(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zf(e,t){if(e&&e.includes(Nr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nr.sep+"`")}function jf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function AE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function T3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const b3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),_3={}.hasOwnProperty;class $f extends b3{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=a3()}copy(){const t=new $f;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ff(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Yf("data",this.frozen),this.namespace[t]=n,this):_3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Yf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Sl(t),r=this.parser||this.Parser;return Vf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vf("process",this.parser||this.Parser),qf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=Sl(t),d=r.parse(c);r.run(d,c,function(p,g,b){if(p||!g||!b)return f(p);const y=g,_=r.stringify(y,b);w3(_)?b.value=_:b.result=_,f(p,b)});function f(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),Vf("processSync",this.parser||this.Parser),qf("processSync",this.compiler||this.Compiler),this.process(t,s),kE("processSync","process",n),r;function s(a,u){n=!0,xE(a),r=u}}run(t,n,r){vE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Sl(n);s.run(t,d,f);function f(p,g,b){const y=g||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),kE("runSync","run",r),s;function a(u,c){xE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Sl(n),s=this.compiler||this.Compiler;return qf("stringify",s),vE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Yf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...g]=f;d(p,g)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Ff(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const g=f[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===f){b=g;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const S=r[b][1];Bf(S)&&Bf(y)&&(y=Ff(!0,S,y)),r[b]=[f,y,..._]}}}}const S3=new $f().freeze();function Vf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yf(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 vE(e){if(!Bf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sl(e){return x3(e)?e:new CE(e)}function x3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w3(e){return typeof e=="string"||C3(e)}function C3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const A3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",NE=[],OE={allowDangerousHtml:!0},v3=/^(https?|ircs?|mailto|xmpp)$/i,k3=[{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 PE(e){const t=N3(e),n=O3(e);return P3(t.runSync(t.parse(n),n),e)}function N3(e){const t=e.rehypePlugins||NE,n=e.remarkPlugins||NE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),OE):OE;return S3().use(cO).use(n).use(i3,r).use(t)}function O3(e){const t=e.children||"",n=new CE;return typeof t=="string"&&(n.value=t),n}function P3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||I3;for(const p of k3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+A3+p.id,void 0);return _l(e,f),nk(e,{Fragment:C.Fragment,components:s,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function f(p,g,b){if(p.type==="raw"&&b&&typeof g=="number")return u?b.children.splice(g,1):b.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Sf)if(Object.hasOwn(Sf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=Sf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function I3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||v3.test(e.slice(0,t))?e:""}const IE=/[#.]/g;function R3(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){IE.lastIndex=s;const c=IE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function RE(e,t,n){const r=n?F3(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=R3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,L3(u))c.unshift(u);else for(const[g,b]of Object.entries(u))D3(e,d.properties,g,b)}for(const f of c)Wf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function L3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function D3(e,t,n,r){const s=gf(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=x1(r):s.commaSeparated?a=c1(r):s.commaOrSpaceSeparated?a=x1(c1(r).join(" ")):a=LE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?M3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(LE(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Wf(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)Wf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Wf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function LE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||da(n)===da(t)))return!0}return n}function M3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function F3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const B3=["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"],U3=RE(ll,"div"),H3=RE(Vs,"g",B3);function z3(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=DE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=DE(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 DE(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 rs={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/"},ME={}.hasOwnProperty,j3=Object.prototype;function $3(e,t){const n=t||{};return Gf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Vs:ll,verbose:n.verbose||!1},e)}function Gf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},xl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:FE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=z3(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"},xl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},xl(e,r,n),n}default:return n=V3(e,t),n}}function FE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Gf(e,t[n]);r.push(s)}return r}function V3(e,t){const n=e.schema;e.schema=t.namespaceURI===rs.svg?Vs:ll;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ME.call(j3,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?H3:U3)(t.tagName,s,FE(e,t.childNodes));if(xl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Xs(d.startTag),p=d&&d.endTag&&Xs(d.endTag),g=Gf(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function xl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=q3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function q3(e,t,n){const r=Xs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ME.call(n.attrs,u)&&(a[gf(e.schema,u).property]=Xs(n.attrs[u]));n.startTag;const c=Xs(n.startTag),d=n.endTag?Xs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Xs(e){const t=BE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=BE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function BE(e){return e.line&&e.column?e:void 0}class Sa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Sa.prototype.property={},Sa.prototype.normal={},Sa.prototype.space=null;function UE(e,t){const n={},r={};let s=-1;for(;++s<e.length;)Object.assign(n,e[s].property),Object.assign(r,e[s].normal);return new Sa(n,r,t)}function Xf(e){return e.toLowerCase()}class Gn{constructor(t,n){this.property=t,this.attribute=n}}Gn.prototype.space=null,Gn.prototype.boolean=!1,Gn.prototype.booleanish=!1,Gn.prototype.overloadedBoolean=!1,Gn.prototype.number=!1,Gn.prototype.commaSeparated=!1,Gn.prototype.spaceSeparated=!1,Gn.prototype.commaOrSpaceSeparated=!1,Gn.prototype.mustUseProperty=!1,Gn.prototype.defined=!1;let Y3=0;const Ve=is(),zt=is(),HE=is(),ge=is(),pt=is(),Ks=is(),Mn=is();function is(){return fd(2,++Y3)}const Kf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:zt,commaOrSpaceSeparated:Mn,commaSeparated:Ks,number:ge,overloadedBoolean:HE,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),Qf=Object.keys(Kf);class Jf extends Gn{constructor(t,n,r,s){let a=-1;if(super(t,n),zE(this,"space",s),typeof r=="number")for(;++a<Qf.length;){const u=Qf[a];zE(this,Qf[a],(r&Kf[u])===Kf[u])}}}Jf.prototype.defined=!0;function zE(e,t,n){n&&(e[t]=n)}const W3={}.hasOwnProperty;function Qs(e){const t={},n={};let r;for(r in e.properties)if(W3.call(e.properties,r)){const s=e.properties[r],a=new Jf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Xf(r)]=r,n[Xf(a.attribute)]=r}return new Sa(t,n,e.space)}const jE=Qs({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}}),$E=Qs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function VE(e,t){return t in e?e[t]:t}function qE(e,t){return VE(e,t.toLowerCase())}const YE=Qs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:qE,properties:{xmlns:null,xmlnsXLink:null}}),WE=Qs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:pt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:ge,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:pt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:zt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),G3=Qs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:qE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ks,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:pt,autoFocus:Ve,autoPlay:Ve,blocking:pt,capture:null,charSet:null,checked:Ve,cite:null,className:pt,cols:ge,colSpan:null,content:null,contentEditable:zt,controls:Ve,controlsList:pt,coords:ge|Ks,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:HE,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:pt,height:ge,hidden:Ve,high:ge,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ve,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,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:Ve,optimum:ge,pattern:null,ping:pt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:pt,required:Ve,reversed:Ve,rows:ge,rowSpan:ge,sandbox:pt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:zt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:ge,security:null,unselectable:null}}),X3=Qs({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:VE,properties:{about:Mn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Ks,g2:Ks,glyphName:Ks,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),K3=/^data[-\w.:]+$/i,GE=/-[a-z]/g,Q3=/[A-Z]/g;function J3(e,t){const n=Xf(t);let r=t,s=Gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&K3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(GE,eP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!GE.test(a)){let u=a.replace(Q3,Z3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Jf}return new s(r,t)}function Z3(e){return"-"+e.toLowerCase()}function eP(e){return e.charAt(1).toUpperCase()}const tP=UE([$E,jE,YE,WE,G3],"html"),XE=UE([$E,jE,YE,WE,X3],"svg"),KE={}.hasOwnProperty;function QE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&KE.call(s,e)){const d=String(s[e]);u=KE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const nP={},rP={}.hasOwnProperty,JE=QE("type",{handlers:{root:sP,element:cP,text:uP,comment:lP,doctype:aP}});function iP(e,t){const r=(t||nP).space;return JE(e,r==="svg"?XE:tP)}function sP(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Zf(e.children,n,t),Js(e,n),n}function oP(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Zf(e.children,n,t),Js(e,n),n}function aP(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Js(e,t),t}function uP(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Js(e,t),t}function lP(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Js(e,t),t}function cP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=XE);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&rP.call(e.properties,a)){const d=dP(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:rs[u],childNodes:[],parentNode:null};return c.childNodes=Zf(e.children,c,r),Js(e,c),e.tagName==="template"&&e.content&&(c.content=oP(e.content,r)),c}function dP(e,t,n){const r=J3(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?d1(n):w1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=rs[r.space]}return s}function Zf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=JE(e[r],n);a.parentNode=t,s.push(a)}return s}function Js(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 fP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],hP=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="�";var k;(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"})(k||(k={}));const Cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ZE(e){return e>=55296&&e<=57343}function pP(e){return e>=56320&&e<=57343}function mP(e,t){return(e-55296)*1024+9216+t}function ey(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ty(e){return e>=64976&&e<=65007||hP.has(e)}var ee;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ee||(ee={}));const gP=65536;class EP{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=gP,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(pP(n))return this.pos++,this._addGap(),mP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ee.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.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,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ZE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ey(t)?this._err(ee.controlCharacterInInputStream):ty(t)&&this._err(ee.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var 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 ny(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 yP=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))),TP=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 bP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=TP.get(e))!==null&&t!==void 0?t:e}var Xt;(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"})(Xt||(Xt={}));const _P=32;var Ei;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ei||(Ei={}));function eh(e){return e>=Xt.ZERO&&e<=Xt.NINE}function SP(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function xP(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||eh(e)}function wP(e){return e===Xt.EQUALS||xP(e)}var Kt;(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"})(Kt||(Kt={}));var Xr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xr||(Xr={}));class CP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xr.Strict}startEntity(t){this.decodeMode=t,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kt.EntityStart:return t.charCodeAt(n)===Xt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(t,n));case Kt.NumericStart:return this.stateNumericStart(t,n);case Kt.NumericDecimal:return this.stateNumericDecimal(t,n);case Kt.NumericHex:return this.stateNumericHex(t,n);case Kt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_P)===Xt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(eh(s)||SP(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(eh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xt.SEMI)this.consumed+=1;else if(this.decodeMode===Xr.Strict)return 0;return this.emitCodePoint(bP(this.result),this.consumed),this.errors&&(t!==Xt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&Ei.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=AP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Xr.Attribute&&(a===0||wP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&Ei.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&Ei.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Ei.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==Xr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}}function AP(e,t,n,r){const s=(t&Ei.BRANCH_LENGTH)>>7,a=t&Ei.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var 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 ss;(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"})(ss||(ss={}));var Xn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Xn||(Xn={}));var V;(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"})(V||(V={}));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 vP=new Map([[V.A,m.A],[V.ADDRESS,m.ADDRESS],[V.ANNOTATION_XML,m.ANNOTATION_XML],[V.APPLET,m.APPLET],[V.AREA,m.AREA],[V.ARTICLE,m.ARTICLE],[V.ASIDE,m.ASIDE],[V.B,m.B],[V.BASE,m.BASE],[V.BASEFONT,m.BASEFONT],[V.BGSOUND,m.BGSOUND],[V.BIG,m.BIG],[V.BLOCKQUOTE,m.BLOCKQUOTE],[V.BODY,m.BODY],[V.BR,m.BR],[V.BUTTON,m.BUTTON],[V.CAPTION,m.CAPTION],[V.CENTER,m.CENTER],[V.CODE,m.CODE],[V.COL,m.COL],[V.COLGROUP,m.COLGROUP],[V.DD,m.DD],[V.DESC,m.DESC],[V.DETAILS,m.DETAILS],[V.DIALOG,m.DIALOG],[V.DIR,m.DIR],[V.DIV,m.DIV],[V.DL,m.DL],[V.DT,m.DT],[V.EM,m.EM],[V.EMBED,m.EMBED],[V.FIELDSET,m.FIELDSET],[V.FIGCAPTION,m.FIGCAPTION],[V.FIGURE,m.FIGURE],[V.FONT,m.FONT],[V.FOOTER,m.FOOTER],[V.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[V.FORM,m.FORM],[V.FRAME,m.FRAME],[V.FRAMESET,m.FRAMESET],[V.H1,m.H1],[V.H2,m.H2],[V.H3,m.H3],[V.H4,m.H4],[V.H5,m.H5],[V.H6,m.H6],[V.HEAD,m.HEAD],[V.HEADER,m.HEADER],[V.HGROUP,m.HGROUP],[V.HR,m.HR],[V.HTML,m.HTML],[V.I,m.I],[V.IMG,m.IMG],[V.IMAGE,m.IMAGE],[V.INPUT,m.INPUT],[V.IFRAME,m.IFRAME],[V.KEYGEN,m.KEYGEN],[V.LABEL,m.LABEL],[V.LI,m.LI],[V.LINK,m.LINK],[V.LISTING,m.LISTING],[V.MAIN,m.MAIN],[V.MALIGNMARK,m.MALIGNMARK],[V.MARQUEE,m.MARQUEE],[V.MATH,m.MATH],[V.MENU,m.MENU],[V.META,m.META],[V.MGLYPH,m.MGLYPH],[V.MI,m.MI],[V.MO,m.MO],[V.MN,m.MN],[V.MS,m.MS],[V.MTEXT,m.MTEXT],[V.NAV,m.NAV],[V.NOBR,m.NOBR],[V.NOFRAMES,m.NOFRAMES],[V.NOEMBED,m.NOEMBED],[V.NOSCRIPT,m.NOSCRIPT],[V.OBJECT,m.OBJECT],[V.OL,m.OL],[V.OPTGROUP,m.OPTGROUP],[V.OPTION,m.OPTION],[V.P,m.P],[V.PARAM,m.PARAM],[V.PLAINTEXT,m.PLAINTEXT],[V.PRE,m.PRE],[V.RB,m.RB],[V.RP,m.RP],[V.RT,m.RT],[V.RTC,m.RTC],[V.RUBY,m.RUBY],[V.S,m.S],[V.SCRIPT,m.SCRIPT],[V.SEARCH,m.SEARCH],[V.SECTION,m.SECTION],[V.SELECT,m.SELECT],[V.SOURCE,m.SOURCE],[V.SMALL,m.SMALL],[V.SPAN,m.SPAN],[V.STRIKE,m.STRIKE],[V.STRONG,m.STRONG],[V.STYLE,m.STYLE],[V.SUB,m.SUB],[V.SUMMARY,m.SUMMARY],[V.SUP,m.SUP],[V.TABLE,m.TABLE],[V.TBODY,m.TBODY],[V.TEMPLATE,m.TEMPLATE],[V.TEXTAREA,m.TEXTAREA],[V.TFOOT,m.TFOOT],[V.TD,m.TD],[V.TH,m.TH],[V.THEAD,m.THEAD],[V.TITLE,m.TITLE],[V.TR,m.TR],[V.TRACK,m.TRACK],[V.TT,m.TT],[V.U,m.U],[V.UL,m.UL],[V.SVG,m.SVG],[V.VAR,m.VAR],[V.WBR,m.WBR],[V.XMP,m.XMP]]);function Zs(e){var t;return(t=vP.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const ce=m,kP={[ie.HTML]:new Set([ce.ADDRESS,ce.APPLET,ce.AREA,ce.ARTICLE,ce.ASIDE,ce.BASE,ce.BASEFONT,ce.BGSOUND,ce.BLOCKQUOTE,ce.BODY,ce.BR,ce.BUTTON,ce.CAPTION,ce.CENTER,ce.COL,ce.COLGROUP,ce.DD,ce.DETAILS,ce.DIR,ce.DIV,ce.DL,ce.DT,ce.EMBED,ce.FIELDSET,ce.FIGCAPTION,ce.FIGURE,ce.FOOTER,ce.FORM,ce.FRAME,ce.FRAMESET,ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6,ce.HEAD,ce.HEADER,ce.HGROUP,ce.HR,ce.HTML,ce.IFRAME,ce.IMG,ce.INPUT,ce.LI,ce.LINK,ce.LISTING,ce.MAIN,ce.MARQUEE,ce.MENU,ce.META,ce.NAV,ce.NOEMBED,ce.NOFRAMES,ce.NOSCRIPT,ce.OBJECT,ce.OL,ce.P,ce.PARAM,ce.PLAINTEXT,ce.PRE,ce.SCRIPT,ce.SECTION,ce.SELECT,ce.SOURCE,ce.STYLE,ce.SUMMARY,ce.TABLE,ce.TBODY,ce.TD,ce.TEMPLATE,ce.TEXTAREA,ce.TFOOT,ce.TH,ce.THEAD,ce.TITLE,ce.TR,ce.TRACK,ce.UL,ce.WBR,ce.XMP]),[ie.MATHML]:new Set([ce.MI,ce.MO,ce.MN,ce.MS,ce.MTEXT,ce.ANNOTATION_XML]),[ie.SVG]:new Set([ce.TITLE,ce.FOREIGN_OBJECT,ce.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},th=new Set([ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6]);V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.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 Dt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function NP(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function xa(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function OP(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function yi(e){return OP(e)||xa(e)}function ry(e){return yi(e)||NP(e)}function wl(e){return e+32}function iy(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function sy(e){return iy(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function PP(e){return e===k.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:ZE(e)?ee.surrogateCharacterReference:ty(e)?ee.noncharacterCharacterReference:ey(e)||e===k.CARRIAGE_RETURN?ee.controlCharacterReference:null}class IP{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 EP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new CP(yP,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=PP(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type: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(ny(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ee.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Zs(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case 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=iy(t)?We.WHITESPACE_CHARACTER:t===k.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()?Xr.Attribute:Xr.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 k.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(yi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(yi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.tagName+=xt;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(xa(t)?wl(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){yi(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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case k.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===k.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){yi(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 k.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case k.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){yi(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===k.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.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 k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:yi(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){yi(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(Cn.SCRIPT,!1)&&sy(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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 k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.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(Cn.SCRIPT,!1)&&sy(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ee.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(xa(t)?wl(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Cn.DASH_DASH,!0)?(this._createCommentToken(Cn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(Cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Cn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(Cn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(Cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ee.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 k.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ee.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 k.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=xt;break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ee.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case k.EOF:{this._err(ee.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 k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ee.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 k.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ee.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(xa(t))this._createDoctypeToken(String.fromCharCode(wl(t))),this.state=N.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ee.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=N.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.name+=xt;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(xa(t)?wl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Cn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Cn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=xt;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=xt;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=xt;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=xt;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.NULL:{this._err(ee.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ee.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=N.DATA;break}case k.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(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ry(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ry(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const oy=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),ay=new Set([...oy,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Cl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),RP=new Set([...Cl,m.OL,m.UL]),LP=new Set([...Cl,m.BUTTON]),uy=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),ly=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),DP=new Set([m.TR,m.TEMPLATE,m.HTML]),MP=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),FP=new Set([m.TABLE,m.TEMPLATE,m.HTML]),BP=new Set([m.TD,m.TH]);class UP{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 s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==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(th,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(BP,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(FP,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(MP,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(DP,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 s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ie.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ie.SVG:{if(ly.has(s))return!1;break}case ie.MATHML:{if(uy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Cl)}hasInListItemScope(t){return this.hasInDynamicScope(t,RP)}hasInButtonScope(t){return this.hasInDynamicScope(t,LP)}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(th.has(n))return!0;if(Cl.has(n))return!1;break}case ie.SVG:{if(ly.has(n))return!1;break}case ie.MATHML:{if(uy.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&&oy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ay.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ay.has(this.currentTagId);)this.pop()}}const nh=3;var Or;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Or||(Or={}));const cy={type:Or.Marker};class HP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Or.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<nh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<nh)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=nh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(cy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Or.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Or.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(cy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Or.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Or.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Or.Element&&n.element===t)}}const Ti={createDocument(){return{nodeName:"#document",mode:Xn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ti.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(Ti.isTextNode(n)){n.value+=t;return}}Ti.appendChild(e,Ti.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ti.isTextNode(r)?r.value+=t:Ti.insertBefore(e,Ti.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=F(F({},e.sourceCodeLocation),t)}},dy="html",zP="about:legacy-compat",jP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",fy=["+//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//"],$P=[...fy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],VP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),hy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],qP=[...hy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function py(e,t){return t.some(n=>e.startsWith(n))}function YP(e){return e.name===dy&&e.publicId===null&&(e.systemId===null||e.systemId===zP)}function WP(e){if(e.name!==dy)return Xn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===jP)return Xn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),VP.has(n))return Xn.QUIRKS;let r=t===null?$P:fy;if(py(n,r))return Xn.QUIRKS;if(r=t===null?hy:qP,py(n,r))return Xn.LIMITED_QUIRKS}return Xn.NO_QUIRKS}const my={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},GP="definitionurl",XP="definitionURL",KP=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])),QP=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}]]),JP=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])),ZP=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 eI(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ss.COLOR||r===ss.SIZE||r===ss.FACE)||ZP.has(t)}function gy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===GP){e.attrs[t].name=XP;break}}function Ey(e){for(let t=0;t<e.attrs.length;t++){const n=KP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function rh(e){for(let t=0;t<e.attrs.length;t++){const n=QP.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 tI(e){const t=JP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Zs(e.tagName))}function nI(e,t){return t===ie.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function rI(e,t,n){if(t===ie.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ss.ENCODING){const s=n[r].value.toLowerCase();return s===my.TEXT_HTML||s===my.APPLICATION_XML}}return t===ie.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function iI(e,t,n,r){return(!r||r===ie.HTML)&&rI(e,t,n)||(!r||r===ie.MATHML)&&nI(e,t)}const sI="hidden",oI=8,aI=3;var R;(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"})(R||(R={}));const uI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),Ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ti,onParseError:null};class by{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=R.INITIAL,this.originalInsertionMode=R.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=F(F({},Ty),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 IP(this.options,this),this.activeFormattingElements=new HP(this.treeAdapter),this.fragmentContextID=r?Zs(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new UP(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=F(F({},Ty),n);t!=null||(t=r.treeAdapter.createElement(V.TEMPLATE,ie.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(R.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:uI,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===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=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.IN_BODY,this.tokenizer.state=Dt.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)===V.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=Dt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Dt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Dt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Dt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&be(F({},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(V.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 s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===We.END_TAG&&s===n.tagName?{endTag:F({},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)===V.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 s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return iI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Or.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R.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=R.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=R.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=R.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=R.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=R.IN_TABLE;return}case m.BODY:{this.insertionMode=R.IN_BODY;return}case m.FRAMESET:{this.insertionMode=R.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?R.AFTER_HEAD:R.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=R.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=R.IN_HEAD;return}break}}this.insertionMode=R.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=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(t){return yy.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 kP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BR(this,t);return}switch(this.insertionMode){case R.INITIAL:{wa(this,t);break}case R.BEFORE_HTML:{Ca(this,t);break}case R.BEFORE_HEAD:{Aa(this,t);break}case R.IN_HEAD:{va(this,t);break}case R.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case R.AFTER_HEAD:{Na(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{Sy(this,t);break}case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{ah(this,t);break}case R.IN_TABLE_TEXT:{Oy(this,t);break}case R.IN_COLUMN_GROUP:{kl(this,t);break}case R.AFTER_BODY:{Pl(this,t);break}case R.AFTER_AFTER_BODY:{Il(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FR(this,t);return}switch(this.insertionMode){case R.INITIAL:{wa(this,t);break}case R.BEFORE_HTML:{Ca(this,t);break}case R.BEFORE_HEAD:{Aa(this,t);break}case R.IN_HEAD:{va(this,t);break}case R.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case R.AFTER_HEAD:{Na(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{ah(this,t);break}case R.IN_COLUMN_GROUP:{kl(this,t);break}case R.AFTER_BODY:{Pl(this,t);break}case R.AFTER_AFTER_BODY:{Il(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){sh(this,t);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{sh(this,t);break}case R.IN_TABLE_TEXT:{Ia(this,t);break}case R.AFTER_BODY:{mI(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{gI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{EI(this,t);break}case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case R.IN_TABLE_TEXT:{Ia(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?UR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{wa(this,t);break}case R.BEFORE_HTML:{yI(this,t);break}case R.BEFORE_HEAD:{bI(this,t);break}case R.IN_HEAD:{dr(this,t);break}case R.IN_HEAD_NO_SCRIPT:{xI(this,t);break}case R.AFTER_HEAD:{CI(this,t);break}case R.IN_BODY:{cn(this,t);break}case R.IN_TABLE:{eo(this,t);break}case R.IN_TABLE_TEXT:{Ia(this,t);break}case R.IN_CAPTION:{_R(this,t);break}case R.IN_COLUMN_GROUP:{uh(this,t);break}case R.IN_TABLE_BODY:{Nl(this,t);break}case R.IN_ROW:{Ol(this,t);break}case R.IN_CELL:{wR(this,t);break}case R.IN_SELECT:{Ry(this,t);break}case R.IN_SELECT_IN_TABLE:{AR(this,t);break}case R.IN_TEMPLATE:{kR(this,t);break}case R.AFTER_BODY:{OR(this,t);break}case R.IN_FRAMESET:{PR(this,t);break}case R.AFTER_FRAMESET:{RR(this,t);break}case R.AFTER_AFTER_BODY:{DR(this,t);break}case R.AFTER_AFTER_FRAMESET:{MR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?HR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{wa(this,t);break}case R.BEFORE_HTML:{TI(this,t);break}case R.BEFORE_HEAD:{_I(this,t);break}case R.IN_HEAD:{SI(this,t);break}case R.IN_HEAD_NO_SCRIPT:{wI(this,t);break}case R.AFTER_HEAD:{AI(this,t);break}case R.IN_BODY:{vl(this,t);break}case R.TEXT:{dR(this,t);break}case R.IN_TABLE:{Oa(this,t);break}case R.IN_TABLE_TEXT:{Ia(this,t);break}case R.IN_CAPTION:{SR(this,t);break}case R.IN_COLUMN_GROUP:{xR(this,t);break}case R.IN_TABLE_BODY:{lh(this,t);break}case R.IN_ROW:{Iy(this,t);break}case R.IN_CELL:{CR(this,t);break}case R.IN_SELECT:{Ly(this,t);break}case R.IN_SELECT_IN_TABLE:{vR(this,t);break}case R.IN_TEMPLATE:{NR(this,t);break}case R.AFTER_BODY:{My(this,t);break}case R.IN_FRAMESET:{IR(this,t);break}case R.AFTER_FRAMESET:{LR(this,t);break}case R.AFTER_AFTER_BODY:{Il(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{wa(this,t);break}case R.BEFORE_HTML:{Ca(this,t);break}case R.BEFORE_HEAD:{Aa(this,t);break}case R.IN_HEAD:{va(this,t);break}case R.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case R.AFTER_HEAD:{Na(this,t);break}case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{ky(this,t);break}case R.TEXT:{fR(this,t);break}case R.IN_TABLE_TEXT:{Ia(this,t);break}case R.IN_TEMPLATE:{Dy(this,t);break}case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{oh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.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 R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{this._insertCharacters(t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{_y(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{ah(this,t);break}case R.IN_TABLE_TEXT:{Ny(this,t);break}}}}function lI(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):vy(e,t),n}function cI(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function dI(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=aI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=fI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function fI(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 hI(e,t,n){const r=e.treeAdapter.getTagName(t),s=Zs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===m.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function ih(e,t){for(let n=0;n<oI;n++){const r=lI(e,t);if(!r)break;const s=cI(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=dI(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&hI(e,u,a),pI(e,s,r)}}function sh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gI(e,t){e._appendCommentNode(t,e.document)}function oh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function EI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Xn.QUIRKS:WP(t);YP(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function wa(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Xn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function yI(e,t){t.tagID===m.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=R.BEFORE_HEAD):Ca(e,t)}function TI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ca(e,t)}function Ca(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function bI(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break}default:Aa(e,t)}}function _I(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Aa(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Aa(e,t){e._insertFakeElement(V.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case m.HTML:{cn(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,Dt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Dt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=R.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Dt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Dt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:va(e,t)}}function SI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=R.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{va(e,t);break}case m.TEMPLATE:{os(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function os(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function va(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function xI(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{dr(e,t);break}case m.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:ka(e,t)}}function wI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case m.BR:{ka(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function ka(e,t){const n=t.type===We.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function CI(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=R.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Na(e,t)}}function AI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Na(e,t);break}case m.TEMPLATE:{os(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Na(e,t){e._insertFakeElement(V.BODY,m.BODY),e.insertionMode=R.IN_BODY,Al(e,t)}function Al(e,t){switch(t.type){case We.CHARACTER:{Sy(e,t);break}case We.WHITESPACE_CHARACTER:{_y(e,t);break}case We.COMMENT:{sh(e,t);break}case We.START_TAG:{cn(e,t);break}case We.END_TAG:{vl(e,t);break}case We.EOF:{ky(e,t);break}}}function _y(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Sy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function kI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function NI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=R.IN_FRAMESET)}function OI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function PI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&th.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function II(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function RI(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 LI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===m.LI&&s===m.LI||(n===m.DD||n===m.DT)&&(s===m.DD||s===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==m.ADDRESS&&s!==m.DIV&&s!==m.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function DI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Dt.PLAINTEXT}function MI(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 FI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(ih(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 BI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(ih(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function zI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Xn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function xy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wy(e){const t=ny(e,ss.TYPE);return t!=null&&t.toLowerCase()===sI}function jI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),wy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function $I(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function VI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qI(e,t){t.tagName=V.IMG,t.tagID=m.IMG,xy(e,t)}function YI(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function WI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function GI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function Cy(e,t){e._switchToTextParsing(t,Dt.RAWTEXT)}function XI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function KI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function QI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function JI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ie.HTML)}function ZI(e,t){e._reconstructActiveFormattingElements(),gy(t),rh(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function eR(e,t){e._reconstructActiveFormattingElements(),Ey(t),rh(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function Ay(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function cn(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:{BI(e,t);break}case m.A:{FI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PI(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:{OI(e,t);break}case m.LI:case m.DD:case m.DT:{LI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{xy(e,t);break}case m.HR:{VI(e,t);break}case m.RB:case m.RTC:{QI(e,t);break}case m.RT:case m.RP:{JI(e,t);break}case m.PRE:case m.LISTING:{II(e,t);break}case m.XMP:{WI(e,t);break}case m.SVG:{eR(e,t);break}case m.HTML:{vI(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:{dr(e,t);break}case m.BODY:{kI(e,t);break}case m.FORM:{RI(e,t);break}case m.NOBR:{UI(e,t);break}case m.MATH:{ZI(e,t);break}case m.TABLE:{zI(e,t);break}case m.INPUT:{jI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{$I(e,t);break}case m.IMAGE:{qI(e,t);break}case m.BUTTON:{MI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{HI(e,t);break}case m.IFRAME:{GI(e,t);break}case m.SELECT:{XI(e,t);break}case m.OPTION:case m.OPTGROUP:{KI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Cy(e,t);break}case m.FRAMESET:{NI(e,t);break}case m.TEXTAREA:{YI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Cy(e,t):Ay(e,t);break}case m.PLAINTEXT:{DI(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:Ay(e,t)}}function tR(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function nR(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=R.AFTER_BODY,My(e,t))}function rR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function sR(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(V.P,m.P),e._closePElement()}function oR(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function aR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function uR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function cR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function vy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function vl(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:{ih(e,t);break}case m.P:{sR(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:{rR(e,t);break}case m.LI:{oR(e);break}case m.DD:case m.DT:{aR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{uR(e);break}case m.BR:{cR(e);break}case m.BODY:{tR(e,t);break}case m.HTML:{nR(e,t);break}case m.FORM:{iR(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{lR(e,t);break}case m.TEMPLATE:{os(e,t);break}default:vy(e,t)}}function ky(e,t){e.tmplInsertionModeStack.length>0?Dy(e,t):oh(e,t)}function dR(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 fR(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ah(e,t){if(e.openElements.currentTagId!==void 0&&yy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case We.CHARACTER:{Oy(e,t);break}case We.WHITESPACE_CHARACTER:{Ny(e,t);break}}else Pa(e,t)}function hR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=R.IN_CAPTION}function pR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function mR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,m.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,uh(e,t)}function gR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=R.IN_TABLE_BODY}function ER(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,m.TBODY),e.insertionMode=R.IN_TABLE_BODY,Nl(e,t)}function yR(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function TR(e,t){wy(t)?e._appendElement(t,ie.HTML):Pa(e,t),t.ackSelfClosing=!0}function bR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function eo(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{ER(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{dr(e,t);break}case m.COL:{mR(e,t);break}case m.FORM:{bR(e,t);break}case m.TABLE:{yR(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{gR(e,t);break}case m.INPUT:{TR(e,t);break}case m.CAPTION:{hR(e,t);break}case m.COLGROUP:{pR(e,t);break}default:Pa(e,t)}}function Oa(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{os(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:Pa(e,t)}}function Pa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Al(e,t),e.fosterParentingEnabled=n}function Ny(e,t){e.pendingCharacterTokens.push(t)}function Oy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ia(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Pa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Py=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function _R(e,t){const n=t.tagID;Py.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,eo(e,t)):cn(e,t)}function SR(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=R.IN_TABLE,n===m.TABLE&&Oa(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:vl(e,t)}}function uh(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{dr(e,t);break}default:kl(e,t)}}function xR(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case m.TEMPLATE:{os(e,t);break}case m.COL:break;default:kl(e,t)}}function kl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function Nl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=R.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,m.TR),e.insertionMode=R.IN_ROW,Ol(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=R.IN_TABLE,eo(e,t));break}default:eo(e,t)}}function lh(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=R.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Oa(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:Oa(e,t)}}function Ol(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=R.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=R.IN_TABLE_BODY,Nl(e,t));break}default:eo(e,t)}}function Iy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,lh(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=R.IN_TABLE_BODY,lh(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:Oa(e,t)}}function wR(e,t){const n=t.tagID;Py.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Ol(e,t)):cn(e,t)}function CR(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=R.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Iy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:vl(e,t)}}function Ry(e,t){switch(t.tagID){case m.HTML:{cn(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:{dr(e,t);break}}}function Ly(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:{os(e,t);break}}}function AR(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)):Ry(e,t)}function vR(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)):Ly(e,t)}function kR(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:{dr(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,eo(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,uh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,Nl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,Ol(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,cn(e,t)}}function NR(e,t){t.tagID===m.TEMPLATE&&os(e,t)}function Dy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):oh(e,t)}function OR(e,t){t.tagID===m.HTML?cn(e,t):Pl(e,t)}function My(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=R.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 Pl(e,t)}function Pl(e,t){e.insertionMode=R.IN_BODY,Al(e,t)}function PR(e,t){switch(t.tagID){case m.HTML:{cn(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:{dr(e,t);break}}}function IR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function RR(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.NOFRAMES:{dr(e,t);break}}}function LR(e,t){t.tagID===m.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function DR(e,t){t.tagID===m.HTML?cn(e,t):Il(e,t)}function Il(e,t){e.insertionMode=R.IN_BODY,Al(e,t)}function MR(e,t){switch(t.tagID){case m.HTML:{cn(e,t);break}case m.NOFRAMES:{dr(e,t);break}}}function FR(e,t){t.chars=xt,e._insertCharacters(t)}function BR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Fy(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 UR(e,t){if(eI(t))Fy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?gy(t):r===ie.SVG&&(tI(t),Ey(t)),rh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function HR(e,t){if(t.tagID===m.P||t.tagID===m.BR){Fy(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 s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR;const zR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),By={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Uy(e,t){const n=JR(e),r=QE("type",{handlers:{root:$R,element:VR,text:qR,comment:zy,doctype:YR,raw:GR},unknown:XR}),s={parser:n?new by(By):by.getFragmentParser(void 0,By),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),to(s,kr());const a=n?s.parser.document:s.parser.getFragment(),u=$3(a,{file:s.options.file});return s.stitches&&_l(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const g=f.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Hy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function $R(e,t){Hy(e.children,t)}function VR(e,t){KR(e,t),Hy(e.children,t),QR(e,t)}function qR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function YR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ra(e)};to(t,kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WR(e,t){t.stitches=!0;const n=ZR(e);if("children"in e&&"children"in n){const r=Uy({type:"root",children:e.children},t.options);n.children=r.children}zy({type:"comment",value:{stitch:n}},t)}function zy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Ra(e)};to(t,kr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function GR(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,jy(t,kr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(zR,"&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 XR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))WR(n,t);else{let r="";throw jR.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 to(e,t){jy(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=Dt.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 jy(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===Dt.PLAINTEXT)return;to(t,kr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:rs.html;s===rs.html&&n==="svg"&&(s=rs.svg);const a=iP(be(F({},e),{children:[]}),{space:s===rs.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function QR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&fP.includes(n)||t.parser.tokenizer.state===Dt.PLAINTEXT)return;to(t,cl(e));const r={type:We.END_TAG,tagName:n,tagID:Zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dt.RCDATA||t.parser.tokenizer.state===Dt.RAWTEXT||t.parser.tokenizer.state===Dt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dt.DATA)}function JR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ra(e){const t=kr(e)||{line:void 0,column:void 0,offset:void 0},n=cl(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 ZR(e){return"children"in e?ns(be(F({},e),{children:[]})):ns(e)}function $y(e){return function(t,n){return Uy(t,be(F({},e),{file:n}))}}const as=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Vy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...as,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...as],h2:[["className","sr-only"]],img:[...as,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...as,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...as],table:[...as],ul:[...as,["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"]},bi={}.hasOwnProperty;function eL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},Vy),t):Vy,stack:[]},s=qy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function qy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return tL(e,n);case"doctype":return nL(e,n);case"element":return rL(e,n);case"root":return iL(e,n);case"text":return sL(e,n)}}}function tL(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 La(a,t),a}}function nL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return La(n,t),n}}function rL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Yy(e,t.children),s=oL(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&&bi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return La(u,t),u}function iL(e,t){const r={type:"root",children:Yy(e,t.children)};return La(r,t),r}function sL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return La(r,t),r}function Yy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=qy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function oL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&bi.call(r,n)?r[n]:void 0,u=r&&bi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(bi.call(c,f)){const p=c[f];let g=Wy(e,Xy(a,f),f,p);g==null&&(g=Wy(e,Xy(u,f),f,p)),g!=null&&(d[f]=g)}if(s&&bi.call(s,n)){const p=s[n];for(f in p)bi.call(p,f)&&!bi.call(d,f)&&(d[f]=p[f])}return d}function Wy(e,t,n,r){return t?Array.isArray(r)?aL(e,t,n,r):Gy(e,t,n,r):void 0}function aL(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Gy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Gy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&uL(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uL(e,t,n){const r=e.schema.protocols&&bi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function La(e,t){const n=O1(t);t.data&&(e.data=ns(t.data)),n&&(e.position=n)}function Xy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function lL(e){return function(t){return eL(t,e)}}const Ky=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return C.jsx("a",be(F(F({className:K(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},cL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=ft();return!e&&!t?null:C.jsx("div",{className:K(n,`${j}-disclaimer`),children:t?C.jsx(PE,{rehypePlugins:[$y,lL],components:{ul:({children:s})=>C.jsx("ul",{className:K(n,`${j}-ul`),children:s}),ol:({children:s})=>C.jsx("ol",{className:K(n,`${j}-ol`),children:s}),li:({children:s})=>C.jsx("li",{className:K(n,`${j}-li`),children:s}),a:({href:s,title:a,children:u})=>C.jsx(Ky,{globalClassName:n,openLinksInNewTab:r,href:s,title:a,children:u}),img:({src:s,alt:a})=>C.jsx("img",{className:K(n,`${j}-disclaimer-image`),src:s,alt:a}),p:({children:s})=>C.jsx("p",{className:K(n,`${j}-disclaimer-text`),children:s}),span:({children:s})=>C.jsx("span",{className:K(n,`${j}-disclaimer-text-span`),children:s})},children:t}):C.jsx("p",{className:K(n,`${j}-disclaimer-text`),children:e})})},ch=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Gr(),{setImageFile:u}=la(),{logger:c,globalClassName:d,searchConfig:f,features:p}=ft(),g=z.useRef(null),b=z.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!s||!1,w=S?"connected":"disconnected",A=t||!S,M=()=>a?new Promise((U,te)=>{const he=new FileReader;he.readAsDataURL(a),he.onload=()=>U(he.result),he.onerror=ye=>te(ye)}):Promise.resolve(""),I=U=>Ze(null,null,function*(){var ye;if(A)return;const te=10*1024*1024,he=(ye=U.target.files)==null?void 0:ye[0];if(he){if(he.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(he)}}),q=()=>{u(null),b.current&&(b.current.value="")},Z=U=>Ze(null,null,function*(){var ye;U.preventDefault();const te=(((ye=g.current)==null?void 0:ye.value)||"").trim();let he="";try{he=yield M()}catch(B){c==null||c.error("Error converting file to base64:",B),alert("There was an error processing the file. Please try again.");return}te&&(q(),g.current.value="",r(te,he))});return C.jsxs("div",{className:K(d,e,n,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&C.jsxs("div",{className:K(d,n,`${j}-image-file-preview`),children:[C.jsx("img",{className:K(d,n,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),C.jsx("span",{className:K(d,n,`${j}-image-file-name`),title:_,children:_}),C.jsx(cf,{className:K(n,"clear-attachment"),label:"Remove image",onClick:q})]}),C.jsxs("form",{className:K(d,e,n,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:Z,children:[C.jsx("span",{role:"status",className:K(`${j}-connection-status-icon`,w)}),y&&C.jsxs("div",{role:"button",className:K(d,e,n,A&&"disabled",`${j}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[C.jsx("label",{className:K(d,e,n,A&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:C.jsx(vv,{})}),C.jsx("input",{className:K(d,e,n,`${j}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:A,onInput:I})]}),C.jsx("input",{className:K(d,e,n,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),C.jsx(Iv,{isLoading:A}),C.jsx(Nv,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),C.jsx(cL,{})]})};function dL(e){return e==null?[]:Array.isArray(e)?e:[e]}var fL=e=>e!=null&&typeof e=="object",Rl=e=>typeof e=="string",no=e=>typeof e=="function",hL=e=>e==null,pL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),mL=e=>Object.prototype.toString.call(e),Qy=Function.prototype.toString,gL=Qy.call(Object),EL=e=>{if(!fL(e)||mL(e)!="[object Object]"||bL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=pL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Qy.call(n)==gL},yL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,TL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,bL=e=>yL(e)||TL(e),_L=e=>e(),SL=()=>{},dh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function fh(e){if(!EL(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=fh(s))}return n}function hh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function xL(e,t){if(e==null)throw new Error(t())}var wL=Object.defineProperty,CL=(e,t,n)=>t in e?wL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ph=(e,t,n)=>CL(e,typeof t!="symbol"?t+"":t,n),Jy=()=>{},Ll=e=>typeof e=="object"&&e!==null,AL=e=>e?"":void 0,vL=e=>e?"true":void 0,kL=1,NL=9,OL=11,Qt=e=>Ll(e)&&e.nodeType===kL&&typeof e.nodeName=="string",Dl=e=>Ll(e)&&e.nodeType===NL,PL=e=>Ll(e)&&e===e.window,Zy=e=>Qt(e)?e.localName||"":"#document";function IL(e){return["html","body","#document"].includes(Zy(e))}var RL=e=>Ll(e)&&e.nodeType!==void 0,us=e=>RL(e)&&e.nodeType===OL&&"host"in e,LL=e=>Qt(e)&&e.localName==="input",DL=e=>Qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Da(e){if(!e)return!1;const t=e.getRootNode();return io(t)===e}var ML=/(textarea|select)/;function FL(e){if(e==null||!Qt(e))return!1;try{return LL(e)&&e.selectionStart!=null||ML.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ml(e,t){var r;if(!e||!t||!Qt(e)||!Qt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&us(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Pr(e){var t;return Dl(e)?e:PL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function BL(e){return Pr(e).documentElement}function ro(e){var t,n,r;return us(e)?ro(e.host):Dl(e)?(t=e.defaultView)!=null?t:window:Qt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function io(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 UL(e){if(Zy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||us(e)&&e.host||BL(e);return us(t)?t.host:t}function mh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Dl(t)||us(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var gh=new WeakMap;function Fl(e){return gh.has(e)||gh.set(e,ro(e).getComputedStyle(e)),gh.get(e)}var Eh=new Set(["menu","listbox","dialog","grid","tree","region"]),HL=e=>Eh.has(e),eT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function tT(e,t){const n=new Set,r=mh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=eT(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(g&&HL(g)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function nT(e,t){const n=mh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=eT(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";g&&Eh.has(g)&&!b&&(t(p),s(p))}}}};s(e)}function zL(e){const t=new Set;return nT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function jL(e){const t=e.getAttribute("role");return!!(t&&Eh.has(t))}function $L(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function VL(e){var t;return $L(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function qL(e){if(!e.id)return!1;const t=mh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&jL(e))}var yh=()=>typeof document!="undefined";function YL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Th=e=>yh()&&e.test(YL()),WL=e=>yh()&&e.test(navigator.vendor),rT=()=>yh()&&!!navigator.maxTouchPoints,GL=()=>Th(/^iPhone/i),XL=()=>Th(/^iPad/i)||bh()&&navigator.maxTouchPoints>1,iT=()=>GL()||XL(),KL=()=>bh()||iT(),bh=()=>Th(/^Mac/i),QL=()=>KL()&&WL(/apple/i);function JL(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Kr(e){var n;const t=JL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ZL=e=>e.button===0,e6=e=>e.button===2||bh()&&e.ctrlKey&&e.button===0,fr=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},sT=e=>Qt(e)&&e.tagName==="IFRAME",t6=/^(audio|video|details)$/;function oT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var n6=e=>!Number.isNaN(oT(e)),r6=e=>oT(e)<0;function i6(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 aT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=i6(d,t);if(f){const p=Array.from(f.querySelectorAll(Bl)).filter(n),g=u.get(d);if(g!==void 0){const b=g+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}s.push(...p)}}return r}var Bl="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",uT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Bl));(n==!0||n=="if-empty"&&s.length===0)&&Qt(e)&&Qr(e)&&s.unshift(e);const u=[];for(const c of s)if(Qr(c)){if(sT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...uT(d,{getShadowRoot:r}));continue}u.push(c)}return r?aT(u,r,Qr):u};function Qr(e){return!Qt(e)||e.closest("[inert]")?!1:e.matches(Bl)&&DL(e)}function Ma(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Bl));n&&ls(e)&&s.unshift(e);const a=[];for(const u of s)if(ls(u)){if(sT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Ma(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=aT(a,r,ls);return!u.length&&n?s:u}return!a.length&&n?s:a}function ls(e){return Qt(e)&&e.tabIndex>0?!0:Qr(e)&&!r6(e)}function s6(e,t={}){const n=Ma(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function o6(e,t={}){const{current:n,getShadowRoot:r}=t,s=Ma(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:io(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Fa(e){return e.tabIndex<0&&(t6.test(e.localName)||FL(e))&&!n6(e)?0:e.tabIndex}function lT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Ma(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var a6=class nx{constructor(){ph(this,"id",null),ph(this,"fn_cleanup"),ph(this,"cleanup",()=>{this.cancel()})}static create(){return new nx}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 An(e){const t=a6.create();return t.request(e),t.cleanup}function u6(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function _h(e){const t=UL(e);return IL(t)?Pr(t).body:Qt(t)&&d6(t)?t:_h(t)}var l6=/auto|scroll|overlay|hidden|clip/,c6=new Set(["inline","contents"]);function d6(e){const t=ro(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return l6.test(n+s+r)&&!c6.has(a)}function f6(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[g,b]=s6(e,{includeContainer:!0,getShadowRoot:a}),y=o6(c,{current:n,getShadowRoot:a}),_=!g&&!b;f.shiftKey&&Da(y)?(s==null||s(),p=b):f.shiftKey&&(Da(g)||_)?p=n:!f.shiftKey&&Da(n)?(s==null||s(),p=g):!f.shiftKey&&(Da(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return fr(u,"keydown",d,!0)}function h6(e,t){const c=t,{defer:n,triggerElement:r}=c,s=sn(c,["defer","triggerElement"]),a=n?An:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(f6(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Ul(e,t){if(!e)return Jy;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function p6(e,t,n){if(!e)return Jy;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 m6(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 g6(e,t){const{timeout:n,rootNode:r}=t,s=ro(r),a=Pr(r),u=new s.AbortController;return m6(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var E6=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),y6=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,cT=e=>{const t={};let n;for(;n=y6.exec(e);)t[n[1]]=n[2];return t},T6=(e,t)=>{if(Rl(e)){if(Rl(t))return`${e};${t}`;e=cT(e)}else Rl(t)&&(t=cT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function hr(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=dh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=E6(t[s],n[s]);continue}if(s==="style"){t[s]=T6(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function AB(e){return e}var so=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(so||{}),Sh="__init__";function b6(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Pr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>io(t()),a=u=>t().getElementById(u);return be(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Da,getById:a})}var xh={exports:{}},vn={},wh={exports:{}},Ch={};var dT;function _6(){return dT||(dT=1,(function(e){function t(W,ne){var v=W.length;W.push(ne);e:for(;0<v;){var L=v-1>>>1,Q=W[L];if(0<s(Q,ne))W[L]=ne,W[v]=Q,v=L;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var ne=W[0],v=W.pop();if(v!==ne){W[0]=v;e:for(var L=0,Q=W.length,O=Q>>>1;L<O;){var _e=2*(L+1)-1,Le=W[_e],Oe=_e+1,Ge=W[Oe];if(0>s(Le,v))Oe<Q&&0>s(Ge,Le)?(W[L]=Ge,W[Oe]=v,L=Oe):(W[L]=Le,W[_e]=v,L=_e);else if(Oe<Q&&0>s(Ge,v))W[L]=Ge,W[Oe]=v,L=Oe;else break e}}return ne}function s(W,ne){var v=W.sortIndex-ne.sortIndex;return v!==0?v:W.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,g=null,b=3,y=!1,_=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(W){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=W)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function q(W){if(S=!1,I(W),!_)if(n(d)!==null)_=!0,Ae(Z);else{var ne=n(f);ne!==null&&ue(q,ne.startTime-W)}}function Z(W,ne){_=!1,S&&(S=!1,A(he),he=-1),y=!0;var v=b;try{for(I(ne),g=n(d);g!==null&&(!(g.expirationTime>ne)||W&&!se());){var L=g.callback;if(typeof L=="function"){g.callback=null,b=g.priorityLevel;var Q=L(g.expirationTime<=ne);ne=e.unstable_now(),typeof Q=="function"?g.callback=Q:g===n(d)&&r(d),I(ne)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var _e=n(f);_e!==null&&ue(q,_e.startTime-ne),O=!1}return O}finally{g=null,b=v,y=!1}}var U=!1,te=null,he=-1,ye=5,B=-1;function se(){return!(e.unstable_now()-B<ye)}function pe(){if(te!==null){var W=e.unstable_now();B=W;var ne=!0;try{ne=te(!0,W)}finally{ne?le():(U=!1,te=null)}}else U=!1}var le;if(typeof M=="function")le=function(){M(pe)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,Te=fe.port2;fe.port1.onmessage=pe,le=function(){Te.postMessage(null)}}else le=function(){w(pe,0)};function Ae(W){te=W,U||(U=!0,le())}function ue(W,ne){he=w(function(){W(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(W){W.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Ae(Z))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var v=b;b=ne;try{return W()}finally{b=v}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,ne){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var v=b;b=W;try{return ne()}finally{b=v}},e.unstable_scheduleCallback=function(W,ne,v){var L=e.unstable_now();switch(typeof v=="object"&&v!==null?(v=v.delay,v=typeof v=="number"&&0<v?L+v:L):v=L,W){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=v+Q,W={id:p++,callback:ne,priorityLevel:W,startTime:v,expirationTime:Q,sortIndex:-1},v>L?(W.sortIndex=v,t(f,W),n(d)===null&&W===n(f)&&(S?(A(he),he=-1):S=!0,ue(q,v-L))):(W.sortIndex=Q,t(d,W),_||y||(_=!0,Ae(Z))),W},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(W){var ne=b;return function(){var v=b;b=ne;try{return W.apply(this,arguments)}finally{b=v}}}})(Ch)),Ch}var fT;function S6(){return fT||(fT=1,wh.exports=_6()),wh.exports}var hT;function x6(){if(hT)return vn;hT=1;var e=Ns(),t=S6();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function b(i){return d.call(g,i)?!0:d.call(p,i)?!1:f.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function S(i,o,l,h,E,T,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=x}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){w[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];w[o]=new S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){w[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){w[i]=new S(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){w[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){w[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){w[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){w[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){w[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(A,M);w[o]=new S(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(A,M);w[o]=new S(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(A,M);w[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){w[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){w[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,l,h){var E=w.hasOwnProperty(o)?w[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var q=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Z=Symbol.for("react.element"),U=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),se=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),W=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var v=Object.assign,L;function Q(i){if(L===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);L=o&&o[1]||""}return`
25
+ `+L+i}var O=!1;function _e(i,o){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(X){var h=X}Reflect.construct(i,[],o)}else{try{o.call()}catch(X){h=X}i.call(o.prototype)}else{try{throw Error()}catch(X){h=X}i()}}catch(X){if(X&&h&&typeof X.stack=="string"){for(var E=X.stack.split(`
26
+ `),T=h.stack.split(`
27
+ `),x=E.length-1,P=T.length-1;1<=x&&0<=P&&E[x]!==T[P];)P--;for(;1<=x&&0<=P;x--,P--)if(E[x]!==T[P]){if(x!==1||P!==1)do if(x--,P--,0>P||E[x]!==T[P]){var D=`
28
+ `+E[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=P);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Le(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 U:return"Portal";case ye:return"Profiler";case he:return"StrictMode";case le:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case B:return(i._context.displayName||"Context")+".Provider";case pe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return o=i.displayName||null,o!==null?o:Oe(i.type)||"Memo";case Ae:o=i._payload,i=i._init;try{return Oe(i(o))}catch(l){}}return null}function Ge(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(o);case 8:return o===he?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function nt(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Pt(i){var o=nt(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,T.call(this,x)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Qn(i){i._valueTracker||(i._valueTracker=Pt(i))}function hs(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=nt(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function ni(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function wi(i,o){var l=o.checked;return v({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ps(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Ye(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ci(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function ri(i,o){Ci(i,o);var l=Ye(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?Ue(i,o.type,l):o.hasOwnProperty("defaultValue")&&Ue(i,o.type,Ye(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function we(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Ue(i,o,l){(o!=="number"||ni(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Qe(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ct(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return v({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Et(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Ye(l)}}function En(i,o){var l=Ye(o.value),h=Ye(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function vt(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(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 oe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Re,$e=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Re=Re||document.createElement("div"),Re.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Re.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Je(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jn=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Jn.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),jt[o]=jt[i]})});function Zn(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||jt.hasOwnProperty(i)&&jt[i]?(""+o).trim():o+"px"}function Ai(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Zn(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var ms=v({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tn(i,o){if(o){if(ms[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Br(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Un=null;function fp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var hp=null,_o=null,So=null;function p_(i){if(i=mu(i)){if(typeof hp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Ac(o),hp(i.stateNode,i.type,o))}}function m_(i){_o?So?So.push(i):So=[i]:_o=i}function g_(){if(_o){var i=_o,o=So;if(So=_o=null,p_(i),o)for(i=0;i<o.length;i++)p_(o[i])}}function E_(i,o){return i(o)}function y_(){}var pp=!1;function T_(i,o,l){if(pp)return i(o,l);pp=!0;try{return E_(i,o,l)}finally{pp=!1,(_o!==null||So!==null)&&(y_(),g_())}}function Ga(i,o){var l=i.stateNode;if(l===null)return null;var h=Ac(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var mp=!1;if(c)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){mp=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch(i){mp=!1}function $M(i,o,l,h,E,T,x,P,D){var X=Array.prototype.slice.call(arguments,3);try{o.apply(l,X)}catch(ae){this.onError(ae)}}var Ka=!1,ic=null,sc=!1,gp=null,VM={onError:function(i){Ka=!0,ic=i}};function qM(i,o,l,h,E,T,x,P,D){Ka=!1,ic=null,$M.apply(VM,arguments)}function YM(i,o,l,h,E,T,x,P,D){if(qM.apply(this,arguments),Ka){if(Ka){var X=ic;Ka=!1,ic=null}else throw Error(n(198));sc||(sc=!0,gp=X)}}function gs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function b_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function __(i){if(gs(i)!==i)throw Error(n(188))}function WM(i){var o=i.alternate;if(!o){if(o=gs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return __(E),i;if(T===h)return __(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,P=E.child;P;){if(P===l){x=!0,l=E,h=T;break}if(P===h){x=!0,h=E,l=T;break}P=P.sibling}if(!x){for(P=T.child;P;){if(P===l){x=!0,l=T,h=E;break}if(P===h){x=!0,h=T,l=E;break}P=P.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:o}function S_(i){return i=WM(i),i!==null?x_(i):null}function x_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=x_(i);if(o!==null)return o;i=i.sibling}return null}var w_=t.unstable_scheduleCallback,C_=t.unstable_cancelCallback,GM=t.unstable_shouldYield,XM=t.unstable_requestPaint,Mt=t.unstable_now,KM=t.unstable_getCurrentPriorityLevel,Ep=t.unstable_ImmediatePriority,A_=t.unstable_UserBlockingPriority,oc=t.unstable_NormalPriority,QM=t.unstable_LowPriority,v_=t.unstable_IdlePriority,ac=null,Ur=null;function JM(i){if(Ur&&typeof Ur.onCommitFiberRoot=="function")try{Ur.onCommitFiberRoot(ac,i,void 0,(i.current.flags&128)===128)}catch(o){}}var gr=Math.clz32?Math.clz32:tF,ZM=Math.log,eF=Math.LN2;function tF(i){return i>>>=0,i===0?32:31-(ZM(i)/eF|0)|0}var uc=64,lc=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 cc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,x=l&268435455;if(x!==0){var P=x&~E;P!==0?h=Qa(P):(T&=x,T!==0&&(h=Qa(T)))}else x=l&~E,x!==0?h=Qa(x):T!==0&&(h=Qa(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-gr(o),E=1<<l,h|=i[l],o&=~E;return h}function nF(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-gr(T),P=1<<x,D=E[x];D===-1?((P&l)===0||(P&h)!==0)&&(E[x]=nF(P,o)):D<=o&&(i.expiredLanes|=P),T&=~P}}function yp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function k_(){var i=uc;return uc<<=1,(uc&4194240)===0&&(uc=64),i}function Tp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function Ja(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-gr(o),i[o]=l}function iF(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-gr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function bp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-gr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ut=0;function N_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var O_,_p,P_,I_,R_,Sp=!1,dc=[],vi=null,ki=null,Ni=null,Za=new Map,eu=new Map,Oi=[],sF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function L_(i,o){switch(i){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":Za.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(o.pointerId)}}function tu(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=mu(o),o!==null&&_p(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function oF(i,o,l,h,E){switch(o){case"focusin":return vi=tu(vi,i,o,l,h,E),!0;case"dragenter":return ki=tu(ki,i,o,l,h,E),!0;case"mouseover":return Ni=tu(Ni,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return Za.set(T,tu(Za.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,eu.set(T,tu(eu.get(T)||null,i,o,l,h,E)),!0}return!1}function D_(i){var o=Es(i.target);if(o!==null){var l=gs(o);if(l!==null){if(o=l.tag,o===13){if(o=b_(l),o!==null){i.blockedOn=o,R_(i.priority,function(){P_(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=wp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Un=h,l.target.dispatchEvent(h),Un=null}else return o=mu(l),o!==null&&_p(o),i.blockedOn=l,!1;o.shift()}return!0}function M_(i,o,l){fc(i)&&l.delete(o)}function aF(){Sp=!1,vi!==null&&fc(vi)&&(vi=null),ki!==null&&fc(ki)&&(ki=null),Ni!==null&&fc(Ni)&&(Ni=null),Za.forEach(M_),eu.forEach(M_)}function nu(i,o){i.blockedOn===o&&(i.blockedOn=null,Sp||(Sp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aF)))}function ru(i){function o(E){return nu(E,i)}if(0<dc.length){nu(dc[0],i);for(var l=1;l<dc.length;l++){var h=dc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(vi!==null&&nu(vi,i),ki!==null&&nu(ki,i),Ni!==null&&nu(Ni,i),Za.forEach(o),eu.forEach(o),l=0;l<Oi.length;l++)h=Oi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Oi.length&&(l=Oi[0],l.blockedOn===null);)D_(l),l.blockedOn===null&&Oi.shift()}var xo=q.ReactCurrentBatchConfig,hc=!0;function uF(i,o,l,h){var E=ut,T=xo.transition;xo.transition=null;try{ut=1,xp(i,o,l,h)}finally{ut=E,xo.transition=T}}function lF(i,o,l,h){var E=ut,T=xo.transition;xo.transition=null;try{ut=4,xp(i,o,l,h)}finally{ut=E,xo.transition=T}}function xp(i,o,l,h){if(hc){var E=wp(i,o,l,h);if(E===null)zp(i,o,h,pc,l),L_(i,h);else if(oF(E,i,o,l,h))h.stopPropagation();else if(L_(i,h),o&4&&-1<sF.indexOf(i)){for(;E!==null;){var T=mu(E);if(T!==null&&O_(T),T=wp(i,o,l,h),T===null&&zp(i,o,h,pc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else zp(i,o,h,null,l)}}var pc=null;function wp(i,o,l,h){if(pc=null,i=fp(h),i=Es(i),i!==null)if(o=gs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=b_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return pc=i,null}function F_(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(KM()){case Ep:return 1;case A_:return 4;case oc:case QM:return 16;case v_:return 536870912;default:return 16}default:return 16}}var Pi=null,Cp=null,mc=null;function B_(){if(mc)return mc;var i,o=Cp,l=o.length,h,E="value"in Pi?Pi.value:Pi.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&o[l-h]===E[T-h];h++);return mc=E.slice(i,1<h?1-h:void 0)}function gc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Ec(){return!0}function U_(){return!1}function Hn(i){function o(l,h,E,T,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=x,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(l=i[P],this[P]=l?l(T):T[P]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ec:U_,this.isPropagationStopped=U_,this}return v(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),o}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ap=Hn(wo),iu=v({},wo,{view:0,detail:0}),cF=Hn(iu),vp,kp,su,yc=v({},iu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Op,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!==su&&(su&&i.type==="mousemove"?(vp=i.screenX-su.screenX,kp=i.screenY-su.screenY):kp=vp=0,su=i),vp)},movementY:function(i){return"movementY"in i?i.movementY:kp}}),H_=Hn(yc),dF=v({},yc,{dataTransfer:0}),fF=Hn(dF),hF=v({},iu,{relatedTarget:0}),Np=Hn(hF),pF=v({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),mF=Hn(pF),gF=v({},wo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),EF=Hn(gF),yF=v({},wo,{data:0}),z_=Hn(yF),TF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bF={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"},_F={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=_F[i])?!!o[i]:!1}function Op(){return SF}var xF=v({},iu,{key:function(i){if(i.key){var o=TF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=gc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?bF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Op,charCode:function(i){return i.type==="keypress"?gc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?gc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),wF=Hn(xF),CF=v({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=Hn(CF),AF=v({},iu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),vF=Hn(AF),kF=v({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),NF=Hn(kF),OF=v({},yc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),PF=Hn(OF),IF=[9,13,27,32],Pp=c&&"CompositionEvent"in window,ou=null;c&&"documentMode"in document&&(ou=document.documentMode);var RF=c&&"TextEvent"in window&&!ou,$_=c&&(!Pp||ou&&8<ou&&11>=ou),V_=" ",q_=!1;function Y_(i,o){switch(i){case"keyup":return IF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Co=!1;function LF(i,o){switch(i){case"compositionend":return W_(o);case"keypress":return o.which!==32?null:(q_=!0,V_);case"textInput":return i=o.data,i===V_&&q_?null:i;default:return null}}function DF(i,o){if(Co)return i==="compositionend"||!Pp&&Y_(i,o)?(i=B_(),mc=Cp=Pi=null,Co=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return $_&&o.locale!=="ko"?null:o.data;default:return null}}var MF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function G_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!MF[i.type]:o==="textarea"}function X_(i,o,l,h){m_(h),o=xc(o,"onChange"),0<o.length&&(l=new Ap("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var au=null,uu=null;function FF(i){h2(i,0)}function Tc(i){var o=Oo(i);if(hs(o))return i}function BF(i,o){if(i==="change")return o}var K_=!1;if(c){var Ip;if(c){var Rp="oninput"in document;if(!Rp){var Q_=document.createElement("div");Q_.setAttribute("oninput","return;"),Rp=typeof Q_.oninput=="function"}Ip=Rp}else Ip=!1;K_=Ip&&(!document.documentMode||9<document.documentMode)}function J_(){au&&(au.detachEvent("onpropertychange",Z_),uu=au=null)}function Z_(i){if(i.propertyName==="value"&&Tc(uu)){var o=[];X_(o,uu,i,fp(i)),T_(FF,o)}}function UF(i,o,l){i==="focusin"?(J_(),au=o,uu=l,au.attachEvent("onpropertychange",Z_)):i==="focusout"&&J_()}function HF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tc(uu)}function zF(i,o){if(i==="click")return Tc(o)}function jF(i,o){if(i==="input"||i==="change")return Tc(o)}function $F(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Er=typeof Object.is=="function"?Object.is:$F;function lu(i,o){if(Er(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!Er(i[E],o[E]))return!1}return!0}function e2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function t2(i,o){var l=e2(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=e2(l)}}function n2(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?n2(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function r2(){for(var i=window,o=ni();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=ni(i.document)}return o}function Lp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function VF(i){var o=r2(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&n2(l.ownerDocument.documentElement,l)){if(h!==null&&Lp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=t2(l,T);var x=t2(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var qF=c&&"documentMode"in document&&11>=document.documentMode,Ao=null,Dp=null,cu=null,Mp=!1;function i2(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Mp||Ao==null||Ao!==ni(h)||(h=Ao,"selectionStart"in h&&Lp(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}),cu&&lu(cu,h)||(cu=h,h=xc(Dp,"onSelect"),0<h.length&&(o=new Ap("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ao)))}function bc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var vo={animationend:bc("Animation","AnimationEnd"),animationiteration:bc("Animation","AnimationIteration"),animationstart:bc("Animation","AnimationStart"),transitionend:bc("Transition","TransitionEnd")},Fp={},s2={};c&&(s2=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function _c(i){if(Fp[i])return Fp[i];if(!vo[i])return i;var o=vo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in s2)return Fp[i]=o[l];return i}var o2=_c("animationend"),a2=_c("animationiteration"),u2=_c("animationstart"),l2=_c("transitionend"),c2=new Map,d2="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 Ii(i,o){c2.set(i,o),a(o,[i])}for(var Bp=0;Bp<d2.length;Bp++){var Up=d2[Bp],YF=Up.toLowerCase(),WF=Up[0].toUpperCase()+Up.slice(1);Ii(YF,"on"+WF)}Ii(o2,"onAnimationEnd"),Ii(a2,"onAnimationIteration"),Ii(u2,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(l2,"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 du="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(" "),GF=new Set("cancel close invalid load scroll toggle".split(" ").concat(du));function f2(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,YM(h,o,void 0,i),i.currentTarget=null}function h2(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var x=h.length-1;0<=x;x--){var P=h[x],D=P.instance,X=P.currentTarget;if(P=P.listener,D!==T&&E.isPropagationStopped())break e;f2(E,P,X),T=D}else for(x=0;x<h.length;x++){if(P=h[x],D=P.instance,X=P.currentTarget,P=P.listener,D!==T&&E.isPropagationStopped())break e;f2(E,P,X),T=D}}}if(sc)throw i=gp,sc=!1,gp=null,i}function yt(i,o){var l=o[Wp];l===void 0&&(l=o[Wp]=new Set);var h=i+"__bubble";l.has(h)||(p2(o,i,2,!1),l.add(h))}function Hp(i,o,l){var h=0;o&&(h|=4),p2(l,i,h,o)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function fu(i){if(!i[Sc]){i[Sc]=!0,r.forEach(function(l){l!=="selectionchange"&&(GF.has(l)||Hp(l,!1,i),Hp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Sc]||(o[Sc]=!0,Hp("selectionchange",!1,o))}}function p2(i,o,l,h){switch(F_(o)){case 1:var E=uF;break;case 4:E=lF;break;default:E=xp}l=E.bind(null,o,l,i),E=void 0,!mp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function zp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var P=h.stateNode.containerInfo;if(P===E||P.nodeType===8&&P.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===E||D.nodeType===8&&D.parentNode===E))return;x=x.return}for(;P!==null;){if(x=Es(P),x===null)return;if(D=x.tag,D===5||D===6){h=T=x;continue e}P=P.parentNode}}h=h.return}T_(function(){var X=T,ae=fp(l),de=[];e:{var re=c2.get(i);if(re!==void 0){var xe=Ap,ve=i;switch(i){case"keypress":if(gc(l)===0)break e;case"keydown":case"keyup":xe=wF;break;case"focusin":ve="focus",xe=Np;break;case"focusout":ve="blur",xe=Np;break;case"beforeblur":case"afterblur":xe=Np;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=H_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=fF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=vF;break;case o2:case a2:case u2:xe=mF;break;case l2:xe=NF;break;case"scroll":xe=cF;break;case"wheel":xe=PF;break;case"copy":case"cut":case"paste":xe=EF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=j_}var ke=(o&4)!==0,Ft=!ke&&i==="scroll",$=ke?re!==null?re+"Capture":null:re;ke=[];for(var H=X,Y;H!==null;){Y=H;var Ee=Y.stateNode;if(Y.tag===5&&Ee!==null&&(Y=Ee,$!==null&&(Ee=Ga(H,$),Ee!=null&&ke.push(hu(H,Ee,Y)))),Ft)break;H=H.return}0<ke.length&&(re=new xe(re,ve,null,l,ae),de.push({event:re,listeners:ke}))}}if((o&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Un&&(ve=l.relatedTarget||l.fromElement)&&(Es(ve)||ve[ii]))break e;if((xe||re)&&(re=ae.window===ae?ae:(re=ae.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(ve=l.relatedTarget||l.toElement,xe=X,ve=ve?Es(ve):null,ve!==null&&(Ft=gs(ve),ve!==Ft||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(xe=null,ve=X),xe!==ve)){if(ke=H_,Ee="onMouseLeave",$="onMouseEnter",H="mouse",(i==="pointerout"||i==="pointerover")&&(ke=j_,Ee="onPointerLeave",$="onPointerEnter",H="pointer"),Ft=xe==null?re:Oo(xe),Y=ve==null?re:Oo(ve),re=new ke(Ee,H+"leave",xe,l,ae),re.target=Ft,re.relatedTarget=Y,Ee=null,Es(ae)===X&&(ke=new ke($,H+"enter",ve,l,ae),ke.target=Y,ke.relatedTarget=Ft,Ee=ke),Ft=Ee,xe&&ve)t:{for(ke=xe,$=ve,H=0,Y=ke;Y;Y=ko(Y))H++;for(Y=0,Ee=$;Ee;Ee=ko(Ee))Y++;for(;0<H-Y;)ke=ko(ke),H--;for(;0<Y-H;)$=ko($),Y--;for(;H--;){if(ke===$||$!==null&&ke===$.alternate)break t;ke=ko(ke),$=ko($)}ke=null}else ke=null;xe!==null&&m2(de,re,xe,ke,!1),ve!==null&&Ft!==null&&m2(de,Ft,ve,ke,!0)}}e:{if(re=X?Oo(X):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=BF;else if(G_(re))if(K_)Ne=jF;else{Ne=HF;var Me=UF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=zF);if(Ne&&(Ne=Ne(i,X))){X_(de,Ne,l,ae);break e}Me&&Me(i,re,X),i==="focusout"&&(Me=re._wrapperState)&&Me.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(Me=X?Oo(X):window,i){case"focusin":(G_(Me)||Me.contentEditable==="true")&&(Ao=Me,Dp=X,cu=null);break;case"focusout":cu=Dp=Ao=null;break;case"mousedown":Mp=!0;break;case"contextmenu":case"mouseup":case"dragend":Mp=!1,i2(de,l,ae);break;case"selectionchange":if(qF)break;case"keydown":case"keyup":i2(de,l,ae)}var Fe;if(Pp)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 Co?Y_(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&($_&&l.locale!=="ko"&&(Co||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Co&&(Fe=B_()):(Pi=ae,Cp="value"in Pi?Pi.value:Pi.textContent,Co=!0)),Me=xc(X,ze),0<Me.length&&(ze=new z_(ze,i,null,l,ae),de.push({event:ze,listeners:Me}),Fe?ze.data=Fe:(Fe=W_(l),Fe!==null&&(ze.data=Fe)))),(Fe=RF?LF(i,l):DF(i,l))&&(X=xc(X,"onBeforeInput"),0<X.length&&(ae=new z_("onBeforeInput","beforeinput",null,l,ae),de.push({event:ae,listeners:X}),ae.data=Fe))}h2(de,o)})}function hu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function xc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ga(i,l),T!=null&&h.unshift(hu(i,T,E)),T=Ga(i,o),T!=null&&h.push(hu(i,T,E))),i=i.return}return h}function ko(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function m2(i,o,l,h,E){for(var T=o._reactName,x=[];l!==null&&l!==h;){var P=l,D=P.alternate,X=P.stateNode;if(D!==null&&D===h)break;P.tag===5&&X!==null&&(P=X,E?(D=Ga(l,T),D!=null&&x.unshift(hu(l,D,P))):E||(D=Ga(l,T),D!=null&&x.push(hu(l,D,P)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var XF=/\r\n?/g,KF=/\u0000|\uFFFD/g;function g2(i){return(typeof i=="string"?i:""+i).replace(XF,`
29
+ `).replace(KF,"")}function wc(i,o,l){if(o=g2(o),g2(i)!==o&&l)throw Error(n(425))}function Cc(){}var jp=null,$p=null;function Vp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var qp=typeof setTimeout=="function"?setTimeout:void 0,QF=typeof clearTimeout=="function"?clearTimeout:void 0,E2=typeof Promise=="function"?Promise:void 0,JF=typeof queueMicrotask=="function"?queueMicrotask:typeof E2!="undefined"?function(i){return E2.resolve(null).then(i).catch(ZF)}:qp;function ZF(i){setTimeout(function(){throw i})}function Yp(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),ru(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);ru(o)}function Ri(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function y2(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var No=Math.random().toString(36).slice(2),Hr="__reactFiber$"+No,pu="__reactProps$"+No,ii="__reactContainer$"+No,Wp="__reactEvents$"+No,e9="__reactListeners$"+No,t9="__reactHandles$"+No;function Es(i){var o=i[Hr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ii]||l[Hr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=y2(i);i!==null;){if(l=i[Hr])return l;i=y2(i)}return o}i=l,l=i.parentNode}return null}function mu(i){return i=i[Hr]||i[ii],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Oo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Ac(i){return i[pu]||null}var Gp=[],Po=-1;function Li(i){return{current:i}}function Tt(i){0>Po||(i.current=Gp[Po],Gp[Po]=null,Po--)}function mt(i,o){Po++,Gp[Po]=i.current,i.current=o}var Di={},dn=Li(Di),kn=Li(!1),ys=Di;function Io(i,o){var l=i.type.contextTypes;if(!l)return Di;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Nn(i){return i=i.childContextTypes,i!=null}function vc(){Tt(kn),Tt(dn)}function T2(i,o,l){if(dn.current!==Di)throw Error(n(168));mt(dn,o),mt(kn,l)}function b2(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Ge(i)||"Unknown",E));return v({},l,h)}function kc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Di,ys=dn.current,mt(dn,i),mt(kn,kn.current),!0}function _2(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=b2(i,o,ys),h.__reactInternalMemoizedMergedChildContext=i,Tt(kn),Tt(dn),mt(dn,i)):Tt(kn),mt(kn,l)}var si=null,Nc=!1,Xp=!1;function S2(i){si===null?si=[i]:si.push(i)}function n9(i){Nc=!0,S2(i)}function Mi(){if(!Xp&&si!==null){Xp=!0;var i=0,o=ut;try{var l=si;for(ut=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}si=null,Nc=!1}catch(E){throw si!==null&&(si=si.slice(i+1)),w_(Ep,Mi),E}finally{ut=o,Xp=!1}}return null}var Ro=[],Lo=0,Oc=null,Pc=0,er=[],tr=0,Ts=null,oi=1,ai="";function bs(i,o){Ro[Lo++]=Pc,Ro[Lo++]=Oc,Oc=i,Pc=o}function x2(i,o,l){er[tr++]=oi,er[tr++]=ai,er[tr++]=Ts,Ts=i;var h=oi;i=ai;var E=32-gr(h)-1;h&=~(1<<E),l+=1;var T=32-gr(o)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,oi=1<<32-gr(o)+E|l<<E|h,ai=T+i}else oi=1<<T|l<<E|h,ai=i}function Kp(i){i.return!==null&&(bs(i,1),x2(i,1,0))}function Qp(i){for(;i===Oc;)Oc=Ro[--Lo],Ro[Lo]=null,Pc=Ro[--Lo],Ro[Lo]=null;for(;i===Ts;)Ts=er[--tr],er[tr]=null,ai=er[--tr],er[tr]=null,oi=er[--tr],er[tr]=null}var zn=null,jn=null,Ct=!1,yr=null;function w2(i,o){var l=sr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function C2(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,zn=i,jn=Ri(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,zn=i,jn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=Ts!==null?{id:oi,overflow:ai}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=sr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,zn=i,jn=null,!0):!1;default:return!1}}function Jp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Zp(i){if(Ct){var o=jn;if(o){var l=o;if(!C2(i,o)){if(Jp(i))throw Error(n(418));o=Ri(l.nextSibling);var h=zn;o&&C2(i,o)?w2(h,l):(i.flags=i.flags&-4097|2,Ct=!1,zn=i)}}else{if(Jp(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,zn=i}}}function A2(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;zn=i}function Ic(i){if(i!==zn)return!1;if(!Ct)return A2(i),Ct=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Vp(i.type,i.memoizedProps)),o&&(o=jn)){if(Jp(i))throw v2(),Error(n(418));for(;o;)w2(i,o),o=Ri(o.nextSibling)}if(A2(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){jn=Ri(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}jn=null}}else jn=zn?Ri(i.stateNode.nextSibling):null;return!0}function v2(){for(var i=jn;i;)i=Ri(i.nextSibling)}function Do(){jn=zn=null,Ct=!1}function em(i){yr===null?yr=[i]:yr.push(i)}var r9=q.ReactCurrentBatchConfig;function gu(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(x){var P=E.refs;x===null?delete P[T]:P[T]=x},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Rc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function k2(i){var o=i._init;return o(i._payload)}function N2(i){function o($,H){if(i){var Y=$.deletions;Y===null?($.deletions=[H],$.flags|=16):Y.push(H)}}function l($,H){if(!i)return null;for(;H!==null;)o($,H),H=H.sibling;return null}function h($,H){for($=new Map;H!==null;)H.key!==null?$.set(H.key,H):$.set(H.index,H),H=H.sibling;return $}function E($,H){return $=Vi($,H),$.index=0,$.sibling=null,$}function T($,H,Y){return $.index=Y,i?(Y=$.alternate,Y!==null?(Y=Y.index,Y<H?($.flags|=2,H):Y):($.flags|=2,H)):($.flags|=1048576,H)}function x($){return i&&$.alternate===null&&($.flags|=2),$}function P($,H,Y,Ee){return H===null||H.tag!==6?(H=qm(Y,$.mode,Ee),H.return=$,H):(H=E(H,Y),H.return=$,H)}function D($,H,Y,Ee){var Ne=Y.type;return Ne===te?ae($,H,Y.props.children,Ee,Y.key):H!==null&&(H.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&k2(Ne)===H.type)?(Ee=E(H,Y.props),Ee.ref=gu($,H,Y),Ee.return=$,Ee):(Ee=rd(Y.type,Y.key,Y.props,null,$.mode,Ee),Ee.ref=gu($,H,Y),Ee.return=$,Ee)}function X($,H,Y,Ee){return H===null||H.tag!==4||H.stateNode.containerInfo!==Y.containerInfo||H.stateNode.implementation!==Y.implementation?(H=Ym(Y,$.mode,Ee),H.return=$,H):(H=E(H,Y.children||[]),H.return=$,H)}function ae($,H,Y,Ee,Ne){return H===null||H.tag!==7?(H=ks(Y,$.mode,Ee,Ne),H.return=$,H):(H=E(H,Y),H.return=$,H)}function de($,H,Y){if(typeof H=="string"&&H!==""||typeof H=="number")return H=qm(""+H,$.mode,Y),H.return=$,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case Z:return Y=rd(H.type,H.key,H.props,null,$.mode,Y),Y.ref=gu($,null,H),Y.return=$,Y;case U:return H=Ym(H,$.mode,Y),H.return=$,H;case Ae:var Ee=H._init;return de($,Ee(H._payload),Y)}if(je(H)||ne(H))return H=ks(H,$.mode,Y,null),H.return=$,H;Rc($,H)}return null}function re($,H,Y,Ee){var Ne=H!==null?H.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Ne!==null?null:P($,H,""+Y,Ee);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Z:return Y.key===Ne?D($,H,Y,Ee):null;case U:return Y.key===Ne?X($,H,Y,Ee):null;case Ae:return Ne=Y._init,re($,H,Ne(Y._payload),Ee)}if(je(Y)||ne(Y))return Ne!==null?null:ae($,H,Y,Ee,null);Rc($,Y)}return null}function xe($,H,Y,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return $=$.get(Y)||null,P(H,$,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case Z:return $=$.get(Ee.key===null?Y:Ee.key)||null,D(H,$,Ee,Ne);case U:return $=$.get(Ee.key===null?Y:Ee.key)||null,X(H,$,Ee,Ne);case Ae:var Me=Ee._init;return xe($,H,Y,Me(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return $=$.get(Y)||null,ae(H,$,Ee,Ne,null);Rc(H,Ee)}return null}function ve($,H,Y,Ee){for(var Ne=null,Me=null,Fe=H,ze=H=0,en=null;Fe!==null&&ze<Y.length;ze++){Fe.index>ze?(en=Fe,Fe=null):en=Fe.sibling;var it=re($,Fe,Y[ze],Ee);if(it===null){Fe===null&&(Fe=en);break}i&&Fe&&it.alternate===null&&o($,Fe),H=T(it,H,ze),Me===null?Ne=it:Me.sibling=it,Me=it,Fe=en}if(ze===Y.length)return l($,Fe),Ct&&bs($,ze),Ne;if(Fe===null){for(;ze<Y.length;ze++)Fe=de($,Y[ze],Ee),Fe!==null&&(H=T(Fe,H,ze),Me===null?Ne=Fe:Me.sibling=Fe,Me=Fe);return Ct&&bs($,ze),Ne}for(Fe=h($,Fe);ze<Y.length;ze++)en=xe(Fe,$,ze,Y[ze],Ee),en!==null&&(i&&en.alternate!==null&&Fe.delete(en.key===null?ze:en.key),H=T(en,H,ze),Me===null?Ne=en:Me.sibling=en,Me=en);return i&&Fe.forEach(function(qi){return o($,qi)}),Ct&&bs($,ze),Ne}function ke($,H,Y,Ee){var Ne=ne(Y);if(typeof Ne!="function")throw Error(n(150));if(Y=Ne.call(Y),Y==null)throw Error(n(151));for(var Me=Ne=null,Fe=H,ze=H=0,en=null,it=Y.next();Fe!==null&&!it.done;ze++,it=Y.next()){Fe.index>ze?(en=Fe,Fe=null):en=Fe.sibling;var qi=re($,Fe,it.value,Ee);if(qi===null){Fe===null&&(Fe=en);break}i&&Fe&&qi.alternate===null&&o($,Fe),H=T(qi,H,ze),Me===null?Ne=qi:Me.sibling=qi,Me=qi,Fe=en}if(it.done)return l($,Fe),Ct&&bs($,ze),Ne;if(Fe===null){for(;!it.done;ze++,it=Y.next())it=de($,it.value,Ee),it!==null&&(H=T(it,H,ze),Me===null?Ne=it:Me.sibling=it,Me=it);return Ct&&bs($,ze),Ne}for(Fe=h($,Fe);!it.done;ze++,it=Y.next())it=xe(Fe,$,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Fe.delete(it.key===null?ze:it.key),H=T(it,H,ze),Me===null?Ne=it:Me.sibling=it,Me=it);return i&&Fe.forEach(function(M9){return o($,M9)}),Ct&&bs($,ze),Ne}function Ft($,H,Y,Ee){if(typeof Y=="object"&&Y!==null&&Y.type===te&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Z:e:{for(var Ne=Y.key,Me=H;Me!==null;){if(Me.key===Ne){if(Ne=Y.type,Ne===te){if(Me.tag===7){l($,Me.sibling),H=E(Me,Y.props.children),H.return=$,$=H;break e}}else if(Me.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&k2(Ne)===Me.type){l($,Me.sibling),H=E(Me,Y.props),H.ref=gu($,Me,Y),H.return=$,$=H;break e}l($,Me);break}else o($,Me);Me=Me.sibling}Y.type===te?(H=ks(Y.props.children,$.mode,Ee,Y.key),H.return=$,$=H):(Ee=rd(Y.type,Y.key,Y.props,null,$.mode,Ee),Ee.ref=gu($,H,Y),Ee.return=$,$=Ee)}return x($);case U:e:{for(Me=Y.key;H!==null;){if(H.key===Me)if(H.tag===4&&H.stateNode.containerInfo===Y.containerInfo&&H.stateNode.implementation===Y.implementation){l($,H.sibling),H=E(H,Y.children||[]),H.return=$,$=H;break e}else{l($,H);break}else o($,H);H=H.sibling}H=Ym(Y,$.mode,Ee),H.return=$,$=H}return x($);case Ae:return Me=Y._init,Ft($,H,Me(Y._payload),Ee)}if(je(Y))return ve($,H,Y,Ee);if(ne(Y))return ke($,H,Y,Ee);Rc($,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,H!==null&&H.tag===6?(l($,H.sibling),H=E(H,Y),H.return=$,$=H):(l($,H),H=qm(Y,$.mode,Ee),H.return=$,$=H),x($)):l($,H)}return Ft}var Mo=N2(!0),O2=N2(!1),Lc=Li(null),Dc=null,Fo=null,tm=null;function nm(){tm=Fo=Dc=null}function rm(i){var o=Lc.current;Tt(Lc),i._currentValue=o}function im(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function Bo(i,o){Dc=i,tm=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(On=!0),i.firstContext=null)}function nr(i){var o=i._currentValue;if(tm!==i)if(i={context:i,memoizedValue:o,next:null},Fo===null){if(Dc===null)throw Error(n(308));Fo=i,Dc.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return o}var _s=null;function sm(i){_s===null?_s=[i]:_s.push(i)}function P2(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,sm(o)):(l.next=E.next,E.next=l),o.interleaved=l,ui(i,h)}function ui(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Fi=!1;function om(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I2(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function li(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Bi(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(rt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ui(i,l)}return E=h.interleaved,E===null?(o.next=o,sm(h)):(o.next=E.next,E.next=o),h.interleaved=o,ui(i,l)}function Mc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,bp(i,l)}}function R2(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=x:T=T.next=x,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Fc(i,o,l,h){var E=i.updateQueue;Fi=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,P=E.shared.pending;if(P!==null){E.shared.pending=null;var D=P,X=D.next;D.next=null,x===null?T=X:x.next=X,x=D;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,P=ae.lastBaseUpdate,P!==x&&(P===null?ae.firstBaseUpdate=X:P.next=X,ae.lastBaseUpdate=D))}if(T!==null){var de=E.baseState;x=0,ae=X=D=null,P=T;do{var re=P.lane,xe=P.eventTime;if((h&re)===re){ae!==null&&(ae=ae.next={eventTime:xe,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ve=i,ke=P;switch(re=o,xe=l,ke.tag){case 1:if(ve=ke.payload,typeof ve=="function"){de=ve.call(xe,de,re);break e}de=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ke.payload,re=typeof ve=="function"?ve.call(xe,de,re):ve,re==null)break e;de=v({},de,re);break e;case 2:Fi=!0}}P.callback!==null&&P.lane!==0&&(i.flags|=64,re=E.effects,re===null?E.effects=[P]:re.push(P))}else xe={eventTime:xe,lane:re,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ae===null?(X=ae=xe,D=de):ae=ae.next=xe,x|=re;if(P=P.next,P===null){if(P=E.shared.pending,P===null)break;re=P,P=re.next,re.next=null,E.lastBaseUpdate=re,E.shared.pending=null}}while(!0);if(ae===null&&(D=de),E.baseState=D,E.firstBaseUpdate=X,E.lastBaseUpdate=ae,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);ws|=x,i.lanes=x,i.memoizedState=de}}function L2(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Eu={},zr=Li(Eu),yu=Li(Eu),Tu=Li(Eu);function Ss(i){if(i===Eu)throw Error(n(174));return i}function am(i,o){switch(mt(Tu,o),mt(yu,i),mt(zr,Eu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:oe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=oe(o,i)}Tt(zr),mt(zr,o)}function Uo(){Tt(zr),Tt(yu),Tt(Tu)}function D2(i){Ss(Tu.current);var o=Ss(zr.current),l=oe(o,i.type);o!==l&&(mt(yu,i),mt(zr,l))}function um(i){yu.current===i&&(Tt(zr),Tt(yu))}var kt=Li(0);function Bc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var lm=[];function cm(){for(var i=0;i<lm.length;i++)lm[i]._workInProgressVersionPrimary=null;lm.length=0}var Uc=q.ReactCurrentDispatcher,dm=q.ReactCurrentBatchConfig,xs=0,Nt=null,qt=null,Jt=null,Hc=!1,bu=!1,_u=0,i9=0;function fn(){throw Error(n(321))}function fm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!Er(i[l],o[l]))return!1;return!0}function hm(i,o,l,h,E,T){if(xs=T,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Uc.current=i===null||i.memoizedState===null?u9:l9,i=l(h,E),bu){T=0;do{if(bu=!1,_u=0,25<=T)throw Error(n(301));T+=1,Jt=qt=null,o.updateQueue=null,Uc.current=c9,i=l(h,E)}while(bu)}if(Uc.current=$c,o=qt!==null&&qt.next!==null,xs=0,Jt=qt=Nt=null,Hc=!1,o)throw Error(n(300));return i}function pm(){var i=_u!==0;return _u=0,i}function jr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Nt.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function rr(){if(qt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=Jt===null?Nt.memoizedState:Jt.next;if(o!==null)Jt=o,qt=i;else{if(i===null)throw Error(n(310));qt=i,i={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Jt===null?Nt.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function Su(i,o){return typeof o=="function"?o(i):o}function mm(i){var o=rr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=qt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var x=E.next;E.next=T.next,T.next=x}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var P=x=null,D=null,X=T;do{var ae=X.lane;if((xs&ae)===ae)D!==null&&(D=D.next={lane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),h=X.hasEagerState?X.eagerState:i(h,X.action);else{var de={lane:ae,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null};D===null?(P=D=de,x=h):D=D.next=de,Nt.lanes|=ae,ws|=ae}X=X.next}while(X!==null&&X!==T);D===null?x=h:D.next=P,Er(h,o.memoizedState)||(On=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Nt.lanes|=T,ws|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function gm(i){var o=rr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do T=i(T,x.action),x=x.next;while(x!==E);Er(T,o.memoizedState)||(On=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function M2(){}function F2(i,o){var l=Nt,h=rr(),E=o(),T=!Er(h.memoizedState,E);if(T&&(h.memoizedState=E,On=!0),h=h.queue,Em(H2.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Jt!==null&&Jt.memoizedState.tag&1){if(l.flags|=2048,xu(9,U2.bind(null,l,h,E,o),void 0,null),Zt===null)throw Error(n(349));(xs&30)!==0||B2(l,o,E)}return E}function B2(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function U2(i,o,l,h){o.value=l,o.getSnapshot=h,z2(o)&&j2(i)}function H2(i,o,l){return l(function(){z2(o)&&j2(i)})}function z2(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!Er(i,l)}catch(h){return!0}}function j2(i){var o=ui(i,1);o!==null&&Sr(o,i,1,-1)}function $2(i){var o=jr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Su,lastRenderedState:i},o.queue=i,i=i.dispatch=a9.bind(null,Nt,i),[o.memoizedState,i]}function xu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function V2(){return rr().memoizedState}function zc(i,o,l,h){var E=jr();Nt.flags|=i,E.memoizedState=xu(1|o,l,void 0,h===void 0?null:h)}function jc(i,o,l,h){var E=rr();h=h===void 0?null:h;var T=void 0;if(qt!==null){var x=qt.memoizedState;if(T=x.destroy,h!==null&&fm(h,x.deps)){E.memoizedState=xu(o,l,T,h);return}}Nt.flags|=i,E.memoizedState=xu(1|o,l,T,h)}function q2(i,o){return zc(8390656,8,i,o)}function Em(i,o){return jc(2048,8,i,o)}function Y2(i,o){return jc(4,2,i,o)}function W2(i,o){return jc(4,4,i,o)}function G2(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function X2(i,o,l){return l=l!=null?l.concat([i]):null,jc(4,4,G2.bind(null,o,i),l)}function ym(){}function K2(i,o){var l=rr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&fm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Q2(i,o){var l=rr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&fm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function J2(i,o,l){return(xs&21)===0?(i.baseState&&(i.baseState=!1,On=!0),i.memoizedState=l):(Er(l,o)||(l=k_(),Nt.lanes|=l,ws|=l,i.baseState=!0),o)}function s9(i,o){var l=ut;ut=l!==0&&4>l?l:4,i(!0);var h=dm.transition;dm.transition={};try{i(!1),o()}finally{ut=l,dm.transition=h}}function Z2(){return rr().memoizedState}function o9(i,o,l){var h=ji(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},eS(i))tS(o,l);else if(l=P2(i,o,l,h),l!==null){var E=Tn();Sr(l,i,h,E),nS(l,o,h)}}function a9(i,o,l){var h=ji(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(eS(i))tS(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var x=o.lastRenderedState,P=T(x,l);if(E.hasEagerState=!0,E.eagerState=P,Er(P,x)){var D=o.interleaved;D===null?(E.next=E,sm(o)):(E.next=D.next,D.next=E),o.interleaved=E;return}}catch(X){}l=P2(i,o,E,h),l!==null&&(E=Tn(),Sr(l,i,h,E),nS(l,o,h))}}function eS(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function tS(i,o){bu=Hc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function nS(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,bp(i,l)}}var $c={readContext:nr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},u9={readContext:nr,useCallback:function(i,o){return jr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:q2,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,zc(4194308,4,G2.bind(null,o,i),l)},useLayoutEffect:function(i,o){return zc(4194308,4,i,o)},useInsertionEffect:function(i,o){return zc(4,2,i,o)},useMemo:function(i,o){var l=jr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=jr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=o9.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var o=jr();return i={current:i},o.memoizedState=i},useState:$2,useDebugValue:ym,useDeferredValue:function(i){return jr().memoizedState=i},useTransition:function(){var i=$2(!1),o=i[0];return i=s9.bind(null,i[1]),jr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Nt,E=jr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Zt===null)throw Error(n(349));(xs&30)!==0||B2(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,q2(H2.bind(null,h,T,i),[i]),h.flags|=2048,xu(9,U2.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=jr(),o=Zt.identifierPrefix;if(Ct){var l=ai,h=oi;l=(h&~(1<<32-gr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=_u++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=i9++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},l9={readContext:nr,useCallback:K2,useContext:nr,useEffect:Em,useImperativeHandle:X2,useInsertionEffect:Y2,useLayoutEffect:W2,useMemo:Q2,useReducer:mm,useRef:V2,useState:function(){return mm(Su)},useDebugValue:ym,useDeferredValue:function(i){var o=rr();return J2(o,qt.memoizedState,i)},useTransition:function(){var i=mm(Su)[0],o=rr().memoizedState;return[i,o]},useMutableSource:M2,useSyncExternalStore:F2,useId:Z2,unstable_isNewReconciler:!1},c9={readContext:nr,useCallback:K2,useContext:nr,useEffect:Em,useImperativeHandle:X2,useInsertionEffect:Y2,useLayoutEffect:W2,useMemo:Q2,useReducer:gm,useRef:V2,useState:function(){return gm(Su)},useDebugValue:ym,useDeferredValue:function(i){var o=rr();return qt===null?o.memoizedState=i:J2(o,qt.memoizedState,i)},useTransition:function(){var i=gm(Su)[0],o=rr().memoizedState;return[i,o]},useMutableSource:M2,useSyncExternalStore:F2,useId:Z2,unstable_isNewReconciler:!1};function Tr(i,o){if(i&&i.defaultProps){o=v({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Tm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:v({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Vc={isMounted:function(i){return(i=i._reactInternals)?gs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=Tn(),E=ji(i),T=li(h,E);T.payload=o,l!=null&&(T.callback=l),o=Bi(i,T,E),o!==null&&(Sr(o,i,E,h),Mc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=Tn(),E=ji(i),T=li(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=Bi(i,T,E),o!==null&&(Sr(o,i,E,h),Mc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Tn(),h=ji(i),E=li(l,h);E.tag=2,o!=null&&(E.callback=o),o=Bi(i,E,h),o!==null&&(Sr(o,i,h,l),Mc(o,i,h))}};function rS(i,o,l,h,E,T,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,x):o.prototype&&o.prototype.isPureReactComponent?!lu(l,h)||!lu(E,T):!0}function iS(i,o,l){var h=!1,E=Di,T=o.contextType;return typeof T=="object"&&T!==null?T=nr(T):(E=Nn(o)?ys:dn.current,h=o.contextTypes,T=(h=h!=null)?Io(i,E):Di),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Vc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function sS(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&Vc.enqueueReplaceState(o,o.state,null)}function bm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},om(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=nr(T):(T=Nn(o)?ys:dn.current,E.context=Io(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Tm(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Vc.enqueueReplaceState(E,E.state,null),Fc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ho(i,o){try{var l="",h=o;do l+=Le(h),h=h.return;while(h);var E=l}catch(T){E=`
30
+ Error generating stack: `+T.message+`
31
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function _m(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Sm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var d9=typeof WeakMap=="function"?WeakMap:Map;function oS(i,o,l){l=li(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){Qc||(Qc=!0,Fm=h),Sm(i,o)},l}function aS(i,o,l){l=li(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Sm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Sm(i,o),typeof h!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function uS(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new d9;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=C9.bind(null,i,o,l),o.then(i,i))}function lS(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function cS(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=li(-1,1),o.tag=2,Bi(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var f9=q.ReactCurrentOwner,On=!1;function yn(i,o,l,h){o.child=i===null?O2(o,null,l,h):Mo(o,i.child,l,h)}function dS(i,o,l,h,E){l=l.render;var T=o.ref;return Bo(o,E),h=hm(i,o,l,h,T,E),l=pm(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ci(i,o,E)):(Ct&&l&&Kp(o),o.flags|=1,yn(i,o,h,E),o.child)}function fS(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Vm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,hS(i,o,T,h,E)):(i=rd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var x=T.memoizedProps;if(l=l.compare,l=l!==null?l:lu,l(x,h)&&i.ref===o.ref)return ci(i,o,E)}return o.flags|=1,i=Vi(T,h),i.ref=o.ref,i.return=o,o.child=i}function hS(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(lu(T,h)&&i.ref===o.ref)if(On=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(On=!0);else return o.lanes=i.lanes,ci(i,o,E)}return xm(i,o,l,h,E)}function pS(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(jo,$n),$n|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,mt(jo,$n),$n|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,mt(jo,$n),$n|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,mt(jo,$n),$n|=h;return yn(i,o,E,l),o.child}function mS(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function xm(i,o,l,h,E){var T=Nn(l)?ys:dn.current;return T=Io(o,T),Bo(o,E),l=hm(i,o,l,h,T,E),h=pm(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ci(i,o,E)):(Ct&&h&&Kp(o),o.flags|=1,yn(i,o,l,E),o.child)}function gS(i,o,l,h,E){if(Nn(l)){var T=!0;kc(o)}else T=!1;if(Bo(o,E),o.stateNode===null)Yc(i,o),iS(o,l,h),bm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,P=o.memoizedProps;x.props=P;var D=x.context,X=l.contextType;typeof X=="object"&&X!==null?X=nr(X):(X=Nn(l)?ys:dn.current,X=Io(o,X));var ae=l.getDerivedStateFromProps,de=typeof ae=="function"||typeof x.getSnapshotBeforeUpdate=="function";de||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==h||D!==X)&&sS(o,x,h,X),Fi=!1;var re=o.memoizedState;x.state=re,Fc(o,h,x,E),D=o.memoizedState,P!==h||re!==D||kn.current||Fi?(typeof ae=="function"&&(Tm(o,l,ae,h),D=o.memoizedState),(P=Fi||rS(o,l,P,h,re,D,X))?(de||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"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=D),x.props=h,x.state=D,x.context=X,h=P):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,I2(i,o),P=o.memoizedProps,X=o.type===o.elementType?P:Tr(o.type,P),x.props=X,de=o.pendingProps,re=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=nr(D):(D=Nn(l)?ys:dn.current,D=Io(o,D));var xe=l.getDerivedStateFromProps;(ae=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==de||re!==D)&&sS(o,x,h,D),Fi=!1,re=o.memoizedState,x.state=re,Fc(o,h,x,E);var ve=o.memoizedState;P!==de||re!==ve||kn.current||Fi?(typeof xe=="function"&&(Tm(o,l,xe,h),ve=o.memoizedState),(X=Fi||rS(o,l,X,h,re,ve,D)||!1)?(ae||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ve,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ve,D)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||P===i.memoizedProps&&re===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===i.memoizedProps&&re===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ve),x.props=h,x.state=ve,x.context=D,h=X):(typeof x.componentDidUpdate!="function"||P===i.memoizedProps&&re===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===i.memoizedProps&&re===i.memoizedState||(o.flags|=1024),h=!1)}return wm(i,o,l,h,T,E)}function wm(i,o,l,h,E,T){mS(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&_2(o,l,!1),ci(i,o,T);h=o.stateNode,f9.current=o;var P=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=Mo(o,i.child,null,T),o.child=Mo(o,null,P,T)):yn(i,o,P,T),o.memoizedState=h.state,E&&_2(o,l,!0),o.child}function ES(i){var o=i.stateNode;o.pendingContext?T2(i,o.pendingContext,o.pendingContext!==o.context):o.context&&T2(i,o.context,!1),am(i,o.containerInfo)}function yS(i,o,l,h,E){return Do(),em(E),o.flags|=256,yn(i,o,l,h),o.child}var Cm={dehydrated:null,treeContext:null,retryLane:0};function Am(i){return{baseLanes:i,cachePool:null,transitions:null}}function TS(i,o,l){var h=o.pendingProps,E=kt.current,T=!1,x=(o.flags&128)!==0,P;if((P=x)||(P=i!==null&&i.memoizedState===null?!1:(E&2)!==0),P?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),mt(kt,E&1),i===null)return Zp(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=h.children,i=h.fallback,T?(h=o.mode,T=o.child,x={mode:"hidden",children:x},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=x):T=id(x,h,0,null),i=ks(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Am(l),o.memoizedState=Cm,i):vm(o,x));if(E=i.memoizedState,E!==null&&(P=E.dehydrated,P!==null))return h9(i,o,x,h,P,E,l);if(T){T=h.fallback,x=o.mode,E=i.child,P=E.sibling;var D={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=D,o.deletions=null):(h=Vi(E,D),h.subtreeFlags=E.subtreeFlags&14680064),P!==null?T=Vi(P,T):(T=ks(T,x,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,x=i.child.memoizedState,x=x===null?Am(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,o.memoizedState=Cm,h}return T=i.child,i=T.sibling,h=Vi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function vm(i,o){return o=id({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function qc(i,o,l,h){return h!==null&&em(h),Mo(o,i.child,null,l),i=vm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function h9(i,o,l,h,E,T,x){if(l)return o.flags&256?(o.flags&=-257,h=_m(Error(n(422))),qc(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=id({mode:"visible",children:h.children},E,0,null),T=ks(T,E,x,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Mo(o,i.child,null,x),o.child.memoizedState=Am(x),o.memoizedState=Cm,T);if((o.mode&1)===0)return qc(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var P=h.dgst;return h=P,T=Error(n(419)),h=_m(T,h,void 0),qc(i,o,x,h)}if(P=(x&i.childLanes)!==0,On||P){if(h=Zt,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ui(i,E),Sr(h,i,E,-1))}return $m(),h=_m(Error(n(421))),qc(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=A9.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,jn=Ri(E.nextSibling),zn=o,Ct=!0,yr=null,i!==null&&(er[tr++]=oi,er[tr++]=ai,er[tr++]=Ts,oi=i.id,ai=i.overflow,Ts=o),o=vm(o,h.children),o.flags|=4096,o)}function bS(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),im(i.return,o,l)}function km(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function _S(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(yn(i,o,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&bS(i,l,o);else if(i.tag===19)bS(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(mt(kt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Bc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),km(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Bc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}km(o,!0,l,null,T);break;case"together":km(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Yc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function ci(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),ws|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Vi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Vi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function p9(i,o,l){switch(o.tag){case 3:ES(o),Do();break;case 5:D2(o);break;case 1:Nn(o.type)&&kc(o);break;case 4:am(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;mt(Lc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(mt(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?TS(i,o,l):(mt(kt,kt.current&1),i=ci(i,o,l),i!==null?i.sibling:null);mt(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return _S(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),mt(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,pS(i,o,l)}return ci(i,o,l)}var SS,Nm,xS,wS;SS=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Nm=function(){},xS=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ss(zr.current);var T=null;switch(l){case"input":E=wi(i,E),h=wi(i,h),T=[];break;case"select":E=v({},E,{value:void 0}),h=v({},h,{value:void 0}),T=[];break;case"textarea":E=ct(i,E),h=ct(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Cc)}tn(l,h);var x;l=null;for(X in E)if(!h.hasOwnProperty(X)&&E.hasOwnProperty(X)&&E[X]!=null)if(X==="style"){var P=E[X];for(x in P)P.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(s.hasOwnProperty(X)?T||(T=[]):(T=T||[]).push(X,null));for(X in h){var D=h[X];if(P=E!=null?E[X]:void 0,h.hasOwnProperty(X)&&D!==P&&(D!=null||P!=null))if(X==="style")if(P){for(x in P)!P.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&P[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(T||(T=[]),T.push(X,l)),l=D;else X==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,P=P?P.__html:void 0,D!=null&&P!==D&&(T=T||[]).push(X,D)):X==="children"?typeof D!="string"&&typeof D!="number"||(T=T||[]).push(X,""+D):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(s.hasOwnProperty(X)?(D!=null&&X==="onScroll"&&yt("scroll",i),T||P===D||(T=[])):(T=T||[]).push(X,D))}l&&(T=T||[]).push("style",l);var X=T;(o.updateQueue=X)&&(o.flags|=4)}},wS=function(i,o,l,h){l!==h&&(o.flags|=4)};function wu(i,o){if(!Ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function hn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function m9(i,o,l){var h=o.pendingProps;switch(Qp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(o),null;case 1:return Nn(o.type)&&vc(),hn(o),null;case 3:return h=o.stateNode,Uo(),Tt(kn),Tt(dn),cm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Ic(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,yr!==null&&(Hm(yr),yr=null))),Nm(i,o),hn(o),null;case 5:um(o);var E=Ss(Tu.current);if(l=o.type,i!==null&&o.stateNode!=null)xS(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return hn(o),null}if(i=Ss(zr.current),Ic(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Hr]=o,h[pu]=T,i=(o.mode&1)!==0,l){case"dialog":yt("cancel",h),yt("close",h);break;case"iframe":case"object":case"embed":yt("load",h);break;case"video":case"audio":for(E=0;E<du.length;E++)yt(du[E],h);break;case"source":yt("error",h);break;case"img":case"image":case"link":yt("error",h),yt("load",h);break;case"details":yt("toggle",h);break;case"input":ps(h,T),yt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},yt("invalid",h);break;case"textarea":Et(h,T),yt("invalid",h)}tn(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var P=T[x];x==="children"?typeof P=="string"?h.textContent!==P&&(T.suppressHydrationWarning!==!0&&wc(h.textContent,P,i),E=["children",P]):typeof P=="number"&&h.textContent!==""+P&&(T.suppressHydrationWarning!==!0&&wc(h.textContent,P,i),E=["children",""+P]):s.hasOwnProperty(x)&&P!=null&&x==="onScroll"&&yt("scroll",h)}switch(l){case"input":Qn(h),we(h,T,!0);break;case"textarea":Qn(h),vt(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Cc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(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[Hr]=o,i[pu]=h,SS(i,o,!1,!1),o.stateNode=i;e:{switch(x=Br(l,h),l){case"dialog":yt("cancel",i),yt("close",i),E=h;break;case"iframe":case"object":case"embed":yt("load",i),E=h;break;case"video":case"audio":for(E=0;E<du.length;E++)yt(du[E],i);E=h;break;case"source":yt("error",i),E=h;break;case"img":case"image":case"link":yt("error",i),yt("load",i),E=h;break;case"details":yt("toggle",i),E=h;break;case"input":ps(i,h),E=wi(i,h),yt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=v({},h,{value:void 0}),yt("invalid",i);break;case"textarea":Et(i,h),E=ct(i,h),yt("invalid",i);break;default:E=h}tn(l,E),P=E;for(T in P)if(P.hasOwnProperty(T)){var D=P[T];T==="style"?Ai(i,D):T==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&$e(i,D)):T==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&Je(i,D):typeof D=="number"&&Je(i,""+D):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?D!=null&&T==="onScroll"&&yt("scroll",i):D!=null&&I(i,T,D,x))}switch(l){case"input":Qn(i),we(i,h,!1);break;case"textarea":Qn(i),vt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Qe(i,!!h.multiple,T,!1):h.defaultValue!=null&&Qe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Cc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return hn(o),null;case 6:if(i&&o.stateNode!=null)wS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ss(Tu.current),Ss(zr.current),Ic(o)){if(h=o.stateNode,l=o.memoizedProps,h[Hr]=o,(T=h.nodeValue!==l)&&(i=zn,i!==null))switch(i.tag){case 3:wc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&wc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Hr]=o,o.stateNode=h}return hn(o),null;case 13:if(Tt(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&jn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)v2(),Do(),o.flags|=98560,T=!1;else if(T=Ic(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Hr]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;hn(o),T=!1}else yr!==null&&(Hm(yr),yr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(kt.current&1)!==0?Yt===0&&(Yt=3):$m())),o.updateQueue!==null&&(o.flags|=4),hn(o),null);case 4:return Uo(),Nm(i,o),i===null&&fu(o.stateNode.containerInfo),hn(o),null;case 10:return rm(o.type._context),hn(o),null;case 17:return Nn(o.type)&&vc(),hn(o),null;case 19:if(Tt(kt),T=o.memoizedState,T===null)return hn(o),null;if(h=(o.flags&128)!==0,x=T.rendering,x===null)if(h)wu(T,!1);else{if(Yt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Bc(i),x!==null){for(o.flags|=128,wu(T,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,x=T.alternate,x===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=x.childLanes,T.lanes=x.lanes,T.child=x.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=x.memoizedProps,T.memoizedState=x.memoizedState,T.updateQueue=x.updateQueue,T.type=x.type,i=x.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(kt,kt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Mt()>$o&&(o.flags|=128,h=!0,wu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Bc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),wu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!Ct)return hn(o),null}else 2*Mt()-T.renderingStartTime>$o&&l!==1073741824&&(o.flags|=128,h=!0,wu(T,!1),o.lanes=4194304);T.isBackwards?(x.sibling=o.child,o.child=x):(l=T.last,l!==null?l.sibling=x:o.child=x,T.last=x)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Mt(),o.sibling=null,l=kt.current,mt(kt,h?l&1|2:l&1),o):(hn(o),null);case 22:case 23:return jm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?($n&1073741824)!==0&&(hn(o),o.subtreeFlags&6&&(o.flags|=8192)):hn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function g9(i,o){switch(Qp(o),o.tag){case 1:return Nn(o.type)&&vc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Uo(),Tt(kn),Tt(dn),cm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return um(o),null;case 13:if(Tt(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Do()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Tt(kt),null;case 4:return Uo(),null;case 10:return rm(o.type._context),null;case 22:case 23:return jm(),null;case 24:return null;default:return null}}var Wc=!1,pn=!1,E9=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function zo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,o,h)}else l.current=null}function Om(i,o,l){try{l()}catch(h){It(i,o,h)}}var CS=!1;function y9(i,o){if(jp=hc,i=r2(),Lp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Ee){l=null;break e}var x=0,P=-1,D=-1,X=0,ae=0,de=i,re=null;t:for(;;){for(var xe;de!==l||E!==0&&de.nodeType!==3||(P=x+E),de!==T||h!==0&&de.nodeType!==3||(D=x+h),de.nodeType===3&&(x+=de.nodeValue.length),(xe=de.firstChild)!==null;)re=de,de=xe;for(;;){if(de===i)break t;if(re===l&&++X===E&&(P=x),re===T&&++ae===h&&(D=x),(xe=de.nextSibling)!==null)break;de=re,re=de.parentNode}de=xe}l=P===-1||D===-1?null:{start:P,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for($p={focusedElem:i,selectionRange:l},hc=!1,Ce=o;Ce!==null;)if(o=Ce,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ce=i;else for(;Ce!==null;){o=Ce;try{var ve=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var ke=ve.memoizedProps,Ft=ve.memoizedState,$=o.stateNode,H=$.getSnapshotBeforeUpdate(o.elementType===o.type?ke:Tr(o.type,ke),Ft);$.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var Y=o.stateNode.containerInfo;Y.nodeType===1?Y.textContent="":Y.nodeType===9&&Y.documentElement&&Y.removeChild(Y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){It(o,o.return,Ee)}if(i=o.sibling,i!==null){i.return=o.return,Ce=i;break}Ce=o.return}return ve=CS,CS=!1,ve}function Cu(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Om(o,l,T)}E=E.next}while(E!==h)}}function Gc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Pm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function AS(i){var o=i.alternate;o!==null&&(i.alternate=null,AS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Hr],delete o[pu],delete o[Wp],delete o[e9],delete o[t9])),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 vS(i){return i.tag===5||i.tag===3||i.tag===4}function kS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||vS(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 Im(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Cc));else if(h!==4&&(i=i.child,i!==null))for(Im(i,o,l),i=i.sibling;i!==null;)Im(i,o,l),i=i.sibling}function Rm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,l),i=i.sibling;i!==null;)Rm(i,o,l),i=i.sibling}var nn=null,br=!1;function Ui(i,o,l){for(l=l.child;l!==null;)NS(i,o,l),l=l.sibling}function NS(i,o,l){if(Ur&&typeof Ur.onCommitFiberUnmount=="function")try{Ur.onCommitFiberUnmount(ac,l)}catch(P){}switch(l.tag){case 5:pn||zo(l,o);case 6:var h=nn,E=br;nn=null,Ui(i,o,l),nn=h,br=E,nn!==null&&(br?(i=nn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):nn.removeChild(l.stateNode));break;case 18:nn!==null&&(br?(i=nn,l=l.stateNode,i.nodeType===8?Yp(i.parentNode,l):i.nodeType===1&&Yp(i,l),ru(i)):Yp(nn,l.stateNode));break;case 4:h=nn,E=br,nn=l.stateNode.containerInfo,br=!0,Ui(i,o,l),nn=h,br=E;break;case 0:case 11:case 14:case 15:if(!pn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,x=T.destroy;T=T.tag,x!==void 0&&((T&2)!==0||(T&4)!==0)&&Om(l,o,x),E=E.next}while(E!==h)}Ui(i,o,l);break;case 1:if(!pn&&(zo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(P){It(l,o,P)}Ui(i,o,l);break;case 21:Ui(i,o,l);break;case 22:l.mode&1?(pn=(h=pn)||l.memoizedState!==null,Ui(i,o,l),pn=h):Ui(i,o,l);break;default:Ui(i,o,l)}}function OS(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new E9),o.forEach(function(h){var E=v9.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function _r(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,x=o,P=x;e:for(;P!==null;){switch(P.tag){case 5:nn=P.stateNode,br=!1;break e;case 3:nn=P.stateNode.containerInfo,br=!0;break e;case 4:nn=P.stateNode.containerInfo,br=!0;break e}P=P.return}if(nn===null)throw Error(n(160));NS(T,x,E),nn=null,br=!1;var D=E.alternate;D!==null&&(D.return=null),E.return=null}catch(X){It(E,o,X)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)PS(o,i),o=o.sibling}function PS(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(_r(o,i),$r(i),h&4){try{Cu(3,i,i.return),Gc(3,i)}catch(ke){It(i,i.return,ke)}try{Cu(5,i,i.return)}catch(ke){It(i,i.return,ke)}}break;case 1:_r(o,i),$r(i),h&512&&l!==null&&zo(l,l.return);break;case 5:if(_r(o,i),$r(i),h&512&&l!==null&&zo(l,l.return),i.flags&32){var E=i.stateNode;try{Je(E,"")}catch(ke){It(i,i.return,ke)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,P=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{P==="input"&&T.type==="radio"&&T.name!=null&&Ci(E,T),Br(P,x);var X=Br(P,T);for(x=0;x<D.length;x+=2){var ae=D[x],de=D[x+1];ae==="style"?Ai(E,de):ae==="dangerouslySetInnerHTML"?$e(E,de):ae==="children"?Je(E,de):I(E,ae,de,X)}switch(P){case"input":ri(E,T);break;case"textarea":En(E,T);break;case"select":var re=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?Qe(E,!!T.multiple,xe,!1):re!==!!T.multiple&&(T.defaultValue!=null?Qe(E,!!T.multiple,T.defaultValue,!0):Qe(E,!!T.multiple,T.multiple?[]:"",!1))}E[pu]=T}catch(ke){It(i,i.return,ke)}}break;case 6:if(_r(o,i),$r(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(ke){It(i,i.return,ke)}}break;case 3:if(_r(o,i),$r(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{ru(o.containerInfo)}catch(ke){It(i,i.return,ke)}break;case 4:_r(o,i),$r(i);break;case 13:_r(o,i),$r(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Mm=Mt())),h&4&&OS(i);break;case 22:if(ae=l!==null&&l.memoizedState!==null,i.mode&1?(pn=(X=pn)||ae,_r(o,i),pn=X):_r(o,i),$r(i),h&8192){if(X=i.memoizedState!==null,(i.stateNode.isHidden=X)&&!ae&&(i.mode&1)!==0)for(Ce=i,ae=i.child;ae!==null;){for(de=Ce=ae;Ce!==null;){switch(re=Ce,xe=re.child,re.tag){case 0:case 11:case 14:case 15:Cu(4,re,re.return);break;case 1:zo(re,re.return);var ve=re.stateNode;if(typeof ve.componentWillUnmount=="function"){h=re,l=re.return;try{o=h,ve.props=o.memoizedProps,ve.state=o.memoizedState,ve.componentWillUnmount()}catch(ke){It(h,l,ke)}}break;case 5:zo(re,re.return);break;case 22:if(re.memoizedState!==null){LS(de);continue}}xe!==null?(xe.return=re,Ce=xe):LS(de)}ae=ae.sibling}e:for(ae=null,de=i;;){if(de.tag===5){if(ae===null){ae=de;try{E=de.stateNode,X?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(P=de.stateNode,D=de.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,P.style.display=Zn("display",x))}catch(ke){It(i,i.return,ke)}}}else if(de.tag===6){if(ae===null)try{de.stateNode.nodeValue=X?"":de.memoizedProps}catch(ke){It(i,i.return,ke)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===i)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===i)break e;for(;de.sibling===null;){if(de.return===null||de.return===i)break e;ae===de&&(ae=null),de=de.return}ae===de&&(ae=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:_r(o,i),$r(i),h&4&&OS(i);break;case 21:break;default:_r(o,i),$r(i)}}function $r(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(vS(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Je(E,""),h.flags&=-33);var T=kS(i);Rm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,P=kS(i);Im(i,P,x);break;default:throw Error(n(161))}}catch(D){It(i,i.return,D)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function T9(i,o,l){Ce=i,IS(i)}function IS(i,o,l){for(var h=(i.mode&1)!==0;Ce!==null;){var E=Ce,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||Wc;if(!x){var P=E.alternate,D=P!==null&&P.memoizedState!==null||pn;P=Wc;var X=pn;if(Wc=x,(pn=D)&&!X)for(Ce=E;Ce!==null;)x=Ce,D=x.child,x.tag===22&&x.memoizedState!==null?DS(E):D!==null?(D.return=x,Ce=D):DS(E);for(;T!==null;)Ce=T,IS(T),T=T.sibling;Ce=E,Wc=P,pn=X}RS(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ce=T):RS(i)}}function RS(i){for(;Ce!==null;){var o=Ce;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:pn||Gc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!pn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Tr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&L2(o,T,h);break;case 3:var x=o.updateQueue;if(x!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}L2(o,x,l)}break;case 5:var P=o.stateNode;if(l===null&&o.flags&4){l=P;var D=o.memoizedProps;switch(o.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(o.memoizedState===null){var X=o.alternate;if(X!==null){var ae=X.memoizedState;if(ae!==null){var de=ae.dehydrated;de!==null&&ru(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}pn||o.flags&512&&Pm(o)}catch(re){It(o,o.return,re)}}if(o===i){Ce=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ce=l;break}Ce=o.return}}function LS(i){for(;Ce!==null;){var o=Ce;if(o===i){Ce=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ce=l;break}Ce=o.return}}function DS(i){for(;Ce!==null;){var o=Ce;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Gc(4,o)}catch(D){It(o,l,D)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(D){It(o,E,D)}}var T=o.return;try{Pm(o)}catch(D){It(o,T,D)}break;case 5:var x=o.return;try{Pm(o)}catch(D){It(o,x,D)}}}catch(D){It(o,o.return,D)}if(o===i){Ce=null;break}var P=o.sibling;if(P!==null){P.return=o.return,Ce=P;break}Ce=o.return}}var b9=Math.ceil,Xc=q.ReactCurrentDispatcher,Lm=q.ReactCurrentOwner,ir=q.ReactCurrentBatchConfig,rt=0,Zt=null,$t=null,rn=0,$n=0,jo=Li(0),Yt=0,Au=null,ws=0,Kc=0,Dm=0,vu=null,Pn=null,Mm=0,$o=1/0,di=null,Qc=!1,Fm=null,Hi=null,Jc=!1,zi=null,Zc=0,ku=0,Bm=null,ed=-1,td=0;function Tn(){return(rt&6)!==0?Mt():ed!==-1?ed:ed=Mt()}function ji(i){return(i.mode&1)===0?1:(rt&2)!==0&&rn!==0?rn&-rn:r9.transition!==null?(td===0&&(td=k_()),td):(i=ut,i!==0||(i=window.event,i=i===void 0?16:F_(i.type)),i)}function Sr(i,o,l,h){if(50<ku)throw ku=0,Bm=null,Error(n(185));Ja(i,l,h),((rt&2)===0||i!==Zt)&&(i===Zt&&((rt&2)===0&&(Kc|=l),Yt===4&&$i(i,rn)),In(i,h),l===1&&rt===0&&(o.mode&1)===0&&($o=Mt()+500,Nc&&Mi()))}function In(i,o){var l=i.callbackNode;rF(i,o);var h=cc(i,i===Zt?rn:0);if(h===0)l!==null&&C_(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&C_(l),o===1)i.tag===0?n9(FS.bind(null,i)):S2(FS.bind(null,i)),JF(function(){(rt&6)===0&&Mi()}),l=null;else{switch(N_(h)){case 1:l=Ep;break;case 4:l=A_;break;case 16:l=oc;break;case 536870912:l=v_;break;default:l=oc}l=qS(l,MS.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function MS(i,o){if(ed=-1,td=0,(rt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Vo()&&i.callbackNode!==l)return null;var h=cc(i,i===Zt?rn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=nd(i,h);else{o=h;var E=rt;rt|=2;var T=US();(Zt!==i||rn!==o)&&(di=null,$o=Mt()+500,As(i,o));do try{x9();break}catch(P){BS(i,P)}while(!0);nm(),Xc.current=T,rt=E,$t!==null?o=0:(Zt=null,rn=0,o=Yt)}if(o!==0){if(o===2&&(E=yp(i),E!==0&&(h=E,o=Um(i,E))),o===1)throw l=Au,As(i,0),$i(i,h),In(i,Mt()),l;if(o===6)$i(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_9(E)&&(o=nd(i,h),o===2&&(T=yp(i),T!==0&&(h=T,o=Um(i,T))),o===1))throw l=Au,As(i,0),$i(i,h),In(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:vs(i,Pn,di);break;case 3:if($i(i,h),(h&130023424)===h&&(o=Mm+500-Mt(),10<o)){if(cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Tn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=qp(vs.bind(null,i,Pn,di),o);break}vs(i,Pn,di);break;case 4:if($i(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-gr(h);T=1<<x,x=o[x],x>E&&(E=x),h&=~T}if(h=E,h=Mt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*b9(h/1960))-h,10<h){i.timeoutHandle=qp(vs.bind(null,i,Pn,di),h);break}vs(i,Pn,di);break;case 5:vs(i,Pn,di);break;default:throw Error(n(329))}}}return In(i,Mt()),i.callbackNode===l?MS.bind(null,i):null}function Um(i,o){var l=vu;return i.current.memoizedState.isDehydrated&&(As(i,o).flags|=256),i=nd(i,o),i!==2&&(o=Pn,Pn=l,o!==null&&Hm(o)),i}function Hm(i){Pn===null?Pn=i:Pn.push.apply(Pn,i)}function _9(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!Er(T(),E))return!1}catch(x){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function $i(i,o){for(o&=~Dm,o&=~Kc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-gr(o),h=1<<l;i[l]=-1,o&=~h}}function FS(i){if((rt&6)!==0)throw Error(n(327));Vo();var o=cc(i,0);if((o&1)===0)return In(i,Mt()),null;var l=nd(i,o);if(i.tag!==0&&l===2){var h=yp(i);h!==0&&(o=h,l=Um(i,h))}if(l===1)throw l=Au,As(i,0),$i(i,o),In(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,vs(i,Pn,di),In(i,Mt()),null}function zm(i,o){var l=rt;rt|=1;try{return i(o)}finally{rt=l,rt===0&&($o=Mt()+500,Nc&&Mi())}}function Cs(i){zi!==null&&zi.tag===0&&(rt&6)===0&&Vo();var o=rt;rt|=1;var l=ir.transition,h=ut;try{if(ir.transition=null,ut=1,i)return i()}finally{ut=h,ir.transition=l,rt=o,(rt&6)===0&&Mi()}}function jm(){$n=jo.current,Tt(jo)}function As(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,QF(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(Qp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&vc();break;case 3:Uo(),Tt(kn),Tt(dn),cm();break;case 5:um(h);break;case 4:Uo();break;case 13:Tt(kt);break;case 19:Tt(kt);break;case 10:rm(h.type._context);break;case 22:case 23:jm()}l=l.return}if(Zt=i,$t=i=Vi(i.current,null),rn=$n=o,Yt=0,Au=null,Dm=Kc=ws=0,Pn=vu=null,_s!==null){for(o=0;o<_s.length;o++)if(l=_s[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var x=T.next;T.next=E,h.next=x}l.pending=h}_s=null}return i}function BS(i,o){do{var l=$t;try{if(nm(),Uc.current=$c,Hc){for(var h=Nt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Hc=!1}if(xs=0,Jt=qt=Nt=null,bu=!1,_u=0,Lm.current=null,l===null||l.return===null){Yt=1,Au=o,$t=null;break}e:{var T=i,x=l.return,P=l,D=o;if(o=rn,P.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var X=D,ae=P,de=ae.tag;if((ae.mode&1)===0&&(de===0||de===11||de===15)){var re=ae.alternate;re?(ae.updateQueue=re.updateQueue,ae.memoizedState=re.memoizedState,ae.lanes=re.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var xe=lS(x);if(xe!==null){xe.flags&=-257,cS(xe,x,P,T,o),xe.mode&1&&uS(T,X,o),o=xe,D=X;var ve=o.updateQueue;if(ve===null){var ke=new Set;ke.add(D),o.updateQueue=ke}else ve.add(D);break e}else{if((o&1)===0){uS(T,X,o),$m();break e}D=Error(n(426))}}else if(Ct&&P.mode&1){var Ft=lS(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),cS(Ft,x,P,T,o),em(Ho(D,P));break e}}T=D=Ho(D,P),Yt!==4&&(Yt=2),vu===null?vu=[T]:vu.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var $=oS(T,D,o);R2(T,$);break e;case 1:P=D;var H=T.type,Y=T.stateNode;if((T.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(Hi===null||!Hi.has(Y)))){T.flags|=65536,o&=-o,T.lanes|=o;var Ee=aS(T,P,o);R2(T,Ee);break e}}T=T.return}while(T!==null)}zS(l)}catch(Ne){o=Ne,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function US(){var i=Xc.current;return Xc.current=$c,i===null?$c:i}function $m(){(Yt===0||Yt===3||Yt===2)&&(Yt=4),Zt===null||(ws&268435455)===0&&(Kc&268435455)===0||$i(Zt,rn)}function nd(i,o){var l=rt;rt|=2;var h=US();(Zt!==i||rn!==o)&&(di=null,As(i,o));do try{S9();break}catch(E){BS(i,E)}while(!0);if(nm(),rt=l,Xc.current=h,$t!==null)throw Error(n(261));return Zt=null,rn=0,Yt}function S9(){for(;$t!==null;)HS($t)}function x9(){for(;$t!==null&&!GM();)HS($t)}function HS(i){var o=VS(i.alternate,i,$n);i.memoizedProps=i.pendingProps,o===null?zS(i):$t=o,Lm.current=null}function zS(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=m9(l,o,$n),l!==null){$t=l;return}}else{if(l=g9(l,o),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Yt=6,$t=null;return}}if(o=o.sibling,o!==null){$t=o;return}$t=o=i}while(o!==null);Yt===0&&(Yt=5)}function vs(i,o,l){var h=ut,E=ir.transition;try{ir.transition=null,ut=1,w9(i,o,l,h)}finally{ir.transition=E,ut=h}return null}function w9(i,o,l,h){do Vo();while(zi!==null);if((rt&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(iF(i,T),i===Zt&&($t=Zt=null,rn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Jc||(Jc=!0,qS(oc,function(){return Vo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=ir.transition,ir.transition=null;var x=ut;ut=1;var P=rt;rt|=4,Lm.current=null,y9(i,l),PS(l,i),VF($p),hc=!!jp,$p=jp=null,i.current=l,T9(l),XM(),rt=P,ut=x,ir.transition=T}else i.current=l;if(Jc&&(Jc=!1,zi=i,Zc=E),T=i.pendingLanes,T===0&&(Hi=null),JM(l.stateNode),In(i,Mt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(Qc)throw Qc=!1,i=Fm,Fm=null,i;return(Zc&1)!==0&&i.tag!==0&&Vo(),T=i.pendingLanes,(T&1)!==0?i===Bm?ku++:(ku=0,Bm=i):ku=0,Mi(),null}function Vo(){if(zi!==null){var i=N_(Zc),o=ir.transition,l=ut;try{if(ir.transition=null,ut=16>i?16:i,zi===null)var h=!1;else{if(i=zi,zi=null,Zc=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Ce=i.current;Ce!==null;){var T=Ce,x=T.child;if((Ce.flags&16)!==0){var P=T.deletions;if(P!==null){for(var D=0;D<P.length;D++){var X=P[D];for(Ce=X;Ce!==null;){var ae=Ce;switch(ae.tag){case 0:case 11:case 15:Cu(8,ae,T)}var de=ae.child;if(de!==null)de.return=ae,Ce=de;else for(;Ce!==null;){ae=Ce;var re=ae.sibling,xe=ae.return;if(AS(ae),ae===X){Ce=null;break}if(re!==null){re.return=xe,Ce=re;break}Ce=xe}}}var ve=T.alternate;if(ve!==null){var ke=ve.child;if(ke!==null){ve.child=null;do{var Ft=ke.sibling;ke.sibling=null,ke=Ft}while(ke!==null)}}Ce=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,Ce=x;else e:for(;Ce!==null;){if(T=Ce,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Cu(9,T,T.return)}var $=T.sibling;if($!==null){$.return=T.return,Ce=$;break e}Ce=T.return}}var H=i.current;for(Ce=H;Ce!==null;){x=Ce;var Y=x.child;if((x.subtreeFlags&2064)!==0&&Y!==null)Y.return=x,Ce=Y;else e:for(x=H;Ce!==null;){if(P=Ce,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Gc(9,P)}}catch(Ne){It(P,P.return,Ne)}if(P===x){Ce=null;break e}var Ee=P.sibling;if(Ee!==null){Ee.return=P.return,Ce=Ee;break e}Ce=P.return}}if(rt=E,Mi(),Ur&&typeof Ur.onPostCommitFiberRoot=="function")try{Ur.onPostCommitFiberRoot(ac,i)}catch(Ne){}h=!0}return h}finally{ut=l,ir.transition=o}}return!1}function jS(i,o,l){o=Ho(l,o),o=oS(i,o,1),i=Bi(i,o,1),o=Tn(),i!==null&&(Ja(i,1,o),In(i,o))}function It(i,o,l){if(i.tag===3)jS(i,i,l);else for(;o!==null;){if(o.tag===3){jS(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Hi===null||!Hi.has(h))){i=Ho(l,i),i=aS(o,i,1),o=Bi(o,i,1),i=Tn(),o!==null&&(Ja(o,1,i),In(o,i));break}}o=o.return}}function C9(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=Tn(),i.pingedLanes|=i.suspendedLanes&l,Zt===i&&(rn&l)===l&&(Yt===4||Yt===3&&(rn&130023424)===rn&&500>Mt()-Mm?As(i,0):Dm|=l),In(i,o)}function $S(i,o){o===0&&((i.mode&1)===0?o=1:(o=lc,lc<<=1,(lc&130023424)===0&&(lc=4194304)));var l=Tn();i=ui(i,o),i!==null&&(Ja(i,o,l),In(i,l))}function A9(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),$S(i,l)}function v9(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),$S(i,l)}var VS;VS=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||kn.current)On=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return On=!1,p9(i,o,l);On=(i.flags&131072)!==0}else On=!1,Ct&&(o.flags&1048576)!==0&&x2(o,Pc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Yc(i,o),i=o.pendingProps;var E=Io(o,dn.current);Bo(o,l),E=hm(null,o,h,i,E,l);var T=pm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Nn(h)?(T=!0,kc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,om(o),E.updater=Vc,o.stateNode=E,E._reactInternals=o,bm(o,h,i,l),o=wm(null,o,h,!0,T,l)):(o.tag=0,Ct&&T&&Kp(o),yn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(Yc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=N9(h),i=Tr(h,i),E){case 0:o=xm(null,o,h,i,l);break e;case 1:o=gS(null,o,h,i,l);break e;case 11:o=dS(null,o,h,i,l);break e;case 14:o=fS(null,o,h,Tr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Tr(h,E),xm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Tr(h,E),gS(i,o,h,E,l);case 3:e:{if(ES(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,I2(i,o),Fc(o,h,null,l);var x=o.memoizedState;if(h=x.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Ho(Error(n(423)),o),o=yS(i,o,h,l,E);break e}else if(h!==E){E=Ho(Error(n(424)),o),o=yS(i,o,h,l,E);break e}else for(jn=Ri(o.stateNode.containerInfo.firstChild),zn=o,Ct=!0,yr=null,l=O2(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Do(),h===E){o=ci(i,o,l);break e}yn(i,o,h,l)}o=o.child}return o;case 5:return D2(o),i===null&&Zp(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,Vp(h,E)?x=null:T!==null&&Vp(h,T)&&(o.flags|=32),mS(i,o),yn(i,o,x,l),o.child;case 6:return i===null&&Zp(o),null;case 13:return TS(i,o,l);case 4:return am(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Mo(o,null,h,l):yn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Tr(h,E),dS(i,o,h,E,l);case 7:return yn(i,o,o.pendingProps,l),o.child;case 8:return yn(i,o,o.pendingProps.children,l),o.child;case 12:return yn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,x=E.value,mt(Lc,h._currentValue),h._currentValue=x,T!==null)if(Er(T.value,x)){if(T.children===E.children&&!kn.current){o=ci(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var P=T.dependencies;if(P!==null){x=T.child;for(var D=P.firstContext;D!==null;){if(D.context===h){if(T.tag===1){D=li(-1,l&-l),D.tag=2;var X=T.updateQueue;if(X!==null){X=X.shared;var ae=X.pending;ae===null?D.next=D:(D.next=ae.next,ae.next=D),X.pending=D}}T.lanes|=l,D=T.alternate,D!==null&&(D.lanes|=l),im(T.return,l,o),P.lanes|=l;break}D=D.next}}else if(T.tag===10)x=T.type===o.type?null:T.child;else if(T.tag===18){if(x=T.return,x===null)throw Error(n(341));x.lanes|=l,P=x.alternate,P!==null&&(P.lanes|=l),im(x,l,o),x=T.sibling}else x=T.child;if(x!==null)x.return=T;else for(x=T;x!==null;){if(x===o){x=null;break}if(T=x.sibling,T!==null){T.return=x.return,x=T;break}x=x.return}T=x}yn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Bo(o,l),E=nr(E),h=h(E),o.flags|=1,yn(i,o,h,l),o.child;case 14:return h=o.type,E=Tr(h,o.pendingProps),E=Tr(h.type,E),fS(i,o,h,E,l);case 15:return hS(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Tr(h,E),Yc(i,o),o.tag=1,Nn(h)?(i=!0,kc(o)):i=!1,Bo(o,l),iS(o,h,E),bm(o,h,E,l),wm(null,o,h,!0,i,l);case 19:return _S(i,o,l);case 22:return pS(i,o,l)}throw Error(n(156,o.tag))};function qS(i,o){return w_(i,o)}function k9(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sr(i,o,l,h){return new k9(i,o,l,h)}function Vm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function N9(i){if(typeof i=="function")return Vm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===pe)return 11;if(i===Te)return 14}return 2}function Vi(i,o){var l=i.alternate;return l===null?(l=sr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function rd(i,o,l,h,E,T){var x=2;if(h=i,typeof i=="function")Vm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return ks(l.children,E,T,o);case he:x=8,E|=8;break;case ye:return i=sr(12,l,o,E|2),i.elementType=ye,i.lanes=T,i;case le:return i=sr(13,l,o,E),i.elementType=le,i.lanes=T,i;case fe:return i=sr(19,l,o,E),i.elementType=fe,i.lanes=T,i;case ue:return id(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case B:x=10;break e;case se:x=9;break e;case pe:x=11;break e;case Te:x=14;break e;case Ae:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=sr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function ks(i,o,l,h){return i=sr(7,i,h,o),i.lanes=l,i}function id(i,o,l,h){return i=sr(22,i,h,o),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function qm(i,o,l){return i=sr(6,i,null,o),i.lanes=l,i}function Ym(i,o,l){return o=sr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function O9(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tp(0),this.expirationTimes=Tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Wm(i,o,l,h,E,T,x,P,D){return i=new O9(i,o,l,P,D),o===1?(o=1,T===!0&&(o|=8)):o=0,T=sr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},om(T),i}function P9(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function YS(i){if(!i)return Di;i=i._reactInternals;e:{if(gs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Nn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Nn(l))return b2(i,l,o)}return o}function WS(i,o,l,h,E,T,x,P,D){return i=Wm(l,h,!0,i,E,T,x,P,D),i.context=YS(null),l=i.current,h=Tn(),E=ji(l),T=li(h,E),T.callback=o!=null?o:null,Bi(l,T,E),i.current.lanes=E,Ja(i,E,h),In(i,h),i}function sd(i,o,l,h){var E=o.current,T=Tn(),x=ji(E);return l=YS(l),o.context===null?o.context=l:o.pendingContext=l,o=li(T,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Bi(E,o,x),i!==null&&(Sr(i,E,x,T),Mc(i,E,x)),x}function od(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function GS(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function Gm(i,o){GS(i,o),(i=i.alternate)&&GS(i,o)}function I9(){return null}var XS=typeof reportError=="function"?reportError:function(i){console.error(i)};function Xm(i){this._internalRoot=i}ad.prototype.render=Xm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));sd(i,o,null,null)},ad.prototype.unmount=Xm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Cs(function(){sd(null,i,null,null)}),o[ii]=null}};function ad(i){this._internalRoot=i}ad.prototype.unstable_scheduleHydration=function(i){if(i){var o=I_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Oi.length&&o!==0&&o<Oi[l].priority;l++);Oi.splice(l,0,i),l===0&&D_(i)}};function Km(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ud(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function KS(){}function R9(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var X=od(x);T.call(X)}}var x=WS(o,h,i,0,null,!1,!1,"",KS);return i._reactRootContainer=x,i[ii]=x.current,fu(i.nodeType===8?i.parentNode:i),Cs(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var P=h;h=function(){var X=od(D);P.call(X)}}var D=Wm(i,0,!1,null,null,!1,!1,"",KS);return i._reactRootContainer=D,i[ii]=D.current,fu(i.nodeType===8?i.parentNode:i),Cs(function(){sd(o,D,l,h)}),D}function ld(i,o,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var P=E;E=function(){var D=od(x);P.call(D)}}sd(o,x,i,E)}else x=R9(l,o,i,E,h);return od(x)}O_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=Qa(o.pendingLanes);l!==0&&(bp(o,l|1),In(o,Mt()),(rt&6)===0&&($o=Mt()+500,Mi()))}break;case 13:Cs(function(){var h=ui(i,1);if(h!==null){var E=Tn();Sr(h,i,1,E)}}),Gm(i,1)}},_p=function(i){if(i.tag===13){var o=ui(i,134217728);if(o!==null){var l=Tn();Sr(o,i,134217728,l)}Gm(i,134217728)}},P_=function(i){if(i.tag===13){var o=ji(i),l=ui(i,o);if(l!==null){var h=Tn();Sr(l,i,o,h)}Gm(i,o)}},I_=function(){return ut},R_=function(i,o){var l=ut;try{return ut=i,o()}finally{ut=l}},hp=function(i,o,l){switch(o){case"input":if(ri(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Ac(h);if(!E)throw Error(n(90));hs(h),ri(h,E)}}}break;case"textarea":En(i,l);break;case"select":o=l.value,o!=null&&Qe(i,!!l.multiple,o,!1)}},E_=zm,y_=Cs;var L9={usingClientEntryPoint:!1,Events:[mu,Oo,Ac,m_,g_,zm]},Nu={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D9={bundleType:Nu.bundleType,version:Nu.version,rendererPackageName:Nu.rendererPackageName,rendererConfig:Nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=S_(i),i===null?null:i.stateNode},findFiberByHostInstance:Nu.findFiberByHostInstance||I9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cd.isDisabled&&cd.supportsFiber)try{ac=cd.inject(D9),Ur=cd}catch(i){}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L9,vn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(o))throw Error(n(200));return P9(i,o,null,l)},vn.createRoot=function(i,o){if(!Km(i))throw Error(n(299));var l=!1,h="",E=XS;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Wm(i,1,!1,null,null,l,!1,h,E),i[ii]=o.current,fu(i.nodeType===8?i.parentNode:i),new Xm(o)},vn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=S_(o),i=i===null?null:i.stateNode,i},vn.flushSync=function(i){return Cs(i)},vn.hydrate=function(i,o,l){if(!ud(o))throw Error(n(200));return ld(null,i,o,!0,l)},vn.hydrateRoot=function(i,o,l){if(!Km(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=XS;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=WS(o,null,i,1,l!=null?l:null,E,!1,T,x),i[ii]=o.current,fu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new ad(o)},vn.render=function(i,o,l){if(!ud(o))throw Error(n(200));return ld(null,i,o,!1,l)},vn.unmountComponentAtNode=function(i){if(!ud(i))throw Error(n(40));return i._reactRootContainer?(Cs(function(){ld(null,null,i,!1,function(){i._reactRootContainer=null,i[ii]=null})}),!0):!1},vn.unstable_batchedUpdates=zm,vn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!ud(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ld(i,o,l,!1,h)},vn.version="18.3.1-next-f1338f8080-20240426",vn}var pT;function mT(){if(pT)return xh.exports;pT=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(),xh.exports=x6(),xh.exports}var oo=mT();function w6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ah=()=>e=>Array.from(new Set(e)),gT=typeof globalThis.document!="undefined"?z.useLayoutEffect:z.useEffect;function Hl(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=z.useState(t),[s,a]=z.useState(r),u=e().value!==void 0,c=z.useRef(s);c.current=u?e().value:s;const d=z.useRef(c.current);gT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var w,A;const _=d.current,S=no(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(A=(w=e()).onChange)==null||A.call(w,S,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?oo.flushSync:_L)(()=>f(y))},invoke(y,_){var S,w;(w=(S=e()).onChange)==null||w.call(S,y,_)},hash(y){var _,S,w;return(w=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?w:String(y)}}}Hl.cleanup=e=>{z.useEffect(()=>e,[])},Hl.ref=e=>{const t=z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function C6(e){const t=z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var A6=(e,t)=>{const n=z.useRef(!1),r=z.useRef(!1);z.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function vh(e,t={}){var se,pe,le,fe,Te,Ae;const n=z.useMemo(()=>{const{id:ue,ids:W,getRootNode:ne}=t;return b6({id:ue,ids:W,getRootNode:ne})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},s=(pe=(se=e.props)==null?void 0:se.call(e,{props:fh(t),scope:n}))!=null?pe:t,a=v6(s),u=(le=e.context)==null?void 0:le.call(e,{prop:a,bindable:Hl,scope:n,flush:yT,getContext(){return d},getComputed(){return Z},getRefs(){return S},getEvent(){return y()}}),c=ET(u),d={get(ue){var W;return(W=c.current)==null?void 0:W[ue].ref.current},set(ue,W){var ne;(ne=c.current)==null||ne[ue].set(W)},initial(ue){var W;return(W=c.current)==null?void 0:W[ue].initial},hash(ue){var ne,v;const W=(ne=c.current)==null?void 0:ne[ue].get();return(v=c.current)==null?void 0:v[ue].hash(W)}},f=z.useRef(new Map),p=z.useRef(null),g=z.useRef(null),b=z.useRef({type:""}),y=()=>be(F({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>be(F({},U),{matches(...ue){return ue.includes(U.ref.current)},hasTag(ue){var W,ne;return!!((ne=(W=e.states[U.ref.current])==null?void 0:W.tags)!=null&&ne.includes(ue))}}),S=C6((Te=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?Te:{}),w=()=>({state:_(),context:d,event:y(),prop:a,send:B,action:A,guard:M,track:A6,refs:S,computed:Z,flush:yT,scope:n,choose:q}),A=ue=>{const W=no(ue)?ue(w()):ue;if(!W)return;const ne=W.map(v=>{var Q,O;const L=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[v];return L||hh(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),L});for(const v of ne)v==null||v(w())},M=ue=>{var W,ne;return no(ue)?ue(w()):(ne=(W=e.implementations)==null?void 0:W.guards)==null?void 0:ne[ue](w())},I=ue=>{const W=no(ue)?ue(w()):ue;if(!W)return;const ne=W.map(L=>{var O,_e;const Q=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[L];return Q||hh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),Q}),v=[];for(const L of ne){const Q=L==null?void 0:L(w());Q&&v.push(Q)}return()=>v.forEach(L=>L==null?void 0:L())},q=ue=>dL(ue).find(W=>{let ne=!W.guard;return Rl(W.guard)?ne=!!M(W.guard):no(W.guard)&&(ne=W.guard(w())),ne}),Z=ue=>{xL(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[ue];return W({context:d,event:y(),prop:a,refs:S,scope:n,computed:Z})},U=Hl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,W){var v,L,Q,O;if(W){const _e=f.current.get(W);_e==null||_e(),f.current.delete(W)}W&&A((v=e.states[W])==null?void 0:v.exit),A((L=p.current)==null?void 0:L.actions);const ne=I((Q=e.states[ue])==null?void 0:Q.effects);if(ne&&f.current.set(ue,ne),W===Sh){A(e.entry);const _e=I(e.effects);_e&&f.current.set(Sh,_e)}A((O=e.states[ue])==null?void 0:O.entry)}})),te=z.useRef(void 0),he=z.useRef(so.NotStarted);gT(()=>{queueMicrotask(()=>{var L;const ne=he.current===so.Started;he.current=so.Started,r(ne?"rehydrating...":"initializing...");const v=(L=te.current)!=null?L:U.initial;U.invoke(v,ne?U.get():Sh)});const ue=f.current,W=U.ref.current;return()=>{r("unmounting..."),te.current=W,he.current=so.Stopped,ue.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ye=()=>"ref"in U?U.ref.current:U.get(),B=ue=>{queueMicrotask(()=>{var O,_e,Le,Oe,Ge;if(he.current!==so.Started)return;g.current=b.current,b.current=ue;let W=ye();const ne=(Le=(O=e.states[W].on)==null?void 0:O[ue.type])!=null?Le:(_e=e.on)==null?void 0:_e[ue.type],v=q(ne);if(!v)return;p.current=v;const L=(Oe=v.target)!=null?Oe:W;r("transition",ue.type,v.target||W,`(${v.actions})`);const Q=L!==W;Q?oo.flushSync(()=>U.set(L)):v.reenter&&!Q?U.invoke(W,W):A((Ge=v.actions)!=null?Ge:[])})};return(Ae=e.watch)==null||Ae.call(e,w()),{state:_(),send:B,context:d,prop:a,scope:n,refs:S,computed:Z,event:y(),getStatus:()=>he.current}}function ET(e){const t=z.useRef(e);return t.current=e,t}function v6(e){const t=ET(e);return function(r){return t.current[r]}}function yT(e){queueMicrotask(()=>{oo.flushSync(()=>e())})}var TT=w6(e=>e);function zl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function k6(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const kh=e=>{const t=z.memo(z.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=sn(f,["asChild","children"]);if(!s)return z.createElement(e,be(F({},u),{ref:r}),a);if(!z.isValidElement(a))return null;const c=z.Children.only(a),d=k6(c);return z.cloneElement(c,be(F({},hr(u,c.props)),{ref:r?zl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},_i=(()=>{const e=new Map;return new Proxy(kh,{apply(t,n,r){return kh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,kh(r)),e.get(r)}})})();function N6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ao(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=z.createContext(u);c.displayName=t;function d(){var p;const f=z.useContext(c);if(!f&&n){const g=new Error(a!=null?a:N6(r,s));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[O6,Nh]=ao({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[bT,Ba]=ao({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),_T=z.forwardRef((e,t)=>{const n=Nh(),r=Ba(),s=hr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(_i.div,be(F({},s),{ref:zl(r.ref,t)}))});_T.displayName="PopoverContent";const ST=z.forwardRef((e,t)=>{const n=Nh(),r=Ba(),s=hr(n.getPositionerProps(),e);return r.unmounted?null:C.jsx(_i.div,be(F({},s),{ref:t}))});ST.displayName="PopoverPositioner";const xT=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},F({},e)]),wT=e=>xT()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function P6(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var I6={props({props:e}){return be(F({},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",Fl(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});An(()=>{var c,d;const u=jl(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})=>{An(()=>{e.set("prevAnimationName",jl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,g,b;((b=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?b:d.target)===s&&e.set("prevAnimationName",jl(t.get("styles")))},u=d=>{const f=jl(t.get("styles"));Kr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Ul(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),u6(()=>c())}}}}};function jl(e){return(e==null?void 0:e.animationName)||"none"}Ah()(["onExitComplete","present","immediate"]);function R6(e,t={}){const{sync:n=!1}=t,r=L6(e);return z.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function L6(e){const t=z.useRef(e);return t.current=e,t}const Oh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=sn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=z.useRef(!1),c=be(F({},a),{present:r,onExitComplete:R6(e.onExitComplete)}),d=vh(I6,c),f=P6(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,g=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:g,present:f.present,unmounted:p}};var uo=(e,t=[])=>({parts:(...n)=>{if(D6(t))return uo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>uo(e,[...t,...n]),omit:(...n)=>uo(e,t.filter(r=>!n.includes(r))),rename:n=>uo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${lo(e)}"][data-part="${lo(r)}"]`,`& [data-scope="${lo(e)}"][data-part="${lo(r)}"]`].join(", "),attrs:{"data-scope":lo(e),"data-part":lo(r)}}}),{})}),lo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),D6=e=>e.length===0;const M6=["top","right","bottom","left"],Si=Math.min,Fn=Math.max,$l=Math.round,Vl=Math.floor,Ir=e=>({x:e,y:e}),F6={left:"right",right:"left",bottom:"top",top:"bottom"},B6={start:"end",end:"start"};function Ph(e,t,n){return Fn(e,Si(t,n))}function Jr(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function Ih(e){return e==="x"?"y":"x"}function Rh(e){return e==="y"?"height":"width"}const U6=new Set(["top","bottom"]);function Rr(e){return U6.has(Zr(e))?"y":"x"}function Lh(e){return Ih(Rr(e))}function H6(e,t,n){n===void 0&&(n=!1);const r=co(e),s=Lh(e),a=Rh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ql(u)),[u,ql(u)]}function z6(e){const t=ql(e);return[Dh(e),t,Dh(t)]}function Dh(e){return e.replace(/start|end/g,t=>B6[t])}const CT=["left","right"],AT=["right","left"],j6=["top","bottom"],$6=["bottom","top"];function V6(e,t,n){switch(e){case"top":case"bottom":return n?t?AT:CT:t?CT:AT;case"left":case"right":return t?j6:$6;default:return[]}}function q6(e,t,n,r){const s=co(e);let a=V6(Zr(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Dh)))),a}function ql(e){return e.replace(/left|right|bottom|top/g,t=>F6[t])}function Y6(e){return F({top:0,right:0,bottom:0,left:0},e)}function vT(e){return typeof e!="number"?Y6(e):{top:e,right:e,bottom:e,left:e}}function Yl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function kT(e,t,n){let{reference:r,floating:s}=e;const a=Rr(t),u=Lh(t),c=Rh(u),d=Zr(t),f=a==="y",p=r.x+r.width/2-s.width/2,g=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-s.width,y:g};break;default:y={x:r.x,y:r.y}}switch(co(t)){case"start":y[u]-=b*(n&&f?-1:1);break;case"end":y[u]+=b*(n&&f?-1:1);break}return y}const W6=(e,t,n)=>Ze(null,null,function*(){const{placement:r="bottom",strategy:s="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:s}),{x:p,y:g}=kT(f,r,d),b=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:w,fn:A}=c[S],{x:M,y:I,data:q,reset:Z}=yield A({x:p,y:g,initialPlacement:r,placement:b,strategy:s,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=M!=null?M:p,g=I!=null?I:g,y=be(F({},y),{[w]:F(F({},y[w]),q)}),Z&&_<=50&&(_++,typeof Z=="object"&&(Z.placement&&(b=Z.placement),Z.rects&&(f=Z.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):Z.rects),{x:p,y:g}=kT(f,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:s,middlewareData:y}});function Ua(e,t){return Ze(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:y=0}=Jr(t,e),_=vT(y),w=c[b?g==="floating"?"reference":"floating":g],A=Yl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(w))==null||n?w:w.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),M=g==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),q=(yield a.isElement==null?void 0:a.isElement(I))?(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1}:{x:1,y:1},Z=Yl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:M,offsetParent:I,strategy:d}):M);return{top:(A.top-Z.top+_.top)/q.y,bottom:(Z.bottom-A.bottom+_.bottom)/q.y,left:(A.left-Z.left+_.left)/q.x,right:(Z.right-A.right+_.right)/q.x}})}const G6=e=>({name:"arrow",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=Jr(e,n)||{};if(p==null)return{};const b=vT(g),y={x:r,y:s},_=Lh(a),S=Rh(_),w=yield c.getDimensions(p),A=_==="y",M=A?"top":"left",I=A?"bottom":"right",q=A?"clientHeight":"clientWidth",Z=u.reference[S]+u.reference[_]-y[_]-u.floating[S],U=y[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let he=te?te[q]:0;(!he||!(yield c.isElement==null?void 0:c.isElement(te)))&&(he=d.floating[q]||u.floating[S]);const ye=Z/2-U/2,B=he/2-w[S]/2-1,se=Si(b[M],B),pe=Si(b[I],B),le=se,fe=he-w[S]-pe,Te=he/2-w[S]/2+ye,Ae=Ph(le,Te,fe),ue=!f.arrow&&co(a)!=null&&Te!==Ae&&u.reference[S]/2-(Te<le?se:pe)-w[S]/2<0,W=ue?Te<le?Te-le:Te-fe:0;return{[_]:y[_]+W,data:F({[_]:Ae,centerOffset:Te-Ae-W},ue&&{alignmentOffset:W}),reset:ue}})}}),X6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ze(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=Jr(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=Te,A=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const M=Zr(a),I=Rr(d),q=Zr(d)===d,Z=yield f.isRTL==null?void 0:f.isRTL(p.floating),U=y||(q||!w?[ql(d)]:z6(d)),te=S!=="none";!y&&te&&U.push(...q6(d,w,S,Z));const he=[d,...U],ye=yield Ua(n,A),B=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(g&&B.push(ye[M]),b){const Ae=H6(a,c,Z);B.push(ye[Ae[0]],ye[Ae[1]])}if(se=[...se,{placement:a,overflows:B}],!B.every(Ae=>Ae<=0)){var pe,le;const Ae=(((pe=u.flip)==null?void 0:pe.index)||0)+1,ue=he[Ae];if(ue&&(!(b==="alignment"?I!==Rr(ue):!1)||se.every(v=>Rr(v.placement)===I?v.overflows[0]>0:!0)))return{data:{index:Ae,overflows:se},reset:{placement:ue}};let W=(le=se.filter(ne=>ne.overflows[0]<=0).sort((ne,v)=>ne.overflows[1]-v.overflows[1])[0])==null?void 0:le.placement;if(!W)switch(_){case"bestFit":{var fe;const ne=(fe=se.filter(v=>{if(te){const L=Rr(v.placement);return L===I||L==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(L=>L>0).reduce((L,Q)=>L+Q,0)]).sort((v,L)=>v[1]-L[1])[0])==null?void 0:fe[0];ne&&(W=ne);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function NT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OT(e){return M6.some(t=>e[t]>=0)}const K6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ze(this,null,function*(){const{rects:r}=n,u=Jr(e,n),{strategy:s="referenceHidden"}=u,a=sn(u,["strategy"]);switch(s){case"referenceHidden":{const c=yield Ua(n,be(F({},a),{elementContext:"reference"})),d=NT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:OT(d)}}}case"escaped":{const c=yield Ua(n,be(F({},a),{altBoundary:!0})),d=NT(c,r.floating);return{data:{escapedOffsets:d,escaped:OT(d)}}}default:return{}}})}}},PT=new Set(["left","top"]);function Q6(e,t){return Ze(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Zr(n),c=co(n),d=Rr(n)==="y",f=PT.has(u)?-1:1,p=a&&d?-1:1,g=Jr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const J6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ze(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield Q6(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:be(F({},f),{placement:c})}})}}},Z6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:s,placement:a}=n,A=Jr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:M=>{let{x:I,y:q}=M;return{x:I,y:q}}}}=A,f=sn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},g=yield Ua(n,f),b=Rr(Zr(a)),y=Ih(b);let _=p[y],S=p[b];if(u){const M=y==="y"?"top":"left",I=y==="y"?"bottom":"right",q=_+g[M],Z=_-g[I];_=Ph(q,_,Z)}if(c){const M=b==="y"?"top":"left",I=b==="y"?"bottom":"right",q=S+g[M],Z=S-g[I];S=Ph(q,S,Z)}const w=d.fn(be(F({},n),{[y]:_,[b]:S}));return be(F({},w),{data:{x:w.x-r,y:w.y-s,enabled:{[y]:u,[b]:c}}})})}}},e4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Jr(e,t),p={x:n,y:r},g=Rr(s),b=Ih(g);let y=p[b],_=p[g];const S=Jr(c,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:F({mainAxis:0,crossAxis:0},S);if(d){const I=b==="y"?"height":"width",q=a.reference[b]-a.floating[I]+w.mainAxis,Z=a.reference[b]+a.reference[I]-w.mainAxis;y<q?y=q:y>Z&&(y=Z)}if(f){var A,M;const I=b==="y"?"width":"height",q=PT.has(Zr(s)),Z=a.reference[g]-a.floating[I]+(q&&((A=u.offset)==null?void 0:A[g])||0)+(q?0:w.crossAxis),U=a.reference[g]+a.reference[I]+(q?0:((M=u.offset)==null?void 0:M[g])||0)-(q?w.crossAxis:0);_<Z?_=Z:_>U&&(_=U)}return{[b]:y,[g]:_}}}},t4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ze(this,null,function*(){var r,s;const{placement:a,rects:u,platform:c,elements:d}=n,se=Jr(e,n),{apply:f=()=>{}}=se,p=sn(se,["apply"]),g=yield Ua(n,p),b=Zr(a),y=co(a),_=Rr(a)==="y",{width:S,height:w}=u.floating;let A,M;b==="top"||b==="bottom"?(A=b,M=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(M=b,A=y==="end"?"top":"bottom");const I=w-g.top-g.bottom,q=S-g.left-g.right,Z=Si(w-g[A],I),U=Si(S-g[M],q),te=!n.middlewareData.shift;let he=Z,ye=U;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=q),(s=n.middlewareData.shift)!=null&&s.enabled.y&&(he=I),te&&!y){const pe=Fn(g.left,0),le=Fn(g.right,0),fe=Fn(g.top,0),Te=Fn(g.bottom,0);_?ye=S-2*(pe!==0||le!==0?pe+le:Fn(g.left,g.right)):he=w-2*(fe!==0||Te!==0?fe+Te:Fn(g.top,g.bottom))}yield f(be(F({},n),{availableWidth:ye,availableHeight:he}));const B=yield c.getDimensions(d.floating);return S!==B.width||w!==B.height?{reset:{rects:!0}}:{}})}}};function Wl(){return typeof window!="undefined"}function fo(e){return IT(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(IT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IT(e){return Wl()?e instanceof Node||e instanceof Bn(e).Node:!1}function pr(e){return Wl()?e instanceof Element||e instanceof Bn(e).Element:!1}function Dr(e){return Wl()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function RT(e){return!Wl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}const n4=new Set(["inline","contents"]);function Ha(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!n4.has(s)}const r4=new Set(["table","td","th"]);function i4(e){return r4.has(fo(e))}const s4=[":popover-open",":modal"];function Gl(e){return s4.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const o4=["transform","translate","scale","rotate","perspective"],a4=["transform","translate","scale","rotate","perspective","filter"],u4=["paint","layout","strict","content"];function Mh(e){const t=Fh(),n=pr(e)?mr(e):e;return o4.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)||a4.some(r=>(n.willChange||"").includes(r))||u4.some(r=>(n.contain||"").includes(r))}function l4(e){let t=xi(e);for(;Dr(t)&&!ho(t);){if(Mh(t))return t;if(Gl(t))return null;t=xi(t)}return null}function Fh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c4=new Set(["html","body","#document"]);function ho(e){return c4.has(fo(e))}function mr(e){return Bn(e).getComputedStyle(e)}function Xl(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xi(e){if(fo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||RT(e)&&e.host||Lr(e);return RT(t)?t.host:t}function LT(e){const t=xi(e);return ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&Ha(t)?t:LT(t)}function za(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=LT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Bn(s);if(a){const c=Bh(u);return t.concat(u,u.visualViewport||[],Ha(s)?s:[],c&&n?za(c):[])}return t.concat(s,za(s,[],n))}function Bh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DT(e){const t=mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Dr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=$l(n)!==a||$l(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Uh(e){return pr(e)?e:e.contextElement}function po(e){const t=Uh(e);if(!Dr(t))return Ir(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=DT(t);let u=(a?$l(n.width):n.width)/r,c=(a?$l(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const d4=Ir(0);function MT(e){const t=Bn(e);return!Fh()||!t.visualViewport?d4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bn(e)?!1:t}function cs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Uh(e);let u=Ir(1);t&&(r?pr(r)&&(u=po(r)):u=po(e));const c=f4(a,n,r)?MT(a):Ir(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,g=s.height/u.y;if(a){const b=Bn(a),y=r&&pr(r)?Bn(r):r;let _=b,S=Bh(_);for(;S&&r&&y!==_;){const w=po(S),A=S.getBoundingClientRect(),M=mr(S),I=A.left+(S.clientLeft+parseFloat(M.paddingLeft))*w.x,q=A.top+(S.clientTop+parseFloat(M.paddingTop))*w.y;d*=w.x,f*=w.y,p*=w.x,g*=w.y,d+=I,f+=q,_=Bn(S),S=Bh(_)}}return Yl({width:p,height:g,x:d,y:f})}function Kl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:cs(Lr(e)).left+n}function FT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Kl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function h4(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Lr(r),c=t?Gl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ir(1);const p=Ir(0),g=Dr(r);if((g||!g&&!a)&&((fo(r)!=="body"||Ha(u))&&(d=Xl(r)),Dr(r))){const y=cs(r);f=po(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?FT(u,d):Ir(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function p4(e){return Array.from(e.getClientRects())}function m4(e){const t=Lr(e),n=Xl(e),r=e.ownerDocument.body,s=Fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Kl(e);const c=-n.scrollTop;return mr(r).direction==="rtl"&&(u+=Fn(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const BT=25;function g4(e,t){const n=Bn(e),r=Lr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Fh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=Kl(r);if(f<=0){const p=r.ownerDocument,g=p.body,b=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=BT&&(a-=_)}else f<=BT&&(a+=f);return{width:a,height:u,x:c,y:d}}const E4=new Set(["absolute","fixed"]);function y4(e,t){const n=cs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Dr(e)?po(e):Ir(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function UT(e,t,n){let r;if(t==="viewport")r=g4(e,n);else if(t==="document")r=m4(Lr(e));else if(pr(t))r=y4(t,n);else{const s=MT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Yl(r)}function HT(e,t){const n=xi(e);return n===t||!pr(n)||ho(n)?!1:mr(n).position==="fixed"||HT(n,t)}function T4(e,t){const n=t.get(e);if(n)return n;let r=za(e,[],!1).filter(c=>pr(c)&&fo(c)!=="body"),s=null;const a=mr(e).position==="fixed";let u=a?xi(e):e;for(;pr(u)&&!ho(u);){const c=mr(u),d=Mh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&E4.has(s.position)||Ha(u)&&!d&&HT(e,u))?r=r.filter(p=>p!==u):s=c,u=xi(u)}return t.set(e,r),r}function b4(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Gl(t)?[]:T4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=UT(t,p,s);return f.top=Fn(g.top,f.top),f.right=Si(g.right,f.right),f.bottom=Si(g.bottom,f.bottom),f.left=Fn(g.left,f.left),f},UT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _4(e){const{width:t,height:n}=DT(e);return{width:t,height:n}}function S4(e,t,n){const r=Dr(t),s=Lr(t),a=n==="fixed",u=cs(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Ir(0);function f(){d.x=Kl(s)}if(r||!r&&!a)if((fo(t)!=="body"||Ha(s))&&(c=Xl(t)),r){const y=cs(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?FT(s,c):Ir(0),g=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:g,y:b,width:u.width,height:u.height}}function Hh(e){return mr(e).position==="static"}function zT(e,t){if(!Dr(e)||mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lr(e)===n&&(n=n.ownerDocument.body),n}function jT(e,t){const n=Bn(e);if(Gl(e))return n;if(!Dr(e)){let s=xi(e);for(;s&&!ho(s);){if(pr(s)&&!Hh(s))return s;s=xi(s)}return n}let r=zT(e,t);for(;r&&i4(r)&&Hh(r);)r=zT(r,t);return r&&ho(r)&&Hh(r)&&!Mh(r)?n:r||l4(e)||n}const x4=function(e){return Ze(this,null,function*(){const t=this.getOffsetParent||jT,n=this.getDimensions,r=yield n(e.floating);return{reference:S4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function w4(e){return mr(e).direction==="rtl"}const C4={convertOffsetParentRelativeRectToViewportRelativeRect:h4,getDocumentElement:Lr,getClippingRect:b4,getOffsetParent:jT,getElementRects:x4,getClientRects:p4,getDimensions:_4,getScale:po,isElement:pr,isRTL:w4};function $T(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A4(e,t){let n=null,r;const s=Lr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:g,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=Vl(g),S=Vl(s.clientWidth-(p+b)),w=Vl(s.clientHeight-(g+y)),A=Vl(p),I={rootMargin:-_+"px "+-S+"px "+-w+"px "+-A+"px",threshold:Fn(0,Si(1,d))||1};let q=!0;function Z(U){const te=U[0].intersectionRatio;if(te!==d){if(!q)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!$T(f,e.getBoundingClientRect())&&u(),q=!1}try{n=new IntersectionObserver(Z,be(F({},I),{root:s.ownerDocument}))}catch(U){n=new IntersectionObserver(Z,I)}n.observe(e)}return u(!0),a}function v4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Uh(e),p=s||a?[...f?za(f):[],...za(t)]:[];p.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const g=f&&c?A4(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(A=>{let[M]=A;M&&M.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?cs(e):null;d&&w();function w(){const A=cs(e);S&&!$T(S,A)&&n(),S=A,_=requestAnimationFrame(w)}return n(),()=>{var A;p.forEach(M=>{s&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),g==null||g(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const k4=J6,N4=Z6,O4=X6,P4=t4,I4=K6,R4=G6,L4=e4,D4=(e,t,n)=>{const r=new Map,s=F({platform:C4},n),a=be(F({},s.platform),{_c:r});return W6(e,t,be(F({},s),{platform:a}))};function VT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return be(F({},s),{toJSON:()=>s})}function M4(e){if(!e)return VT();const{x:t,y:n,width:r,height:s}=e;return VT(t,n,r,s)}function F4(e,t){return{contextElement:Qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?M4(r):n.getBoundingClientRect()}}}var ja=e=>({variable:e,reference:`var(${e})`}),ei={arrowSize:ja("--arrow-size"),arrowSizeHalf:ja("--arrow-size-half"),arrowBg:ja("--arrow-background"),transformOrigin:ja("--transform-origin"),arrowOffset:ja("--arrow-offset")},B4=e=>e==="top"||e==="bottom"?"y":"x";function U4(e,t){return{name:"transformOrigin",fn(n){var ye,B,se,pe,le;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=B4(d),p=((ye=s.arrow)==null?void 0:ye.x)||0,g=((B=s.arrow)==null?void 0:B.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,S=g+y/2,w=Math.abs(((se=s.shift)==null?void 0:se.y)||0),A=u.reference.height/2,M=y/2,I=(le=(pe=e.offset)==null?void 0:pe.mainAxis)!=null?le:e.gutter,q=typeof I=="number"?I+M:I!=null?I:M,Z=w>q,U={top:`${_}px calc(100% + ${q}px)`,bottom:`${_}px ${-q}px`,left:`calc(100% + ${q}px) ${S}px`,right:`${-q}px ${S}px`}[d],te=`${_}px ${u.reference.y+A-c}px`,he=!!e.overlap&&f==="y"&&Z;return r.floating.style.setProperty(ei.transformOrigin.variable,he?te:U),{data:{transformOrigin:he?te:U}}}}}var H4={name:"rects",fn({rects:e}){return{data:e}}},z4=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${ei.arrowOffset.reference})`}),{}}}};function j4(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 qT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function zh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function V4(e,t,n){const r=e||t.createElement("div");return R4({element:r,padding:n.arrowPadding})}function q4(e,t){var n;if(!hL((n=t.offset)!=null?n:t.gutter))return k4(({placement:r})=>{var p,g,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=j4(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return fh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function Y4(e){if(!e.flip)return;const t=zh(e.boundary);return O4(be(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function W4(e){if(!e.slide&&!e.overlap)return;const t=zh(e.boundary);return N4(be(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:L4()}))}function G4(e){return P4({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function X4(e){var t;if(e.hideWhenDetached)return I4({strategy:"referenceHidden",boundary:(t=zh(e.boundary))!=null?t:"clippingAncestors"})}function K4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Q4(e,t,n={}){const r=F4(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},$4,n),a=t.querySelector("[data-part=arrow]"),u=[q4(a,s),Y4(s),W4(s),V4(a,t.ownerDocument,s),z4(a),U4({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),G4(s),X4(s),H4],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,g=()=>Ze(null,null,function*(){var q;if(!r||!t)return;const S=yield D4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const w=ro(t),A=qT(w,S.x),M=qT(w,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${M}px`),s.hideWhenDetached&&(((q=S.middlewareData.hide)==null?void 0:q.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Z=Fl(I);t.style.setProperty("--z-index",Z.zIndex)}}),b=()=>Ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=K4(s.listeners),_=s.listeners?v4(r,t,b,y):SL;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function YT(e,t,n={}){const c=n,{defer:r}=c,s=sn(c,["defer"]),a=r?An:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(Q4(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var J4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Z4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ei.arrowSize.reference,height:ei.arrowSize.reference,[ei.arrowSizeHalf.variable]:`calc(${ei.arrowSize.reference} / 2)`,[ei.arrowOffset.variable]:`calc(${ei.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?J4[t.split("-")[0]]:void 0,background:ei.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var mo=new WeakMap,Ql=new WeakMap,Jl={},jh=0,WT=e=>e&&(e.host||WT(e.parentNode)),eD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=WT(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),tD=new Set(["script","output","status","next-route-announcer"]),nD=e=>tD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),rD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=eD(n,Array.isArray(e)?e:[e]);Jl[r]||(Jl[r]=new WeakMap);const c=Jl[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Qt(y)&&nT(y,_=>{g(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(nD(_))return;const w=_.getAttribute(s)==="true",A=(mo.get(_)||0)+1,M=(c.get(_)||0)+1;mo.set(_,A),c.set(_,M),d.push(_),A===1&&w&&Ql.set(_,!0),M===1&&_.setAttribute(r,""),w||_.setAttribute(s,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),f.clear(),jh++,()=>{d.forEach(y=>{const _=mo.get(y)-1,S=c.get(y)-1;mo.set(y,_),c.set(y,S),_||(Ql.has(y)||y.removeAttribute(s),Ql.delete(y)),S||y.removeAttribute(r)}),jh--,jh||(mo=new WeakMap,mo=new WeakMap,Ql=new WeakMap,Jl={})}},iD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,sD=(e,t=iD(e),n="data-aria-hidden",r=!0)=>{if(t)return rD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},oD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function GT(e,t={}){const{defer:n=!0}=t,r=n?oD:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(sD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function aD(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function uD(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var XT="pointerdown.outside",KT="focus.outside";function lD(e){for(const t of e)if(Qt(t)&&Qr(t))return!0;return!1}var QT=e=>"clientY"in e;function cD(e,t){if(!QT(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 dD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function JT(e,t){if(!t||!QT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return dD(u,c)?r||a:!1}function fD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Pr(e),f=ro(e),p=aD(f),g=uD(f);function b(I,q){if(!Qt(q)||!q.isConnected||Ml(e,q)||cD(e,I)||c&&tT(e,q))return!1;const Z=d.querySelector(`[aria-controls="${e.id}"]`);if(Z){const te=_h(Z);if(JT(I,te))return!1}const U=_h(e);return JT(I,U)?!1:!(n!=null&&n(q))}const y=new Set,_=us(e==null?void 0:e.getRootNode());function S(I){function q(Z){var ye,B;const U=u&&!rT()?An:se=>se(),te=Z!=null?Z:I,he=(B=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?B:[te==null?void 0:te.target];U(()=>{const se=_?he[0]:Kr(I);if(!(!e||!b(I,se))){if(s||a){const pe=dh(s,a);e.addEventListener(XT,pe,{once:!0})}ZT(e,XT,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:e6(te),focusable:lD(he),target:se}})}})}I.pointerType==="touch"?(y.forEach(Z=>Z()),y.add(fr(d,"click",q,{once:!0})),y.add(g.addEventListener("click",q,{once:!0})),y.add(p.addEventListener("click",q,{once:!0}))):q()}const w=new Set,A=setTimeout(()=>{w.add(fr(d,"pointerdown",S,!0)),w.add(g.addEventListener("pointerdown",S,!0)),w.add(p.addEventListener("pointerdown",S,!0))},0);function M(I){(u?An:Z=>Z())(()=>{var te,he;const Z=(he=(te=I==null?void 0:I.composedPath)==null?void 0:te.call(I))!=null?he:[I==null?void 0:I.target],U=_?Z[0]:Kr(I);if(!(!e||!b(I,U))){if(r||a){const ye=dh(r,a);e.addEventListener(KT,ye,{once:!0})}ZT(e,KT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Qr(U),target:U}})}})}return rT()||(w.add(fr(d,"focusin",M,!0)),w.add(g.addEventListener("focusin",M,!0)),w.add(p.addEventListener("focusin",M,!0))),()=>{clearTimeout(A),y.forEach(I=>I()),w.forEach(I=>I())}}function hD(e,t){const{defer:n}=t,r=n?An:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(fD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function ZT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function pD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return fr(Pr(e),"keydown",n,{capture:!0})}var eb="layer:request-dismiss",Kn={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=>Ml(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ml(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=>Kn.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];gD(e,eb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),mD(e,eb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function mD(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function gD(e,t,n){e.addEventListener(t,n,{once:!0})}var tb;function nb(){Kn.layers.forEach(({node:e})=>{e.style.pointerEvents=Kn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function ED(e){e.style.pointerEvents=""}function yD(e,t){const n=Pr(e),r=[];return Kn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(tb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=g6(()=>{const c=s();return Qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ul(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Kn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=tb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function TD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){hh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Kn.add(f),nb();function p(S){var A,M;const w=Kr(S.detail.originalEvent);Kn.isBelowPointerBlockingLayer(e)||Kn.isInBranch(w)||((A=t.onPointerDownOutside)==null||A.call(t,S),(M=t.onInteractOutside)==null||M.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var A,M;const w=Kr(S.detail.originalEvent);Kn.isInBranch(w)||((A=t.onFocusOutside)==null||A.call(t,S),(M=t.onInteractOutside)==null||M.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var w;Kn.isTopMost(e)&&((w=t.onEscapeKeyDown)==null||w.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var I;if(!e)return!1;const w=typeof u=="function"?u():u,A=Array.isArray(w)?w:[w],M=(I=t.persistentElements)==null?void 0:I.map(q=>q()).filter(Qt);return M&&A.push(...M),A.some(q=>Ml(q,S))||Kn.isInNestedLayer(e,S)}const _=[a?yD(e,t.persistentElements):void 0,pD(e,b),hD(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Kn.remove(e),nb(),ED(e),_.forEach(S=>S==null?void 0:S())}}function rb(e,t){const{defer:n}=t,r=n?An:a=>a(),s=[];return s.push(r(()=>{const a=no(e)?e():e;s.push(TD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var bD=Object.defineProperty,_D=(e,t,n)=>t in e?bD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>_D(e,typeof t!="symbol"?t+"":t,n),ib={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()}},SD=[],xD=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const s=Kr(r),a=this.findContainerIndex(s,r)>=0;if(a||Dl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Fa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Fa(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),wt(this,"handlePointerDown",r=>{const s=Kr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Va(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Va(this.config.allowOutsideClick,r)||r.preventDefault()}}),wt(this,"handleClick",r=>{const s=Kr(r);this.findContainerIndex(s,r)>=0||Va(this.config.clickOutsideDeactivates,r)||Va(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;$a(r)&&r.preventDefault(),this.tryFocus(a)}}),wt(this,"handleEscapeKey",r=>{wD(r)&&Va(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return VL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?qL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Qr(r)){const s=io(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,CD(r)&&r.select()}}),wt(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({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(),ib.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{sb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),wt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),wt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),wt(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),wt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||Kr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Qr(u)&&!ls(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[g];c=Fa(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else $a(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Qr(u)&&!ls(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[g];c=Fa(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else $a(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||SD;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return $a(r)&&!r.shiftKey},isKeyBackward(r){return $a(r)&&r.shiftKey}},t);this.doc=n.document||Pr(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=>{zL(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?tT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Ma(e,{getShadowRoot:this.config.getShadowRoot}),n=uT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(Fa(t[f])>0){c=!0;break}function d(f,p=!0){const g=t.indexOf(f);if(g>=0)return t[g+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ls(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ls(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ib.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?sb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(fr(this.doc,"focusin",this.handleFocus,!0),fr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),fr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),fr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),fr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),fr(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=io(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},$a=e=>e.key==="Tab",Va=(e,...t)=>typeof e=="function"?e(...t):e,wD=e=>!e.isComposing&&e.key==="Escape",sb=e=>setTimeout(e,0),CD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function ob(e,t={}){let n;const r=An(()=>{const s=typeof e=="function"?e():e;if(s){n=new xD(s,be(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Pr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var $h="data-scroll-lock";function AD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function ab(e){const t=Fl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ub(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute($h))return;const u=ab(r)||ab(s),c=n.innerWidth-r.clientWidth;s.setAttribute($h,"");const d=()=>p6(r,"--scrollbar-width",`${c}px`),f=AD(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ul(s,_)},g=()=>{var Z,U;const{scrollX:_,scrollY:S,visualViewport:w}=n,A=(Z=w==null?void 0:w.offsetLeft)!=null?Z:0,M=(U=w==null?void 0:w.offsetTop)!=null?U:0,I={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(M))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(I[f]=`${c}px`);const q=Ul(s,I);return()=>{q==null||q(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),iT()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute($h)}}var vD=uo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Mr=vD.build(),lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},kD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},ND=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},fb=e=>e.getById(lb(e)),go=e=>e.getById(cb(e)),Eo=e=>e.getById(Vh(e)),hb=e=>e.getById(db(e)),OD=e=>e.getById(qh(e)),PD=e=>e.getById(Yh(e));function ID(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),b=Z4(be(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(be(F({id:kD(c)},Mr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(be(F({},Mr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(be(F({},Mr.anchor.attrs),{dir:u("dir"),id:lb(c)}))},getTriggerProps(){return t.button(be(F({},Mr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:cb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Vh(c),onPointerDown(y){ZL(y)&&QL()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(be(F({},Mr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(F({id:db(c)},Mr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(be(F({},Mr.content.attrs),{dir:u("dir"),id:Vh(c),tabIndex:-1,role:"dialog","aria-modal":vL(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":AL(d),"aria-labelledby":g.title?qh(c):void 0,"aria-describedby":g.description?Yh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(be(F({},Mr.title.attrs),{id:qh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(be(F({},Mr.description.attrs),{id:Yh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(be(F({},Mr.closeTrigger.attrs),{dir:u("dir"),id:ND(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var RD={props({props:e}){return be(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=fb(n))!=null?a:go(n);return YT(r,()=>hb(n),be(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Eo(n);let s=!0;return rb(r,{type:"popover",pointerBlocking:t("modal"),exclude:go(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:h6(()=>Eo(t),{triggerElement:go(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?GT(()=>[Eo(t),go(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ub(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?ob(()=>Eo(t),{initialFocus:()=>lT({root:Eo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=fb(n))!=null?u:go(n);YT(s,()=>hb(n),be(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){An(()=>{Object.assign(e.get("renderedElements"),{title:!!OD(t),description:!!PD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||An(()=>{const n=lT({root:Eo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||An(()=>{const a=go(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})}}}};Ah()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[kB,Wh]=ao({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[NB,pb]=ao({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),LD=e=>{const t=z.useId(),{getRootNode:n}=Wh(),{dir:r}=pb(),s=F({id:t,dir:r,getRootNode:n},e),a=vh(RD,s);return ID(a,TT)},DD=e=>{const[t,u]=wT(e),c=u,{children:n}=c,r=sn(c,["children"]),s=LD(r),a=Oh(hr({present:s.open},t));return C.jsx(O6,{value:s,children:C.jsx(bT,{value:a,children:n})})},mb=z.forwardRef((e,t)=>{const n=Nh(),r=Ba(),s=hr(be(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return C.jsx(_i.button,be(F({},s),{ref:t}))});mb.displayName="PopoverTrigger";function MD(e){return Vt({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 FD(e){return Vt({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 BD(e){return Vt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function UD(e){return Vt({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 gb(e){return Vt({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 HD=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=Ar(),r=()=>{n(),e()};return C.jsxs("button",{className:K(`${j}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[C.jsx(gb,{}),"Clear chat"]})},zD=({className:e,componentType:t,children:n})=>{const[r,s]=z.useState(!1),{globalClassName:a}=ft(),u=()=>{s(!1)},c=d=>{s(d.open)};return C.jsxs(DD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[C.jsx(mb,{"aria-label":`Overflow menu for ${t}`,className:K(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,t),children:C.jsx(UD,{})}),C.jsx(ST,{children:C.jsxs(_T,{className:K(`${j}-overflow-menu-list`,a,t),children:[n,C.jsx(HD,{componentType:t,onClearChat:u})]})})]})};function Eb(e){return Vt({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 yb(e){return Vt({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 Tb=r=>{var s=r,{onClearChat:e,componentType:t}=s,n=sn(s,["onClearChat","componentType"]);const{globalClassName:a}=ft(),{resetConversation:u}=Ar(),c=()=>{u(),e==null||e()};return C.jsx(vr,F({icon:C.jsx(gb,{size:"16px"}),ariaLabel:"Clear Chat",className:K(a,`${j}-clear-chat-icon-button`,t),onClick:c},n))},bb=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ft();if(!r)return null;const s=()=>{Zi(!1),rl(!0)};return t?C.jsx(vr,{className:K(n,`${j}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:C.jsx(u1,{})}):C.jsxs("button",{className:K(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,e),onClick:s,children:[C.jsx(u1,{}),"Minimize"]})},_b=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=()=>{il("modal")};return t?C.jsx(vr,{className:K(n,`${j}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:C.jsx(yb,{})}):C.jsxs("button",{className:K(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,e),onClick:r,children:[C.jsx(yb,{}),"Show modal"]})},jD=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=ft();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return C.jsxs("div",{className:K(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[C.jsx("img",{className:K(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),C.jsxs("div",{className:K(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[C.jsxs("div",{className:K(r,`${j}-product-tile-content`),children:[u&&C.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?C.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:K(r,`${j}-product-tile-pdp`),href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",C.jsx("span",{className:K(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):C.jsx("p",{className:K(r,`${j}-product-tile-name`),title:a,children:a})]}),C.jsx("div",{className:K(r,`${j}-product-tile-footer`),children:C.jsx("p",{className:K(r,`${j}-product-tile-price`),children:c})})]})]})},$D=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ft(),s=t;return n?C.jsxs("div",{className:K(r,`${j}-display-products widget-message`),children:[C.jsx("p",{children:s.message}),s.products&&s.products.length>0&&C.jsx("div",{className:K(r,`${j}-product-list`,{embedded:!e,standalone:e}),children:s.products.map(a=>{const u=n.getPid(a);return C.jsx(jD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},VD=({globalClassName:e,message:t,isWidgetStandalone:n})=>C.jsx("div",{className:K(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:C.jsxs("p",{className:K(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[C.jsx(Sv,{})," ",t.message||"An error occurred while processing your request."]})});function qD(e){return Vt({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 YD=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,hasSourceEvent:s,suggestions:a,handleSuggestionClick:u})=>C.jsx("div",{className:K(e,`${j}-suggestion-container standalone`),children:a.map(c=>C.jsxs(df,{disabled:r||!s,className:K(e,`${j}-suggestion-button standalone`),onClick:()=>u(c,n||t),children:[C.jsx(qD,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",c.displayText]},c.displayText))}),WD=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:s}=Ar(),{messages:a}=Gr(),u=a.some(c=>c.id===t.eventSourceId);return C.jsxs("div",{className:K(e,`${j}-follow-up`),children:[C.jsx("p",{className:K(e,`${j}-text`),children:t.message}),n&&C.jsx(YD,{globalClassName:e,isLoading:s,hasSourceEvent:u,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&C.jsx("div",{className:K(e,`${j}-suggestion-container embedded`),children:t.suggestions.map(c=>C.jsx("button",{disabled:s||!u,className:K(e,`${j}-suggestion-button embedded`),onClick:()=>r(c,t.eventSourceId||t.id),children:c.displayText},c.displayText))})]})};function Sb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function GD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XD(e,t,n){const s=Tl((n||{}).ignore||[]),a=KD(t);let u=-1;for(;++u<a.length;)bE(e,"text",c);function c(f,p){let g=-1,b;for(;++g<p.length;){const y=p[g],_=b?b.children:void 0;if(s(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const g=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const w=g.children.indexOf(f);let A=!1,M=[];b.lastIndex=0;let I=b.exec(f.value);for(;I;){const q=I.index,Z={index:I.index,input:I.input,stack:[...p,f]};let U=y(...I,Z);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?b.lastIndex=q+1:(_!==q&&M.push({type:"text",value:f.value.slice(_,q)}),Array.isArray(U)?M.push(...U):U&&M.push(U),_=q+I[0].length,A=!0),!b.global)break;I=b.exec(f.value)}return A?(_<f.value.length&&M.push({type:"text",value:f.value.slice(_)}),g.children.splice(w,1,...M)):M=[f],w+M.length}}function KD(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([QD(s[0]),JD(s[1])])}return t}function QD(e){return typeof e=="string"?new RegExp(GD(e),"g"):e}function JD(e){return typeof e=="function"?e:function(){return e}}const Gh="phrasing",Xh=["autolink","link","image","label"];function ZD(){return{transforms:[o5],enter:{literalAutolink:t5,literalAutolinkEmail:Kh,literalAutolinkHttp:Kh,literalAutolinkWww:Kh},exit:{literalAutolink:s5,literalAutolinkEmail:i5,literalAutolinkHttp:n5,literalAutolinkWww:r5}}}function e5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gh,notInConstruct:Xh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gh,notInConstruct:Xh},{character:":",before:"[ps]",after:"\\/",inConstruct:Gh,notInConstruct:Xh}]}}function t5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Kh(e){this.config.enter.autolinkProtocol.call(this,e)}function n5(e){this.config.exit.autolinkProtocol.call(this,e)}function r5(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 i5(e){this.config.exit.autolinkEmail.call(this,e)}function s5(e){this.exit(e)}function o5(e){XD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u5]],{ignore:["link","linkReference"]})}function a5(e,t,n,r,s){let a="";if(!xb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!l5(n)))return!1;const u=c5(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 u5(e,t,n,r){return!xb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l5(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 c5(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Sb(e,"(");let a=Sb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function xb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ts(n)||fl(n))&&(!t||n!==47)}wb.peek=T5;function d5(){this.buffer()}function f5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h5(){this.buffer()}function p5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g5(e){this.exit(e)}function E5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y5(e){this.exit(e)}function T5(){return"["}function wb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function b5(){return{enter:{gfmFootnoteCallString:d5,gfmFootnoteCall:f5,gfmFootnoteDefinitionLabelString:h5,gfmFootnoteDefinition:p5},exit:{gfmFootnoteCallString:m5,gfmFootnoteCall:g5,gfmFootnoteDefinitionLabelString:E5,gfmFootnoteDefinition:y5}}}function _5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:wb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Cb:S5))),f(),d}}function S5(e,t,n){return t===0?e:Cb(e,t,n)}function Cb(e,t,n){return(n?"":" ")+e}const x5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ab.peek=k5;function w5(){return{canContainEols:["delete"],enter:{strikethrough:A5},exit:{strikethrough:v5}}}function C5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:x5}],handlers:{delete:Ab}}}function A5(e){this.enter({type:"delete",children:[]},e)}function v5(e){this.exit(e)}function Ab(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,be(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function k5(){return"~"}function N5(e){return e.length}function O5(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||N5,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],w=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const M=P5(e[p][A]);if(n.alignDelimiters!==!1){const I=s(M);w[A]=I,(d[A]===void 0||I>d[A])&&(d[A]=I)}S.push(M)}u[p]=S,c[p]=w}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)a[g]=vb(r[g]);else{const S=vb(r);for(;++g<f;)a[g]=S}g=-1;const b=[],y=[];for(;++g<f;){const S=a[g];let w="",A="";S===99?(w=":",A=":"):S===108?w=":":S===114&&(A=":");let M=n.alignDelimiters===!1?1:Math.max(1,d[g]-w.length-A.length);const I=w+"-".repeat(M)+A;n.alignDelimiters!==!1&&(M=w.length+M+A.length,M>d[g]&&(d[g]=M),y[g]=M),b[g]=I}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],w=c[p];g=-1;const A=[];for(;++g<f;){const M=S[g]||"";let I="",q="";if(n.alignDelimiters!==!1){const Z=d[g]-(w[g]||0),U=a[g];U===114?I=" ".repeat(Z):U===99?Z%2?(I=" ".repeat(Z/2+.5),q=" ".repeat(Z/2-.5)):(I=" ".repeat(Z/2),q=I):q=" ".repeat(Z)}n.delimiterStart!==!1&&!g&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||g)&&A.push(" "),n.alignDelimiters!==!1&&A.push(I),A.push(M),n.alignDelimiters!==!1&&A.push(q),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
33
+ `)}function P5(e){return e==null?"":String(e)}function vb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function I5(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),R5);return s(),u}function R5(e,t,n){return">"+(n?"":" ")+e}function L5(e,t){return kb(e,t.inConstruct,!0)&&!kb(e,t.notInConstruct,!1)}function kb(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 Nb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
+ `&&L5(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function D5(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function M5(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 F5(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 B5(e,t,n,r){const s=F5(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(M5(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,U5);return g(),b}const c=n.createTracker(r),d=s.repeat(Math.max(D5(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
36
+ `,encode:["`"]},c.current()))),g()}return p+=c.move(`
37
37
  `),a&&(p+=c.move(a+`
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:`
38
+ `)),p+=c.move(d),f(),p}function U5(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 H5(e,t,n,r){const s=Qh(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
39
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function z5(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 qa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Zl(e,t,n){const r=Ws(e),s=Ws(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ob.peek=j5;function Ob(e,t,n,r){const s=z5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=qa(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=Zl(r.after.charCodeAt(0),g,s);b.inside&&(d=d.slice(0,-1)+qa(g));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function j5(e,t,n){return n.options.emphasis||"*"}function $5(e,t){let n=!1;return _l(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Lf}),!!((!e.depth||e.depth<3)&&xf(e)&&(t.options.setext||n))}function V5(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($5(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,be(F({},a.current()),{before:`
40
40
  `,after:`
41
- `}));return E(),p(),T+`
42
- `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
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:`
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"})}));
41
+ `}));return g(),p(),b+`
42
+ `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
43
+ `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=qa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}Pb.peek=q5;function Pb(e){return e.value||""}function q5(){return"<"}Ib.peek=Y5;function Ib(e,t,n,r){const s=Qh(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function Y5(){return"!"}Rb.peek=W5;function Rb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==g?d+=c.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function W5(){return"!"}Lb.peek=G5;function Lb(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function G5(){return"`"}function Db(e,t){const n=xf(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))}Mb.peek=X5;function Mb(e,t,n,r){const s=Qh(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Db(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,F({before:g,after:">"},u.current()))),g+=u.move(">"),c(),n.stack=p,g}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,F({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,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,F({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function X5(e,t,n){return Db(e,n)?"<":"["}Fb.peek=K5;function Fb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==g?d+=c.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function K5(){return"["}function Jh(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 Q5(e){const t=Jh(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 J5(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 Bb(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 Z5(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?J5(n):Jh(n);const c=e.ordered?u==="."?")":".":Q5(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),Bb(n)===u&&p){let g=-1;for(;++g<e.children.length;){const b=e.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function e8(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 t8(e,t,n,r){const s=e8(n);let a=n.bulletCurrent||Jh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(g,b,y){return b?(y?"":" ".repeat(u))+g:(y?a:a+" ".repeat(u-a.length))+g}}function n8(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const r8=Tl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i8(e,t,n,r){return(e.children.some(function(u){return r8(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function s8(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ub.peek=o8;function Ub(e,t,n,r){const s=s8(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=qa(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=Zl(r.after.charCodeAt(0),g,s);b.inside&&(d=d.slice(0,-1)+qa(g));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function o8(e,t,n){return n.options.strong||"*"}function a8(e,t,n,r){return n.safe(e.value,r)}function u8(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 l8(e,t,n){const r=(Bb(n)+(n.options.ruleSpaces?" ":"")).repeat(u8(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Hb={blockquote:I5,break:Nb,code:B5,definition:H5,emphasis:Ob,hardBreak:Nb,heading:V5,html:Pb,image:Ib,imageReference:Rb,inlineCode:Lb,link:Mb,linkReference:Fb,list:Z5,listItem:t8,paragraph:n8,root:i8,strong:Ub,text:a8,thematicBreak:l8};function c8(){return{enter:{table:d8,tableData:zb,tableHeader:zb,tableRow:h8},exit:{codeText:p8,table:f8,tableData:Zh,tableHeader:Zh,tableRow:Zh}}}function d8(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 f8(e){this.exit(e),this.data.inTable=void 0}function h8(e){this.enter({type:"tableRow",children:[]},e)}function Zh(e){this.exit(e)}function zb(e){this.enter({type:"tableCell",children:[]},e)}function p8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,m8));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function m8(e,t){return t==="|"?t:e}function g8(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=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:b,table:u,tableCell:d,tableRow:c}};function u(y,_,S,w){return f(p(y,S,w),y.align)}function c(y,_,S,w){const A=g(y,S,w),M=f([A]);return M.slice(0,M.indexOf(`
46
+ `))}function d(y,_,S,w){const A=S.enter("tableCell"),M=S.enter("phrasing"),I=S.containerPhrasing(y,be(F({},w),{before:a,after:a}));return M(),A(),I}function f(y,_){return O5(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,S){const w=y.children;let A=-1;const M=[],I=_.enter("table");for(;++A<w.length;)M[A]=g(w[A],_,S);return I(),M}function g(y,_,S){const w=y.children;let A=-1;const M=[],I=_.enter("tableRow");for(;++A<w.length;)M[A]=d(w[A],y,_,S);return I(),M}function b(y,_,S){let w=Hb.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function E8(){return{exit:{taskListCheckValueChecked:jb,taskListCheckValueUnchecked:jb,paragraph:T8}}}function y8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:b8}}}function jb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function T8(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function b8(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Hb.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function _8(){return[ZD(),b5(),w5(),c8(),E8()]}function S8(e){return{extensions:[e5(),_5(e),C5(),g8(e),y8()]}}const x8={tokenize:N8,partial:!0},$b={tokenize:O8,partial:!0},Vb={tokenize:P8,partial:!0},qb={tokenize:I8,partial:!0},w8={tokenize:R8,partial:!0},Yb={name:"wwwAutolink",tokenize:v8,previous:Gb},Wb={name:"protocolAutolink",tokenize:k8,previous:Xb},ti={name:"emailAutolink",tokenize:A8,previous:Kb},Fr={};function C8(){return{text:Fr}}let ds=48;for(;ds<123;)Fr[ds]=ti,ds++,ds===58?ds=65:ds===91&&(ds=97);Fr[43]=ti,Fr[45]=ti,Fr[46]=ti,Fr[95]=ti,Fr[72]=[ti,Wb],Fr[104]=[ti,Wb],Fr[87]=[ti,Yb],Fr[119]=[ti,Yb];function A8(e,t,n){const r=this;let s,a;return u;function u(g){return!ep(g)||!Kb.call(r,r.previous)||tp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return ep(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(w8,p,f)(g):g===45||g===95||ln(g)?(a=!0,e.consume(g),d):p(g)}function f(g){return e.consume(g),s=!0,d}function p(g){return a&&s&&gn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function v8(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Gb.call(r,r.previous)||tp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(x8,e.attempt($b,e.attempt(Vb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function k8(e,t,n){const r=this;let s="",a=!1;return u;function u(g){return(g===72||g===104)&&Xb.call(r,r.previous)&&!tp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(gn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?f:(a=!0,d)):n(g)}function f(g){return g===null||dl(g)||dt(g)||ts(g)||fl(g)?n(g):e.attempt($b,e.attempt(Vb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function N8(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function O8(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(qb,d,c)(f):f===null||dt(f)||ts(f)||f!==45&&fl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function P8(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(qb,t,a)(u):u===null||dt(u)||ts(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function I8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||dt(c)||ts(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||dt(c)||ts(c)?t(c):r(c)}function a(c){return gn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):gn(c)?(e.consume(c),u):n(c)}}function R8(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ln(a)?n(a):t(a)}}function Gb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function Xb(e){return!gn(e)}function Kb(e){return!(e===47||ep(e))}function ep(e){return e===43||e===45||e===46||e===95||ln(e)}function tp(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 L8={tokenize:j8,partial:!0};function D8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:U8,continuation:{tokenize:H8},exit:z8}},text:{91:{name:"gfmFootnoteCall",tokenize:B8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:M8,resolveTo:F8}}}}function M8(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=cr(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 F8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function B8(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(a>999||g===93&&!u||g===null||g===91||dt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(cr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return dt(g)||(u=!0),a++,e.consume(g),g===92?p:f}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}}function U8(e,t,n){const r=this,s=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||dt(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=cr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return dt(_)||(c=!0),u++,e.consume(_),_===92?g:p}function g(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),tt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function H8(e,t,n){return e.check(ga,t,e.attempt(L8,t,n))}function z8(e){e.exit("gfmFootnoteDefinition")}function j8(e,t,n){const r=this;return tt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function $8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&Dn(b,b.length,0,hl(y,u.slice(f+1,d),c)),Dn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Dn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let g=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const S=Ws(f);if(_===126)return g>1?d(_):(u.consume(_),g++,y);if(g<2&&!n)return d(_);const w=u.exit("strikethroughSequenceTemporary"),A=Ws(_);return w._open=!A||A===2&&!!S,w._close=!S||S===2&&!!A,c(_)}}}class V8{constructor(){this.map=[]}add(t,n,r){q8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function q8(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function Y8(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function W8(){return{flow:{null:{name:"table",tokenize:G8,resolveAll:X8}}}}function G8(e,t,n){const r=this;let s=0,a=0,u;return c;function c(B){let se=r.events.length-1;for(;se>-1;){const fe=r.events[se][1].type;if(fe==="lineEnding"||fe==="linePrefix")se--;else break}const pe=se>-1?r.events[se][1].type:null,le=pe==="tableHead"||pe==="tableRow"?U:d;return le===U&&r.parser.lazy[r.now().line]?n(B):le(B)}function d(B){return e.enter("tableHead"),e.enter("tableRow"),f(B)}function f(B){return B===124||(u=!0,a+=1),p(B)}function p(B){return B===null?n(B):De(B)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),y):n(B):Ke(B)?tt(e,p,"whitespace")(B):(a+=1,u&&(u=!1,s+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||dt(B)?(e.exit("data"),p(B)):(e.consume(B),B===92?b:g)}function b(B){return B===92||B===124?(e.consume(B),g):g(B)}function y(B){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(B):(e.enter("tableDelimiterRow"),u=!1,Ke(B)?tt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):_(B))}function _(B){return B===45||B===58?w(B):B===124?(u=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),S):Z(B)}function S(B){return Ke(B)?tt(e,w,"whitespace")(B):w(B)}function w(B){return B===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),A):B===45?(a+=1,A(B)):B===null||De(B)?q(B):Z(B)}function A(B){return B===45?(e.enter("tableDelimiterFiller"),M(B)):Z(B)}function M(B){return B===45?(e.consume(B),M):B===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(B))}function I(B){return Ke(B)?tt(e,q,"whitespace")(B):q(B)}function q(B){return B===124?_(B):B===null||De(B)?!u||s!==a?Z(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(B)):Z(B)}function Z(B){return n(B)}function U(B){return e.enter("tableRow"),te(B)}function te(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),te):B===null||De(B)?(e.exit("tableRow"),t(B)):Ke(B)?tt(e,te,"whitespace")(B):(e.enter("data"),he(B))}function he(B){return B===null||B===124||dt(B)?(e.exit("data"),te(B)):(e.consume(B),B===92?ye:he)}function ye(B){return B===92||B===124?(e.consume(B),he):he(B)}}function X8(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,g;const b=new V8;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(Qb(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,g=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)},b.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=ec(b,t,a,s,void 0,g),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=ec(b,t,a,s,void 0,g)),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],g=ec(b,t,a,s,n,g)):u[1]!==0&&(g=ec(b,t,u,s,n,g)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Qb(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Y8(t.events,n))}return e}function ec(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},yo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=yo(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=yo(t.events,n[2]),p=yo(t.events,n[3]),g={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(a.end=Object.assign({},yo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Qb(e,t,n,r,s){const a=[],u=yo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function yo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const K8={name:"tasklistCheck",tokenize:J8};function Q8(){return{text:{91:K8}}}function J8(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return dt(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 De(d)?t(d):Ke(d)?e.check({tokenize:Z8},t,n)(d):n(d)}}function Z8(e,t,n){return tt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function eM(e){return z1([C8(),D8(),$8(e),W8(),Q8()])}const tM={};function nM(e){const t=this,n=e||tM,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(eM(n)),a.push(_8()),u.push(S8(n))}const To=()=>C.jsx("span",{className:`${j}-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"})})}),np=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,message:r})=>C.jsx(PE,{remarkPlugins:[nM],rehypePlugins:[$y],components:{h1:({children:s})=>C.jsx("h1",{className:K(e,`${j}-header h1`),children:s}),h2:({children:s})=>C.jsx("h2",{className:K(e,`${j}-header h2`),children:s}),h3:({children:s})=>C.jsx("h3",{className:K(e,`${j}-header h3`),children:s}),ul:({children:s})=>C.jsx("ul",{className:K(e,`${j}-ul`),children:s}),ol:({children:s})=>C.jsx("ol",{className:K(e,`${j}-ol`),children:s}),li:({children:s})=>C.jsx("li",{className:K(e,`${j}-li`),children:s}),a:({href:s,children:a})=>C.jsx(Ky,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>C.jsx("table",{className:K(e,`${j}-table`),children:s}),thead:({children:s})=>C.jsx("thead",{className:K(e,`${j}-thead`),children:s}),tbody:({children:s})=>C.jsx("tbody",{className:K(e,`${j}-tbody`),children:s}),tr:({children:s})=>C.jsx("tr",{className:K(e,`${j}-tr`),children:s}),th:({children:s})=>C.jsx("th",{className:K(e,`${j}-th`),children:s}),td:({children:s})=>C.jsx("td",{className:K(e,`${j}-td`),children:s}),span:({className:s,children:a})=>s===`${j}-blinking-cursor`?C.jsx(To,{}):C.jsx("span",{children:a})},children:r.message+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),rM=({globalClassName:e,message:t})=>{const[n,r]=z.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return C.jsxs("div",{children:[C.jsxs("div",{className:K(e,`${j}-progress-message`,"standalone"),children:[C.jsx("span",{className:K(e,`${j}-message-icon`,"progress-icon","standalone"),children:C.jsx(a1,{})}),C.jsx("p",{className:K(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&C.jsxs(C.Fragment,{children:[C.jsx(df,{className:K(e,`${j}-thought-context-button`),onClick:c,children:n?C.jsxs(C.Fragment,{children:["Hide ",C.jsx(xv,{})]}):C.jsxs(C.Fragment,{children:["Context ",C.jsx(wv,{})]})}),n&&C.jsx("div",{className:K(e,`${j}-thought-container`),children:a&&C.jsx("p",{className:K(e,`${j}-progress-thought`),children:t.thought})})]})]})},iM=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?C.jsx(rM,{globalClassName:e,message:t}):C.jsxs("div",{className:K(e,`${j}-progress-message`,"embedded"),title:t.message,children:[C.jsx("span",{className:K(e,`${j}-message-icon`,"progress-icon","embedded"),children:C.jsx(a1,{})}),C.jsx("i",{className:K(e,`${j}-progress-text`,"embedded"),children:t.message})]}),sM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return C.jsxs("div",{className:K(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&C.jsxs("div",{className:K(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[C.jsx("span",{className:K(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:C.jsx(zs,{role:"img"})}),C.jsx("p",{className:K(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),C.jsx(np,{message:t})]})},Jb=e=>{var d,f;const{configModule:t}=ft(),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:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,g)=>p+g.length,0);return{facetFiltersList:u,filterCount:c}},tc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>C.jsx("span",{className:K(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),Zb=({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),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return C.jsxs("div",{className:K(e,`${j}-facets`),children:[C.jsx("p",{className:K(e,`${j}-facet-category`),children:c}),C.jsx("p",{className:K(e,`${j}-facet-values`),children:d})]},c)})},Ya=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>C.jsx("span",{className:K(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),oM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=Jb(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?C.jsxs("div",{className:K(e,`${j}-user-message standalone`),children:[C.jsxs("div",{className:K(e,`${j}-user-message-row standalone`),children:[d?C.jsx("img",{className:K(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:K(e,`${j}-message-icon user-message-icon standalone`),children:C.jsx(l1,{})}),C.jsx("p",{className:K(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&C.jsx(tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),C.jsx(Zb,{globalClassName:e,facetFiltersList:a,message:t}),C.jsx(Ya,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):C.jsxs("div",{className:K(e,`${j}-user-message embedded`),children:[C.jsxs("div",{className:K(e,`${j}-user-message-row embedded`),children:[d?C.jsx("img",{className:K(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:K(e,`${j}-message-icon user-message-icon embedded`),children:C.jsx(l1,{})}),C.jsx("p",{className:K(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&C.jsx(tc,{isWidgetStandalone:!1,filterCount:u})]}),C.jsx(Ya,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},aM=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>C.jsxs("div",{className:K(e,`${j}-user-search standalone`),children:[C.jsxs("div",{children:[C.jsxs("div",{className:K(e,`${j}-user-search-query standalone`),children:[d?C.jsx("img",{className:K(e,`${j}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):C.jsx("span",{className:K(e,`${j}-message-icon user-search-icon standalone`),children:C.jsx(zs,{})}),C.jsx("p",{className:K(e,`${j}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&C.jsx(tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),C.jsx(Zb,{globalClassName:e,facetFiltersList:u,message:a})]}),C.jsx(Ya,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),uM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=Jb(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:g,queryLabel:b}=z.useMemo(()=>{var S,w,A;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.label)=="string"?(w=r==null?void 0:r.clientContext)==null?void 0:w.label:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(A=r==null?void 0:r.browseParams)==null?void 0:A.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return g?n?C.jsx(aM,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):C.jsxs("div",{className:K(e,`${j}-user-search embedded`),children:[C.jsxs("div",{className:K(e,`${j}-user-search-query embedded`),children:[f?C.jsx("img",{className:K(e,`${j}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):C.jsx("span",{className:K(e,`${j}-message-icon user-search-icon embedded`),children:C.jsx(zs,{})}),C.jsx("p",{children:b||g}),u.length>0&&C.jsx(tc,{isWidgetStandalone:!1,filterCount:c})]}),C.jsx(Ya,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},e_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:s,handleSuggestionClick:a})=>{var g;const{isLoading:u,isResponseLoading:c}=Ar(),d=u&&c((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const f=e.name,p=!!((g=e.request)!=null&&g.userPrompt);switch(f){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return p?C.jsx(oM,{globalClassName:t,isWidgetStandalone:s,message:e}):C.jsx(uM,{globalClassName:t,message:e,isWidgetStandalone:s});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return C.jsx(sM,{globalClassName:t,message:e,isWidgetStandalone:s});case"follow_up":return C.jsx(WD,{globalClassName:t,isWidgetStandalone:s,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return C.jsx(np,{globalClassName:t,openLinksInNewTab:n,showIsLoading:d,message:e});case"error":return C.jsx(VD,{message:e,isWidgetStandalone:s});case"display_products":return C.jsx($D,{message:e,isWidgetStandalone:s});case"progress":return C.jsx(iM,{globalClassName:t,isWidgetStandalone:s,message:e});case"conversation_reset":return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:K(t,`${j}-reset-message`),children:"This conversation has been reset."}),C.jsx("p",{className:K(t,`${j}-start-search-message`),children:r})]});default:return null}},rp=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:s,resetConversationMessage:a}=ft(),{groupedMessages:u,entryType:c}=Gr(),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:K(n,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let p=new Date(f.createdAt).toLocaleString();const g=f.messages[f.messages.length-1];return g&&(p=new Date(g.createdAt).toLocaleString()),C.jsxs("div",{className:K(n,`${j}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(b=>C.jsx("div",{className:`${j}-message-group-child`,children:C.jsx(e_,{id:b.id,openLinksInNewTab:s,globalClassName:n,isWidgetStandalone:e,message:b,resetConversationMessage:a,handleSuggestionClick:t})},b.id)),C.jsx(Ya,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return C.jsx("div",{className:K(n,`${j}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:C.jsx(e_,{id:f.message.id,openLinksInNewTab:s,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},t_=()=>{const{globalClassName:e,themeVariables:t}=ft(),{copilot:n,messages:r,isLoading:s,handleUserInput:a,handleSuggestion:u}=Ar(),c=z.useRef(null),d=lf();return z.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?C.jsxs("div",{className:K(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[C.jsxs("div",{className:K(e,`${j}-message-container`,"embedded"),children:[C.jsx(rp,{isWidgetStandalone:!1,handleSuggestionClick:u}),s&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(To,{})}),C.jsx("div",{ref:c})]}),C.jsx(ch,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),C.jsx("div",{className:K(`${j}-embedded-chat-menu`),children:C.jsx(zD,{componentType:"chat",children:C.jsx(_b,{componentType:"chat"})})})]}):C.jsx("div",{children:"Loading Copilot..."}):null},[lM,cM]=ao({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),dM=e=>xT()(e,["lazyMount","unmountOnExit"]),[fM,Wa]=ao({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),n_=z.forwardRef((e,t)=>{const n=Wa(),r=cM(),s=Oh(be(F({},r),{present:n.open})),a=hr(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:C.jsx(_i.div,be(F({},a),{ref:zl(s.ref,t)}))});n_.displayName="DialogBackdrop";const ip=z.forwardRef((e,t)=>{const n=Wa(),r=Ba(),s=hr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(_i.div,be(F({},s),{ref:zl(r.ref,t)}))});ip.displayName="DialogContent";const sp=z.forwardRef((e,t)=>{const n=Wa(),r=hr(n.getDescriptionProps(),e);return C.jsx(_i.div,be(F({},r),{ref:t}))});sp.displayName="DialogDescription";const op=z.forwardRef((e,t)=>{const n=Wa(),r=hr(n.getPositionerProps(),e);return Ba().unmounted?null:C.jsx(_i.div,be(F({},r),{ref:t}))});op.displayName="DialogPositioner";var hM=uo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),fs=hM.build(),r_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},i_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},s_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},nc=e=>e.getById(ap(e)),pM=e=>e.getById(r_(e)),mM=e=>e.getById(i_(e)),gM=e=>e.getById(s_(e)),EM=e=>e.getById(up(e)),yM=e=>e.getById(lp(e)),TM=e=>e.getById(o_(e));function bM(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(be(F({},fs.trigger.attrs),{dir:a("dir"),id:s_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(be(F({},fs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:i_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(F({},fs.positioner.attrs),{dir:a("dir"),id:r_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(be(F({},fs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ap(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:up(u),"aria-describedby":f.description?lp(u):void 0}))},getTitleProps(){return t.element(be(F({},fs.title.attrs),{dir:a("dir"),id:up(u)}))},getDescriptionProps(){return t.element(be(F({},fs.description.attrs),{dir:a("dir"),id:lp(u)}))},getCloseTriggerProps(){return t.button(be(F({},fs.closeTrigger.attrs),{dir:a("dir"),id:o_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var _M={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>TM(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return rb(()=>nc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[gM(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return ub(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?ob(()=>nc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?GT(()=>[nc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){An(()=>{e.set("rendered",{title:!!EM(t),description:!!yM(t)})})},syncZIndex({scope:e}){An(()=>{const t=nc(e);if(!t)return;const n=Fl(t);[pM(e),mM(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};Ah()(["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 SM=e=>{const t=z.useId(),{getRootNode:n}=Wh(),{dir:r}=pb(),s=F({id:t,getRootNode:n,dir:r},e),a=vh(_M,s);return bM(a,TT)},a_=e=>{const[t,c]=wT(e),d=c,{children:n}=d,r=sn(d,["children"]),[s]=dM(t),a=SM(r),u=Oh(hr({present:a.open},t));return C.jsx(fM,{value:a,children:C.jsx(lM,{value:s,children:C.jsx(bT,{value:u,children:n})})})},cp=z.forwardRef((e,t)=>{const n=Wa(),r=hr(n.getTitleProps(),e);return C.jsx(_i.h2,be(F({},r),{ref:t}))});cp.displayName="DialogTitle";const u_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=z.useState((d=e.container)==null?void 0:d.current),a=z.useSyncExternalStore(wM,()=>!1,()=>!0),{getRootNode:u}=Wh();if(z.useEffect(()=>{s(()=>{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:xM(u);return C.jsx(C.Fragment,{children:z.Children.map(t,f=>oo.createPortal(f,c))})},xM=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return us(n)?n:Pr(t).body},wM=()=>()=>{},CM=()=>{const{globalClassName:e}=ft(),{dialogPosition:t}=pi(),n=t==="bottom-left",r=()=>{uf(n?"bottom-right":"bottom-left")},s=n?FD:MD,a=n?"Move right":"Move left";return C.jsx(vr,{className:K(e,`${j}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:C.jsx(s,{})})},l_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ft(),{mode:s,status:a,dialogPosition:u}=pi(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:g}=Ar(),b=z.useRef(null),y=lf(),{isOpen:_}=a||{},S=s==="standalone";z.useEffect(()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const w=()=>{Zi(!1)};return y?c?C.jsx(a_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:C.jsx(u_,{children:C.jsx(op,{className:K(n,`${j}-container`,`${j}-dialog`,u),style:r,children:C.jsxs(ip,{className:K(n,`${j}-dialog-content`,{standalone:S,embedded:!S}),children:[C.jsxs("div",{className:K(n,`${j}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&C.jsx("img",{alt:"",role:"img",className:K(n,`${j}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),C.jsx(cp,{className:K(n,`${j}-dialog-title`,{standalone:S,embedded:!S}),children:t}),C.jsxs("div",{className:K(n,`${j}-dialog-controls`),children:[C.jsx(_b,{componentType:"dialog",isIcon:!0}),C.jsx(CM,{}),C.jsx(bb,{componentType:"dialog",isIcon:!0}),C.jsx(Tb,{componentType:"dialog"}),C.jsx(cf,{className:`dialog ${n}`,onClick:w})]})]}),C.jsxs(sp,{className:K(n,`${j}-message-container`,{standalone:S,embedded:!S}),children:[C.jsx(rp,{isWidgetStandalone:S,handleSuggestionClick:g}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(To,{})}),C.jsx("div",{ref:b})]}),C.jsx(ch,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):C.jsx("div",{children:"Loading Copilot..."}):null},AM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=pi(),s=()=>{il(r||"dialog")};return t?C.jsx(vr,{className:K(n,`${j}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:s,icon:C.jsx(Eb,{})}):C.jsxs("button",{className:K(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,e),onClick:s,children:[C.jsx(Eb,{}),"Show ",r||"dialog"]})},vM=()=>{const{globalClassName:e}=ft(),{isModalFullscreen:t}=pi(),n=()=>{af(!t)},r=t?Cv:Av,s=`${t?"Exit":"Enter"} Fullscreen`;return C.jsx(vr,{ariaLabel:s,title:s,className:K(e,`${j}-modal-fullscreen-button`),icon:C.jsx(r,{}),onClick:n})},c_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ft(),{mode:s,status:a,isModalFullscreen:u}=pi(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:g}=Ar(),b=z.useRef(null),{isOpen:y}=a||{},_=s==="standalone",S=lf();z.useEffect(()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const w=({open:M})=>{Zi(M)},A=()=>{Zi(!1)};return S?c?C.jsx(a_,{lazyMount:!0,open:y,onOpenChange:w,children:C.jsx(u_,{children:C.jsxs("div",{className:K(n,`${j}-modal-container`),style:r,children:[C.jsx(n_,{className:K(n,`${j}-modal-backdrop`)}),C.jsx(op,{className:K(n,`${j}-container`,`${j}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:C.jsxs(ip,{className:K(n,`${j}-modal-content`,{standalone:_,embedded:!_}),children:[C.jsxs("div",{className:K(n,`${j}-modal-header`,{standalone:_,embedded:!_}),children:[e&&C.jsx("img",{alt:"",role:"img",className:K(n,`${j}-modal-logo`,{standalone:_,embedded:!_}),src:e}),C.jsx(cp,{className:K(n,`${j}-modal-title`,{standalone:_,embedded:!_}),children:t}),C.jsxs("div",{className:K(n,`${j}-modal-controls`),children:[C.jsx(vM,{}),C.jsx(AM,{componentType:"modal",isIcon:!0}),C.jsx(bb,{componentType:"modal",isIcon:!0}),C.jsx(Tb,{componentType:"modal"}),C.jsx(cf,{className:`modal ${n}`,onClick:A})]})]}),C.jsxs(sp,{className:K(n,`${j}-message-container`,{standalone:_,embedded:!_}),children:[C.jsx(rp,{isWidgetStandalone:_,handleSuggestionClick:g}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:C.jsx(To,{})}),C.jsx("div",{ref:b})]}),C.jsx(ch,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):C.jsx("div",{children:"Loading Copilot..."}):null},kM="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",NM=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=ft(),r=()=>{rl(!1),Zi(!0)};return oo.createPortal(C.jsx("div",{className:K(e,`${j}-minimized-container`),style:n,children:C.jsx(vr,{className:K(e,`${j}-minimized-button`),ariaLabel:"Open Copilot",icon:C.jsx("img",{src:t||kM,alt:"Copilot",className:K(e,`${j}-minimized-icon-img`)}),onClick:r})}),document.body)},OM=()=>{const e=pi(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?C.jsx(NM,{}):t==="dialog"?C.jsx(l_,{}):t==="modal"?C.jsx(c_,{}):C.jsx(t_,{})},d_=()=>{const e=z.useContext(e1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e},bo=()=>{const e=z.useContext(Zg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e},PM=()=>{const{copilot:e}=Gr(),{entryType:t,activePromptsId:n,params:r}=bo(),{setIsOpen:s,setIsInline:a,setElementId:u,setEntryType:c,setActivePromptsId:d,setParams:f,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}=d_();z.useEffect(()=>{const w=A=>{const{property:M,value:I}=A.detail||{};!M||I===void 0||(M==="isOpen"&&s(I),M==="isInline"&&a(I),M==="elementId"&&u(I),M==="entryType"&&c(I),M==="params"&&f(I))};return BA(w),()=>{UA(w)}},[s,a,u,c,f]);const y=z.useCallback(w=>{if(!e||!t||!w)return;const A=M=>{d(M.id)};switch(t){case"ask_cim":e.askCimSuggestions(w,A);break;case"search":e.searchSuggestions({searchParams:w},A);break;case"browse":e.browseSuggestions({browseParams:w},A);break;case"pdp":e.productViewSuggestions(w,A);break}},[e,t,d]);z.useEffect(()=>{!e||!t||!r||y(r)},[e,t,r,y]);const _=z.useCallback(w=>{w.eventSourceId===n&&(p(w),d(w.id))},[n,p,d]),S=z.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(g(w),b(!1))},[n,g,b]);return z.useEffect(()=>{if(e)return e.on("follow_up",_),e.on("inquiry",S),()=>{e.off("follow_up",_),e.off("inquiry",S)}},[e,_,S]),null},IM=({sendCopilotPrompt:e})=>{const{globalClassName:t}=ft(),{placeholder:n,isResponseLoading:r}=bo(),[s,a]=z.useState(""),u=c=>{const d=s.trim();d&&(c.preventDefault(),e(d),a(""))};return C.jsxs("form",{className:K(t,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:u,children:[C.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":n||"Ask Copilot",children:C.jsx(BD,{className:K(t,`${j}-prompts-input-icon`)})}),C.jsx("input",{id:`${j}-prompts-input`,className:K(t,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:n||"Ask Copilot",type:"text",disabled:r,value:s,onChange:c=>a(c.target.value)}),C.jsx(vr,{className:K(t,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:C.jsx(zs,{}),disabled:r})]})},RM=({sendCopilotPrompt:e})=>{var u,c;const{globalClassName:t}=ft(),{promptsMessage:n,isResponseLoading:r}=bo(),s=d=>()=>{const f=d.displayText.trim();f&&e(f)},a=!!(n!=null&&n.suggestions&&((u=n==null?void 0:n.suggestions)!=null&&u.length));return C.jsxs("div",{className:K(t,`${j}-prompts-button-group`),children:[!a&&C.jsx(To,{}),a&&((c=n==null?void 0:n.suggestions)==null?void 0:c.map(d=>C.jsx("button",{className:K(t,`${j}-prompts-button`),disabled:r,onClick:s(d),children:d.displayText},d.displayText)))]})},LM=()=>{const{globalClassName:e}=ft(),{isInline:t,userPrompt:n}=bo();return!n||!t?null:C.jsx("div",{className:K(e,`${j}-prompts-message-container`),children:C.jsx("p",{className:K(e,`${j}-prompts-message`),children:n})})},DM=()=>{const{globalClassName:e,openLinksInNewTab:t}=ft(),{isInline:n,responseMessage:r,isResponseLoading:s}=bo();return!n||!r&&!s?null:s?C.jsx(To,{}):r?C.jsx("div",{className:K(e,`${j}-prompts-response-container`,`${j}-message-container`),children:C.jsx(np,{globalClassName:e,openLinksInNewTab:t,message:r})}):null},MM=()=>{const{globalClassName:e,themeVariables:t}=ft(),{connected:n,copilot:r}=Gr(),{isOpen:s,isInline:a,elementId:u,entryType:c,params:d}=bo(),{setActivePromptsId:f,setUserPrompt:p,setResponseMessage:g,setIsResponseLoading:b}=d_(),[y,_]=z.useState(null);z.useEffect(()=>{if(!u||y)return;const w=document.getElementById(u);w&&_(w)},[u,y]);const S=z.useCallback(w=>{if(!r||!c||!d)return;const A=I=>{g(null),p(w),f(I.id),b(!0)},M={userPrompt:w,clientContext:F({_cimEventSource:"prompts-extension"},a?{_cimPromptsExtensionInline:"true"}:{})};switch(c){case"ask_cim":r.askCim(M,A);break;case"search":r.search(F(F({},d),M),A);break;case"browse":r.browse(F(F({},d),M),A);break;case"pdp":r.productView(F(F({},d),M),A);break}},[r,a,c,d,f,g,p,b]);return!n||!s||!y?null:oo.createPortal(C.jsxs("div",{className:K(e,`${j}-prompts-extension-container`),style:t,children:[C.jsx(IM,{sendCopilotPrompt:S}),C.jsx(RM,{sendCopilotPrompt:S}),C.jsx(LM,{}),C.jsx(DM,{})]}),y)},FM=()=>C.jsxs(C.Fragment,{children:[C.jsx(PM,{}),C.jsx(MM,{})]}),dp=e=>C.jsxs(t1,be(F({},e),{children:[C.jsx(OM,{}),C.jsx(FM,{})]}));var rc={},f_;function BM(){if(f_)return rc;f_=1;var e=mT();return rc.createRoot=e.createRoot,rc.hydrateRoot=e.hydrateRoot,rc}var h_=BM();const UM=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=sn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const b of g.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Hs(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=h_.createRoot(b))==null||p.render(C.jsx(dp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Hs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},HM=r=>{var s=r,{timeout:e,elementId:t}=s,n=sn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Hs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Hs(!0,"warn","Container element not found for id:",t),Hs(!0,"warn","Beginning observation for element"),UM(F({elementId:t,timeout:e},n));return}h_.createRoot(a).render(C.jsx(dp,F({},n)))},zM={search:QA,browse:RA,pdp:{setPdpContext:Hg,updatePdpProductId:DA,updatePdpLink:MA},components:{setEntryType:aa,toggleWidgetOpen:Zi,toggleWidgetMinimized:rl,toggleModalFullscreen:af,setWidgetType:il,setWidgetDialogPosition:uf,togglePromptsExtensionOpen:jg,togglePromptsExtensionInline:$g,loadPromptsComponent:VA,getAskCimPrompts:HA,getSearchPrompts:zA,getBrowsePrompts:jA,getProductViewPrompts:$A},session:qA},jM=()=>Object.freeze({search:Object.freeze(gt.state),browse:Object.freeze(at.state),pdp:Object.freeze(lr.state),isConnected:ot.state.connected,isOpen:ot.isOpen,entryType:ot.entryType});Pe.CopilotDialog=l_,Pe.CopilotEmbed=t_,Pe.CopilotModal=c_,Pe.CopilotWidget=dp,Pe.WidgetProvider=t1,Pe.eventHandlers=zM,Pe.injectCopilotWidget=HM,Pe.state=jM,Pe.useCopilot=Ar,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));