@cimulate/copilot-widget 1.7.1 → 1.7.2

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(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(`
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 B9=Object.defineProperty,U9=Object.defineProperties;var H9=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),z9=Pe=>{throw TypeError(Pe)},fd=Math.pow,Qm=(Pe,He,Xe)=>He in Pe?B9(Pe,He,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Pe[He]=Xe,B=(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)=>U9(Pe,H9(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 _t=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(_t,Ie);Wt((Xe=Xe.apply(Pe,He)).next())}),qr=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 qr,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=>_t[Ie]=Wt=>new Promise((Rt,bn)=>lt(Ie,Wt,Rt,bn)),_t={};return Xe=Xe.apply(Pe,He),_t[qo("asyncIterator")]=()=>_t,Ot("next"),Ot("throw"),Ot("return"),_t},Jm=Pe=>{var He=Pe[qo("asyncIterator")],Xe=!1,lt,Ot={};return He==null?(He=Pe[qo("iterator")](),lt=_t=>Ot[_t]=Ie=>He[_t](Ie)):(He=He.call(Pe),lt=_t=>Ot[_t]=Ie=>{if(Xe){if(Xe=!1,_t==="throw")throw Ie;return Ie}return Xe=!0,{done:!1,value:new qr(new Promise(Wt=>{var Rt=He[_t](Ie);Rt instanceof Object||z9("Object expected"),Wt(Rt)}),1)}}),Ot[qo("iterator")]=()=>Ot,lt("next"),"throw"in He?lt("throw"):Ot.throw=_t=>{throw _t},"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]=_t=>new Promise((Ie,Wt,Rt)=>(_t=Ot.call(Pe,_t),Rt=_t.done,Promise.resolve(_t.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;box-sizing:border-box;overflow-y:auto}.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%}
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={},_t={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 C(L,J,O){this.props=L,this.context=J,this.refs=S,this.updater=O||y}C.prototype.isReactComponent={},C.prototype.setState=function(L,J){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,J,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=C.prototype;function M(L,J,O){this.props=L,this.context=J,this.refs=S,this.updater=O||y}var I=M.prototype=new A;I.constructor=M,_(I,C.prototype),I.isPureReactComponent=!0;var $=Array.isArray,X=Object.prototype.hasOwnProperty,F={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function he(L,J,O){var _e,Le={},Oe=null,Ge=null;if(J!=null)for(_e in J.ref!==void 0&&(Ge=J.ref),J.key!==void 0&&(Oe=""+J.key),J)X.call(J,_e)&&!te.hasOwnProperty(_e)&&(Le[_e]=J[_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:F.current}}function ye(L,J){return{$$typeof:e,type:L.type,key:J,ref:L.ref,props:L.props,_owner:L._owner}}function U(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function se(L){var J={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return J[O]})}var pe=/\/+/g;function le(L,J){return typeof L=="object"&&L!==null&&L.key!=null?se(""+L.key):J.toString(36)}function fe(L,J,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,$(Le)?(O="",L!=null&&(O=L.replace(pe,"$&/")+"/"),fe(Le,J,O,"",function(Pt){return Pt})):Le!=null&&(U(Le)&&(Le=ye(Le,O+(!Le.key||Ge&&Ge.key===Le.key?"":(""+Le.key).replace(pe,"$&/")+"/")+L)),J.push(Le)),1;if(Ge=0,_e=_e===""?".":_e+":",$(L))for(var Ye=0;Ye<L.length;Ye++){Oe=L[Ye];var nt=_e+le(Oe,Ye);Ge+=fe(Oe,J,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,J,O,nt,Le);else if(Oe==="object")throw J=String(L),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Ge}function Te(L,J,O){if(L==null)return L;var _e=[],Le=0;return fe(L,_e,"","",function(Oe){return J.call(O,Oe,Le++)}),_e}function Ae(L){if(L._status===-1){var J=L._result;J=J(),J.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=J)}if(L._status===1)return L._result.default;throw L._result}var ue={current:null},W={transition:null},ne={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:W,ReactCurrentOwner:F};function v(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:Te,forEach:function(L,J,O){Te(L,function(){J.apply(this,arguments)},O)},count:function(L){var J=0;return Te(L,function(){J++}),J},toArray:function(L){return Te(L,function(J){return J})||[]},only:function(L){if(!U(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Ie.Component=C,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,J,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(J!=null){if(J.ref!==void 0&&(Oe=J.ref,Ge=F.current),J.key!==void 0&&(Le=""+J.key),L.type&&L.type.defaultProps)var Ye=L.type.defaultProps;for(nt in J)X.call(J,nt)&&!te.hasOwnProperty(nt)&&(_e[nt]=J[nt]===void 0&&Ye!==void 0?Ye[nt]:J[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 J=he.bind(null,L);return J.type=L,J},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(L){return{$$typeof:c,render:L}},Ie.isValidElement=U,Ie.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Ae}},Ie.memo=function(L,J){return{$$typeof:f,type:L,compare:J===void 0?null:J}},Ie.startTransition=function(L){var J=W.transition;W.transition={};try{L()}finally{W.transition=J}},Ie.unstable_act=v,Ie.useCallback=function(L,J){return ue.current.useCallback(L,J)},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,J){return ue.current.useEffect(L,J)},Ie.useId=function(){return ue.current.useId()},Ie.useImperativeHandle=function(L,J,O){return ue.current.useImperativeHandle(L,J,O)},Ie.useInsertionEffect=function(L,J){return ue.current.useInsertionEffect(L,J)},Ie.useLayoutEffect=function(L,J){return ue.current.useLayoutEffect(L,J)},Ie.useMemo=function(L,J){return ue.current.useMemo(L,J)},Ie.useReducer=function(L,J,O){return ue.current.useReducer(L,J,O)},Ie.useRef=function(L){return ue.current.useRef(L)},Ie.useState=function(L){return ue.current.useState(L)},Ie.useSyncExternalStore=function(L,J,O){return ue.current.useSyncExternalStore(L,J,O)},Ie.useTransition=function(){return ue.current.useTransition()},Ie.version="18.3.1",Ie}var bn;function Ns(){return bn||(bn=1,_t.exports=Rt()),_t.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 w=rx();const wr=Object.create(null);wr.open="0",wr.close="1",wr.ping="2",wr.pong="3",wr.message="4",wr.upgrade="5",wr.noop="6";const Ou=Object.create(null);Object.keys(wr).forEach(e=>{Ou[wr[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(wr[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 j9(){}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 Cr 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=Cr.requestsCount++,Cr.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 Cr.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(Cr.requestsCount=0,Cr.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 Cr.requests)Cr.requests.hasOwnProperty(e)&&Cr.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 Cr(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(B({},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 qr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new qr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new qr(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 Yr(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 B({},e);const s=Object.create(r);return Object.assign(s,e)}}function Dd(e,t=!1){return ju(e)||Rs(e)||!Yr(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)),Yr(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(Yr(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_||!Yr(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),Wr(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),Wr(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 Wr(e){e.modified_||(e.modified_=!0,e.parent_&&Wr(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(Yr(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){Yr(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(!Yr(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),Wr(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),Wr(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),Wr(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_||!Yr(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),Wr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),a(f),Wr(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),Wr(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(Yr(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"},St={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`,Ar=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},M0),Ow={"browse-context":Ar.CONTEXT_UPDATED,categoryId:Ar.CATEGORY_ID_CHANGED,categoryName:Ar.CATEGORY_NAME_CHANGED,page:Ar.PAGE_CHANGED,pageSize:Ar.PAGE_SIZE_CHANGED,includeFacets:Ar.FACET_FILTERS_CHANGED,facetFilters:Ar.FACET_FILTERS_CHANGED,rangeFilters:Ar.RANGE_FILTERS_CHANGED,catalogSegment:Ar.CATALOG_SEGMENT_CHANGED,pricebooks:Ar.PRICEBOOKS_CHANGED},Gr=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},M0),Pw={"search-context":Gr.SEARCH_CONTEXT_UPDATED,query:Gr.QUERY_CHANGED,page:Gr.PAGE_CHANGED,pageSize:Gr.PAGE_SIZE_CHANGED,includeFacets:Gr.FACET_FILTERS_CHANGED,facetFilters:Gr.FACET_FILTERS_CHANGED,rangeFilters:Gr.RANGE_FILTERS_CHANGED,catalogSegment:Gr.CATALOG_SEGMENT_CHANGED,pricebooks:Gr.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(C,A){return!G.isUndefined(A[C])});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,C,A){let M=S;if(G.isReactNative(t)&&G.isReactNativeBlob(S))return t.append(Kd(A,C,a),p(S)),!1;if(S&&!A&&typeof S=="object"){if(G.endsWith(C,"{}"))C=r?C:C.slice(0,-2),S=JSON.stringify(S);else if(G.isArray(S)&&_C(S)||(G.isFileList(S)||G.endsWith(C,"[]"))&&(M=G.toArray(S)))return C=K0(C),M.forEach(function($,X){!(G.isUndefined($)||$===null)&&t.append(u===!0?Kd([C],X,a):u===null?C:C+"[]",p($))}),!1}return Xd(S)?!0:(t.append(Kd(A,C,a),p(S)),!1)}const b=[],y=Object.assign(SC,{defaultVisitor:g,convertValue:p,isVisitable:Xd});function _(S,C,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 "+C.join("."));b.push(S),G.forEach(S,function(I,$){(!(G.isUndefined(I)||I===null)&&s.call(t,I,G.isString($)?$.trim():$,C,y))===!0&&_(I,C?C.concat($):[$],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=B(B({},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,B({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
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 :
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?B({},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(B(B({},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 C=new XMLHttpRequest;C.open(s.method.toUpperCase(),s.url,!0),C.timeout=s.timeout;function A(){if(!C)return;const I=Sn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:I,config:e,request:C};ig(function(te){n(te),S()},function(te){r(te),S()},X),C=null}"onloadend"in C?C.onloadend=A:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(A)},C.onabort=function(){C&&(r(new Be("Request aborted",Be.ECONNABORTED,e,C)),C=null)},C.onerror=function($){const X=$&&$.message?$.message:"Network Error",F=new Be(X,Be.ERR_NETWORK,e,C);F.event=$||null,r(F),C=null},C.ontimeout=function(){let $=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const X=s.transitional||Jd;s.timeoutErrorMessage&&($=s.timeoutErrorMessage),r(new Be($,X.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,C)),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&G.forEach(u.toJSON(),function($,X){C.setRequestHeader(X,$)}),G.isUndefined(s.withCredentials)||(C.withCredentials=!!s.withCredentials),c&&c!=="json"&&(C.responseType=s.responseType),f&&([b,_]=Zu(f,!0),C.addEventListener("progress",b)),d&&C.upload&&([g,y]=Zu(d),C.upload.addEventListener("progress",g),C.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{C&&(r(!I||I.type?new sa(null,e,C):I),C.abort(),C=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}C.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 qr(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 qr(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 qr(t.read());if(n)break;yield r}}finally{yield new qr(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"}}),C=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),_&&!C}),p=u&&c&&pg(()=>G.isReadableStream(new r("").body)),g={stream:p&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!g[_]&&(g[_]=(S,C)=>{let A=S&&S[_];if(A)return A.call(S);throw new Be(`Response type '${_}' is not supported`,Be.ERR_NOT_SUPPORT,C)})});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 C=G.toFiniteNumber(_.getContentLength());return C==null?b(S):C});return _=>Ze(null,null,function*(){let{url:S,method:C,data:A,signal:M,cancelToken:I,timeout:$,onDownloadProgress:X,onUploadProgress:F,responseType:te,headers:he,withCredentials:ye="same-origin",fetchOptions:U}=lg(_),se=t||fetch;te=te?(te+"").toLowerCase():"text";let pe=XC([M,I&&I.toAbortSignal()],$),le=null;const fe=pe&&pe.unsubscribe&&(()=>{pe.unsubscribe()});let Te;try{if(F&&f&&C!=="get"&&C!=="head"&&(Te=yield y(he,A))!==0){let L=new n(S,{method:"POST",body:A,duplex:"half"}),J;if(G.isFormData(A)&&(J=L.headers.get("content-type"))&&he.setContentType(J),L.body){const[O,_e]=sg(Te,Zu(og(F)));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(B({},U),{signal:pe,method:C.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,U):se(S,ue);const ne=p&&(te==="stream"||te==="response");if(p&&(X||ne&&fe)){const L={};["status","statusText","headers"].forEach(Le=>{L[Le]=W[Le]});const J=G.toFiniteNumber(W.headers.get("content-length")),[O,_e]=X&&sg(J,Zu(og(X),!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,J)=>{ig(L,J,{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
5
  `+u.map(gg).join(`
6
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
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=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=`
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 C=n.transitional||Jd;C&&C.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(C){S.call(this,C);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:X9,AxiosError:K9,CanceledError:Q9,isCancel:J9,CancelToken:Z9,VERSION:eB,all:tB,Cancel:nB,isAxiosError:rB,spread:iB,toFormData:sB,AxiosHeaders:oB,HttpStatusCode:aB,formToJSON:uB,getAdapter:lB,mergeConfig:cB}=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:C,isDevelopment:A,__features:M,children:I})=>{const $=z.useMemo(()=>new lA(S,y,_,A),[S,y,_,A]),X=z.useMemo(()=>new cA(A),[A]);z.useEffect(()=>{$.config||$.getConfig()},[$]);const F=z.useMemo(()=>Iw(C),[C]),te=z.useMemo(()=>{const ye=(f==null?void 0:f.placeholder)||c,U=(f==null?void 0:f.buttonLabel)||d;let se="icon";return f!=null&&f.buttonType?se=f.buttonType:d&&(se="text"),be(B({},f||{}),{placeholder:ye,buttonLabel:U,buttonType:se})},[f,c,d]),he=z.useMemo(()=>({configModule:$,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:s,disclaimerText:a,disclaimerMarkdown:u,themeVariables:F,logger:X,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}),[$,e,t,r,n,a,u,s,te,p,b,X,F,g,M]);return w.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:St.SET_COPILOT,payload:A})},[n]),a=z.useCallback(A=>{gA(A),n({type:St.SET_CONNECTED,payload:A})},[n]),u=z.useCallback(A=>{n({type:St.SET_ENTRY_TYPE,payload:A})},[n]),c=z.useCallback(()=>{n({type:St.RESET_COPILOT,payload:{}})},[n]),d=z.useCallback(()=>{n({type:St.RESET_STATE,payload:{}})},[n]),f=z.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:St.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),p=z.useCallback(A=>{n({type:St.ADD_LOADING_MESSAGE,payload:A})},[n]),g=z.useCallback(A=>{n({type:St.REMOVE_LOADING_MESSAGE,payload:A})},[n]),b=z.useCallback(A=>{n({type:St.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=z.useCallback(A=>{n({type:St.ADD_CONVERSATION_ID,payload:A})},[n]),_=z.useCallback(A=>{n({type:St.SET_CONVERSATION_IDS,payload:A})},[n]),S=z.useCallback(A=>{n({type:St.SET_IMAGE_FILE,payload:A})},[n]),C=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 w.jsx(B0.Provider,{value:C,children:t})};Aw();const yA=(e,t)=>{const{type:n,payload:r}=t;if(n===St.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 St.RESET_STATE:e.messages=Ls.messages,e.groupedMessages=Ls.groupedMessages,e.loadingMessages=Ls.loadingMessages,e.entryType=Ls.entryType;break;case St.RESET_COPILOT:e.copilot=null;break;case St.SET_COPILOT:e.copilot=r;break;case St.SET_CONNECTED:e.connected=r;break;case St.SET_ENTRY_TYPE:e.entryType=r;break;case St.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case St.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case St.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case St.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case St.SET_CONVERSATION_IDS:e.conversationIds=r;break;case St.SET_IMAGE_FILE:e.imageFile=r;break}},TA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?be(B({},Ls),{entryType:e}):Ls,[s,a]=D0(yA,r);return w.jsx(F0.Provider,{value:s,children:w.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=B({},((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(B({},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:B({},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:B({},e)});return}lr.updateProxy(e),Ng("pdp-context",e)},DA=e=>{lr.proxy.productId=e,Ji()||an.add({context:"pdp",payload:B({},lr.state)})},MA=e=>{lr.proxy.pdpLink=e},ht={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},zg={isInitialized:!1,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(B({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ut=new 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 Et=new YA,WA=e=>{const t=oa(),n=Ji();if(!n||!t){n&&an.clear(),an.add({context:"search",payload:be(B({},Et.state),{query:e})});return}Et.queryProxy.query=e},Vg=e=>{Og(e,Et)},GA=(e,t)=>{Pg(e,t,Et)},qg=e=>{Ig(e,Et)},XA=({field:e,value:t})=>{Rg({field:e,value:t},Et)},KA=e=>{Lg(e,Et)},Yg=e=>{Dg(e,Et)},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:B({},e)});return}"facetFilters"in e&&Vg(e.facetFilters||{}),"rangeFilters"in e&&qg(e.rangeFilters||[]),"catalogSegment"in e&&(Et.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Yg(e.pricebooks||[]),Et.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 w.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:Et.query,facetFilters:Et.facetFilters,rangeFilters:Et.rangeFilters,catalogSegment:Et.catalogSegment,pricebooks:Et.pricebooks},Xg=z.createContext(tv),nv=({children:e})=>{const[t,n]=z.useState(Et.query),[r,s]=z.useState(Et.facetFilters),[a,u]=z.useState(Et.rangeFilters),[c,d]=z.useState(Et.catalogSegment),[f,p]=z.useState(Et.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 w.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 w.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},cr=()=>{const e=z.useContext(F0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},vr=()=>{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}=cr(),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=C=>{const{property:A,value:M}=C.detail||{};if(!(!A||M===void 0)){if(A==="mode"){u(M);return}if(A==="entryType"){s(M);return}if(A==="isMinimized"){d(I=>be(B({},I),{isMinimized:M}));return}if(A==="isOpen"){d(I=>be(B({},I),{isOpen:M}));return}if(A==="type"){d(I=>be(B({},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 w.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}=cr(),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:C,resetCopilot:A,resetCopilotState:M,addCopilotEvent:I,addLoadingMessage:$,removeLoadingMessage:X,setActiveConversationId:F,setConversationIds:te}=la(),{connected:he,entryType:ye,copilot:U,messages:se,groupedMessages:pe,loadingMessages:le}=cr(),{status:fe}=pi(),Te=z.useRef(!1),Ae=z.useRef(!1),{getConversationMessages:ue,getSessionInformation:W}=uv({copilot:U}),ne=z.useMemo(()=>le.size>0,[le]),v=z.useCallback(we=>le.has(we),[le]),L=z.useCallback(we=>{I(we),$(we.id)},[I,$]),J=z.useCallback(({query:we,facetFilters:Ue,rangeFilters:je,catalogSegment:Qe,pricebooks:ct,userPrompt:yt,imageFile:En})=>{if(!U){d==null||d.error("Copilot is not initialized");return}if(!we)return;const vt={searchParams:{query:we}};yt&&(vt.userPrompt=yt),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"),U.search(vt,Z=>{const oe=B({},Z);Te.current=!0,L(oe)})},[d,L,U]),O=z.useCallback(({categoryId:we,categoryName:Ue,facetFilters:je,rangeFilters:Qe,catalogSegment:ct,pricebooks:yt,userPrompt:En,imageFile:vt})=>{if(!U){d==null||d.error("Copilot is not initialized");return}const Z=je&&Object.keys(je).length>0;if(we===""&&!Z){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}),Z&&(oe.browseParams.facetFilters=je),Qe&&Qe.length>0&&(oe.browseParams.rangeFilters=Qe),ct&&(oe.browseParams.catalogSegment=ct),Array.isArray(yt)&&yt.length>0&&(oe.browseParams.pricebooks=yt),Ue&&(oe.clientContext={label:Ue}),aa("browse"),U.browse(oe,Re=>{var Jn;const $e=B({},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,U]),_e=z.useCallback(({productId:we,productName:Ue,pdpLink:je,userPrompt:Qe,imageFile:ct})=>{if(!U){d==null||d.error("Copilot is not initialized");return}if(!we)return;const yt={productId:we};Qe&&(yt.userPrompt=Qe),je&&(yt.pdpLink=je),ct&&(yt.attachments={image:ct}),Ue&&(yt.clientContext={label:Ue}),aa("pdp"),U.productView(yt,En=>{var Re;const vt=B({},En),Z=((Re=vt.request)==null?void 0:Re.clientContext)||{},oe=(Z==null?void 0:Z.label)||Ue;oe&&vt.request&&(vt.request.label=oe),L(vt)})},[d,U,L]),Le=z.useCallback(({userPrompt:we,imageFile:Ue})=>{if(!U){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Ue&&(je.attachments={image:Ue}),U.askCim(je,Qe=>{const ct=B({},Qe);L(ct)})},[d,U,L]),Oe=z.useCallback(we=>{const Ue=be(B({},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),C(!0)},[s,C]);z.useEffect(()=>{!U||!he||!fe.isOpen||an.size>0&&an.processQueue(we=>{if(we.context==="search"){const Ue=B({},we.payload);Wg(Ue)}if(we.context==="browse"){const Ue=B({},we.payload);Ug(Ue)}if(we.context==="pdp"){const Ue=B({},we.payload);Hg(Ue)}})},[fe.isOpen,U,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=>{X(Ue.eventSourceId)}),we.on("error",Ue=>{I(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)){C(!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,C,X,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:yt}=Qe.data||{};ct&&F(ct),yt!=null&&yt.length&&te(yt)}),()=>{je.disconnect(),je.off(),A()}});const Qn=z.useCallback(we=>{if(!U)return;const Ue={eventId:we,reason:"User cancelled the request"};U.cancelRequest(Ue,je=>{I(je),X(we)})},[I,X,U]),hs=z.useCallback(()=>{U&&U.conversationReset({},we=>{M(),I(we),U.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Qe}=Ue.data||{};je&&F(je),Qe!=null&&Qe.length&&te(Qe)})})},[U,d,I,M,F,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":J(B(B({query:f},p),je));return;case"browse":O(B(B({categoryId:g},b),je));return;case"pdp":_e(B({productId:y,pdpLink:_||""},je));return}},[ye,f,p,J,Le,g,b,O,_e,y,_]),wi=z.useCallback((we,Ue)=>{var yt,En,vt;const Qe=we.params.userPrompt||"";if(!Qe)return;const ct=se.find(Z=>Z.id===Ue);if(ct){if(ct.name==="ask_cim"){Le({userPrompt:Qe});return}if(ct.name==="copilot_search"){const Z=((yt=ct.request)==null?void 0:yt.searchParams)||{};Z.query&&J(be(B({},Z),{userPrompt:Qe}));return}if(ct.name==="copilot_browse"){const Z=ct.request,oe=Z.browseParams||{},Re=((En=Z.clientContext)==null?void 0:En.label)||"";O(be(B({},oe),{categoryName:Re,userPrompt:Qe}));return}if(ct.name==="product_view"){const Z=ct.request||{},oe=((vt=Z.clientContext)==null?void 0:vt.label)||"";Z.productId&&_e(be(B({},Z),{productName:oe,userPrompt:Qe}))}}},[se,J,Le,O,_e]),ps=z.useMemo(()=>({copilot:U,messages:se,groupedMessages:pe,isLoading:ne,isResponseLoading:v,handleAskCim:Le,handleSearch:J,handleBrowse:O,handlePdp:_e,handleUserInput:ni,handleSuggestion:wi,handleCancel:Qn,resetConversation:hs,getSessionInformation:W,getConversationMessages:ue}),[U,se,pe,ne,v,Le,J,O,_e,ni,wi,Qn,hs,W,ue]);return w.jsx(Jg.Provider,{value:ps,children:c})},cv=()=>{const{copilot:e}=cr(),{resetCopilotState:t,addCopilotEvent:n}=la(),{handleSearch:r,handleBrowse:s,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=vr(),f=z.useCallback(({query:b})=>{if(!e||!b)return;const{facetFilters:y}=Et.facetFiltersProxy,{rangeFilters:_}=Et.rangeFiltersProxy,{catalogSegment:S}=Et.catalogSegmentProxy,{pricebooks:C}=Et.pricebooksProxy,A={query:b};A.facetFilters=y||{},A.rangeFilters=_||[],A.catalogSegment=S||"",A.pricebooks=C||[],r(B({},A))},[e,r]),p=z.useCallback(({categoryId:b})=>{if(!e)return;const y=at.categoryIdProxy.categoryName,{facetFilters:_}=at.facetFiltersProxy,{rangeFilters:S}=at.rangeFiltersProxy,{catalogSegment:C}=at.catalogSegmentProxy,{pricebooks:A}=at.pricebooksProxy,M={categoryId:b};M.categoryName=y||"",M.facetFilters=_||{},M.rangeFilters=S||[],M.catalogSegment=C||"",M.pricebooks=A||[],s(B({},M))},[e,s]),g=z.useCallback(({productId:b})=>{if(!e||!b)return;const y={productId:b,pdpLink:lr.pdpLink,productName:lr.proxy.productName||""};a(y)},[e,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(_,C=>{t(),C.forEach(A=>{n(A)})})}};return AA(b),()=>{vA(b)}},[u,c,d,t,n]),null},dv=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>w.jsxs(lv,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:[w.jsx(cv,{}),c]}),Zg=z.createContext(null),e1=z.createContext(null),fv=({children:e,dispatch:t})=>{const n=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=z.useCallback(_=>{t({type:ht.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=z.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,g,b]);return w.jsx(e1.Provider,{value:y,children:e})},hv=(e,t)=>{const{type:n,payload:r}=t;switch(n){case ht.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case ht.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case ht.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case ht.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case ht.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case ht.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case ht.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case ht.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case ht.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case ht.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case ht.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case ht.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case ht.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case ht.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case ht.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},pv=({promptsConfig:e,children:t})=>{const[n,r]=D0(hv,B(B({},zg),e||{}));return w.jsx(Zg.Provider,{value:n,children:w.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:C,searchConfig:A,promptsConfig:M,resetConversationMessage:I,conversationHistory:$,onConnect:X,onCopilotEvent:F,onRefinedSearch:te,onRefinedBrowse:he,__features:ye,children:U})=>w.jsx(dA,{baseUrl:n,apiKey:e,apiToken:t,logoUrl:r,headerText:s,entryMessage:b,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:S,searchButtonLabel:C,searchConfig:A,componentConfig:p,disclaimerMarkdown:_,disclaimerText:y,resetConversationMessage:I,conversationHistory:$,isDevelopment:d,__features:ye,children:w.jsx(TA,{entryType:g,onCopilotEvent:F,children:w.jsx(sv,{children:w.jsx(ZA,{children:w.jsx(nv,{children:w.jsx(av,{entryType:g,componentConfig:p,componentType:f,children:w.jsx(pv,{promptsConfig:M,children:w.jsx(dv,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:g,onConnect:X,onRefinedSearch:te,onRefinedBrowse:he,onCopilotEvent:F,children:U})})})})})})})});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 Q(){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})=>w.jsx("button",{"aria-label":t,className:Q(e,`${j}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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})=>w.jsx("button",{className:Q(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),kr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:Q(e,`${j}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:Q(`${j}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),kv=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:Q(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(zs,{size:"16px"})},Nv=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(kr,{className:Q(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:w.jsx(zs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(df,{className:Q(e,n,r,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.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}=cr(),{handleCancel:t}=vr();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?w.jsx(kr,{className:Q(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Ov,{}),disabled:!e,onClick:r}):null};function mB(){}function gB(){}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(),pt=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:pt},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:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:pt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:pt,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:pt,accessKey:pt,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:pt,autoFocus:qe,autoPlay:qe,blocking:pt,capture:null,charSet:null,checked:qe,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ht,controls:qe,controlsList:pt,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:pt,height:me,hidden:ff,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:pt,itemRef:pt,itemScope:qe,itemType:pt,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:pt,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:pt,required:qe,reversed:qe,rows:me,rowSpan:me,sandbox:pt,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: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: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: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: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: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},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,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};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 $(){var le={line:A,column:M};return function(fe){return fe.position=new X(le),he(),fe}}function X(le){this.start=le,this.end={line:A,column:M},this.source=C.source}X.prototype.content=S;function F(le){var fe=new Error(C.source+":"+A+":"+M+": "+le);if(fe.reason=le,fe.filename=C.source,fe.line=A,fe.column=M,fe.source=S,!C.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=U();)fe!==!1&&le.push(fe);return le}function U(){var le=$();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 F("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=$(),fe=te(r);if(fe){if(U(),!te(s))return F("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"),Nr=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=Nr(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=B({},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=Nr(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 dr(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 $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const $=t.events.length;let X=$,F;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){F=t.events[X][1].end;break}A(r);let te=$;for(;te<t.events.length;)t.events[te][1].end=B({},F),te++;return Dn(t.events,X+1,0,t.events.slice($)),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){C(e.exit("chunkFlow"),!0),A(0),e.consume(I);return}return De(I)?(e.consume(I),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(I),S)}function C(I,$){const X=t.sliceStream(I);if($&&X.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(X),t.parser.lazy[I.start.line]){let F=s.events.length;for(;F--;)if(s.events[F][1].start.offset<u&&(!s.events[F][1].end||s.events[F][1].end.offset>u))return;const te=t.events.length;let he=te,ye,U;for(;he--;)if(t.events[he][0]==="exit"&&t.events[he][1].type==="chunkFlow"){if(ye){U=t.events[he][1].end;break}ye=!0}for(A(r),F=te;F<t.events.length;)t.events[F][1].end=B({},U),F++;Dn(t.events,he+1,0,t.events.slice(te)),t.events.length=F}}function A(I){let $=n.length;for(;$-- >I;){const X=n[$];t.containerState=X[1],X[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=B({},e[r][1].end),b=B({},e[n][1].start);V1(g,-d),V1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},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:X};let a=0,u=0,c;return d;function d(F){return f(F)}function f(F){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ke(F)?tt(e,g,"whitespace")(F):g(F))}function g(F){return F===null||De(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(G1,S,$)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||De(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ke(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function y(F){return F===null||De(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||De(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),_)}function S(F){return e.attempt(s,$,C)(F)}function C(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),A}function A(F){return a>0&&Ke(F)?tt(e,M,"linePrefix",a+1)(F):M(F)}function M(F){return F===null||De(F)?e.check(G1,S,$)(F):(e.enter("codeFlowValue"),I(F))}function I(F){return F===null||De(F)?(e.exit("codeFlowValue"),M(F)):(e.consume(F),I)}function $(F){return e.exit("codeFenced"),t(F)}function X(F,te,he){let ye=0;return U;function U(Te){return F.enter("lineEnding"),F.consume(Te),F.exit("lineEnding"),se}function se(Te){return F.enter("codeFencedFence"),Ke(Te)?tt(F,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):pe(Te)}function pe(Te){return Te===c?(F.enter("codeFencedFenceSequence"),le(Te)):he(Te)}function le(Te){return Te===c?(ye++,F.consume(Te),le):ye>=u?(F.exit("codeFencedFenceSequence"),Ke(Te)?tt(F,fe,"whitespace")(Te):fe(Te)):he(Te)}function fe(Te){return Te===null||De(Te)?(F.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=B({},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 C=[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,C.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):C.pop(),b=C.length;b--;){const A=c.slice(C[b],C[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?C:S)}function C(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=dr(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),C):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),C):n(O)}function C(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),C):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):U(O)}function I(O){return O===47?(e.consume(O),U):O===58||O===95||gn(O)?(e.consume(O),$):Ke(O)?(e.consume(O),I):U(O)}function $(O){return O===45||O===46||O===58||O===95||ln(O)?(e.consume(O),$):X(O)}function X(O){return O===61?(e.consume(O),F):Ke(O)?(e.consume(O),X):I(O)}function F(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),F):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)?X(O):(e.consume(O),he)}function ye(O){return O===47||O===62||Ke(O)?I(O):n(O)}function U(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,J,le)(O)):O===null||De(O)?(e.exit("htmlFlowData"),le(O)):(e.consume(O),pe)}function le(O){return e.check(pN,fe,J)(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"),J(O)):(e.consume(O),L)}function J(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),X):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),C):De(v)?(u=S,ue(v)):(e.consume(v),S)}function C(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),$):De(v)?(u=I,ue(v)):(e.consume(v),I)}function $(v){return v===62?Ae(v):I(v)}function X(v){return gn(v)?(e.consume(v),F):n(v)}function F(v){return v===45||ln(v)?(e.consume(v),F):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),U):De(v)?(u=ye,ue(v)):Ke(v)?(e.consume(v),ye):Ae(v)}function U(v){return v===45||v===46||v===58||v===95||ln(v)?(e.consume(v),U):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:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return 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(dr(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(dr(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:B({},e[r][1].start),end:B({},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=B({},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:B({},r.end)};r.end=B({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const 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(X),check:te(F),consume:M,enter:I,exit:$,interrupt:te(F,{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),C(),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,U()}function C(){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,U()):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 $(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function X(se,pe){he(se,pe.from)}function F(se,pe){pe.restore()}function te(se,pe){return le;function le(fe,Te,Ae){let ue,W,ne,v;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([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 J(Qn)(Ye)}}function J(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,U()}}function U(){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&&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:`
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(yt),thematicBreak:a(vt)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:nt,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Le,characterReferenceMarkerNumeric:Le,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(C),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:U,codeIndented:d(A),codeText:d(Te),codeTextData:U,data:U,definition:d(),definitionDestinationString:$,definitionLabelString:M,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(le),htmlFlowData:U,htmlText:d(fe),htmlTextData:U,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:J,setextHeading:d(he),setextHeadingLineSequence:te,setextHeadingText:F,strong:d(),thematicBreak:d()}};oE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){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<Z.length;)if(Z[Je][1].type==="listOrdered"||Z[Je][1].type==="listUnordered")if(Z[Je][0]==="enter")$e.push(Je);else{const jt=$e.pop();Je=s(Z,jt,Je)}for(Je=-1;++Je<Z.length;){const jt=t[Z[Je][0]];sE.call(jt,Z[Je][1].type)&&jt[Z[Je][1].type].call(Object.assign({sliceSerialize:Z[Je][2].sliceSerialize},Re),Z[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(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:gi(Z.length>0?Z[Z.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(Z,oe,Re){let $e=oe-1,Je=-1,jt=!1,Jn,Zn,Ai,ms;for(;++$e<=Re;){const tn=Z[$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 Ur=$e;for(Zn=void 0;Ur--;){const Un=Z[Ur];if(Un[1].type==="lineEnding"||Un[1].type==="lineEndingBlank"){if(Un[0]==="exit")continue;Zn&&(Z[Zn][1].type="lineEndingBlank",jt=!0),Un[1].type="lineEnding",Zn=Ur}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?Z[Zn][1].start:tn[1].end),Z.splice(Zn||$e,0,["exit",Jn,tn[2]]),$e++,Re++}if(tn[1].type==="listItemPrefix"){const Ur={type:"listItem",_spread:!1,start:Object.assign({},tn[1].start),end:void 0};Jn=Ur,Z.splice($e,0,["enter",Ur,tn[2]]),$e++,Re++,Ai=void 0,ms=!0}}}return Z[oe][1]._spread=jt,Re}function a(Z,oe){return Re;function Re($e){c.call(this,Z($e),$e),oe&&oe.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(Z,oe,Re){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([oe,Re||void 0]),Z.position={start:gi(oe.start),end:void 0}}function d(Z){return oe;function oe(Re){Z&&Z.call(this,Re),f.call(this,Re)}}function f(Z,oe){const Re=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==Z.type&&(oe?oe.call(this,Z,$e[0]):($e[1]||aE).call(this,Z,$e[0]));else throw new Error("Cannot close `"+Z.type+"` ("+pa({start:Z.start,end:Z.end})+"): it’s not open");Re.position.end=gi(Z.end)}function p(){return xf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(Z){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=Z}function _(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=Z}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Z.replace(/(\r?\n|\r)$/g,"")}function M(Z){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=dr(this.sliceSerialize(Z)).toLowerCase()}function I(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.title=Z}function $(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.url=Z}function X(Z){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Re=this.sliceSerialize(Z).length;oe.depth=Re}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function te(Z){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function he(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(Z){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(Z.start),end:void 0},Re.push($e)),this.stack.push($e)}function U(Z){const oe=this.stack.pop();oe.value+=this.sliceSerialize(Z),oe.position.end=gi(Z.end)}function se(Z){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=oe.children[oe.children.length-1];Re.position.end=gi(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(ye.call(this,Z),U.call(this,Z))}function pe(){this.data.atHardBreak=!0}function le(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Z}function fe(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Z}function Te(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Z}function Ae(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=oe,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ue(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=oe,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function W(Z){const oe=this.sliceSerialize(Z),Re=this.stack[this.stack.length-2];Re.label=sO(oe),Re.identifier=dr(oe).toLowerCase()}function ne(){const Z=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=Z.children;Re.children=$e}else Re.alt=oe}function v(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.url=Z}function L(){const Z=this.resume(),oe=this.stack[this.stack.length-1];oe.title=Z}function J(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(Z){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=dr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Le(Z){this.data.characterReferenceType=Z.type}function Oe(Z){const oe=this.sliceSerialize(Z),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(Z){const oe=this.stack.pop();oe.position.end=gi(Z.end)}function Ye(Z){U.call(this,Z);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(Z)}function nt(Z){U.call(this,Z);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(Z)}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(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Qe(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function ct(){return{type:"paragraph",children:[]}}function yt(){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(B(B({},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
14
  `}]}function hO(e,t){const n=t.value?t.value+`
15
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
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:`
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=Nr(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 C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.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(B({},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 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:`
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 AB(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,C;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,C=p.concat(A);S>-1&&S<A.children.length;){const M=A.children[S];if(_=c(M,S,C)(),_[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=B(B({},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:C}=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
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(`
23
+ `},s),a}function i3(e,t){return e&&"run"in e?function(n,r){return Ze(this,null,function*(){const s=SE(n,B({file:r},t));yield e.run(s,r)})}:function(n,r){return SE(n,B({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],C=1,A=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<A;++C)if(f=arguments[C],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 Or={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"?Or.basename(this.path):void 0}set basename(t){jf(t,"basename"),zf(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){AE(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.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=Or.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"?Or.basename(this.path,this.extname):void 0}set stem(t){jf(t,"stem"),zf(t,"stem"),this.path=Or.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(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.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?B(B({},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:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.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(),mt=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:mt},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:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:mt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:ge,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:mt,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:mt,accessKey:mt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:mt,autoFocus:Ve,autoPlay:Ve,blocking:mt,capture:null,charSet:null,checked:Ve,cite:null,className:mt,cols:ge,colSpan:null,content:null,contentEditable:zt,controls:Ve,controlsList:mt,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:mt,height:ge,hidden:Ve,high:ge,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:mt,itemRef:mt,itemScope:Ve,itemType:mt,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:mt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:mt,required:Ve,reversed:Ve,rows:ge,rowSpan:ge,sandbox:mt,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:mt,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:mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent: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:mt,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 q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(q||(q={}));var 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([[q.A,m.A],[q.ADDRESS,m.ADDRESS],[q.ANNOTATION_XML,m.ANNOTATION_XML],[q.APPLET,m.APPLET],[q.AREA,m.AREA],[q.ARTICLE,m.ARTICLE],[q.ASIDE,m.ASIDE],[q.B,m.B],[q.BASE,m.BASE],[q.BASEFONT,m.BASEFONT],[q.BGSOUND,m.BGSOUND],[q.BIG,m.BIG],[q.BLOCKQUOTE,m.BLOCKQUOTE],[q.BODY,m.BODY],[q.BR,m.BR],[q.BUTTON,m.BUTTON],[q.CAPTION,m.CAPTION],[q.CENTER,m.CENTER],[q.CODE,m.CODE],[q.COL,m.COL],[q.COLGROUP,m.COLGROUP],[q.DD,m.DD],[q.DESC,m.DESC],[q.DETAILS,m.DETAILS],[q.DIALOG,m.DIALOG],[q.DIR,m.DIR],[q.DIV,m.DIV],[q.DL,m.DL],[q.DT,m.DT],[q.EM,m.EM],[q.EMBED,m.EMBED],[q.FIELDSET,m.FIELDSET],[q.FIGCAPTION,m.FIGCAPTION],[q.FIGURE,m.FIGURE],[q.FONT,m.FONT],[q.FOOTER,m.FOOTER],[q.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[q.FORM,m.FORM],[q.FRAME,m.FRAME],[q.FRAMESET,m.FRAMESET],[q.H1,m.H1],[q.H2,m.H2],[q.H3,m.H3],[q.H4,m.H4],[q.H5,m.H5],[q.H6,m.H6],[q.HEAD,m.HEAD],[q.HEADER,m.HEADER],[q.HGROUP,m.HGROUP],[q.HR,m.HR],[q.HTML,m.HTML],[q.I,m.I],[q.IMG,m.IMG],[q.IMAGE,m.IMAGE],[q.INPUT,m.INPUT],[q.IFRAME,m.IFRAME],[q.KEYGEN,m.KEYGEN],[q.LABEL,m.LABEL],[q.LI,m.LI],[q.LINK,m.LINK],[q.LISTING,m.LISTING],[q.MAIN,m.MAIN],[q.MALIGNMARK,m.MALIGNMARK],[q.MARQUEE,m.MARQUEE],[q.MATH,m.MATH],[q.MENU,m.MENU],[q.META,m.META],[q.MGLYPH,m.MGLYPH],[q.MI,m.MI],[q.MO,m.MO],[q.MN,m.MN],[q.MS,m.MS],[q.MTEXT,m.MTEXT],[q.NAV,m.NAV],[q.NOBR,m.NOBR],[q.NOFRAMES,m.NOFRAMES],[q.NOEMBED,m.NOEMBED],[q.NOSCRIPT,m.NOSCRIPT],[q.OBJECT,m.OBJECT],[q.OL,m.OL],[q.OPTGROUP,m.OPTGROUP],[q.OPTION,m.OPTION],[q.P,m.P],[q.PARAM,m.PARAM],[q.PLAINTEXT,m.PLAINTEXT],[q.PRE,m.PRE],[q.RB,m.RB],[q.RP,m.RP],[q.RT,m.RT],[q.RTC,m.RTC],[q.RUBY,m.RUBY],[q.S,m.S],[q.SCRIPT,m.SCRIPT],[q.SEARCH,m.SEARCH],[q.SECTION,m.SECTION],[q.SELECT,m.SELECT],[q.SOURCE,m.SOURCE],[q.SMALL,m.SMALL],[q.SPAN,m.SPAN],[q.STRIKE,m.STRIKE],[q.STRONG,m.STRONG],[q.STYLE,m.STYLE],[q.SUB,m.SUB],[q.SUMMARY,m.SUMMARY],[q.SUP,m.SUP],[q.TABLE,m.TABLE],[q.TBODY,m.TBODY],[q.TEMPLATE,m.TEMPLATE],[q.TEXTAREA,m.TEXTAREA],[q.TFOOT,m.TFOOT],[q.TD,m.TD],[q.TH,m.TH],[q.THEAD,m.THEAD],[q.TITLE,m.TITLE],[q.TR,m.TR],[q.TRACK,m.TRACK],[q.TT,m.TT],[q.U,m.U],[q.UL,m.UL],[q.SVG,m.SVG],[q.VAR,m.VAR],[q.WBR,m.WBR],[q.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]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.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 Pr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Pr||(Pr={}));const cy={type:Pr.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===Pr.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:Pr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Pr.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===Pr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Pr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Pr.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=B(B({},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=B(B({},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=B(B({},Ty),n);t!=null||(t=r.treeAdapter.createElement(q.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)===q.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(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,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(q.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:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===q.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===Pr.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:{fr(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(q.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function fr(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:{fr(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),fr(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(q.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(q.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=q.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:{fr(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(q.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(q.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(q.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(q.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:{fr(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:{fr(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(q.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:{fr(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:{fr(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:{fr(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:{fr(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:{fr(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}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const 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,Nr());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,Nr(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,Nr(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,Nr(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,Nr(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,Nr(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(B({},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=Nr(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(B({},e),{children:[]})):ns(e)}function $y(e){return function(t,n){return Uy(t,be(B({},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?B(B({},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 w.jsx("a",be(B(B({className:Q(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:w.jsx("div",{className:Q(n,`${j}-disclaimer`),children:t?w.jsx(PE,{rehypePlugins:[$y,lL],components:{ul:({children:s})=>w.jsx("ul",{className:Q(n,`${j}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:Q(n,`${j}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:Q(n,`${j}-li`),children:s}),a:({href:s,title:a,children:u})=>w.jsx(Ky,{globalClassName:n,openLinksInNewTab:r,href:s,title:a,children:u}),img:({src:s,alt:a})=>w.jsx("img",{className:Q(n,`${j}-disclaimer-image`),src:s,alt:a}),p:({children:s})=>w.jsx("p",{className:Q(n,`${j}-disclaimer-text`),children:s}),span:({children:s})=>w.jsx("span",{className:Q(n,`${j}-disclaimer-text-span`),children:s})},children:t}):w.jsx("p",{className:Q(n,`${j}-disclaimer-text`),children:e})})},ch=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=cr(),{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,C=S?"connected":"disconnected",A=t||!S,M=()=>a?new Promise((F,te)=>{const he=new FileReader;he.readAsDataURL(a),he.onload=()=>F(he.result),he.onerror=ye=>te(ye)}):Promise.resolve(""),I=F=>Ze(null,null,function*(){var ye;if(A)return;const te=10*1024*1024,he=(ye=F.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)}}),$=()=>{u(null),b.current&&(b.current.value="")},X=F=>Ze(null,null,function*(){var ye;F.preventDefault();const te=(((ye=g.current)==null?void 0:ye.value)||"").trim();let he="";try{he=yield M()}catch(U){c==null||c.error("Error converting file to base64:",U),alert("There was an error processing the file. Please try again.");return}te&&($(),g.current.value="",r(te,he))});return w.jsxs("div",{className:Q(d,e,n,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:Q(d,n,`${j}-image-file-preview`),children:[w.jsx("img",{className:Q(d,n,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:Q(d,n,`${j}-image-file-name`),title:_,children:_}),w.jsx(cf,{className:Q(n,"clear-attachment"),label:"Remove image",onClick:$})]}),w.jsxs("form",{className:Q(d,e,n,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:X,children:[w.jsx("span",{role:"status",className:Q(`${j}-connection-status-icon`,C)}),y&&w.jsxs("div",{role:"button",className:Q(d,e,n,A&&"disabled",`${j}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[w.jsx("label",{className:Q(d,e,n,A&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(vv,{})}),w.jsx("input",{className:Q(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})]}),w.jsx("input",{className:Q(d,e,n,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Iv,{isLoading:A}),w.jsx(Nv,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),w.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 Ir(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 Ir(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,hr=(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)?Ir(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 hr(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,B({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=Ir(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 pr(...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 vB(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=()=>Ir(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>io(t()),a=u=>t().getElementById(u);return be(B({},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,J=W[L];if(0<s(J,ne))W[L]=ne,W[v]=J,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,J=W.length,O=J>>>1;L<O;){var _e=2*(L+1)-1,Le=W[_e],Oe=_e+1,Ge=W[Oe];if(0>s(Le,v))Oe<J&&0>s(Ge,Le)?(W[L]=Ge,W[Oe]=v,L=Oe):(W[L]=Le,W[_e]=v,L=_e);else if(Oe<J&&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,C=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 $(W){if(S=!1,I(W),!_)if(n(d)!==null)_=!0,Ae(X);else{var ne=n(f);ne!==null&&ue($,ne.startTime-W)}}function X(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 J=L(g.expirationTime<=ne);ne=e.unstable_now(),typeof J=="function"?g.callback=J: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($,_e.startTime-ne),O=!1}return O}finally{g=null,b=v,y=!1}}var F=!1,te=null,he=-1,ye=5,U=-1;function se(){return!(e.unstable_now()-U<ye)}function pe(){if(te!==null){var W=e.unstable_now();U=W;var ne=!0;try{ne=te(!0,W)}finally{ne?le():(F=!1,te=null)}}else F=!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(){C(pe,0)};function Ae(W){te=W,F||(F=!0,le())}function ue(W,ne){he=C(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(X))},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 J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=v+J,W={id:p++,callback:ne,priorityLevel:W,startTime:v,expirationTime:J,sortIndex:-1},v>L?(W.sortIndex=v,t(f,W),n(d)===null&&W===n(f)&&(S?(A(he),he=-1):S=!0,ue($,v-L))):(W.sortIndex=J,t(d,W),_||y||(_=!0,Ae(X))),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 C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[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];C[o]=new S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[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){C[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[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);C[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);C[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);C[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,l,h){var E=C.hasOwnProperty(o)?C[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 $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),F=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),U=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 J(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(K){var h=K}Reflect.construct(i,[],o)}else{try{o.call()}catch(K){h=K}i.call(o.prototype)}else{try{throw Error()}catch(K){h=K}i()}}catch(K){if(K&&h&&typeof K.stack=="string"){for(var E=K.stack.split(`
26
26
  `),T=h.stack.split(`
27
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=`
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:"")?J(i):""}function Le(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=_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 F: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 U: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 yt(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 Z(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?Z(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 Ur(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 VM(i,o,l,h,E,T,x,P,D){var K=Array.prototype.slice.call(arguments,3);try{o.apply(l,K)}catch(ae){this.onError(ae)}}var Ka=!1,ic=null,sc=!1,gp=null,qM={onError:function(i){Ka=!0,ic=i}};function YM(i,o,l,h,E,T,x,P,D){Ka=!1,ic=null,VM.apply(qM,arguments)}function WM(i,o,l,h,E,T,x,P,D){if(YM.apply(this,arguments),Ka){if(Ka){var K=ic;Ka=!1,ic=null}else throw Error(n(198));sc||(sc=!0,gp=K)}}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 GM(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=GM(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,XM=t.unstable_shouldYield,KM=t.unstable_requestPaint,Mt=t.unstable_now,QM=t.unstable_getCurrentPriorityLevel,Ep=t.unstable_ImmediatePriority,A_=t.unstable_UserBlockingPriority,oc=t.unstable_NormalPriority,JM=t.unstable_LowPriority,v_=t.unstable_IdlePriority,ac=null,Hr=null;function ZM(i){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(ac,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Er=Math.clz32?Math.clz32:nF,eF=Math.log,tF=Math.LN2;function nF(i){return i>>>=0,i===0?32:31-(eF(i)/tF|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-Er(o),E=1<<l,h|=i[l],o&=~E;return h}function rF(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 iF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-Er(T),P=1<<x,D=E[x];D===-1?((P&l)===0||(P&h)!==0)&&(E[x]=rF(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-Er(o),i[o]=l}function sF(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-Er(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-Er(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=[],oF="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 aF(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 uF(){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,uF)))}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=$.ReactCurrentBatchConfig,hc=!0;function lF(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 cF(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(aF(E,i,o,l,h))h.stopPropagation();else if(L_(i,h),o&4&&-1<oF.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(QM()){case Ep:return 1;case A_:return 4;case oc:case JM: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}),dF=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),fF=v({},yc,{dataTransfer:0}),hF=Hn(fF),pF=v({},iu,{relatedTarget:0}),Np=Hn(pF),mF=v({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),gF=Hn(mF),EF=v({},wo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yF=Hn(EF),TF=v({},wo,{data:0}),z_=Hn(TF),bF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_F={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"},SF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=SF[i])?!!o[i]:!1}function Op(){return xF}var wF=v({},iu,{key:function(i){if(i.key){var o=bF[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"?_F[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}}),CF=Hn(wF),AF=v({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=Hn(AF),vF=v({},iu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),kF=Hn(vF),NF=v({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),OF=Hn(NF),PF=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}),IF=Hn(PF),RF=[9,13,27,32],Pp=c&&"CompositionEvent"in window,ou=null;c&&"documentMode"in document&&(ou=document.documentMode);var LF=c&&"TextEvent"in window&&!ou,$_=c&&(!Pp||ou&&8<ou&&11>=ou),V_=" ",q_=!1;function Y_(i,o){switch(i){case"keyup":return RF.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 DF(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 MF(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 FF={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"?!!FF[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 BF(i){h2(i,0)}function Tc(i){var o=Oo(i);if(hs(o))return i}function UF(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_(BF,o)}}function HF(i,o,l){i==="focusin"?(J_(),au=o,uu=l,au.attachEvent("onpropertychange",Z_)):i==="focusout"&&J_()}function zF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tc(uu)}function jF(i,o){if(i==="click")return Tc(o)}function $F(i,o){if(i==="input"||i==="change")return Tc(o)}function VF(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var yr=typeof Object.is=="function"?Object.is:VF;function lu(i,o){if(yr(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)||!yr(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 qF(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 YF=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],WF=Up.toLowerCase(),GF=Up[0].toUpperCase()+Up.slice(1);Ii(WF,"on"+GF)}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(" "),XF=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,WM(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,K=P.currentTarget;if(P=P.listener,D!==T&&E.isPropagationStopped())break e;f2(E,P,K),T=D}else for(x=0;x<h.length;x++){if(P=h[x],D=P.instance,K=P.currentTarget,P=P.listener,D!==T&&E.isPropagationStopped())break e;f2(E,P,K),T=D}}}if(sc)throw i=gp,sc=!1,gp=null,i}function Tt(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"&&(XF.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=lF;break;case 4:E=cF;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 K=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=CF;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=hF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=kF;break;case o2:case a2:case u2:xe=gF;break;case l2:xe=OF;break;case"scroll":xe=dF;break;case"wheel":xe=IF;break;case"copy":case"cut":case"paste":xe=yF;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",V=ke?re!==null?re+"Capture":null:re;ke=[];for(var H=K,Y;H!==null;){Y=H;var Ee=Y.stateNode;if(Y.tag===5&&Ee!==null&&(Y=Ee,V!==null&&(Ee=Ga(H,V),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=K,ve=ve?Es(ve):null,ve!==null&&(Ft=gs(ve),ve!==Ft||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(xe=null,ve=K),xe!==ve)){if(ke=H_,Ee="onMouseLeave",V="onMouseEnter",H="mouse",(i==="pointerout"||i==="pointerover")&&(ke=j_,Ee="onPointerLeave",V="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)===K&&(ke=new ke(V,H+"enter",ve,l,ae),ke.target=Y,ke.relatedTarget=Ft,Ee=ke),Ft=Ee,xe&&ve)t:{for(ke=xe,V=ve,H=0,Y=ke;Y;Y=ko(Y))H++;for(Y=0,Ee=V;Ee;Ee=ko(Ee))Y++;for(;0<H-Y;)ke=ko(ke),H--;for(;0<Y-H;)V=ko(V),Y--;for(;H--;){if(ke===V||V!==null&&ke===V.alternate)break t;ke=ko(ke),V=ko(V)}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=K?Oo(K):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=UF;else if(G_(re))if(K_)Ne=$F;else{Ne=zF;var Me=HF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=jF);if(Ne&&(Ne=Ne(i,K))){X_(de,Ne,l,ae);break e}Me&&Me(i,re,K),i==="focusout"&&(Me=re._wrapperState)&&Me.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(Me=K?Oo(K):window,i){case"focusin":(G_(Me)||Me.contentEditable==="true")&&(Ao=Me,Dp=K,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(YF)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(K,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=LF?DF(i,l):MF(i,l))&&(K=xc(K,"onBeforeInput"),0<K.length&&(ae=new z_("onBeforeInput","beforeinput",null,l,ae),de.push({event:ae,listeners:K}),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,K=P.stateNode;if(D!==null&&D===h)break;P.tag===5&&K!==null&&(P=K,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 KF=/\r\n?/g,QF=/\u0000|\uFFFD/g;function g2(i){return(typeof i=="string"?i:""+i).replace(KF,`
29
+ `).replace(QF,"")}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,JF=typeof clearTimeout=="function"?clearTimeout:void 0,E2=typeof Promise=="function"?Promise:void 0,ZF=typeof queueMicrotask=="function"?queueMicrotask:typeof E2!="undefined"?function(i){return E2.resolve(null).then(i).catch(e9)}:qp;function e9(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),zr="__reactFiber$"+No,pu="__reactProps$"+No,ii="__reactContainer$"+No,Wp="__reactEvents$"+No,t9="__reactListeners$"+No,n9="__reactHandles$"+No;function Es(i){var o=i[zr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ii]||l[zr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=y2(i);i!==null;){if(l=i[zr])return l;i=y2(i)}return o}i=l,l=i.parentNode}return null}function mu(i){return i=i[zr]||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 bt(i){0>Po||(i.current=Gp[Po],Gp[Po]=null,Po--)}function gt(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(){bt(kn),bt(dn)}function T2(i,o,l){if(dn.current!==Di)throw Error(n(168));gt(dn,o),gt(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,gt(dn,i),gt(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,bt(kn),bt(dn),gt(dn,i)):bt(kn),gt(kn,l)}var si=null,Nc=!1,Xp=!1;function S2(i){si===null?si=[i]:si.push(i)}function r9(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-Er(h)-1;h&=~(1<<E),l+=1;var T=32-Er(o)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,oi=1<<32-Er(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,Tr=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){Tr===null?Tr=[i]:Tr.push(i)}var i9=$.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(V,H){if(i){var Y=V.deletions;Y===null?(V.deletions=[H],V.flags|=16):Y.push(H)}}function l(V,H){if(!i)return null;for(;H!==null;)o(V,H),H=H.sibling;return null}function h(V,H){for(V=new Map;H!==null;)H.key!==null?V.set(H.key,H):V.set(H.index,H),H=H.sibling;return V}function E(V,H){return V=Vi(V,H),V.index=0,V.sibling=null,V}function T(V,H,Y){return V.index=Y,i?(Y=V.alternate,Y!==null?(Y=Y.index,Y<H?(V.flags|=2,H):Y):(V.flags|=2,H)):(V.flags|=1048576,H)}function x(V){return i&&V.alternate===null&&(V.flags|=2),V}function P(V,H,Y,Ee){return H===null||H.tag!==6?(H=qm(Y,V.mode,Ee),H.return=V,H):(H=E(H,Y),H.return=V,H)}function D(V,H,Y,Ee){var Ne=Y.type;return Ne===te?ae(V,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(V,H,Y),Ee.return=V,Ee):(Ee=rd(Y.type,Y.key,Y.props,null,V.mode,Ee),Ee.ref=gu(V,H,Y),Ee.return=V,Ee)}function K(V,H,Y,Ee){return H===null||H.tag!==4||H.stateNode.containerInfo!==Y.containerInfo||H.stateNode.implementation!==Y.implementation?(H=Ym(Y,V.mode,Ee),H.return=V,H):(H=E(H,Y.children||[]),H.return=V,H)}function ae(V,H,Y,Ee,Ne){return H===null||H.tag!==7?(H=ks(Y,V.mode,Ee,Ne),H.return=V,H):(H=E(H,Y),H.return=V,H)}function de(V,H,Y){if(typeof H=="string"&&H!==""||typeof H=="number")return H=qm(""+H,V.mode,Y),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case X:return Y=rd(H.type,H.key,H.props,null,V.mode,Y),Y.ref=gu(V,null,H),Y.return=V,Y;case F:return H=Ym(H,V.mode,Y),H.return=V,H;case Ae:var Ee=H._init;return de(V,Ee(H._payload),Y)}if(je(H)||ne(H))return H=ks(H,V.mode,Y,null),H.return=V,H;Rc(V,H)}return null}function re(V,H,Y,Ee){var Ne=H!==null?H.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Ne!==null?null:P(V,H,""+Y,Ee);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case X:return Y.key===Ne?D(V,H,Y,Ee):null;case F:return Y.key===Ne?K(V,H,Y,Ee):null;case Ae:return Ne=Y._init,re(V,H,Ne(Y._payload),Ee)}if(je(Y)||ne(Y))return Ne!==null?null:ae(V,H,Y,Ee,null);Rc(V,Y)}return null}function xe(V,H,Y,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return V=V.get(Y)||null,P(H,V,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case X:return V=V.get(Ee.key===null?Y:Ee.key)||null,D(H,V,Ee,Ne);case F:return V=V.get(Ee.key===null?Y:Ee.key)||null,K(H,V,Ee,Ne);case Ae:var Me=Ee._init;return xe(V,H,Y,Me(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return V=V.get(Y)||null,ae(H,V,Ee,Ne,null);Rc(H,Ee)}return null}function ve(V,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(V,Fe,Y[ze],Ee);if(it===null){Fe===null&&(Fe=en);break}i&&Fe&&it.alternate===null&&o(V,Fe),H=T(it,H,ze),Me===null?Ne=it:Me.sibling=it,Me=it,Fe=en}if(ze===Y.length)return l(V,Fe),Ct&&bs(V,ze),Ne;if(Fe===null){for(;ze<Y.length;ze++)Fe=de(V,Y[ze],Ee),Fe!==null&&(H=T(Fe,H,ze),Me===null?Ne=Fe:Me.sibling=Fe,Me=Fe);return Ct&&bs(V,ze),Ne}for(Fe=h(V,Fe);ze<Y.length;ze++)en=xe(Fe,V,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(V,qi)}),Ct&&bs(V,ze),Ne}function ke(V,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(V,Fe,it.value,Ee);if(qi===null){Fe===null&&(Fe=en);break}i&&Fe&&qi.alternate===null&&o(V,Fe),H=T(qi,H,ze),Me===null?Ne=qi:Me.sibling=qi,Me=qi,Fe=en}if(it.done)return l(V,Fe),Ct&&bs(V,ze),Ne;if(Fe===null){for(;!it.done;ze++,it=Y.next())it=de(V,it.value,Ee),it!==null&&(H=T(it,H,ze),Me===null?Ne=it:Me.sibling=it,Me=it);return Ct&&bs(V,ze),Ne}for(Fe=h(V,Fe);!it.done;ze++,it=Y.next())it=xe(Fe,V,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(F9){return o(V,F9)}),Ct&&bs(V,ze),Ne}function Ft(V,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 X: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(V,Me.sibling),H=E(Me,Y.props.children),H.return=V,V=H;break e}}else if(Me.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&k2(Ne)===Me.type){l(V,Me.sibling),H=E(Me,Y.props),H.ref=gu(V,Me,Y),H.return=V,V=H;break e}l(V,Me);break}else o(V,Me);Me=Me.sibling}Y.type===te?(H=ks(Y.props.children,V.mode,Ee,Y.key),H.return=V,V=H):(Ee=rd(Y.type,Y.key,Y.props,null,V.mode,Ee),Ee.ref=gu(V,H,Y),Ee.return=V,V=Ee)}return x(V);case F: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(V,H.sibling),H=E(H,Y.children||[]),H.return=V,V=H;break e}else{l(V,H);break}else o(V,H);H=H.sibling}H=Ym(Y,V.mode,Ee),H.return=V,V=H}return x(V);case Ae:return Me=Y._init,Ft(V,H,Me(Y._payload),Ee)}if(je(Y))return ve(V,H,Y,Ee);if(ne(Y))return ke(V,H,Y,Ee);Rc(V,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,H!==null&&H.tag===6?(l(V,H.sibling),H=E(H,Y),H.return=V,V=H):(l(V,H),H=qm(Y,V.mode,Ee),H.return=V,V=H),x(V)):l(V,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;bt(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,K=D.next;D.next=null,x===null?T=K:x.next=K,x=D;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,P=ae.lastBaseUpdate,P!==x&&(P===null?ae.firstBaseUpdate=K:P.next=K,ae.lastBaseUpdate=D))}if(T!==null){var de=E.baseState;x=0,ae=K=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?(K=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=K,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={},jr=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(gt(Tu,o),gt(yu,i),gt(jr,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)}bt(jr),gt(jr,o)}function Uo(){bt(jr),bt(yu),bt(Tu)}function D2(i){Ss(Tu.current);var o=Ss(jr.current),l=oe(o,i.type);o!==l&&(gt(yu,i),gt(jr,l))}function um(i){yu.current===i&&(bt(jr),bt(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=$.ReactCurrentDispatcher,dm=$.ReactCurrentBatchConfig,xs=0,Nt=null,qt=null,Jt=null,Hc=!1,bu=!1,_u=0,s9=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(!yr(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?l9:c9,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=d9,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 $r(){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,K=T;do{var ae=K.lane;if((xs&ae)===ae)D!==null&&(D=D.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),h=K.hasEagerState?K.eagerState:i(h,K.action);else{var de={lane:ae,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};D===null?(P=D=de,x=h):D=D.next=de,Nt.lanes|=ae,ws|=ae}K=K.next}while(K!==null&&K!==T);D===null?x=h:D.next=P,yr(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);yr(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=!yr(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!yr(i,l)}catch(h){return!0}}function j2(i){var o=ui(i,1);o!==null&&xr(o,i,1,-1)}function $2(i){var o=$r();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=u9.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=$r();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):(yr(l,o)||(l=k_(),Nt.lanes|=l,ws|=l,i.baseState=!0),o)}function o9(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 a9(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();xr(l,i,h,E),nS(l,o,h)}}function u9(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,yr(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(K){}l=P2(i,o,E,h),l!==null&&(E=Tn(),xr(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},l9={readContext:nr,useCallback:function(i,o){return $r().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=$r();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=$r();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=a9.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var o=$r();return i={current:i},o.memoizedState=i},useState:$2,useDebugValue:ym,useDeferredValue:function(i){return $r().memoizedState=i},useTransition:function(){var i=$2(!1),o=i[0];return i=o9.bind(null,i[1]),$r().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Nt,E=$r();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=$r(),o=Zt.identifierPrefix;if(Ct){var l=ai,h=oi;l=(h&~(1<<32-Er(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=_u++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=s9++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},c9={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},d9={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 br(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&&(xr(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&&(xr(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&&(xr(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
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(`
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 f9=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 f9;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=A9.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 h9=$.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},gt(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,gt(jo,$n),$n|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,gt(jo,$n),$n|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,gt(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,K=l.contextType;typeof K=="object"&&K!==null?K=nr(K):(K=Nn(l)?ys:dn.current,K=Io(o,K));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!==K)&&sS(o,x,h,K),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,K))?(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=K,h=P):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,I2(i,o),P=o.memoizedProps,K=o.type===o.elementType?P:br(o.type,P),x.props=K,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),(K=Fi||rS(o,l,K,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=K):(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,h9.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),gt(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 p9(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 p9(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),xr(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=v9.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,jn=Ri(E.nextSibling),zn=o,Ct=!0,Tr=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(gt(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 m9(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;gt(Lc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(gt(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?TS(i,o,l):(gt(kt,kt.current&1),i=ci(i,o,l),i!==null?i.sibling:null);gt(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),gt(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(jr.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(K in E)if(!h.hasOwnProperty(K)&&E.hasOwnProperty(K)&&E[K]!=null)if(K==="style"){var P=E[K];for(x in P)P.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(s.hasOwnProperty(K)?T||(T=[]):(T=T||[]).push(K,null));for(K in h){var D=h[K];if(P=E!=null?E[K]:void 0,h.hasOwnProperty(K)&&D!==P&&(D!=null||P!=null))if(K==="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(K,l)),l=D;else K==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,P=P?P.__html:void 0,D!=null&&P!==D&&(T=T||[]).push(K,D)):K==="children"?typeof D!="string"&&typeof D!="number"||(T=T||[]).push(K,""+D):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(s.hasOwnProperty(K)?(D!=null&&K==="onScroll"&&Tt("scroll",i),T||P===D||(T=[])):(T=T||[]).push(K,D))}l&&(T=T||[]).push("style",l);var K=T;(o.updateQueue=K)&&(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 g9(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(),bt(kn),bt(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,Tr!==null&&(Hm(Tr),Tr=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(jr.current),Ic(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[zr]=o,h[pu]=T,i=(o.mode&1)!==0,l){case"dialog":Tt("cancel",h),Tt("close",h);break;case"iframe":case"object":case"embed":Tt("load",h);break;case"video":case"audio":for(E=0;E<du.length;E++)Tt(du[E],h);break;case"source":Tt("error",h);break;case"img":case"image":case"link":Tt("error",h),Tt("load",h);break;case"details":Tt("toggle",h);break;case"input":ps(h,T),Tt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},Tt("invalid",h);break;case"textarea":yt(h,T),Tt("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"&&Tt("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=Z(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[zr]=o,i[pu]=h,SS(i,o,!1,!1),o.stateNode=i;e:{switch(x=Ur(l,h),l){case"dialog":Tt("cancel",i),Tt("close",i),E=h;break;case"iframe":case"object":case"embed":Tt("load",i),E=h;break;case"video":case"audio":for(E=0;E<du.length;E++)Tt(du[E],i);E=h;break;case"source":Tt("error",i),E=h;break;case"img":case"image":case"link":Tt("error",i),Tt("load",i),E=h;break;case"details":Tt("toggle",i),E=h;break;case"input":ps(i,h),E=wi(i,h),Tt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=v({},h,{value:void 0}),Tt("invalid",i);break;case"textarea":yt(i,h),E=ct(i,h),Tt("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"&&Tt("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(jr.current),Ic(o)){if(h=o.stateNode,l=o.memoizedProps,h[zr]=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[zr]=o,o.stateNode=h}return hn(o),null;case 13:if(bt(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[zr]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;hn(o),T=!1}else Tr!==null&&(Hm(Tr),Tr=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(bt(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 gt(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,gt(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 E9(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(),bt(kn),bt(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(bt(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 bt(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,y9=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 T9(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,K=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&&++K===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,V=o.stateNode,H=V.getSnapshotBeforeUpdate(o.elementType===o.type?ke:br(o.type,ke),Ft);V.__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[zr],delete o[pu],delete o[Wp],delete o[t9],delete o[n9])),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,_r=!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(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(ac,l)}catch(P){}switch(l.tag){case 5:pn||zo(l,o);case 6:var h=nn,E=_r;nn=null,Ui(i,o,l),nn=h,_r=E,nn!==null&&(_r?(i=nn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):nn.removeChild(l.stateNode));break;case 18:nn!==null&&(_r?(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=_r,nn=l.stateNode.containerInfo,_r=!0,Ui(i,o,l),nn=h,_r=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 y9),o.forEach(function(h){var E=k9.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Sr(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,_r=!1;break e;case 3:nn=P.stateNode.containerInfo,_r=!0;break e;case 4:nn=P.stateNode.containerInfo,_r=!0;break e}P=P.return}if(nn===null)throw Error(n(160));NS(T,x,E),nn=null,_r=!1;var D=E.alternate;D!==null&&(D.return=null),E.return=null}catch(K){It(E,o,K)}}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(Sr(o,i),Vr(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:Sr(o,i),Vr(i),h&512&&l!==null&&zo(l,l.return);break;case 5:if(Sr(o,i),Vr(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),Ur(P,x);var K=Ur(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,K)}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(Sr(o,i),Vr(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(Sr(o,i),Vr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{ru(o.containerInfo)}catch(ke){It(i,i.return,ke)}break;case 4:Sr(o,i),Vr(i);break;case 13:Sr(o,i),Vr(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=(K=pn)||ae,Sr(o,i),pn=K):Sr(o,i),Vr(i),h&8192){if(K=i.memoizedState!==null,(i.stateNode.isHidden=K)&&!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,K?(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=K?"":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:Sr(o,i),Vr(i),h&4&&OS(i);break;case 21:break;default:Sr(o,i),Vr(i)}}function Vr(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 b9(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 K=pn;if(Wc=x,(pn=D)&&!K)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=K}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:br(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 K=o.alternate;if(K!==null){var ae=K.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 _9=Math.ceil,Xc=$.ReactCurrentDispatcher,Lm=$.ReactCurrentOwner,ir=$.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:i9.transition!==null?(td===0&&(td=k_()),td):(i=ut,i!==0||(i=window.event,i=i===void 0?16:F_(i.type)),i)}function xr(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;iF(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?r9(FS.bind(null,i)):S2(FS.bind(null,i)),ZF(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{w9();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&&!S9(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-Er(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*_9(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 S9(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(!yr(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-Er(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,bt(jo)}function As(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,JF(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(),bt(kn),bt(dn),cm();break;case 5:um(h);break;case 4:Uo();break;case 13:bt(kt);break;case 19:bt(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 K=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,K,o),o=xe,D=K;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,K,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 V=oS(T,D,o);R2(T,V);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{x9();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 x9(){for(;$t!==null;)HS($t)}function w9(){for(;$t!==null&&!XM();)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=g9(l,o,$n),l!==null){$t=l;return}}else{if(l=E9(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,C9(i,o,l,h)}finally{ir.transition=E,ut=h}return null}function C9(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(sF(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,T9(i,l),PS(l,i),qF($p),hc=!!jp,$p=jp=null,i.current=l,b9(l),KM(),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),ZM(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 K=P[D];for(Ce=K;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===K){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 V=T.sibling;if(V!==null){V.return=T.return,Ce=V;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(),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.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 A9(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 v9(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),$S(i,l)}function k9(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,m9(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=O9(h),i=br(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,br(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:br(h,E),xm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:br(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,Tr=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:br(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,gt(Lc,h._currentValue),h._currentValue=x,T!==null)if(yr(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 K=T.updateQueue;if(K!==null){K=K.shared;var ae=K.pending;ae===null?D.next=D:(D.next=ae.next,ae.next=D),K.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=br(h,o.pendingProps),E=br(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:br(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 N9(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 N9(i,o,l,h)}function Vm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function O9(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 U: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 P9(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 P9(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 I9(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,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&&(xr(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 R9(){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 L9(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var K=od(x);T.call(K)}}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 K=od(D);P.call(K)}}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=L9(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();xr(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();xr(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();xr(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 D9={usingClientEntryPoint:!1,Events:[mu,Oo,Ac,m_,g_,zm]},Nu={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},M9={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:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=S_(i),i===null?null:i.stateNode},findFiberByHostInstance:Nu.findFiberByHostInstance||R9,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(M9),Hr=cd}catch(i){}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D9,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 I9(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 C,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=(C=e()).onChange)==null||A.call(C,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,C;(C=(S=e()).onChange)==null||C.call(S,y,_)},hash(y){var _,S,C;return(C=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?C: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 X},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(B({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>be(B({},F),{matches(...ue){return ue.includes(F.ref.current)},hasTag(ue){var W,ne;return!!((ne=(W=e.states[F.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:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:U,action:A,guard:M,track:A6,refs:S,computed:X,flush:yT,scope:n,choose:$}),A=ue=>{const W=no(ue)?ue(C()):ue;if(!W)return;const ne=W.map(v=>{var J,O;const L=(O=(J=e.implementations)==null?void 0:J.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(C())},M=ue=>{var W,ne;return no(ue)?ue(C()):(ne=(W=e.implementations)==null?void 0:W.guards)==null?void 0:ne[ue](C())},I=ue=>{const W=no(ue)?ue(C()):ue;if(!W)return;const ne=W.map(L=>{var O,_e;const J=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[L];return J||hh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),J}),v=[];for(const L of ne){const J=L==null?void 0:L(C());J&&v.push(J)}return()=>v.forEach(L=>L==null?void 0:L())},$=ue=>dL(ue).find(W=>{let ne=!W.guard;return Rl(W.guard)?ne=!!M(W.guard):no(W.guard)&&(ne=W.guard(C())),ne}),X=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:X})},F=Hl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,W){var v,L,J,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((J=e.states[ue])==null?void 0:J.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:F.initial;F.invoke(v,ne?F.get():Sh)});const ue=f.current,W=F.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 F?F.ref.current:F.get(),U=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=$(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 J=L!==W;J?oo.flushSync(()=>F.set(L)):v.reenter&&!J?F.invoke(W,W):A((Ge=v.actions)!=null?Ge:[])})};return(Ae=e.watch)==null||Ae.call(e,C()),{state:_(),send:U,context:d,prop:a,scope:n,refs:S,computed:X,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(B({},u),{ref:r}),a);if(!z.isValidElement(a))return null;const c=z.Children.only(a),d=k6(c);return z.cloneElement(c,be(B({},pr(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=pr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(_i.div,be(B({},s),{ref:zl(r.ref,t)}))});_T.displayName="PopoverContent";const ST=z.forwardRef((e,t)=>{const n=Nh(),r=Ba(),s=pr(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(_i.div,be(B({},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]},[{},B({},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(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",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(B({},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,Rr=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 Lr(e){return U6.has(Zr(e))?"y":"x"}function Lh(e){return Ih(Lr(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 B({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=Lr(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:C,fn:A}=c[S],{x:M,y:I,data:$,reset:X}=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(B({},y),{[C]:B(B({},y[C]),$)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(b=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):X.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),C=c[b?g==="floating"?"reference":"floating":g],A=Yl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.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),$=(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},X=Yl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:M,offsetParent:I,strategy:d}):M);return{top:(A.top-X.top+_.top)/$.y,bottom:(X.bottom-A.bottom+_.bottom)/$.y,left:(A.left-X.left+_.left)/$.x,right:(X.right-A.right+_.right)/$.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(_),C=yield c.getDimensions(p),A=_==="y",M=A?"top":"left",I=A?"bottom":"right",$=A?"clientHeight":"clientWidth",X=u.reference[S]+u.reference[_]-y[_]-u.floating[S],F=y[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let he=te?te[$]:0;(!he||!(yield c.isElement==null?void 0:c.isElement(te)))&&(he=d.floating[$]||u.floating[S]);const ye=X/2-F/2,U=he/2-C[S]/2-1,se=Si(b[M],U),pe=Si(b[I],U),le=se,fe=he-C[S]-pe,Te=he/2-C[S]/2+ye,Ae=Ph(le,Te,fe),ue=!f.arrow&&co(a)!=null&&Te!==Ae&&u.reference[S]/2-(Te<le?se:pe)-C[S]/2<0,W=ue?Te<le?Te-le:Te-fe:0;return{[_]:y[_]+W,data:B({[_]: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:C=!0}=Te,A=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const M=Zr(a),I=Lr(d),$=Zr(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),F=y||($||!C?[ql(d)]:z6(d)),te=S!=="none";!y&&te&&F.push(...q6(d,C,S,X));const he=[d,...F],ye=yield Ua(n,A),U=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(g&&U.push(ye[M]),b){const Ae=H6(a,c,X);U.push(ye[Ae[0]],ye[Ae[1]])}if(se=[...se,{placement:a,overflows:U}],!U.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!==Lr(ue):!1)||se.every(v=>Lr(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=Lr(v.placement);return L===I||L==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(L=>L>0).reduce((L,J)=>L+J,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(B({},a),{elementContext:"reference"})),d=NT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:OT(d)}}}case"escaped":{const c=yield Ua(n,be(B({},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=Lr(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(B({},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:$}=M;return{x:I,y:$}}}}=A,f=sn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},g=yield Ua(n,f),b=Lr(Zr(a)),y=Ih(b);let _=p[y],S=p[b];if(u){const M=y==="y"?"top":"left",I=y==="y"?"bottom":"right",$=_+g[M],X=_-g[I];_=Ph($,_,X)}if(c){const M=b==="y"?"top":"left",I=b==="y"?"bottom":"right",$=S+g[M],X=S-g[I];S=Ph($,S,X)}const C=d.fn(be(B({},n),{[y]:_,[b]:S}));return be(B({},C),{data:{x:C.x-r,y:C.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=Lr(s),b=Ih(g);let y=p[b],_=p[g];const S=Jr(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:B({mainAxis:0,crossAxis:0},S);if(d){const I=b==="y"?"height":"width",$=a.reference[b]-a.floating[I]+C.mainAxis,X=a.reference[b]+a.reference[I]-C.mainAxis;y<$?y=$:y>X&&(y=X)}if(f){var A,M;const I=b==="y"?"width":"height",$=PT.has(Zr(s)),X=a.reference[g]-a.floating[I]+($&&((A=u.offset)==null?void 0:A[g])||0)+($?0:C.crossAxis),F=a.reference[g]+a.reference[I]+($?0:((M=u.offset)==null?void 0:M[g])||0)-($?C.crossAxis:0);_<X?_=X:_>F&&(_=F)}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),_=Lr(a)==="y",{width:S,height:C}=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=C-g.top-g.bottom,$=S-g.left-g.right,X=Si(C-g[A],I),F=Si(S-g[M],$),te=!n.middlewareData.shift;let he=X,ye=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=$),(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=C-2*(fe!==0||Te!==0?fe+Te:Fn(g.top,g.bottom))}yield f(be(B({},n),{availableWidth:ye,availableHeight:he}));const U=yield c.getDimensions(d.floating);return S!==U.width||C!==U.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 Dr(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 mr(e){return Wl()?e instanceof Element||e instanceof Bn(e).Element:!1}function Mr(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}=gr(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=mr(e)?gr(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(;Mr(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 gr(e){return Bn(e).getComputedStyle(e)}function Xl(e){return mr(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||Dr(e);return RT(t)?t.host:t}function LT(e){const t=xi(e);return ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mr(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=gr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Mr(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 mr(e)?e:e.contextElement}function po(e){const t=Uh(e);if(!Mr(t))return Rr(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=Rr(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=Rr(1);t&&(r?mr(r)&&(u=po(r)):u=po(e));const c=f4(a,n,r)?MT(a):Rr(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&&mr(r)?Bn(r):r;let _=b,S=Bh(_);for(;S&&r&&y!==_;){const C=po(S),A=S.getBoundingClientRect(),M=gr(S),I=A.left+(S.clientLeft+parseFloat(M.paddingLeft))*C.x,$=A.top+(S.clientTop+parseFloat(M.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,g*=C.y,d+=I,f+=$,_=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(Dr(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=Dr(r),c=t?Gl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Rr(1);const p=Rr(0),g=Mr(r);if((g||!g&&!a)&&((fo(r)!=="body"||Ha(u))&&(d=Xl(r)),Mr(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):Rr(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=Dr(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 gr(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=Dr(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=Mr(e)?po(e):Rr(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(Dr(e));else if(mr(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||!mr(n)||ho(n)?!1:gr(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=>mr(c)&&fo(c)!=="body"),s=null;const a=gr(e).position==="fixed";let u=a?xi(e):e;for(;mr(u)&&!ho(u);){const c=gr(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=Mr(t),s=Dr(t),a=n==="fixed",u=cs(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Rr(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):Rr(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 gr(e).position==="static"}function zT(e,t){if(!Mr(e)||gr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Dr(e)===n&&(n=n.ownerDocument.body),n}function jT(e,t){const n=Bn(e);if(Gl(e))return n;if(!Mr(e)){let s=xi(e);for(;s&&!ho(s);){if(mr(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 gr(e).direction==="rtl"}const C4={convertOffsetParentRelativeRectToViewportRelativeRect:h4,getDocumentElement:Dr,getClippingRect:b4,getOffsetParent:jT,getElementRects:x4,getClientRects:p4,getDimensions:_4,getScale:po,isElement:mr,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=Dr(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)),C=Vl(s.clientHeight-(g+y)),A=Vl(p),I={rootMargin:-_+"px "+-S+"px "+-C+"px "+-A+"px",threshold:Fn(0,Si(1,d))||1};let $=!0;function X(F){const te=F[0].intersectionRatio;if(te!==d){if(!$)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!$T(f,e.getBoundingClientRect())&&u(),$=!1}try{n=new IntersectionObserver(X,be(B({},I),{root:s.ownerDocument}))}catch(F){n=new IntersectionObserver(X,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&&C();function C(){const A=cs(e);S&&!$T(S,A)&&n(),S=A,_=requestAnimationFrame(C)}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=B({platform:C4},n),a=be(B({},s.platform),{_c:r});return W6(e,t,be(B({},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(B({},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,U,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=((U=s.arrow)==null?void 0:U.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,C=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,$=typeof I=="number"?I+M:I!=null?I:M,X=C>$,F={top:`${_}px calc(100% + ${$}px)`,bottom:`${_}px ${-$}px`,left:`calc(100% + ${$}px) ${S}px`,right:`${-$}px ${S}px`}[d],te=`${_}px ${u.reference.y+A-c}px`,he=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(ei.transformOrigin.variable,he?te:F),{data:{transformOrigin:he?te:F}}}}}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(B({},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(B({},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 $;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 C=ro(t),A=qT(C,S.x),M=qT(C,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${M}px`),s.hideWhenDetached&&((($=S.middlewareData.hide)==null?void 0:$.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 X=Fl(I);t.style.setProperty("--z-index",X.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 C=_.getAttribute(s)==="true",A=(mo.get(_)||0)+1,M=(c.get(_)||0)+1;mo.set(_,A),c.set(_,M),d.push(_),A===1&&C&&Ql.set(_,!0),M===1&&_.setAttribute(r,""),C||_.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=Ir(e),f=ro(e),p=aD(f),g=uD(f);function b(I,$){if(!Qt($)||!$.isConnected||Ml(e,$)||cD(e,I)||c&&tT(e,$))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=_h(X);if(JT(I,te))return!1}const F=_h(e);return JT(I,F)?!1:!(n!=null&&n($))}const y=new Set,_=us(e==null?void 0:e.getRootNode());function S(I){function $(X){var ye,U;const F=u&&!rT()?An:se=>se(),te=X!=null?X:I,he=(U=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?U:[te==null?void 0:te.target];F(()=>{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(X=>X()),y.add(hr(d,"click",$,{once:!0})),y.add(g.addEventListener("click",$,{once:!0})),y.add(p.addEventListener("click",$,{once:!0}))):$()}const C=new Set,A=setTimeout(()=>{C.add(hr(d,"pointerdown",S,!0)),C.add(g.addEventListener("pointerdown",S,!0)),C.add(p.addEventListener("pointerdown",S,!0))},0);function M(I){(u?An:X=>X())(()=>{var te,he;const X=(he=(te=I==null?void 0:I.composedPath)==null?void 0:te.call(I))!=null?he:[I==null?void 0:I.target],F=_?X[0]:Kr(I);if(!(!e||!b(I,F))){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(F),target:F}})}})}return rT()||(C.add(hr(d,"focusin",M,!0)),C.add(g.addEventListener("focusin",M,!0)),C.add(p.addEventListener("focusin",M,!0))),()=>{clearTimeout(A),y.forEach(I=>I()),C.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 hr(Ir(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=Ir(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 C=Kr(S.detail.originalEvent);Kn.isBelowPointerBlockingLayer(e)||Kn.isInBranch(C)||((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 C=Kr(S.detail.originalEvent);Kn.isInBranch(C)||((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 C;Kn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var I;if(!e)return!1;const C=typeof u=="function"?u():u,A=Array.isArray(C)?C:[C],M=(I=t.persistentElements)==null?void 0:I.map($=>$()).filter(Qt);return M&&A.push(...M),A.some($=>Ml($,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=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),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=B({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||Ir(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(hr(this.doc,"focusin",this.handleFocus,!0),hr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),hr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),hr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),hr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),hr(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(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Ir(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 X,F;const{scrollX:_,scrollY:S,visualViewport:C}=n,A=(X=C==null?void 0:C.offsetLeft)!=null?X:0,M=(F=C==null?void 0:C.offsetTop)!=null?F: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 $=Ul(s,I);return()=>{$==null||$(),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"),Fr=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(B({},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(B({id:kD(c)},Fr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(be(B({},Fr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(be(B({},Fr.anchor.attrs),{dir:u("dir"),id:lb(c)}))},getTriggerProps(){return t.button(be(B({},Fr.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(B({},Fr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(B({id:db(c)},Fr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(be(B({},Fr.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(B({},Fr.title.attrs),{id:qh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(be(B({},Fr.description.attrs),{id:Yh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(be(B({},Fr.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(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=fb(n))!=null?a:go(n);return YT(r,()=>hb(n),be(B({},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(B(B({},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[NB,Wh]=ao({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[OB,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=B({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(pr({present:s.open},t));return w.jsx(O6,{value:s,children:w.jsx(bT,{value:a,children:n})})},mb=z.forwardRef((e,t)=>{const n=Nh(),r=Ba(),s=pr(be(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(_i.button,be(B({},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}=vr(),r=()=>{n(),e()};return w.jsxs("button",{className:Q(`${j}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[w.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 w.jsxs(DD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[w.jsx(mb,{"aria-label":`Overflow menu for ${t}`,className:Q(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,t),children:w.jsx(UD,{})}),w.jsx(ST,{children:w.jsxs(_T,{className:Q(`${j}-overflow-menu-list`,a,t),children:[n,w.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}=vr(),c=()=>{u(),e==null||e()};return w.jsx(kr,B({icon:w.jsx(gb,{size:"16px"}),ariaLabel:"Clear Chat",className:Q(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?w.jsx(kr,{className:Q(n,`${j}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(u1,{})}):w.jsxs("button",{className:Q(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,e),onClick:s,children:[w.jsx(u1,{}),"Minimize"]})},_b=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=()=>{il("modal")};return t?w.jsx(kr,{className:Q(n,`${j}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:w.jsx(yb,{})}):w.jsxs("button",{className:Q(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,e),onClick:r,children:[w.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 w.jsxs("div",{className:Q(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[w.jsx("img",{className:Q(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:Q(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:Q(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:Q(r,`${j}-product-tile-pdp`),href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:Q(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:Q(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:Q(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:Q(r,`${j}-product-tile-price`),children:c})})]})]})},$D=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ft(),s=t;return n?w.jsxs("div",{className:Q(r,`${j}-display-products widget-message`),children:[w.jsx("p",{children:s.message}),s.products&&s.products.length>0&&w.jsx("div",{className:Q(r,`${j}-product-list`,{embedded:!e,standalone:e}),children:s.products.map(a=>{const u=n.getPid(a);return w.jsx(jD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},VD=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:Q(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:Q(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.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})=>w.jsx("div",{className:Q(e,`${j}-suggestion-container standalone`),children:a.map(c=>w.jsxs(df,{disabled:r||!s,className:Q(e,`${j}-suggestion-button standalone`),onClick:()=>u(c,n||t),children:[w.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}=vr(),{messages:a}=cr(),u=a.some(c=>c.id===t.eventSourceId);return w.jsxs("div",{className:Q(e,`${j}-follow-up`),children:[w.jsx("p",{className:Q(e,`${j}-text`),children:t.message}),n&&w.jsx(YD,{globalClassName:e,isLoading:s,hasSourceEvent:u,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&w.jsx("div",{className:Q(e,`${j}-suggestion-container embedded`),children:t.suggestions.map(c=>w.jsx("button",{disabled:s||!u,className:Q(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 C=g.children.indexOf(f);let A=!1,M=[];b.lastIndex=0;let I=b.exec(f.value);for(;I;){const $=I.index,X={index:I.index,input:I.input,stack:[...p,f]};let F=y(...I,X);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=$+1:(_!==$&&M.push({type:"text",value:f.value.slice(_,$)}),Array.isArray(F)?M.push(...F):F&&M.push(F),_=$+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(C,1,...M)):M=[f],C+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=dr(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=dr(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(B({},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=[],C=[];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);C[A]=I,(d[A]===void 0||I>d[A])&&(d[A]=I)}S.push(M)}u[p]=S,c[p]=C}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 C="",A="";S===99?(C=":",A=":"):S===108?C=":":S===114&&(A=":");let M=n.alignDelimiters===!1?1:Math.max(1,d[g]-C.length-A.length);const I=C+"-".repeat(M)+A;n.alignDelimiters!==!1&&(M=C.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],C=c[p];g=-1;const A=[];for(;++g<f;){const M=S[g]||"";let I="",$="";if(n.alignDelimiters!==!1){const X=d[g]-(C[g]||0),F=a[g];F===114?I=" ".repeat(X):F===99?X%2?(I=" ".repeat(X/2+.5),$=" ".repeat(X/2-.5)):(I=" ".repeat(X/2),$=I):$=" ".repeat(X)}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($),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
33
33
  `)}function 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
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:`
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,B({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,B({before:p,after:`
36
36
  `,encode:["`"]},c.current()))),g()}return p+=c.move(`
37
37
  `),a&&(p+=c.move(a+`
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:`
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),B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({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,B({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,B({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(B({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return g(),p(),b+`
42
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"})}));
43
+ `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,B({before:"# ",after:`
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=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,B({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,B({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({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,B({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,B({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),B({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,B({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,B({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,B({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,B({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,B({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),B({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,B({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,C){return f(p(y,S,C),y.align)}function c(y,_,S,C){const A=g(y,S,C),M=f([A]);return M.slice(0,M.indexOf(`
46
+ `))}function d(y,_,S,C){const A=S.enter("tableCell"),M=S.enter("phrasing"),I=S.containerPhrasing(y,be(B({},C),{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 C=y.children;let A=-1;const M=[],I=_.enter("table");for(;++A<C.length;)M[A]=g(C[A],_,S);return I(),M}function g(y,_,S){const C=y.children;let A=-1;const M=[],I=_.enter("tableRow");for(;++A<C.length;)M[A]=d(C[A],y,_,S);return I(),M}function b(y,_,S){let C=Hb.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}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,B(B({},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},Br={};function C8(){return{text:Br}}let ds=48;for(;ds<123;)Br[ds]=ti,ds++,ds===58?ds=65:ds===91&&(ds=97);Br[43]=ti,Br[45]=ti,Br[46]=ti,Br[95]=ti,Br[72]=[ti,Wb],Br[104]=[ti,Wb],Br[87]=[ti,Yb],Br[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=dr(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(dr(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=dr(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 C=u.exit("strikethroughSequenceTemporary"),A=Ws(_);return C._open=!A||A===2&&!!S,C._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(U){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"?F:d;return le===F&&r.parser.lazy[r.now().line]?n(U):le(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),f(U)}function f(U){return U===124||(u=!0,a+=1),p(U)}function p(U){return U===null?n(U):De(U)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(U):Ke(U)?tt(e,p,"whitespace")(U):(a+=1,u&&(u=!1,s+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(U)))}function g(U){return U===null||U===124||dt(U)?(e.exit("data"),p(U)):(e.consume(U),U===92?b:g)}function b(U){return U===92||U===124?(e.consume(U),g):g(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),u=!1,Ke(U)?tt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):_(U))}function _(U){return U===45||U===58?C(U):U===124?(u=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),S):X(U)}function S(U){return Ke(U)?tt(e,C,"whitespace")(U):C(U)}function C(U){return U===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),A):U===45?(a+=1,A(U)):U===null||De(U)?$(U):X(U)}function A(U){return U===45?(e.enter("tableDelimiterFiller"),M(U)):X(U)}function M(U){return U===45?(e.consume(U),M):U===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(U))}function I(U){return Ke(U)?tt(e,$,"whitespace")(U):$(U)}function $(U){return U===124?_(U):U===null||De(U)?!u||s!==a?X(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):X(U)}function X(U){return n(U)}function F(U){return e.enter("tableRow"),te(U)}function te(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),te):U===null||De(U)?(e.exit("tableRow"),t(U)):Ke(U)?tt(e,te,"whitespace")(U):(e.enter("data"),he(U))}function he(U){return U===null||U===124||dt(U)?(e.exit("data"),te(U)):(e.consume(U),U===92?ye:he)}function ye(U){return U===92||U===124?(e.consume(U),he):he(U)}}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=()=>w.jsx("span",{className:`${j}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),np=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,message:r})=>w.jsx(PE,{remarkPlugins:[nM],rehypePlugins:[$y],components:{h1:({children:s})=>w.jsx("h1",{className:Q(e,`${j}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:Q(e,`${j}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:Q(e,`${j}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:Q(e,`${j}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:Q(e,`${j}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:Q(e,`${j}-li`),children:s}),a:({href:s,children:a})=>w.jsx(Ky,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("table",{className:Q(e,`${j}-table`),children:s}),thead:({children:s})=>w.jsx("thead",{className:Q(e,`${j}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:Q(e,`${j}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:Q(e,`${j}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:Q(e,`${j}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:Q(e,`${j}-td`),children:s}),span:({className:s,children:a})=>s===`${j}-blinking-cursor`?w.jsx(To,{}):w.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 w.jsxs("div",{children:[w.jsxs("div",{className:Q(e,`${j}-progress-message`,"standalone"),children:[w.jsx("span",{className:Q(e,`${j}-message-icon`,"progress-icon","standalone"),children:w.jsx(a1,{})}),w.jsx("p",{className:Q(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(df,{className:Q(e,`${j}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(xv,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(wv,{})]})}),n&&w.jsx("div",{className:Q(e,`${j}-thought-container`),children:a&&w.jsx("p",{className:Q(e,`${j}-progress-thought`),children:t.thought})})]})]})},iM=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(rM,{globalClassName:e,message:t}):w.jsxs("div",{className:Q(e,`${j}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:Q(e,`${j}-message-icon`,"progress-icon","embedded"),children:w.jsx(a1,{})}),w.jsx("i",{className:Q(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 w.jsxs("div",{className:Q(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:Q(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:Q(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(zs,{role:"img"})}),w.jsx("p",{className:Q(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.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})=>w.jsx("span",{className:Q(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 w.jsxs("div",{className:Q(e,`${j}-facets`),children:[w.jsx("p",{className:Q(e,`${j}-facet-category`),children:c}),w.jsx("p",{className:Q(e,`${j}-facet-values`),children:d})]},c)})},Ya=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:Q(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?w.jsxs("div",{className:Q(e,`${j}-user-message standalone`),children:[w.jsxs("div",{className:Q(e,`${j}-user-message-row standalone`),children:[d?w.jsx("img",{className:Q(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:Q(e,`${j}-message-icon user-message-icon standalone`),children:w.jsx(l1,{})}),w.jsx("p",{className:Q(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(Zb,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(Ya,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:Q(e,`${j}-user-message embedded`),children:[w.jsxs("div",{className:Q(e,`${j}-user-message-row embedded`),children:[d?w.jsx("img",{className:Q(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:Q(e,`${j}-message-icon user-message-icon embedded`),children:w.jsx(l1,{})}),w.jsx("p",{className:Q(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(tc,{isWidgetStandalone:!1,filterCount:u})]}),w.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})=>w.jsxs("div",{className:Q(e,`${j}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:Q(e,`${j}-user-search-query standalone`),children:[d?w.jsx("img",{className:Q(e,`${j}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):w.jsx("span",{className:Q(e,`${j}-message-icon user-search-icon standalone`),children:w.jsx(zs,{})}),w.jsx("p",{className:Q(e,`${j}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&w.jsx(tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(Zb,{globalClassName:e,facetFiltersList:u,message:a})]}),w.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,C,A;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.label)=="string"?(C=r==null?void 0:r.clientContext)==null?void 0:C.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?w.jsx(aM,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:Q(e,`${j}-user-search embedded`),children:[w.jsxs("div",{className:Q(e,`${j}-user-search-query embedded`),children:[f?w.jsx("img",{className:Q(e,`${j}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):w.jsx("span",{className:Q(e,`${j}-message-icon user-search-icon embedded`),children:w.jsx(zs,{})}),w.jsx("p",{children:b||g}),u.length>0&&w.jsx(tc,{isWidgetStandalone:!1,filterCount:c})]}),w.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}=vr(),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?w.jsx(oM,{globalClassName:t,isWidgetStandalone:s,message:e}):w.jsx(uM,{globalClassName:t,message:e,isWidgetStandalone:s});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(sM,{globalClassName:t,message:e,isWidgetStandalone:s});case"follow_up":return w.jsx(WD,{globalClassName:t,isWidgetStandalone:s,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return w.jsx(np,{globalClassName:t,openLinksInNewTab:n,showIsLoading:d,message:e});case"error":return w.jsx(VD,{message:e,isWidgetStandalone:s});case"display_products":return w.jsx($D,{message:e,isWidgetStandalone:s});case"progress":return w.jsx(iM,{globalClassName:t,isWidgetStandalone:s,message:e});case"conversation_reset":return w.jsxs(w.Fragment,{children:[w.jsx("p",{className:Q(t,`${j}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:Q(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}=cr(),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 w.jsxs(w.Fragment,{children:[c==="ask_cim"&&w.jsx("div",{className:Q(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()),w.jsxs("div",{className:Q(n,`${j}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(b=>w.jsx("div",{className:`${j}-message-group-child`,children:w.jsx(e_,{id:b.id,openLinksInNewTab:s,globalClassName:n,isWidgetStandalone:e,message:b,resetConversationMessage:a,handleSuggestionClick:t})},b.id)),w.jsx(Ya,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return w.jsx("div",{className:Q(n,`${j}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:w.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}=vr(),c=z.useRef(null),d=lf();return z.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?w.jsxs("div",{className:Q(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[w.jsxs("div",{className:Q(e,`${j}-message-container`,"embedded"),children:[w.jsx(rp,{isWidgetStandalone:!1,handleSuggestionClick:u}),s&&w.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:w.jsx(To,{})}),w.jsx("div",{ref:c})]}),w.jsx(ch,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),w.jsx("div",{className:Q(`${j}-embedded-chat-menu`),children:w.jsx(zD,{componentType:"chat",children:w.jsx(_b,{componentType:"chat"})})})]}):w.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(B({},r),{present:n.open})),a=pr(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(_i.div,be(B({},a),{ref:zl(s.ref,t)}))});n_.displayName="DialogBackdrop";const ip=z.forwardRef((e,t)=>{const n=Wa(),r=Ba(),s=pr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(_i.div,be(B({},s),{ref:zl(r.ref,t)}))});ip.displayName="DialogContent";const sp=z.forwardRef((e,t)=>{const n=Wa(),r=pr(n.getDescriptionProps(),e);return w.jsx(_i.div,be(B({},r),{ref:t}))});sp.displayName="DialogDescription";const op=z.forwardRef((e,t)=>{const n=Wa(),r=pr(n.getPositionerProps(),e);return Ba().unmounted?null:w.jsx(_i.div,be(B({},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(B({},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(B({},fs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:i_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(B({},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(B({},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(B({},fs.title.attrs),{dir:a("dir"),id:up(u)}))},getDescriptionProps(){return t.element(be(B({},fs.description.attrs),{dir:a("dir"),id:lp(u)}))},getCloseTriggerProps(){return t.button(be(B({},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 B({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=B({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(pr({present:a.open},t));return w.jsx(fM,{value:a,children:w.jsx(lM,{value:s,children:w.jsx(bT,{value:u,children:n})})})},cp=z.forwardRef((e,t)=>{const n=Wa(),r=pr(n.getTitleProps(),e);return w.jsx(_i.h2,be(B({},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 w.jsx(w.Fragment,{children:t});const c=r!=null?r:xM(u);return w.jsx(w.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:Ir(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 w.jsx(kr,{className:Q(e,`${j}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:w.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}=vr(),b=z.useRef(null),y=lf(),{isOpen:_}=a||{},S=s==="standalone";z.useEffect(()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const C=()=>{Zi(!1)};return y?c?w.jsx(a_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:w.jsx(u_,{children:w.jsx(op,{className:Q(n,`${j}-container`,`${j}-dialog`,u),style:r,children:w.jsxs(ip,{className:Q(n,`${j}-dialog-content`,{standalone:S,embedded:!S}),children:[w.jsxs("div",{className:Q(n,`${j}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&w.jsx("img",{alt:"",role:"img",className:Q(n,`${j}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),w.jsx(cp,{className:Q(n,`${j}-dialog-title`,{standalone:S,embedded:!S}),children:t}),w.jsxs("div",{className:Q(n,`${j}-dialog-controls`),children:[w.jsx(_b,{componentType:"dialog",isIcon:!0}),w.jsx(CM,{}),w.jsx(bb,{componentType:"dialog",isIcon:!0}),w.jsx(Tb,{componentType:"dialog"}),w.jsx(cf,{className:`dialog ${n}`,onClick:C})]})]}),w.jsxs(sp,{className:Q(n,`${j}-message-container`,{standalone:S,embedded:!S}),children:[w.jsx(rp,{isWidgetStandalone:S,handleSuggestionClick:g}),f&&w.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:w.jsx(To,{})}),w.jsx("div",{ref:b})]}),w.jsx(ch,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},AM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=pi(),s=()=>{il(r||"dialog")};return t?w.jsx(kr,{className:Q(n,`${j}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:s,icon:w.jsx(Eb,{})}):w.jsxs("button",{className:Q(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,e),onClick:s,children:[w.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 w.jsx(kr,{ariaLabel:s,title:s,className:Q(e,`${j}-modal-fullscreen-button`),icon:w.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}=vr(),b=z.useRef(null),{isOpen:y}=a||{},_=s==="standalone",S=lf();z.useEffect(()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const C=({open:M})=>{Zi(M)},A=()=>{Zi(!1)};return S?c?w.jsx(a_,{lazyMount:!0,open:y,onOpenChange:C,children:w.jsx(u_,{children:w.jsxs("div",{className:Q(n,`${j}-modal-container`),style:r,children:[w.jsx(n_,{className:Q(n,`${j}-modal-backdrop`)}),w.jsx(op,{className:Q(n,`${j}-container`,`${j}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:w.jsxs(ip,{className:Q(n,`${j}-modal-content`,{standalone:_,embedded:!_}),children:[w.jsxs("div",{className:Q(n,`${j}-modal-header`,{standalone:_,embedded:!_}),children:[e&&w.jsx("img",{alt:"",role:"img",className:Q(n,`${j}-modal-logo`,{standalone:_,embedded:!_}),src:e}),w.jsx(cp,{className:Q(n,`${j}-modal-title`,{standalone:_,embedded:!_}),children:t}),w.jsxs("div",{className:Q(n,`${j}-modal-controls`),children:[w.jsx(vM,{}),w.jsx(AM,{componentType:"modal",isIcon:!0}),w.jsx(bb,{componentType:"modal",isIcon:!0}),w.jsx(Tb,{componentType:"modal"}),w.jsx(cf,{className:`modal ${n}`,onClick:A})]})]}),w.jsxs(sp,{className:Q(n,`${j}-message-container`,{standalone:_,embedded:!_}),children:[w.jsx(rp,{isWidgetStandalone:_,handleSuggestionClick:g}),f&&w.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:w.jsx(To,{})}),w.jsx("div",{ref:b})]}),w.jsx(ch,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):w.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(w.jsx("div",{className:Q(e,`${j}-minimized-container`),style:n,children:w.jsx(kr,{className:Q(e,`${j}-minimized-button`),ariaLabel:"Open Copilot",icon:w.jsx("img",{src:t||kM,alt:"Copilot",className:Q(e,`${j}-minimized-icon-img`)}),onClick:r})}),document.body)},OM=()=>{const e=pi(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(NM,{}):t==="dialog"?w.jsx(l_,{}):t==="modal"?w.jsx(c_,{}):w.jsx(t_,{})},PM=()=>{const{copilot:e}=cr();return{getCopilotSuggestions:z.useCallback((n,r,s)=>{if(!(!e||!r||!n))switch(r){case"ask_cim":e.askCimSuggestions(n,s);break;case"search":e.searchSuggestions({searchParams:n},s);break;case"browse":e.browseSuggestions({browseParams:n},s);break;case"pdp":e.productViewSuggestions({productId:n.productId},s);break}},[e])}},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},IM=()=>{const{copilot:e}=cr(),{entryType:t,activePromptsId:n,params:r}=bo(),{setIsInitialized:s,setIsOpen:a,setIsInline:u,setElementId:c,setEntryType:d,setActivePromptsId:f,setParams:p,setPromptsMessage:g,setResponseMessage:b,setIsResponseLoading:y}=d_(),{getCopilotSuggestions:_}=PM();z.useEffect(()=>{const I=$=>{const{property:X,value:F}=$.detail||{};!X||F===void 0||(X==="isOpen"&&a(F),X==="isInline"&&u(F),X==="elementId"&&c(F),X==="entryType"&&d(F),X==="params"&&p(F))};return BA(I),()=>{UA(I)}},[a,u,c,d,p]);const S=z.useCallback(I=>{if(!t||!I)return;_(I,t,X=>{f(X.id)})},[t,_,f]);z.useEffect(()=>{!e||!t||!r||S(r)},[e,t,r,S]);const C=z.useCallback(I=>{I.eventSourceId===n&&(g(I),f(I.id),s(!0))},[n,g,f,s]),A=z.useCallback(I=>{(I==null?void 0:I.eventSourceId)===n&&(b(I),y(!1))},[n,b,y]),M=z.useCallback(()=>{s(!0),y(!1)},[s,y]);return z.useEffect(()=>{if(e)return e.on("follow_up",C),e.on("inquiry",A),e.on("error",M),()=>{e.off("follow_up",C),e.off("inquiry",A),e.off("error",M)}},[e,C,A,M]),null},RM=({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 w.jsxs("form",{className:Q(t,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:u,children:[w.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":n||"Ask Copilot",children:w.jsx(BD,{className:Q(t,`${j}-prompts-input-icon`)})}),w.jsx("input",{id:`${j}-prompts-input`,className:Q(t,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:n||"Ask Copilot",type:"text",disabled:r,value:s,onChange:c=>a(c.target.value)}),w.jsx(kr,{className:Q(t,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(zs,{}),disabled:r})]})},LM=({sendCopilotPrompt:e})=>{var c,d;const{globalClassName:t}=ft(),{promptsMessage:n,isResponseLoading:r,isInitialized:s}=bo(),a=f=>()=>{const p=f.displayText.trim();p&&e(p)},u=!!(n!=null&&n.suggestions&&((c=n==null?void 0:n.suggestions)!=null&&c.length));return w.jsxs("div",{className:Q(t,`${j}-prompts-button-group`),children:[!s&&w.jsx(To,{}),s&&u&&((d=n==null?void 0:n.suggestions)==null?void 0:d.map(f=>w.jsx("button",{className:Q(t,`${j}-prompts-button`),disabled:r,onClick:a(f),children:f.displayText},f.displayText)))]})},DM=()=>{const{globalClassName:e}=ft(),{isInline:t,userPrompt:n}=bo();return!n||!t?null:w.jsx("div",{className:Q(e,`${j}-prompts-message-container`),children:w.jsx("p",{className:Q(e,`${j}-prompts-message`),children:n})})},MM=()=>{const{globalClassName:e,openLinksInNewTab:t}=ft(),{isInline:n,responseMessage:r,isResponseLoading:s}=bo();return!n||!r&&!s?null:s?w.jsx(To,{}):r?w.jsx("div",{className:Q(e,`${j}-prompts-response-container`,`${j}-message-container`),children:w.jsx(np,{globalClassName:e,openLinksInNewTab:t,message:r})}):null},FM=()=>{const{globalClassName:e,themeVariables:t}=ft(),{connected:n,copilot:r}=cr(),{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 C=document.getElementById(u);C&&_(C)},[u,y]);const S=z.useCallback(C=>{if(!r||!c||!d)return;const A=I=>{g(null),p(C),f(I.id),b(!0)},M={userPrompt:C,clientContext:B({_cimEventSource:"prompts-extension"},a?{_cimPromptsExtensionInline:"true"}:{})};switch(c){case"ask_cim":r.askCim(M,A);break;case"search":r.search(B(B({},d),M),A);break;case"browse":r.browse(B(B({},d),M),A);break;case"pdp":r.productView(B(B({},d),M),A);break}},[r,a,c,d,f,g,p,b]);return!n||!s||!y?null:oo.createPortal(w.jsxs("div",{className:Q(e,`${j}-prompts-extension-container`),style:t,children:[w.jsx(RM,{sendCopilotPrompt:S}),w.jsx(LM,{sendCopilotPrompt:S}),w.jsx(DM,{}),w.jsx(MM,{})]}),y)},BM=()=>w.jsxs(w.Fragment,{children:[w.jsx(IM,{}),w.jsx(FM,{})]}),dp=e=>w.jsxs(t1,be(B({},e),{children:[w.jsx(OM,{}),w.jsx(BM,{})]}));var rc={},f_;function UM(){if(f_)return rc;f_=1;var e=mT();return rc.createRoot=e.createRoot,rc.hydrateRoot=e.hydrateRoot,rc}var h_=UM();const HM=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(w.jsx(dp,B({},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},zM=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"),HM(B({elementId:t,timeout:e},n));return}h_.createRoot(a).render(w.jsx(dp,B({},n)))},jM={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},$M=()=>Object.freeze({search:Object.freeze(Et.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=jM,Pe.injectCopilotWidget=zM,Pe.state=$M,Pe.useCopilot=vr,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));