@cimulate/copilot-widget 1.7.10 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.d.ts +76 -26
- package/dist/cimulate-copilot-widget.es.js +26344 -25277
- package/dist/cimulate-copilot-widget.umd.js +33 -33
- package/dist/copilot.css +1 -0
- package/dist/copilot.d.ts +20 -0
- package/dist/copilot.es.js +37355 -0
- package/dist/copilot.umd.js +46 -0
- package/dist/messaging.css +1 -0
- package/dist/messaging.d.ts +324 -0
- package/dist/messaging.es.js +34481 -0
- package/dist/messaging.umd.js +52 -0
- package/package.json +27 -4
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(Me,je){typeof exports=="object"&&typeof module!="undefined"?je(exports):typeof define=="function"&&define.amd?define(["exports"],je):(Me=typeof globalThis!="undefined"?globalThis:Me||self,je(Me["cimulate-copilot-widget"]={}))})(this,(function(Me){"use strict";var X9=Object.defineProperty,K9=Object.defineProperties;var Q9=Object.getOwnPropertyDescriptors;var fd=Object.getOwnPropertySymbols;var JS=Object.prototype.hasOwnProperty,ZS=Object.prototype.propertyIsEnumerable;var qo=(Me,je)=>(je=Symbol[Me])?je:Symbol.for("Symbol."+Me),J9=Me=>{throw TypeError(Me)},hd=Math.pow,e0=(Me,je,Je)=>je in Me?X9(Me,je,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Me[je]=Je,U=(Me,je)=>{for(var Je in je||(je={}))JS.call(je,Je)&&e0(Me,Je,je[Je]);if(fd)for(var Je of fd(je))ZS.call(je,Je)&&e0(Me,Je,je[Je]);return Me},_e=(Me,je)=>K9(Me,Q9(je));var on=(Me,je)=>{var Je={};for(var ct in Me)JS.call(Me,ct)&&je.indexOf(ct)<0&&(Je[ct]=Me[ct]);if(Me!=null&&fd)for(var ct of fd(Me))je.indexOf(ct)<0&&ZS.call(Me,ct)&&(Je[ct]=Me[ct]);return Je};var Se=(Me,je,Je)=>e0(Me,typeof je!="symbol"?je+"":je,Je);var et=(Me,je,Je)=>new Promise((ct,It)=>{var wt=Lt=>{try{Wt(Je.next(Lt))}catch(Sn){It(Sn)}},Be=Lt=>{try{Wt(Je.throw(Lt))}catch(Sn){It(Sn)}},Wt=Lt=>Lt.done?ct(Lt.value):Promise.resolve(Lt.value).then(wt,Be);Wt((Je=Je.apply(Me,je)).next())}),Gr=function(Me,je){this[0]=Me,this[1]=je},pd=(Me,je,Je)=>{var ct=(Be,Wt,Lt,Sn)=>{try{var Is=Je[Be](Wt),Yo=(Wt=Is.value)instanceof Gr,md=Is.done;Promise.resolve(Yo?Wt[0]:Wt).then(lr=>Yo?ct(Be==="return"?Be:"next",Wt[1]?{done:lr.done,value:lr.value}:lr,Lt,Sn):Lt({value:lr,done:md})).catch(lr=>ct("throw",lr,Lt,Sn))}catch(lr){Sn(lr)}},It=Be=>wt[Be]=Wt=>new Promise((Lt,Sn)=>ct(Be,Wt,Lt,Sn)),wt={};return Je=Je.apply(Me,je),wt[qo("asyncIterator")]=()=>wt,It("next"),It("throw"),It("return"),wt},t0=Me=>{var je=Me[qo("asyncIterator")],Je=!1,ct,It={};return je==null?(je=Me[qo("iterator")](),ct=wt=>It[wt]=Be=>je[wt](Be)):(je=je.call(Me),ct=wt=>It[wt]=Be=>{if(Je){if(Je=!1,wt==="throw")throw Be;return Be}return Je=!0,{done:!1,value:new Gr(new Promise(Wt=>{var Lt=je[wt](Be);Lt instanceof Object||J9("Object expected"),Wt(Lt)}),1)}}),It[qo("iterator")]=()=>It,ct("next"),"throw"in je?ct("throw"):It.throw=wt=>{throw wt},"return"in je&&ct("return"),It},ex=(Me,je,Je)=>(je=Me[qo("asyncIterator")])?je.call(Me):(Me=Me[qo("iterator")](),je={},Je=(ct,It)=>(It=Me[ct])&&(je[ct]=wt=>new Promise((Be,Wt,Lt)=>(wt=It.call(Me,wt),Lt=wt.done,Promise.resolve(wt.value).then(Sn=>Be({value:Sn,done:Lt}),Wt)))),Je("next"),Je("return"),je);var je=document.createElement("style");je.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-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;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-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-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(je);function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},It={},wt={exports:{}},Be={};var Wt;function Lt(){if(Wt)return Be;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(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function v(M,Z,O){this.props=M,this.context=Z,this.refs=S,this.updater=O||T}v.prototype.isReactComponent={},v.prototype.setState=function(M,Z){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Z,"setState")},v.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=v.prototype;function R(M,Z,O){this.props=M,this.context=Z,this.refs=S,this.updater=O||T}var N=R.prototype=new A;N.constructor=R,_(N,v.prototype),N.isPureReactComponent=!0;var L=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function le(M,Z,O){var be,Pe={},Ce=null,$e=null;if(Z!=null)for(be in Z.ref!==void 0&&($e=Z.ref),Z.key!==void 0&&(Ce=""+Z.key),Z)W.call(Z,be)&&!ne.hasOwnProperty(be)&&(Pe[be]=Z[be]);var we=arguments.length-2;if(we===1)Pe.children=O;else if(1<we){for(var Ge=Array(we),mt=0;mt<we;mt++)Ge[mt]=arguments[mt+2];Pe.children=Ge}if(M&&M.defaultProps)for(be in we=M.defaultProps,we)Pe[be]===void 0&&(Pe[be]=we[be]);return{$$typeof:e,type:M,key:Ce,ref:$e,props:Pe,_owner:F.current}}function Te(M,Z){return{$$typeof:e,type:M.type,key:Z,ref:M.ref,props:M.props,_owner:M._owner}}function j(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function se(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return Z[O]})}var te=/\/+/g;function pe(M,Z){return typeof M=="object"&&M!==null&&M.key!=null?se(""+M.key):Z.toString(36)}function ce(M,Z,O,be,Pe){var Ce=typeof M;(Ce==="undefined"||Ce==="boolean")&&(M=null);var $e=!1;if(M===null)$e=!0;else switch(Ce){case"string":case"number":$e=!0;break;case"object":switch(M.$$typeof){case e:case t:$e=!0}}if($e)return $e=M,Pe=Pe($e),M=be===""?"."+pe($e,0):be,L(Pe)?(O="",M!=null&&(O=M.replace(te,"$&/")+"/"),ce(Pe,Z,O,"",function(mt){return mt})):Pe!=null&&(j(Pe)&&(Pe=Te(Pe,O+(!Pe.key||$e&&$e.key===Pe.key?"":(""+Pe.key).replace(te,"$&/")+"/")+M)),Z.push(Pe)),1;if($e=0,be=be===""?".":be+":",L(M))for(var we=0;we<M.length;we++){Ce=M[we];var Ge=be+pe(Ce,we);$e+=ce(Ce,Z,O,Ge,Pe)}else if(Ge=b(M),typeof Ge=="function")for(M=Ge.call(M),we=0;!(Ce=M.next()).done;)Ce=Ce.value,Ge=be+pe(Ce,we++),$e+=ce(Ce,Z,O,Ge,Pe);else if(Ce==="object")throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return $e}function ye(M,Z,O){if(M==null)return M;var be=[],Pe=0;return ce(M,be,"","",function(Ce){return Z.call(O,Ce,Pe++)}),be}function De(M){if(M._status===-1){var Z=M._result;Z=Z(),Z.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=Z)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},K={transition:null},re={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:K,ReactCurrentOwner:F};function C(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:ye,forEach:function(M,Z,O){ye(M,function(){Z.apply(this,arguments)},O)},count:function(M){var Z=0;return ye(M,function(){Z++}),Z},toArray:function(M){return ye(M,function(Z){return Z})||[]},only:function(M){if(!j(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Be.Component=v,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=R,Be.StrictMode=r,Be.Suspense=d,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Be.act=C,Be.cloneElement=function(M,Z,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var be=_({},M.props),Pe=M.key,Ce=M.ref,$e=M._owner;if(Z!=null){if(Z.ref!==void 0&&(Ce=Z.ref,$e=F.current),Z.key!==void 0&&(Pe=""+Z.key),M.type&&M.type.defaultProps)var we=M.type.defaultProps;for(Ge in Z)W.call(Z,Ge)&&!ne.hasOwnProperty(Ge)&&(be[Ge]=Z[Ge]===void 0&&we!==void 0?we[Ge]:Z[Ge])}var Ge=arguments.length-2;if(Ge===1)be.children=O;else if(1<Ge){we=Array(Ge);for(var mt=0;mt<Ge;mt++)we[mt]=arguments[mt+2];be.children=we}return{$$typeof:e,type:M.type,key:Pe,ref:Ce,props:be,_owner:$e}},Be.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},Be.createElement=le,Be.createFactory=function(M){var Z=le.bind(null,M);return Z.type=M,Z},Be.createRef=function(){return{current:null}},Be.forwardRef=function(M){return{$$typeof:c,render:M}},Be.isValidElement=j,Be.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:De}},Be.memo=function(M,Z){return{$$typeof:f,type:M,compare:Z===void 0?null:Z}},Be.startTransition=function(M){var Z=K.transition;K.transition={};try{M()}finally{K.transition=Z}},Be.unstable_act=C,Be.useCallback=function(M,Z){return de.current.useCallback(M,Z)},Be.useContext=function(M){return de.current.useContext(M)},Be.useDebugValue=function(){},Be.useDeferredValue=function(M){return de.current.useDeferredValue(M)},Be.useEffect=function(M,Z){return de.current.useEffect(M,Z)},Be.useId=function(){return de.current.useId()},Be.useImperativeHandle=function(M,Z,O){return de.current.useImperativeHandle(M,Z,O)},Be.useInsertionEffect=function(M,Z){return de.current.useInsertionEffect(M,Z)},Be.useLayoutEffect=function(M,Z){return de.current.useLayoutEffect(M,Z)},Be.useMemo=function(M,Z){return de.current.useMemo(M,Z)},Be.useReducer=function(M,Z,O){return de.current.useReducer(M,Z,O)},Be.useRef=function(M){return de.current.useRef(M)},Be.useState=function(M){return de.current.useState(M)},Be.useSyncExternalStore=function(M,Z,O){return de.current.useSyncExternalStore(M,Z,O)},Be.useTransition=function(){return de.current.useTransition()},Be.version="18.3.1",Be}var Sn;function Is(){return Sn||(Sn=1,wt.exports=Lt()),wt.exports}var Yo;function md(){if(Yo)return It;Yo=1;var e=Is(),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,T=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=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:T,props:g,_owner:s.current}}return It.Fragment=n,It.jsx=u,It.jsxs=u,It}var lr;function ix(){return lr||(lr=1,ct.exports=md()),ct.exports}var w=ix();const vr=Object.create(null);vr.open="0",vr.close="1",vr.ping="2",vr.pong="3",vr.message="4",vr.upgrade="5",vr.noop="6";const Nu=Object.create(null);Object.keys(vr).forEach(e=>{Nu[vr[e]]=e});const gd={type:"error",data:"parser error"},n0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",r0=typeof ArrayBuffer=="function",i0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ed=({type:e,data:t},n,r)=>n0&&t instanceof Blob?n?r(t):s0(t,r):r0&&(t instanceof ArrayBuffer||i0(t))?n?r(t):s0(new Blob([t]),r):r(vr[e]+(t||"")),s0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function o0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let yd;function sx(e,t){if(n0&&e.data instanceof Blob)return e.data.arrayBuffer().then(o0).then(t);if(r0&&(e.data instanceof ArrayBuffer||i0(e.data)))return t(o0(e.data));Ed(e,!1,n=>{yd||(yd=new TextEncoder),t(yd.encode(n))})}const a0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<a0.length;e++)Wo[a0.charCodeAt(e)]=e;const ox=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},ax=typeof ArrayBuffer=="function",Td=(e,t)=>{if(typeof e!="string")return{type:"message",data:u0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ux(e.substring(1),t)}:Nu[n]?e.length>1?{type:Nu[n],data:e.substring(1)}:{type:Nu[n]}:gd},ux=(e,t)=>{if(ax){const n=ox(e);return u0(n,t)}else return{base64:!0,data:e}},u0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,l0="",lx=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Ed(a,!1,c=>{r[u]=c,++s===n&&t(r.join(l0))})})},cx=(e,t)=>{const n=e.split(l0),r=[];for(let s=0;s<n.length;s++){const a=Td(n[s],t);if(r.push(a),a.type==="error")break}return r};function dx(){return new TransformStream({transform(e,t){sx(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 bd;function Ou(e){return e.reduce((t,n)=>t+n.length,0)}function Pu(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 fx(e,t){bd||(bd=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(Ou(n)<1)break;const d=Pu(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(Ou(n)<2)break;const d=Pu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Ou(n)<8)break;const d=Pu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(gd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Ou(n)<s)break;const d=Pu(n,s);c.enqueue(Td(a?d:bd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(gd);break}}}})}const c0=4;function Ut(e){if(e)return hx(e)}function hx(e){for(var t in Ut.prototype)e[t]=Ut.prototype[t];return e}Ut.prototype.on=Ut.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ut.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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},Ut.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},Ut.prototype.emitReserved=Ut.prototype.emit,Ut.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ut.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Iu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Yn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),px="arraybuffer";function Z9(){}function d0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const mx=Yn.setTimeout,gx=Yn.clearTimeout;function Ru(e,t){t.useNativeTimers?(e.setTimeoutFn=mx.bind(Yn),e.clearTimeoutFn=gx.bind(Yn)):(e.setTimeoutFn=Yn.setTimeout.bind(Yn),e.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const Ex=1.33;function yx(e){return typeof e=="string"?Tx(e):Math.ceil((e.byteLength||e.size)*Ex)}function Tx(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 f0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function bx(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function _x(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 Sx extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class _d extends Ut{constructor(t){super(),this.writable=!1,Ru(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 Sx(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=Td(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=bx(t);return n.length?"?"+n:""}}class xx extends _d{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)};cx(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,lx(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]=f0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let h0=!1;try{h0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const wx=h0;function Cx(){}class Ax extends xx{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 kr extends Ut{constructor(t,n,r){super(),this.createRequest=t,Ru(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=d0(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=kr.requestsCount++,kr.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=Cx,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete kr.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(kr.requestsCount=0,kr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",p0);else if(typeof addEventListener=="function"){const e="onpagehide"in Yn?"pagehide":"unload";addEventListener(e,p0,!1)}}function p0(){for(let e in kr.requests)kr.requests.hasOwnProperty(e)&&kr.requests[e].abort()}const vx=(function(){const e=m0({xdomain:!1});return e&&e.responseType!==null})();class kx extends Ax{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=vx&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new kr(m0,this.uri(),t)}}function m0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||wx))return new XMLHttpRequest}catch(n){}if(!t)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const g0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Nx extends _d{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=g0?{}:d0(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;Ed(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Iu(()=>{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]=f0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Sd=Yn.WebSocket||Yn.MozWebSocket;class Ox extends Nx{createSocket(t,n,r){return g0?new Sd(t,n,r):n?new Sd(t,n):new Sd(t)}doWrite(t,n){this.ws.send(n)}}class Px extends _d{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=fx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=dx();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&&Iu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ix={websocket:Ox,webtransport:Px,polling:kx},Rx=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xd(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=Rx.exec(e||""),a={},u=14;for(;u--;)a[Lx[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=Dx(a,a.path),a.queryKey=Mx(a,a.query),a}function Dx(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 Mx(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const wd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lu=[];wd&&addEventListener("offline",()=>{Lu.forEach(e=>e())},!1);class mi extends Ut{constructor(t,n){if(super(),this.binaryType=px,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=xd(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=xd(n.host).host);Ru(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=_x(this.opts.query)),wd&&(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"})},Lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=c0,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&&mi.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",mi.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+=yx(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,Iu(()=>{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(mi.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(),wd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Lu.indexOf(this._offlineEventListener);r!==-1&&Lu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}mi.protocol=c0;class Fx extends mi{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;mi.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;mi.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 Bx=class extends Fx{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=>Ix[s]).filter(s=>!!s)),super(t,r)}};function Ux(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=xd(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 Hx=typeof ArrayBuffer=="function",zx=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,E0=Object.prototype.toString,jx=typeof Blob=="function"||typeof Blob!="undefined"&&E0.call(Blob)==="[object BlobConstructor]",$x=typeof File=="function"||typeof File!="undefined"&&E0.call(File)==="[object FileConstructor]";function Cd(e){return Hx&&(e instanceof ArrayBuffer||zx(e))||jx&&e instanceof Blob||$x&&e instanceof File}function Du(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Du(e[n]))return!0;return!1}if(Cd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Du(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Du(e[n]))return!0;return!1}function Vx(e){const t=[],n=e.data,r=e;return r.data=Ad(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ad(e,t){if(!e)return e;if(Cd(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]=Ad(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]=Ad(e[r],t));return n}return e}function qx(e,t){return e.data=vd(e.data,t),delete e.attachments,e}function vd(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]=vd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vd(e[n],t));return e}const Yx=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class Wx{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Du(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Vx(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class kd extends Ut{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Gx(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Cd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Xx(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(kd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return y0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||y0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Yx.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Gx{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=qx(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Xx=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function y0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Kx=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kd,Encoder:Wx,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function cr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Qx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class T0 extends Ut{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=[cr(t,"open",this.onopen.bind(this)),cr(t,"packet",this.onpacket.bind(this)),cr(t,"error",this.onerror.bind(this)),cr(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(Qx.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(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:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:tt.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:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Rs(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}Rs.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},Rs.prototype.reset=function(){this.attempts=0},Rs.prototype.setMin=function(e){this.ms=e},Rs.prototype.setMax=function(e){this.max=e},Rs.prototype.setJitter=function(e){this.jitter=e};class Nd extends Ut{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,Ru(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 Rs({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||Kx;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 Bx(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=cr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=cr(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(cr(t,"ping",this.onping.bind(this)),cr(t,"data",this.ondata.bind(this)),cr(t,"error",this.onerror.bind(this)),cr(t,"close",this.onclose.bind(this)),cr(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){Iu(()=>{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 T0(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 Mu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ux(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 Nd(r,t):(Go[s]||(Go[s]=new Nd(r,t)),d=Go[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Mu,{Manager:Nd,Socket:T0,io:Mu,connect:Mu});var Jx=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===Zx})(t)})(e)},Zx=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Xo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ls((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function ew(e,t,n){return e.concat(t).map((function(r){return Xo(r,n)}))}function b0(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 _0(e,t){try{return t in e}catch(n){return!1}}function tw(e,t,n){var r={};return n.isMergeableObject(e)&&b0(e).forEach((function(s){r[s]=Xo(e[s],n)})),b0(t).forEach((function(s){(function(a,u){return _0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(_0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Ls;var c=u.customMerge(a);return typeof c=="function"?c:Ls})(s,n)(e[s],t[s],n):r[s]=Xo(t[s],n))})),r}function Ls(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||ew,n.isMergeableObject=n.isMergeableObject||Jx,n.cloneUnlessOtherwiseSpecified=Xo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):tw(e,t,n):Xo(t,n)}Ls.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Ls(n,r,t)}),{})};var nw=Ls;let rw=class{constructor(t){Object.assign(this,t)}};function gn(e){if(e)return(function(t){for(var n in gn.prototype)t[n]=gn.prototype[n];return t})(e)}gn.prototype.on=gn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},gn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},gn.prototype.off=gn.prototype.removeListener=gn.prototype.removeAllListeners=gn.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},gn.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},gn.prototype.emitReserved=gn.prototype.emit,gn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},gn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const iw=typeof ArrayBuffer=="function",S0=Object.prototype.toString,sw=typeof Blob=="function"||typeof Blob!="undefined"&&S0.call(Blob)==="[object BlobConstructor]",ow=typeof File=="function"||typeof File!="undefined"&&S0.call(File)==="[object FileConstructor]";function Od(e){return iw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||sw&&e instanceof Blob||ow&&e instanceof File}function Fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fu(e[n]))return!0;return!1}if(Od(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fu(e[n]))return!0;return!1}function aw(e){const t=[],n=e.data,r=e;return r.data=Pd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Pd(e,t){if(!e)return e;if(Od(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]=Pd(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]=Pd(e[r],t));return n}return e}function uw(e,t){return e.data=Id(e.data,t),delete e.attachments,e}function Id(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]=Id(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Id(e[n],t));return e}const lw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Nt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Nt||(Nt={}));class cw{constructor(t){this.replacer=t}encode(t){return t.type!==Nt.EVENT&&t.type!==Nt.ACK||!Fu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Nt.EVENT?Nt.BINARY_EVENT:Nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Nt.BINARY_EVENT&&t.type!==Nt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=aw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Rd extends gn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Nt.BINARY_EVENT;r||n.type===Nt.BINARY_ACK?(n.type=r?Nt.EVENT:Nt.ACK,this.reconstructor=new dw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Od(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(Nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Nt.BINARY_EVENT||r.type===Nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!fw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(!Rd.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 Nt.CONNECT:return x0(n);case Nt.DISCONNECT:return n===void 0;case Nt.CONNECT_ERROR:return typeof n=="string"||x0(n);case Nt.EVENT:case Nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lw.indexOf(n[0])===-1);case Nt.ACK:case Nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class dw{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=uw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function x0(e){return Object.prototype.toString.call(e)==="[object Object]"}const w0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],C0=(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)},A0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),hw=C0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),w0),v0=C0(A0,A0,w0),pw={Encoder:class extends cw{encode(e){var t,n;return super.encode(_e(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],hw(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 Rd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?v0(r):r)):n instanceof Object?v0(n):n)):t))}}},mw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class gw{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=[mw,a,{parser:pw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Mu(u,nw.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*hd(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(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 et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return pd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Gr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Gr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Gr(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),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new rw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var z=Is();const Ki=Je(z);var k0=Symbol.for("immer-nothing"),N0=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function Wn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ds=Object.getPrototypeOf;function Ms(e){return!!e&&!!e[st]}function Xr(e){var t;return e?O0(e)||Array.isArray(e)||!!e[N0]||!!((t=e.constructor)!=null&&t[N0])||Uu(e)||Hu(e):!1}var Ew=Object.prototype.constructor.toString();function O0(e){if(!e||typeof e!="object")return!1;const t=Ds(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)===Ew}function Ko(e,t){Bu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bu(e){const t=e[st];return t?t.type_:Array.isArray(e)?1:Uu(e)?2:Hu(e)?3:0}function Ld(e,t){return Bu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function P0(e,t,n){const r=Bu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function yw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Uu(e){return e instanceof Map}function Hu(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function Dd(e,t){if(Uu(e))return new Map(e);if(Hu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=O0(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(Ds(e),r)}else{const r=Ds(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Md(e,t=!1){return zu(e)||Ms(e)||!Xr(e)||(Bu(e)>1&&(e.set=e.add=e.clear=e.delete=Tw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Md(r,!0))),e}function Tw(){Wn(2)}function zu(e){return Object.isFrozen(e)}var Fd={};function Qi(e){const t=Fd[e];return t||Wn(0,e),t}function bw(e,t){Fd[e]||(Fd[e]=t)}var Qo;function ju(){return Qo}function _w(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function I0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bd(e){Ud(e),e.drafts_.forEach(Sw),e.drafts_=null}function Ud(e){e===Qo&&(Qo=e.parent_)}function R0(e){return Qo=_w(Qo,e)}function Sw(e){const t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function L0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[st].modified_&&(Bd(t),Wn(4)),Xr(e)&&(e=$u(t,e),t.parent_||Vu(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[st].base_,e,t.patches_,t.inversePatches_)):e=$u(t,n,[]),Bd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==k0?e:void 0}function $u(e,t,n){if(zu(t))return t;const r=t[st];if(!r)return Ko(t,(s,a)=>D0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Vu(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)=>D0(e,r,s,c,d,n,u)),Vu(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function D0(e,t,n,r,s,a,u){if(Ms(s)){const c=a&&t&&t.type_!==3&&!Ld(t.assigned_,r)?a.concat(r):void 0,d=$u(e,s,c);if(P0(n,r,d),Ms(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Xr(s)&&!zu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$u(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Vu(e,s)}}function Vu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Md(t,n)}function xw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ju(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Hd;n&&(s=[r],a=Jo);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Hd={get(e,t){if(t===st)return e;const n=Gt(e);if(!Ld(n,t))return ww(e,n,t);const r=n[t];return e.finalized_||!Xr(r)?r:r===zd(e.base_,t)?(jd(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=M0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=zd(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(yw(n,s)&&(n!==void 0||Ld(e.base_,t)))return!0;jd(e),Kr(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 zd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,jd(e),Kr(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(){Wn(11)},getPrototypeOf(e){return Ds(e.base_)},setPrototypeOf(){Wn(12)}},Jo={};Ko(Hd,(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 Hd.set.call(this,e[0],t,n,e[0])};function zd(e,t){const n=e[st];return(n?Gt(n):e)[t]}function ww(e,t,n){var s;const r=M0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function M0(e,t){if(!(t in e))return;let n=Ds(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ds(n)}}function Kr(e){e.modified_||(e.modified_=!0,e.parent_&&Kr(e.parent_))}function jd(e){e.copy_||(e.copy_=Dd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Cw=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"&&Wn(6),r!==void 0&&typeof r!="function"&&Wn(7);let s;if(Xr(t)){const a=R0(this),u=Zo(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Bd(a):Ud(a)}return I0(a,r),L0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===k0&&(s=void 0),this.autoFreeze_&&Md(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Wn(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){Xr(e)||Wn(8),Ms(e)&&(e=Aw(e));const t=R0(this),n=Zo(e,void 0);return n[st].isManual_=!0,Ud(t),n}finishDraft(e,t){const n=e&&e[st];(!n||!n.isManual_)&&Wn(9);const{scope_:r}=n;return I0(r,t),L0(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=Qi("Patches").applyPatches_;return Ms(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Zo(e,t){const n=Uu(e)?Qi("MapSet").proxyMap_(e,t):Hu(e)?Qi("MapSet").proxySet_(e,t):xw(e,t);return(t?t.scope_:ju()).drafts_.push(n),n}function Aw(e){return Ms(e)||Wn(10,e),F0(e)}function F0(e){if(!Xr(e)||zu(e))return e;const t=e[st];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Dd(e,!0);return Ko(n,(r,s)=>{P0(n,r,F0(s))}),t&&(t.finalized_=!1),n}function vw(){class e extends Map{constructor(d,f){super(),this[st]={type_:2,parent_:f,scope_:f?f.scope_:ju(),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),Kr(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),Kr(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),Kr(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,T)=>{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_||!Xr(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_:ju(),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),Kr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),a(f),Kr(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),Kr(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(Xr(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_&&Wn(3,JSON.stringify(Gt(c)))}bw("MapSet",{proxyMap_:t,proxySet_:s})}var Dn=new Cw,kw=Dn.produce;Dn.produceWithPatches.bind(Dn),Dn.setAutoFreeze.bind(Dn),Dn.setUseStrictShallowCopy.bind(Dn),Dn.applyPatches.bind(Dn),Dn.createDraft.bind(Dn),Dn.finishDraft.bind(Dn);function B0(e,t,n){var r=z.useMemo(function(){return kw(e)},[e]);return z.useReducer(r,t,n)}const U0={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"},dt={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_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},gi={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},Nw=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},Fs="cimulate",$d=`${Fs}:pdp-update`,Vd=`${Fs}:browse-update`,qd=`${Fs}:search-update`,Yd=`${Fs}:ui-state-update`,Wd=`${Fs}:prompts-state-update`,Gd=`${Fs}:session-state`,Nr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},U0),Ow={"browse-context":Nr.CONTEXT_UPDATED,categoryId:Nr.CATEGORY_ID_CHANGED,categoryName:Nr.CATEGORY_NAME_CHANGED,page:Nr.PAGE_CHANGED,pageSize:Nr.PAGE_SIZE_CHANGED,includeFacets:Nr.FACET_FILTERS_CHANGED,facetFilters:Nr.FACET_FILTERS_CHANGED,rangeFilters:Nr.RANGE_FILTERS_CHANGED,catalogSegment:Nr.CATALOG_SEGMENT_CHANGED,pricebooks:Nr.PRICEBOOKS_CHANGED},Qr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},U0),Pw={"search-context":Qr.SEARCH_CONTEXT_UPDATED,query:Qr.QUERY_CHANGED,page:Qr.PAGE_CHANGED,pageSize:Qr.PAGE_SIZE_CHANGED,includeFacets:Qr.FACET_FILTERS_CHANGED,facetFilters:Qr.FACET_FILTERS_CHANGED,rangeFilters:Qr.RANGE_FILTERS_CHANGED,catalogSegment:Qr.CATALOG_SEGMENT_CHANGED,pricebooks:Qr.PRICEBOOKS_CHANGED},$="cim-widget",Bs=`--${$}`,Ji={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},Iw=(e=Ji)=>({[`${Bs}-primary-color`]:e.primaryColor||Ji.primaryColor,[`${Bs}-secondary-color`]:e.secondaryColor||Ji.secondaryColor,[`${Bs}-font-color`]:e.fontColor||Ji.fontColor,[`${Bs}-font-family`]:e.fontFamily||Ji.fontFamily,[`${Bs}-background-color`]:e.backgroundColor||Ji.backgroundColor,[`${Bs}-border-color`]:e.borderColor||Ji.borderColor}),Ei={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},H0=z.createContext(null),z0=z.createContext(null);function j0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rw}=Object.prototype,{getPrototypeOf:qu}=Object,{iterator:Yu,toStringTag:$0}=Symbol,Wu=(e=>t=>{const n=Rw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),dr=e=>(e=e.toLowerCase(),t=>Wu(t)===e),Gu=e=>t=>typeof t===e,{isArray:Us}=Array,Hs=Gu("undefined");function ea(e){return e!==null&&!Hs(e)&&e.constructor!==null&&!Hs(e.constructor)&&xn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const V0=dr("ArrayBuffer");function Lw(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&V0(e.buffer),t}const Dw=Gu("string"),xn=Gu("function"),q0=Gu("number"),ta=e=>e!==null&&typeof e=="object",Mw=e=>e===!0||e===!1,Xu=e=>{if(Wu(e)!=="object")return!1;const t=qu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!($0 in e)&&!(Yu 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=dr("Date"),Uw=dr("File"),Hw=e=>!!(e&&typeof e.uri!="undefined"),zw=e=>e&&typeof e.getParts!="undefined",jw=dr("Blob"),$w=dr("FileList"),Vw=e=>ta(e)&&xn(e.pipe);function qw(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Y0=qw(),W0=typeof Y0.FormData!="undefined"?Y0.FormData:void 0,Yw=e=>{if(!e)return!1;if(W0&&e instanceof W0)return!0;const t=qu(e);if(!t||t===Object.prototype||!xn(e.append))return!1;const n=Wu(e);return n==="formdata"||n==="object"&&xn(e.toString)&&e.toString()==="[object FormData]"},Ww=dr("URLSearchParams"),[Gw,Xw,Kw,Qw]=["ReadableStream","Request","Response","Headers"].map(dr),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]),Us(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 G0(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 Zi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,X0=e=>!Hs(e)&&e!==Zi;function Xd(...e){const{caseless:t,skipUndefined:n}=X0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&G0(r,u)||u,d=Kd(r,c)?r[c]:void 0;Xu(d)&&Xu(a)?r[c]=Xd(d,a):Xu(a)?r[c]=Xd({},a):Us(a)?r[c]=a.slice():(!n||!Hs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&na(e[a],s);return r}const Zw=(e,t,n,{allOwnKeys:r}={})=>(na(t,(s,a)=>{n&&xn(s)?Object.defineProperty(e,a,{__proto__:null,value:j0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,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",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},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&&qu(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(Us(e))return e;let t=e.length;if(!q0(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"&&qu(Uint8Array)),oC=(e,t)=>{const r=(e&&e[Yu]).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=dr("HTMLFormElement"),lC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Kd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cC=dr("RegExp"),K0=(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=>{K0(e,(t,n)=>{if(xn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(xn(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 Us(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&&xn(e.append)&&e[$0]==="FormData"&&e[Yu])}const gC=e=>{const t=new WeakSet,n=r=>{if(ta(r)){if(t.has(r))return;if(ea(r))return r;if(!("toJSON"in r)){t.add(r);const s=Us(r)?[]:{};return na(r,(a,u)=>{const c=n(a);!Hs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},EC=dr("AsyncFunction"),yC=e=>e&&(ta(e)||xn(e))&&xn(e.then)&&xn(e.catch),Q0=((e,t)=>e?setImmediate:t?((n,r)=>(Zi.addEventListener("message",({source:s,data:a})=>{s===Zi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Zi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xn(Zi.postMessage)),TC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Zi):typeof process!="undefined"&&process.nextTick||Q0,V={isArray:Us,isArrayBuffer:V0,isBuffer:ea,isFormData:Yw,isArrayBufferView:Lw,isString:Dw,isNumber:q0,isBoolean:Mw,isObject:ta,isPlainObject:Xu,isEmptyObject:Fw,isReadableStream:Gw,isRequest:Xw,isResponse:Kw,isHeaders:Qw,isUndefined:Hs,isDate:Bw,isFile:Uw,isReactNativeBlob:Hw,isReactNative:zw,isBlob:jw,isRegExp:cC,isFunction:xn,isStream:Vw,isURLSearchParams:Ww,isTypedArray:sC,isFileList:$w,forEach:na,merge:Xd,extend:Zw,trim:Jw,stripBOM:eC,inherits:tC,toFlatObject:nC,kindOf:Wu,kindOfTest:dr,endsWith:rC,toArray:iC,forEachEntry:oC,matchAll:aC,isHTMLForm:uC,hasOwnProperty:Kd,hasOwnProp:Kd,reduceDescriptors:K0,freezeMethods:dC,toObjectSet:fC,toCamelCase:lC,noop:hC,toFiniteNumber:pC,findKey:G0,global:Zi,isContextDefined:X0,isSpecCompliantForm:mC,toJSONObject:gC,isAsyncFn:EC,isThenable:yC,setImmediate:Q0,asap:TC,isIterable:e=>e!=null&&xn(e[Yu])},bC=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_C=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
3
|
-
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&
|
|
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[Z0]=this[Z0]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ra(u);r[c]||(OC(s,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};En.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(En.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(En);const PC="[REDACTED ****]";function IC(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function RC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof En&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&IC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?PC:s(d);V.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let Ne=class tx extends Error{static from(t,n,r,s,a,u){const c=new tx(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",{__proto__:null,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(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?RC(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LC=null;function Zd(e){return V.isPlainObject(e)||V.isArray(e)}function eg(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ef(e,t,n){return e?e.concat(t).map(function(s,a){return s=eg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function DC(e){return V.isArray(e)&&!e.some(Zd)}const MC=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function Qu(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,A){return!V.isUndefined(A[v])});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&&V.isSpecCompliantForm(t);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!f&&V.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,v,A){let R=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(ef(A,v,a),p(S)),!1;if(S&&!A&&typeof S=="object"){if(V.endsWith(v,"{}"))v=r?v:v.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&DC(S)||(V.isFileList(S)||V.endsWith(v,"[]"))&&(R=V.toArray(S)))return v=eg(v),R.forEach(function(L,W){!(V.isUndefined(L)||L===null)&&t.append(u===!0?ef([v],W,a):u===null?v:v+"[]",p(L))}),!1}return Zd(S)?!0:(t.append(ef(A,v,a),p(S)),!1)}const b=[],T=Object.assign(MC,{defaultVisitor:g,convertValue:p,isVisitable:Zd});function _(S,v,A=0){if(!V.isUndefined(S)){if(A>d)throw new Ne("Object is too deeply nested ("+A+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+v.join("."));b.push(S),V.forEach(S,function(N,L){(!(V.isUndefined(N)||N===null)&&s.call(t,N,V.isString(L)?L.trim():L,v,T))===!0&&_(N,v?v.concat(L):[L],A+1)}),b.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function tg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function tf(e,t){this._pairs=[],e&&Qu(e,this,t)}const ng=tf.prototype;ng.append=function(t,n){this._pairs.push([t,n])},ng.toString=function(t){const n=t?function(r){return t.call(this,r,tg)}:tg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function FC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rg(e,t,n){if(!t)return e;const r=n&&n.encode||FC,s=V.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let u;if(a?u=a(t,s):u=V.isURLSearchParams(t)?t.toString():new tf(t,s).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class ig{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},BC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:tf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},rf=typeof window!="undefined"&&typeof document!="undefined",sf=typeof navigator=="object"&&navigator||void 0,UC=rf&&(!sf||["ReactNative","NativeScript","NS"].indexOf(sf.product)<0),HC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zC=rf&&window.location.href||"http://localhost",an=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rf,hasStandardBrowserEnv:UC,hasStandardBrowserWebWorkerEnv:HC,navigator:sf,origin:zC},Symbol.toStringTag,{value:"Module"}))),BC);function jC(e,t){return Qu(e,new an.classes.URLSearchParams,U({visitor:function(n,r,s,a){return an.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function $C(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function VC(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 sg(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&&V.isArray(s)?s.length:u,d?(V.hasOwnProp(s,u)?s[u]=V.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!V.hasOwnProp(s,u)||!V.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&V.isArray(s[u])&&(s[u]=VC(s[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,s)=>{t($C(r),s,n,0)}),n}return null}const zs=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function qC(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ia={transitional:nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return s?JSON.stringify(sg(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=zs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return jC(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=zs(this,"env"),p=f&&f.FormData;return Qu(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),qC(t)):t}],transformResponse:[function(t){const n=zs(this,"transitional")||ia.transitional,r=n&&n.forcedJSONParsing,s=zs(this,"responseType"),a=s==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,zs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,zs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:an.classes.FormData,Blob:an.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{ia.headers[e]={}});function of(e,t){const n=this||ia,r=t||n,s=En.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function og(e){return!!(e&&e.__CANCEL__)}let sa=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ag(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function YC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function WC(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 T=p&&f-p;return T?Math.round(b*1e3/T):void 0}}function GC(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 Ju=(e,t,n=3)=>{let r=0;const s=WC(50,250);return GC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=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)},ug=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lg=e=>(...t)=>V.asap(()=>e(...t)),XC=an.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,an.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(an.origin),an.navigator&&/(msie|trident)/i.test(an.navigator.userAgent)):()=>!0,KC=an.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)return decodeURIComponent(r.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function QC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cg(e,t,n){let r=!QC(t);return e&&(r||n===!1)?JC(e,t):t}const dg=e=>e instanceof En?U({},e):e;function es(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,b){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:b},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function s(f,p,g,b){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}function a(f,p){if(!V.isUndefined(p))return r(void 0,p)}function u(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,g){if(V.hasOwnProp(t,g))return r(f,p);if(V.hasOwnProp(e,g))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>s(dg(f),dg(p),g,!0)};return V.forEach(Object.keys(U(U({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:s,b=V.hasOwnProp(e,p)?e[p]:void 0,T=V.hasOwnProp(t,p)?t[p]:void 0,_=g(b,T,p);V.isUndefined(_)&&g!==c||(n[p]=_)}),n}const ZC=["content-type","content-length"];function eA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,s])=>{ZC.includes(r.toLowerCase())&&e.set(r,s)})}const tA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),fg=e=>{const t=es({},e),n=b=>V.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=En.from(c),t.url=rg(cg(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?tA(d.password):""))),V.isFormData(r)&&(an.hasStandardBrowserEnv||an.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&eA(c,r.getHeaders(),n("formDataHeaderPolicy"))),an.hasStandardBrowserEnv&&(V.isFunction(s)&&(s=s(t)),s===!0||s==null&&XC(t.url))){const T=a&&u&&KC.read(u);T&&c.set(a,T)}return t},nA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=fg(e);let a=s.data;const u=En.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,g,b,T,_;function S(){T&&T(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function A(){if(!v)return;const N=En.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:N,config:e,request:v};ag(function(ne){n(ne),S()},function(ne){r(ne),S()},W),v=null}"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(A)},v.onabort=function(){v&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,v)),S(),v=null)},v.onerror=function(L){const W=L&&L.message?L.message:"Network Error",F=new Ne(W,Ne.ERR_NETWORK,e,v);F.event=L||null,r(F),S(),v=null},v.ontimeout=function(){let L=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||nf;s.timeoutErrorMessage&&(L=s.timeoutErrorMessage),r(new Ne(L,W.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,v)),S(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&V.forEach(J0(u),function(L,W){v.setRequestHeader(W,L)}),V.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,_]=Ju(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([g,T]=Ju(d),v.upload.addEventListener("progress",g),v.upload.addEventListener("loadend",T)),(s.cancelToken||s.signal)&&(p=N=>{v&&(r(!N||N.type?new sa(null,e,v):N),v.abort(),S(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const R=YC(s.url);if(R&&!an.protocols.includes(R)){r(new Ne("Unsupported protocol "+R+":",Ne.ERR_BAD_REQUEST,e));return}v.send(a||null)})},rA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new sa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},iA=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},sA=function(e,t){return pd(this,null,function*(){try{for(var n=ex(oA(e)),r,s,a;r=!(s=yield new Gr(n.next())).done;r=!1){const u=s.value;yield*t0(iA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Gr(s.call(n)))}finally{if(a)throw a[0]}}})},oA=function(e){return pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*t0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Gr(t.read());if(n)break;yield r}}finally{yield new Gr(t.cancel())}})},hg=(e,t,n,r)=>{const s=sA(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:g}=yield s.next();if(p){c(),f.close();return}let b=g.byteLength;if(n){let T=a+=b;n(T)}f.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})};function aA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let T=0;T<c;T++)if(r.charCodeAt(T)===37&&T+2<c){const _=r.charCodeAt(T+1),S=r.charCodeAt(T+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,T+=2)}let d=0,f=c-1;const p=T=>T>=2&&r.charCodeAt(T-2)===37&&r.charCodeAt(T-1)===51&&(r.charCodeAt(T)===68||r.charCodeAt(T)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const af="1.16.1",pg=64*1024,{isFunction:Zu}=V,mg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},uA=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?Zu(s):typeof fetch=="function",d=Zu(a),f=Zu(u);if(!c)return!1;const p=c&&Zu(n),g=c&&(typeof r=="function"?(A=>R=>A.encode(R))(new r):A=>et(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),b=d&&p&&mg(()=>{let A=!1;const R=new a(an.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),N=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),A&&!N}),T=f&&p&&mg(()=>V.isReadableStream(new u("").body)),_={stream:T&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(R,N)=>{let L=R&&R[A];if(L)return L.call(R);throw new Ne(`Response type '${A}' is not supported`,Ne.ERR_NOT_SUPPORT,N)})});const S=A=>et(null,null,function*(){if(A==null)return 0;if(V.isBlob(A))return A.size;if(V.isSpecCompliantForm(A))return(yield new a(an.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(V.isArrayBufferView(A)||V.isArrayBuffer(A))return A.byteLength;if(V.isURLSearchParams(A)&&(A=A+""),V.isString(A))return(yield g(A)).byteLength}),v=(A,R)=>et(null,null,function*(){const N=V.toFiniteNumber(A.getContentLength());return N==null?S(R):N});return A=>et(null,null,function*(){let{url:R,method:N,data:L,signal:W,cancelToken:F,timeout:ne,onDownloadProgress:le,onUploadProgress:Te,responseType:j,headers:se,withCredentials:te="same-origin",fetchOptions:pe,maxContentLength:ce,maxBodyLength:ye}=fg(A);const De=V.isNumber(ce)&&ce>-1,de=V.isNumber(ye)&&ye>-1;let K=s||fetch;j=j?(j+"").toLowerCase():"text";let re=rA([W,F&&F.toAbortSignal()],ne),C=null;const M=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let Z;try{if(De&&typeof R=="string"&&R.startsWith("data:")&&aA(R)>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,A,C);if(de&&N!=="get"&&N!=="head"){const we=yield v(se,L);if(typeof we=="number"&&isFinite(we)&&we>ye)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,A,C)}if(Te&&b&&N!=="get"&&N!=="head"&&(Z=yield v(se,L))!==0){let we=new a(R,{method:"POST",body:L,duplex:"half"}),Ge;if(V.isFormData(L)&&(Ge=we.headers.get("content-type"))&&se.setContentType(Ge),we.body){const[mt,tn]=ug(Z,Ju(lg(Te)));L=hg(we.body,pg,mt,tn)}}V.isString(te)||(te=te?"include":"omit");const O=d&&"credentials"in a.prototype;if(V.isFormData(L)){const we=se.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&se.delete("content-type")}se.set("User-Agent","axios/"+af,!1);const be=_e(U({},pe),{signal:re,method:N.toUpperCase(),headers:J0(se.normalize()),body:L,duplex:"half",credentials:O?te:void 0});C=d&&new a(R,be);let Pe=yield d?K(C,pe):K(R,be);if(De){const we=V.toFiniteNumber(Pe.headers.get("content-length"));if(we!=null&&we>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,A,C)}const Ce=T&&(j==="stream"||j==="response");if(T&&Pe.body&&(le||De||Ce&&M)){const we={};["status","statusText","headers"].forEach(Nn=>{we[Nn]=Pe[Nn]});const Ge=V.toFiniteNumber(Pe.headers.get("content-length")),[mt,tn]=le&&ug(Ge,Ju(lg(le),!0))||[];let zr=0;const Tr=Nn=>{if(De&&(zr=Nn,zr>ce))throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,A,C);mt&&mt(Nn)};Pe=new u(hg(Pe.body,pg,Tr,()=>{tn&&tn(),M&&M()}),we)}j=j||"text";let $e=yield _[V.findKey(_,j)||"text"](Pe,A);if(De&&!T&&!Ce){let we;if($e!=null&&(typeof $e.byteLength=="number"?we=$e.byteLength:typeof $e.size=="number"?we=$e.size:typeof $e=="string"&&(we=typeof r=="function"?new r().encode($e).byteLength:$e.length)),typeof we=="number"&&we>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,A,C)}return!Ce&&M&&M(),yield new Promise((we,Ge)=>{ag(we,Ge,{data:$e,headers:En.from(Pe.headers),status:Pe.status,statusText:Pe.statusText,config:A,request:C})})}catch(O){if(M&&M(),re&&re.aborted&&re.reason instanceof Ne){const be=re.reason;throw be.config=A,C&&(be.request=C),O!==be&&(be.cause=O),be}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,A,C,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,A,C,O&&O.response)}})},lA=new Map,gg=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=lA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:uA(t)),p=f;return f};gg();const uf={http:LC,xhr:nA,fetch:{get:gg}};V.forEach(uf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Eg=e=>`- ${e}`,cA=e=>V.isFunction(e)||e===null||e===!1;function dA(e,t){e=V.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,!cA(r)&&(s=uf[(c=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${c}'`);if(s&&(V.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
5
|
-
`+u.map(
|
|
6
|
-
`):" "+
|
|
1
|
+
(function(je,ze){typeof exports=="object"&&typeof module!="undefined"?module.exports=ze():typeof define=="function"&&define.amd?define(ze):(je=typeof globalThis!="undefined"?globalThis:je||self,je["cimulate-copilot-widget"]=ze())})(this,(function(){"use strict";var c7=Object.defineProperty,d7=Object.defineProperties;var f7=Object.getOwnPropertyDescriptors;var Ad=Object.getOwnPropertySymbols;var O2=Object.prototype.hasOwnProperty,I2=Object.prototype.propertyIsEnumerable;var Zo=(je,ze)=>(ze=Symbol[je])?ze:Symbol.for("Symbol."+je),h7=je=>{throw TypeError(je)},ea=Math.pow,h0=(je,ze,Je)=>ze in je?c7(je,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):je[ze]=Je,F=(je,ze)=>{for(var Je in ze||(ze={}))O2.call(ze,Je)&&h0(je,Je,ze[Je]);if(Ad)for(var Je of Ad(ze))I2.call(ze,Je)&&h0(je,Je,ze[Je]);return je},me=(je,ze)=>d7(je,f7(ze));var rn=(je,ze)=>{var Je={};for(var ot in je)O2.call(je,ot)&&ze.indexOf(ot)<0&&(Je[ot]=je[ot]);if(je!=null&&Ad)for(var ot of Ad(je))ze.indexOf(ot)<0&&I2.call(je,ot)&&(Je[ot]=je[ot]);return Je};var Se=(je,ze,Je)=>h0(je,typeof ze!="symbol"?ze+"":ze,Je);var et=(je,ze,Je)=>new Promise((ot,Bt)=>{var Le=Ot=>{try{sn(Je.next(Ot))}catch(bn){Bt(bn)}},Vt=Ot=>{try{sn(Je.throw(Ot))}catch(bn){Bt(bn)}},sn=Ot=>Ot.done?ot(Ot.value):Promise.resolve(Ot.value).then(Le,Vt);sn((Je=Je.apply(je,ze)).next())}),Zr=function(je,ze){this[0]=je,this[1]=ze},vd=(je,ze,Je)=>{var ot=(Vt,sn,Ot,bn)=>{try{var ta=Je[Vt](sn),Uu=(sn=ta.value)instanceof Zr,Hu=ta.done;Promise.resolve(Uu?sn[0]:sn).then(Pr=>Uu?ot(Vt==="return"?Vt:"next",sn[1]?{done:Pr.done,value:Pr.value}:Pr,Ot,bn):Ot({value:Pr,done:Hu})).catch(Pr=>ot("throw",Pr,Ot,bn))}catch(Pr){bn(Pr)}},Bt=Vt=>Le[Vt]=sn=>new Promise((Ot,bn)=>ot(Vt,sn,Ot,bn)),Le={};return Je=Je.apply(je,ze),Le[Zo("asyncIterator")]=()=>Le,Bt("next"),Bt("throw"),Bt("return"),Le},p0=je=>{var ze=je[Zo("asyncIterator")],Je=!1,ot,Bt={};return ze==null?(ze=je[Zo("iterator")](),ot=Le=>Bt[Le]=Vt=>ze[Le](Vt)):(ze=ze.call(je),ot=Le=>Bt[Le]=Vt=>{if(Je){if(Je=!1,Le==="throw")throw Vt;return Vt}return Je=!0,{done:!1,value:new Zr(new Promise(sn=>{var Ot=ze[Le](Vt);Ot instanceof Object||h7("Object expected"),sn(Ot)}),1)}}),Bt[Zo("iterator")]=()=>Bt,ot("next"),"throw"in ze?ot("throw"):Bt.throw=Le=>{throw Le},"return"in ze&&ot("return"),Bt},R2=(je,ze,Je)=>(ze=je[Zo("asyncIterator")])?ze.call(je):(je=je[Zo("iterator")](),ze={},Je=(ot,Bt)=>(Bt=je[ot])&&(ze[ot]=Le=>new Promise((Vt,sn,Ot)=>(Le=Bt.call(je,Le),Ot=Le.done,Promise.resolve(Le.value).then(bn=>Vt({value:bn,done:Ot}),sn)))),Je("next"),Je("return"),ze);var je=document.createElement("style");je.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;background-color:transparent;border:1px solid transparent;border-radius: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-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-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-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%;min-height:2rem;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-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-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:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;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-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.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-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:.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-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-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-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(je);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Je={exports:{}},ot={},Bt={exports:{}},Le={};var Vt;function sn(){if(Vt)return Le;Vt=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(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,te){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,te,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function v(){}v.prototype=A.prototype;function P(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}var C=P.prototype=new v;C.constructor=P,_(C,A.prototype),C.isPureReactComponent=!0;var B=Array.isArray,q=Object.prototype.hasOwnProperty,D={current:null},J={key:!0,ref:!0,__self:!0,__source:!0};function ie(M,te,O){var _e,Oe={},Ce=null,$e=null;if(te!=null)for(_e in te.ref!==void 0&&($e=te.ref),te.key!==void 0&&(Ce=""+te.key),te)q.call(te,_e)&&!J.hasOwnProperty(_e)&&(Oe[_e]=te[_e]);var we=arguments.length-2;if(we===1)Oe.children=O;else if(1<we){for(var We=Array(we),pt=0;pt<we;pt++)We[pt]=arguments[pt+2];Oe.children=We}if(M&&M.defaultProps)for(_e in we=M.defaultProps,we)Oe[_e]===void 0&&(Oe[_e]=we[_e]);return{$$typeof:e,type:M,key:Ce,ref:$e,props:Oe,_owner:D.current}}function Te(M,te){return{$$typeof:e,type:M.type,key:te,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ee(M){var te={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return te[O]})}var ce=/\/+/g;function he(M,te){return typeof M=="object"&&M!==null&&M.key!=null?ee(""+M.key):te.toString(36)}function le(M,te,O,_e,Oe){var Ce=typeof M;(Ce==="undefined"||Ce==="boolean")&&(M=null);var $e=!1;if(M===null)$e=!0;else switch(Ce){case"string":case"number":$e=!0;break;case"object":switch(M.$$typeof){case e:case t:$e=!0}}if($e)return $e=M,Oe=Oe($e),M=_e===""?"."+he($e,0):_e,B(Oe)?(O="",M!=null&&(O=M.replace(ce,"$&/")+"/"),le(Oe,te,O,"",function(pt){return pt})):Oe!=null&&($(Oe)&&(Oe=Te(Oe,O+(!Oe.key||$e&&$e.key===Oe.key?"":(""+Oe.key).replace(ce,"$&/")+"/")+M)),te.push(Oe)),1;if($e=0,_e=_e===""?".":_e+":",B(M))for(var we=0;we<M.length;we++){Ce=M[we];var We=_e+he(Ce,we);$e+=le(Ce,te,O,We,Oe)}else if(We=b(M),typeof We=="function")for(M=We.call(M),we=0;!(Ce=M.next()).done;)Ce=Ce.value,We=_e+he(Ce,we++),$e+=le(Ce,te,O,We,Oe);else if(Ce==="object")throw te=String(M),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.");return $e}function be(M,te,O){if(M==null)return M;var _e=[],Oe=0;return le(M,_e,"","",function(Ce){return te.call(O,Ce,Oe++)}),_e}function Me(M){if(M._status===-1){var te=M._result;te=te(),te.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=te)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},K={transition:null},re={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:K,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:be,forEach:function(M,te,O){be(M,function(){te.apply(this,arguments)},O)},count:function(M){var te=0;return be(M,function(){te++}),te},toArray:function(M){return be(M,function(te){return te})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Le.Component=A,Le.Fragment=n,Le.Profiler=s,Le.PureComponent=P,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Le.act=k,Le.cloneElement=function(M,te,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=_({},M.props),Oe=M.key,Ce=M.ref,$e=M._owner;if(te!=null){if(te.ref!==void 0&&(Ce=te.ref,$e=D.current),te.key!==void 0&&(Oe=""+te.key),M.type&&M.type.defaultProps)var we=M.type.defaultProps;for(We in te)q.call(te,We)&&!J.hasOwnProperty(We)&&(_e[We]=te[We]===void 0&&we!==void 0?we[We]:te[We])}var We=arguments.length-2;if(We===1)_e.children=O;else if(1<We){we=Array(We);for(var pt=0;pt<We;pt++)we[pt]=arguments[pt+2];_e.children=we}return{$$typeof:e,type:M.type,key:Oe,ref:Ce,props:_e,_owner:$e}},Le.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},Le.createElement=ie,Le.createFactory=function(M){var te=ie.bind(null,M);return te.type=M,te},Le.createRef=function(){return{current:null}},Le.forwardRef=function(M){return{$$typeof:c,render:M}},Le.isValidElement=$,Le.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Me}},Le.memo=function(M,te){return{$$typeof:f,type:M,compare:te===void 0?null:te}},Le.startTransition=function(M){var te=K.transition;K.transition={};try{M()}finally{K.transition=te}},Le.unstable_act=k,Le.useCallback=function(M,te){return de.current.useCallback(M,te)},Le.useContext=function(M){return de.current.useContext(M)},Le.useDebugValue=function(){},Le.useDeferredValue=function(M){return de.current.useDeferredValue(M)},Le.useEffect=function(M,te){return de.current.useEffect(M,te)},Le.useId=function(){return de.current.useId()},Le.useImperativeHandle=function(M,te,O){return de.current.useImperativeHandle(M,te,O)},Le.useInsertionEffect=function(M,te){return de.current.useInsertionEffect(M,te)},Le.useLayoutEffect=function(M,te){return de.current.useLayoutEffect(M,te)},Le.useMemo=function(M,te){return de.current.useMemo(M,te)},Le.useReducer=function(M,te,O){return de.current.useReducer(M,te,O)},Le.useRef=function(M){return de.current.useRef(M)},Le.useState=function(M){return de.current.useState(M)},Le.useSyncExternalStore=function(M,te,O){return de.current.useSyncExternalStore(M,te,O)},Le.useTransition=function(){return de.current.useTransition()},Le.version="18.3.1",Le}var Ot;function bn(){return Ot||(Ot=1,Bt.exports=sn()),Bt.exports}var ta;function Uu(){if(ta)return ot;ta=1;var e=bn(),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 Hu;function Pr(){return Hu||(Hu=1,Je.exports=Uu()),Je.exports}var w=Pr();const Or=Object.create(null);Or.open="0",Or.close="1",Or.ping="2",Or.pong="3",Or.message="4",Or.upgrade="5",Or.noop="6";const zu=Object.create(null);Object.keys(Or).forEach(e=>{zu[Or[e]]=e});const kd={type:"error",data:"parser error"},m0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",g0=typeof ArrayBuffer=="function",E0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nd=({type:e,data:t},n,r)=>m0&&t instanceof Blob?n?r(t):y0(t,r):g0&&(t instanceof ArrayBuffer||E0(t))?n?r(t):y0(new Blob([t]),r):r(Or[e]+(t||"")),y0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function T0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Pd;function F2(e,t){if(m0&&e.data instanceof Blob)return e.data.arrayBuffer().then(T0).then(t);if(g0&&(e.data instanceof ArrayBuffer||E0(e.data)))return t(T0(e.data));Nd(e,!1,n=>{Pd||(Pd=new TextEncoder),t(Pd.encode(n))})}const b0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<b0.length;e++)na[b0.charCodeAt(e)]=e;const B2=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=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],c=na[e.charCodeAt(r+2)],d=na[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},U2=typeof ArrayBuffer=="function",Od=(e,t)=>{if(typeof e!="string")return{type:"message",data:_0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:H2(e.substring(1),t)}:zu[n]?e.length>1?{type:zu[n],data:e.substring(1)}:{type:zu[n]}:kd},H2=(e,t)=>{if(U2){const n=B2(e);return _0(n,t)}else return{base64:!0,data:e}},_0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,S0="",z2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Nd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(S0))})})},j2=(e,t)=>{const n=e.split(S0),r=[];for(let s=0;s<n.length;s++){const a=Od(n[s],t);if(r.push(a),a.type==="error")break}return r};function $2(){return new TransformStream({transform(e,t){F2(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 Id;function ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let 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 V2(e,t){Id||(Id=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(ju(n)<1)break;const d=$u(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(ju(n)<2)break;const d=$u(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ju(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(kd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ju(n)<s)break;const d=$u(n,s);c.enqueue(Od(a?d:Id.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(kd);break}}}})}const x0=4;function Ut(e){if(e)return q2(e)}function q2(e){for(var t in Ut.prototype)e[t]=Ut.prototype[t];return e}Ut.prototype.on=Ut.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ut.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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},Ut.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},Ut.prototype.emitReserved=Ut.prototype.emit,Ut.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ut.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Y2="arraybuffer";function p7(){}function w0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const G2=Kn.setTimeout,W2=Kn.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=G2.bind(Kn),e.clearTimeoutFn=W2.bind(Kn)):(e.setTimeoutFn=Kn.setTimeout.bind(Kn),e.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const X2=1.33;function K2(e){return typeof e=="string"?Q2(e):Math.ceil((e.byteLength||e.size)*X2)}function Q2(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 C0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function J2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Z2(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 ew extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Rd extends Ut{constructor(t){super(),this.writable=!1,qu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new ew(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=Od(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=J2(t);return n.length?"?"+n:""}}class tw extends Rd{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)};j2(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,z2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=C0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let A0=!1;try{A0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const nw=A0;function rw(){}class iw extends tw{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 Ir extends Ut{constructor(t,n,r){super(),this.createRequest=t,qu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=w0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let 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=Ir.requestsCount++,Ir.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=rw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Ir.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(Ir.requestsCount=0,Ir.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",v0);else if(typeof addEventListener=="function"){const e="onpagehide"in Kn?"pagehide":"unload";addEventListener(e,v0,!1)}}function v0(){for(let e in Ir.requests)Ir.requests.hasOwnProperty(e)&&Ir.requests[e].abort()}const sw=(function(){const e=k0({xdomain:!1});return e&&e.responseType!==null})();class ow extends iw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=sw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ir(k0,this.uri(),t)}}function k0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||nw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const N0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aw extends Rd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=N0?{}:w0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(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;Nd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=C0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ld=Kn.WebSocket||Kn.MozWebSocket;class uw extends aw{createSocket(t,n,r){return N0?new Ld(t,n,r):n?new Ld(t,n):new Ld(t)}doWrite(t,n){this.ws.send(n)}}class lw extends Rd{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=V2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=$2();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&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const cw={websocket:uw,webtransport:lw,polling:ow},dw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dd(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=dw.exec(e||""),a={},u=14;for(;u--;)a[fw[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=hw(a,a.path),a.queryKey=pw(a,a.query),a}function hw(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 pw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Md=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Md&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class yi extends Ut{constructor(t,n){if(super(),this.binaryType=Y2,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=Dd(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=Dd(n.host).host);qu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const 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=Z2(this.opts.query)),Md&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=x0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=K2(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,Vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,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(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Md&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=x0;class mw extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const 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;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const 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 gw=class extends mw{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=>cw[s]).filter(s=>!!s)),super(t,r)}};function Ew(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=Dd(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 yw=typeof ArrayBuffer=="function",Tw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,P0=Object.prototype.toString,bw=typeof Blob=="function"||typeof Blob!="undefined"&&P0.call(Blob)==="[object BlobConstructor]",_w=typeof File=="function"||typeof File!="undefined"&&P0.call(File)==="[object FileConstructor]";function Fd(e){return yw&&(e instanceof ArrayBuffer||Tw(e))||bw&&e instanceof Blob||_w&&e instanceof File}function Gu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Gu(e[n]))return!0;return!1}if(Fd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Gu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gu(e[n]))return!0;return!1}function Sw(e){const t=[],n=e.data,r=e;return r.data=Bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bd(e,t){if(!e)return e;if(Fd(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]=Bd(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]=Bd(e[r],t));return n}return e}function xw(e,t){return e.data=Ud(e.data,t),delete e.attachments,e}function Ud(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]=Ud(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ud(e[n],t));return e}const ww=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class Cw{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Gu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Sw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Hd extends Ut{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new Aw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Fd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!vw(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(Hd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return O0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||O0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ww.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Aw{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=xw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const vw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function O0(e){return Object.prototype.toString.call(e)==="[object Object]"}const kw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Hd,Encoder:Cw,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Nw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class I0 extends Ut{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=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(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(Nw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(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:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:tt.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:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ms(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}Ms.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},Ms.prototype.reset=function(){this.attempts=0},Ms.prototype.setMin=function(e){this.ms=e},Ms.prototype.setMax=function(e){this.max=e},Ms.prototype.setJitter=function(e){this.jitter=e};class zd extends Ut{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,qu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ms({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||kw;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 gw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(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(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Vu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new I0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(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 ra={};function Wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ew(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=ra[s]&&a in ra[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new zd(r,t):(ra[s]||(ra[s]=new zd(r,t)),d=ra[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Wu,{Manager:zd,Socket:I0,io:Wu,connect:Wu});var Pw=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===Ow})(t)})(e)},Ow=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Fs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Iw(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function R0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function L0(e,t){try{return t in e}catch(n){return!1}}function Rw(e,t,n){var r={};return n.isMergeableObject(e)&&R0(e).forEach((function(s){r[s]=ia(e[s],n)})),R0(t).forEach((function(s){(function(a,u){return L0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(L0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Fs;var c=u.customMerge(a);return typeof c=="function"?c:Fs})(s,n)(e[s],t[s],n):r[s]=ia(t[s],n))})),r}function Fs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Iw,n.isMergeableObject=n.isMergeableObject||Pw,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Rw(e,t,n):ia(t,n)}Fs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Fs(n,r,t)}),{})};var Lw=Fs;let Dw=class{constructor(t){Object.assign(this,t)}};function _n(e){if(e)return(function(t){for(var n in _n.prototype)t[n]=_n.prototype[n];return t})(e)}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.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},_n.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},_n.prototype.emitReserved=_n.prototype.emit,_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Mw=typeof ArrayBuffer=="function",D0=Object.prototype.toString,Fw=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",Bw=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function jd(e){return Mw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Fw&&e instanceof Blob||Bw&&e instanceof File}function Xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Xu(e[n]))return!0;return!1}if(jd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Xu(e[n]))return!0;return!1}function Uw(e){const t=[],n=e.data,r=e;return r.data=$d(n,t),r.attachments=t.length,{packet:r,buffers:t}}function $d(e,t){if(!e)return e;if(jd(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]=$d(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]=$d(e[r],t));return n}return e}function Hw(e,t){return e.data=Vd(e.data,t),delete e.attachments,e}function Vd(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]=Vd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Vd(e[n],t));return e}const zw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var kt;(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"})(kt||(kt={}));class jw{constructor(t){this.replacer=t}encode(t){return t.type!==kt.EVENT&&t.type!==kt.ACK||!Xu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===kt.EVENT?kt.BINARY_EVENT:kt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==kt.BINARY_EVENT&&t.type!==kt.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=Uw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class qd extends _n{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===kt.BINARY_EVENT;r||n.type===kt.BINARY_ACK?(n.type=r?kt.EVENT:kt.ACK,this.reconstructor=new $w(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!jd(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(kt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===kt.BINARY_EVENT||r.type===kt.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(!Vw(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(!qd.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 kt.CONNECT:return M0(n);case kt.DISCONNECT:return n===void 0;case kt.CONNECT_ERROR:return typeof n=="string"||M0(n);case kt.EVENT:case kt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&zw.indexOf(n[0])===-1);case kt.ACK:case kt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class $w{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=Hw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Vw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const F0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],B0=(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)},U0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),qw=B0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),F0),H0=B0(U0,U0,F0),Yw={Encoder:class extends jw{encode(e){var t,n;return super.encode(me(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],qw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends qd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?H0(r):r)):n instanceof Object?H0(n):n)):t))}}},Gw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Ww{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=[Gw,a,{parser:Yw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Wu(u,Lw.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*ea(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(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 et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return vd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Zr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Zr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Zr(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),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Dw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var H=bn();const Qi=ze(H);var z0=Symbol.for("immer-nothing"),j0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bs=Object.getPrototypeOf;function Us(e){return!!e&&!!e[at]}function ei(e){var t;return e?$0(e)||Array.isArray(e)||!!e[j0]||!!((t=e.constructor)!=null&&t[j0])||Qu(e)||Ju(e):!1}var Xw=Object.prototype.constructor.toString();function $0(e){if(!e||typeof e!="object")return!1;const t=Bs(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)===Xw}function sa(e,t){Ku(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ku(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:Qu(e)?2:Ju(e)?3:0}function Yd(e,t){return Ku(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V0(e,t,n){const r=Ku(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Kw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Xt(e){return e.copy_||e.base_}function Gd(e,t){if(Qu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let 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(Bs(e),r)}else{const r=Bs(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function Wd(e,t=!1){return Zu(e)||Us(e)||!ei(e)||(Ku(e)>1&&(e.set=e.add=e.clear=e.delete=Qw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Wd(r,!0))),e}function Qw(){Qn(2)}function Zu(e){return Object.isFrozen(e)}var Xd={};function Ji(e){const t=Xd[e];return t||Qn(0,e),t}function Jw(e,t){Xd[e]||(Xd[e]=t)}var oa;function el(){return oa}function Zw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function q0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kd(e){Qd(e),e.drafts_.forEach(eC),e.drafts_=null}function Qd(e){e===oa&&(oa=e.parent_)}function Y0(e){return oa=Zw(oa,e)}function eC(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function G0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Kd(t),Qn(4)),ei(e)&&(e=tl(t,e),t.parent_||nl(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=tl(t,n,[]),Kd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==z0?e:void 0}function tl(e,t,n){if(Zu(t))return t;const r=t[at];if(!r)return sa(t,(s,a)=>W0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return nl(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),sa(a,(c,d)=>W0(e,r,s,c,d,n,u)),nl(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function W0(e,t,n,r,s,a,u){if(Us(s)){const c=a&&t&&t.type_!==3&&!Yd(t.assigned_,r)?a.concat(r):void 0,d=tl(e,s,c);if(V0(n,r,d),Us(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(ei(s)&&!Zu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;tl(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&nl(e,s)}}function nl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wd(t,n)}function tC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:el(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Jd;n&&(s=[r],a=aa);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Jd={get(e,t){if(t===at)return e;const n=Xt(e);if(!Yd(n,t))return nC(e,n,t);const r=n[t];return e.finalized_||!ei(r)?r:r===Zd(e.base_,t)?(ef(e),e.copy_[t]=ua(r,e)):r},has(e,t){return t in Xt(e)},ownKeys(e){return Reflect.ownKeys(Xt(e))},set(e,t,n){const r=X0(Xt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Zd(Xt(e),t),a=s==null?void 0:s[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Kw(n,s)&&(n!==void 0||Yd(e.base_,t)))return!0;ef(e),ti(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 Zd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ef(e),ti(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return Bs(e.base_)},setPrototypeOf(){Qn(12)}},aa={};sa(Jd,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)},aa.set=function(e,t,n){return Jd.set.call(this,e[0],t,n,e[0])};function Zd(e,t){const n=e[at];return(n?Xt(n):e)[t]}function nC(e,t,n){var s;const r=X0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function X0(e,t){if(!(t in e))return;let n=Bs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Bs(n)}}function ti(e){e.modified_||(e.modified_=!0,e.parent_&&ti(e.parent_))}function ef(e){e.copy_||(e.copy_=Gd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rC=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(ei(t)){const a=Y0(this),u=ua(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Kd(a):Qd(a)}return q0(a,r),G0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===z0&&(s=void 0),this.autoFreeze_&&Wd(s,!0),r){const a=[],u=[];Ji("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){ei(e)||Qn(8),Us(e)&&(e=iC(e));const t=Y0(this),n=ua(e,void 0);return n[at].isManual_=!0,Qd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return q0(r,t),G0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ji("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,s=>r(s,t))}};function ua(e,t){const n=Qu(e)?Ji("MapSet").proxyMap_(e,t):Ju(e)?Ji("MapSet").proxySet_(e,t):tC(e,t);return(t?t.scope_:el()).drafts_.push(n),n}function iC(e){return Us(e)||Qn(10,e),K0(e)}function K0(e){if(!ei(e)||Zu(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gd(e,!0);return sa(n,(r,s)=>{V0(n,r,K0(s))}),t&&(t.finalized_=!1),n}function sC(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Xt(this[at]).size}has(d){return Xt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Xt(p).has(d)||Xt(p).get(d)!==f)&&(n(p),ti(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),ti(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Xt(d).size&&(n(d),ti(d),d.assigned_=new Map,sa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Xt(p).forEach((g,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[at];u(f);const p=Xt(f).get(d);if(f.finalized_||!ei(p)||p!==f.base_.get(d))return p;const g=ua(p,f);return n(f),f.copy_.set(d,g),g}keys(){return Xt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:el(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Xt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),ti(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ti(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Xt(d).size&&(a(d),ti(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let g=p.next();for(;!g.done;)d.call(f,g.value,g.value,this),g=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(ei(d)){const f=ua(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Qn(3,JSON.stringify(Xt(c)))}Jw("MapSet",{proxyMap_:t,proxySet_:s})}var Un=new rC,oC=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function Q0(e,t,n){var r=H.useMemo(function(){return oC(e)},[e]);return H.useReducer(r,t,n)}const J0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},aC=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},Hs="cimulate",tf=`${Hs}:pdp-update`,nf=`${Hs}:browse-update`,rf=`${Hs}:search-update`,sf=`${Hs}:ui-state-update`,of=`${Hs}:prompts-state-update`,af=`${Hs}:session-state`,Rr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},J0),uC={"browse-context":Rr.CONTEXT_UPDATED,categoryId:Rr.CATEGORY_ID_CHANGED,categoryName:Rr.CATEGORY_NAME_CHANGED,page:Rr.PAGE_CHANGED,pageSize:Rr.PAGE_SIZE_CHANGED,includeFacets:Rr.FACET_FILTERS_CHANGED,facetFilters:Rr.FACET_FILTERS_CHANGED,rangeFilters:Rr.RANGE_FILTERS_CHANGED,catalogSegment:Rr.CATALOG_SEGMENT_CHANGED,pricebooks:Rr.PRICEBOOKS_CHANGED},ni=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},J0),lC={"search-context":ni.SEARCH_CONTEXT_UPDATED,query:ni.QUERY_CHANGED,page:ni.PAGE_CHANGED,pageSize:ni.PAGE_SIZE_CHANGED,includeFacets:ni.FACET_FILTERS_CHANGED,facetFilters:ni.FACET_FILTERS_CHANGED,rangeFilters:ni.RANGE_FILTERS_CHANGED,catalogSegment:ni.CATALOG_SEGMENT_CHANGED,pricebooks:ni.PRICEBOOKS_CHANGED},j="cim-widget",zs=`--${j}`,es={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},cC=(e=es)=>({[`${zs}-primary-color`]:e.primaryColor||es.primaryColor,[`${zs}-secondary-color`]:e.secondaryColor||es.secondaryColor,[`${zs}-font-color`]:e.fontColor||es.fontColor,[`${zs}-font-family`]:e.fontFamily||es.fontFamily,[`${zs}-background-color`]:e.backgroundColor||es.backgroundColor,[`${zs}-border-color`]:e.borderColor||es.borderColor}),Ti={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},Z0=H.createContext(null),eg=H.createContext(null);function tg(e,t){return function(){return e.apply(t,arguments)}}const{toString:dC}=Object.prototype,{getPrototypeOf:rl}=Object,{iterator:il,toStringTag:ng}=Symbol,sl=(e=>t=>{const n=dC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hr=e=>(e=e.toLowerCase(),t=>sl(t)===e),ol=e=>t=>typeof t===e,{isArray:js}=Array,$s=ol("undefined");function la(e){return e!==null&&!$s(e)&&e.constructor!==null&&!$s(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rg=hr("ArrayBuffer");function fC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rg(e.buffer),t}const hC=ol("string"),vn=ol("function"),ig=ol("number"),ca=e=>e!==null&&typeof e=="object",pC=e=>e===!0||e===!1,al=e=>{if(sl(e)!=="object")return!1;const t=rl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ng in e)&&!(il in e)},mC=e=>{if(!ca(e)||la(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},gC=hr("Date"),EC=hr("File"),yC=e=>!!(e&&typeof e.uri!="undefined"),TC=e=>e&&typeof e.getParts!="undefined",bC=hr("Blob"),_C=hr("FileList"),SC=e=>ca(e)&&vn(e.pipe);function xC(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const sg=xC(),og=typeof sg.FormData!="undefined"?sg.FormData:void 0,wC=e=>{if(!e)return!1;if(og&&e instanceof og)return!0;const t=rl(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=sl(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},CC=hr("URLSearchParams"),[AC,vC,kC,NC]=["ReadableStream","Request","Response","Headers"].map(hr),PC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),js(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(la(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function ag(e,t){if(la(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ug=e=>!$s(e)&&e!==ts;function uf(...e){const{caseless:t,skipUndefined:n}=ug(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&ag(r,u)||u,d=lf(r,c)?r[c]:void 0;al(d)&&al(a)?r[c]=uf(d,a):al(a)?r[c]=uf({},a):js(a)?r[c]=a.slice():(!n||!$s(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&da(e[a],s);return r}const OC=(e,t,n,{allOwnKeys:r}={})=>(da(t,(s,a)=>{n&&vn(s)?Object.defineProperty(e,a,{__proto__:null,value:tg(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),IC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RC=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},LC=(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&&rl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},DC=(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},MC=e=>{if(!e)return null;if(js(e))return e;let t=e.length;if(!ig(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},FC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&rl(Uint8Array)),BC=(e,t)=>{const r=(e&&e[il]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},UC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},HC=hr("HTMLFormElement"),zC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),lf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jC=hr("RegExp"),lg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};da(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},$C=e=>{lg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VC=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return js(e)?r(e):r(String(e).split(t)),n},qC=()=>{},YC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function GC(e){return!!(e&&vn(e.append)&&e[ng]==="FormData"&&e[il])}const WC=e=>{const t=new WeakSet,n=r=>{if(ca(r)){if(t.has(r))return;if(la(r))return r;if(!("toJSON"in r)){t.add(r);const s=js(r)?[]:{};return da(r,(a,u)=>{const c=n(a);!$s(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},XC=hr("AsyncFunction"),KC=e=>e&&(ca(e)||vn(e))&&vn(e.then)&&vn(e.catch),cg=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:s,data:a})=>{s===ts&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(ts.postMessage)),QC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ts):typeof process!="undefined"&&process.nextTick||cg,V={isArray:js,isArrayBuffer:rg,isBuffer:la,isFormData:wC,isArrayBufferView:fC,isString:hC,isNumber:ig,isBoolean:pC,isObject:ca,isPlainObject:al,isEmptyObject:mC,isReadableStream:AC,isRequest:vC,isResponse:kC,isHeaders:NC,isUndefined:$s,isDate:gC,isFile:EC,isReactNativeBlob:yC,isReactNative:TC,isBlob:bC,isRegExp:jC,isFunction:vn,isStream:SC,isURLSearchParams:CC,isTypedArray:FC,isFileList:_C,forEach:da,merge:uf,extend:OC,trim:PC,stripBOM:IC,inherits:RC,toFlatObject:LC,kindOf:sl,kindOfTest:hr,endsWith:DC,toArray:MC,forEachEntry:BC,matchAll:UC,isHTMLForm:HC,hasOwnProperty:lf,hasOwnProp:lf,reduceDescriptors:lg,freezeMethods:$C,toObjectSet:VC,toCamelCase:zC,noop:qC,toFiniteNumber:YC,findKey:ag,global:ts,isContextDefined:ug,isSpecCompliantForm:GC,toJSONObject:WC,isAsyncFn:XC,isThenable:KC,setImmediate:cg,asap:QC,isIterable:e=>e!=null&&vn(e[il])},JC=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZC=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
3
|
+
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&JC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function eA(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const tA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function cf(e,t){return V.isArray(e)?e.map(n=>cf(n,t)):eA(String(e).replace(t,""))}const rA=e=>cf(e,tA),iA=e=>cf(e,nA);function dg(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=iA(n)}),t}const fg=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function ul(e){return e===!1||e==null?e:V.isArray(e)?e.map(ul):rA(String(e))}function sA(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 oA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function df(e,t,n,r,s){if(V.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function aA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function uA(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,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=fa(d);if(!p)throw new Error("header name must be a non-empty string");const g=V.findKey(s,p);(!g||s[g]===void 0||f===!0||f===void 0&&s[g]!==!1)&&(s[g||d]=ul(c))}const u=(c,d)=>V.forEach(c,(f,p)=>a(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!oA(t))u(ZC(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,f;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=fa(t),t){const r=V.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return sA(s);if(V.isFunction(n))return n.call(this,s,r);if(V.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fa(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||df(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=fa(u),u){const c=V.findKey(r,u);c&&(!n||df(r,r[c],c,n))&&(delete r[c],s=!0)}}return V.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||df(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return V.forEach(this,(s,a)=>{const u=V.findKey(r,a);if(u){n[u]=ul(s),delete n[a];return}const c=t?aA(a):String(a).trim();c!==a&&delete n[a],n[c]=ul(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
4
|
+
`)}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[fg]=this[fg]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=fa(u);r[c]||(uA(s,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(Sn);const lA="[REDACTED ****]";function cA(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function dA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Sn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&cA(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?lA:s(d);V.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let Ne=class L2 extends Error{static from(t,n,r,s,a,u){const c=new L2(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",{__proto__:null,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(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?dA(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const fA=null;function ff(e){return V.isPlainObject(e)||V.isArray(e)}function hg(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function hf(e,t,n){return e?e.concat(t).map(function(s,a){return s=hg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function hA(e){return V.isArray(e)&&!e.some(ff)}const pA=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function ll(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,v){return!V.isUndefined(v[A])});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&&V.isSpecCompliantForm(t);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!f&&V.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,A,v){let P=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(hf(v,A,a),p(S)),!1;if(S&&!v&&typeof S=="object"){if(V.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&hA(S)||(V.isFileList(S)||V.endsWith(A,"[]"))&&(P=V.toArray(S)))return A=hg(A),P.forEach(function(B,q){!(V.isUndefined(B)||B===null)&&t.append(u===!0?hf([A],q,a):u===null?A:A+"[]",p(B))}),!1}return ff(S)?!0:(t.append(hf(v,A,a),p(S)),!1)}const b=[],y=Object.assign(pA,{defaultVisitor:g,convertValue:p,isVisitable:ff});function _(S,A,v=0){if(!V.isUndefined(S)){if(v>d)throw new Ne("Object is too deeply nested ("+v+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(S),V.forEach(S,function(C,B){(!(V.isUndefined(C)||C===null)&&s.call(t,C,V.isString(B)?B.trim():B,A,y))===!0&&_(C,A?A.concat(B):[B],v+1)}),b.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function pg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function pf(e,t){this._pairs=[],e&&ll(e,this,t)}const mg=pf.prototype;mg.append=function(t,n){this._pairs.push([t,n])},mg.toString=function(t){const n=t?function(r){return t.call(this,r,pg)}:pg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gg(e,t,n){if(!t)return e;const r=n&&n.encode||mA,s=V.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let u;if(a?u=a(t,s):u=V.isURLSearchParams(t)?t.toString():new pf(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){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const mf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},gA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:pf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},gf=typeof window!="undefined"&&typeof document!="undefined",Ef=typeof navigator=="object"&&navigator||void 0,EA=gf&&(!Ef||["ReactNative","NativeScript","NS"].indexOf(Ef.product)<0),yA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",TA=gf&&window.location.href||"http://localhost",cn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gf,hasStandardBrowserEnv:EA,hasStandardBrowserWebWorkerEnv:yA,navigator:Ef,origin:TA},Symbol.toStringTag,{value:"Module"}))),gA);function bA(e,t){return ll(e,new cn.classes.URLSearchParams,F({visitor:function(n,r,s,a){return cn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function _A(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function SA(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 yg(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&&V.isArray(s)?s.length:u,d?(V.hasOwnProp(s,u)?s[u]=V.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!V.hasOwnProp(s,u)||!V.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&V.isArray(s[u])&&(s[u]=SA(s[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,s)=>{t(_A(r),s,n,0)}),n}return null}const Vs=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function xA(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:mf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return s?JSON.stringify(yg(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Vs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return bA(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Vs(this,"env"),p=f&&f.FormData;return ll(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),xA(t)):t}],transformResponse:[function(t){const n=Vs(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,s=Vs(this,"responseType"),a=s==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Vs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Vs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cn.classes.FormData,Blob:cn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{ha.headers[e]={}});function yf(e,t){const n=this||ha,r=t||n,s=Sn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Tg(e){return!!(e&&e.__CANCEL__)}let pa=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function bg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function wA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function CA(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 AA(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 cl=(e,t,n=3)=>{let r=0;const s=CA(50,250);return AA(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=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)},_g=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sg=e=>(...t)=>V.asap(()=>e(...t)),vA=cn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,cn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(cn.origin),cn.navigator&&/(msie|trident)/i.test(cn.navigator.userAgent)):()=>!0,kA=cn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)return decodeURIComponent(r.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function NA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xg(e,t,n){let r=!NA(t);return e&&(r||n===!1)?PA(e,t):t}const wg=e=>e instanceof Sn?F({},e):e;function ns(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,b){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:b},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function s(f,p,g,b){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}function a(f,p){if(!V.isUndefined(p))return r(void 0,p)}function u(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,g){if(V.hasOwnProp(t,g))return r(f,p);if(V.hasOwnProp(e,g))return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>s(wg(f),wg(p),g,!0)};return V.forEach(Object.keys(F(F({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:s,b=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,_=g(b,y,p);V.isUndefined(_)&&g!==c||(n[p]=_)}),n}const OA=["content-type","content-length"];function IA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,s])=>{OA.includes(r.toLowerCase())&&e.set(r,s)})}const RA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Cg=e=>{const t=ns({},e),n=b=>V.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=gg(xg(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?RA(d.password):""))),V.isFormData(r)&&(cn.hasStandardBrowserEnv||cn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&IA(c,r.getHeaders(),n("formDataHeaderPolicy"))),cn.hasStandardBrowserEnv&&(V.isFunction(s)&&(s=s(t)),s===!0||s==null&&vA(t.url))){const y=a&&u&&kA.read(u);y&&c.set(a,y)}return t},LA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Cg(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 A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function v(){if(!A)return;const C=Sn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:C,config:e,request:A};bg(function(J){n(J),S()},function(J){r(J),S()},q),A=null}"onloadend"in A?A.onloadend=v:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(v)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(B){const q=B&&B.message?B.message:"Network Error",D=new Ne(q,Ne.ERR_NETWORK,e,A);D.event=B||null,r(D),S(),A=null},A.ontimeout=function(){let B=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const q=s.transitional||mf;s.timeoutErrorMessage&&(B=s.timeoutErrorMessage),r(new Ne(B,q.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&V.forEach(dg(u),function(B,q){A.setRequestHeader(q,B)}),V.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),c&&c!=="json"&&(A.responseType=s.responseType),f&&([b,_]=cl(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([g,y]=cl(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{A&&(r(!C||C.type?new pa(null,e,A):C),A.abort(),S(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const P=wA(s.url);if(P&&!cn.protocols.includes(P)){r(new Ne("Unsupported protocol "+P+":",Ne.ERR_BAD_REQUEST,e));return}A.send(a||null)})},DA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},MA=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},FA=function(e,t){return vd(this,null,function*(){try{for(var n=R2(BA(e)),r,s,a;r=!(s=yield new Zr(n.next())).done;r=!1){const u=s.value;yield*p0(MA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Zr(s.call(n)))}finally{if(a)throw a[0]}}})},BA=function(e){return vd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*p0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Zr(t.read());if(n)break;yield r}}finally{yield new Zr(t.cancel())}})},Ag=(e,t,n,r)=>{const s=FA(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:g}=yield 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})};function UA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Tf="1.16.1",vg=64*1024,{isFunction:dl}=V,kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},HA=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?dl(s):typeof fetch=="function",d=dl(a),f=dl(u);if(!c)return!1;const p=c&&dl(n),g=c&&(typeof r=="function"?(v=>P=>v.encode(P))(new r):v=>et(null,null,function*(){return new Uint8Array(yield new a(v).arrayBuffer())})),b=d&&p&&kg(()=>{let v=!1;const P=new a(cn.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),C=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),v&&!C}),y=f&&p&&kg(()=>V.isReadableStream(new u("").body)),_={stream:y&&(v=>v.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!_[v]&&(_[v]=(P,C)=>{let B=P&&P[v];if(B)return B.call(P);throw new Ne(`Response type '${v}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const S=v=>et(null,null,function*(){if(v==null)return 0;if(V.isBlob(v))return v.size;if(V.isSpecCompliantForm(v))return(yield new a(cn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(V.isArrayBufferView(v)||V.isArrayBuffer(v))return v.byteLength;if(V.isURLSearchParams(v)&&(v=v+""),V.isString(v))return(yield g(v)).byteLength}),A=(v,P)=>et(null,null,function*(){const C=V.toFiniteNumber(v.getContentLength());return C==null?S(P):C});return v=>et(null,null,function*(){let{url:P,method:C,data:B,signal:q,cancelToken:D,timeout:J,onDownloadProgress:ie,onUploadProgress:Te,responseType:$,headers:ee,withCredentials:ce="same-origin",fetchOptions:he,maxContentLength:le,maxBodyLength:be}=Cg(v);const Me=V.isNumber(le)&&le>-1,de=V.isNumber(be)&&be>-1;let K=s||fetch;$=$?($+"").toLowerCase():"text";let re=DA([q,D&&D.toAbortSignal()],J),k=null;const M=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let te;try{if(Me&&typeof P=="string"&&P.startsWith("data:")&&UA(P)>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k);if(de&&C!=="get"&&C!=="head"){const we=yield A(ee,B);if(typeof we=="number"&&isFinite(we)&&we>be)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,v,k)}if(Te&&b&&C!=="get"&&C!=="head"&&(te=yield A(ee,B))!==0){let we=new a(P,{method:"POST",body:B,duplex:"half"}),We;if(V.isFormData(B)&&(We=we.headers.get("content-type"))&&ee.setContentType(We),we.body){const[pt,on]=_g(te,cl(Sg(Te)));B=Ag(we.body,vg,pt,on)}}V.isString(ce)||(ce=ce?"include":"omit");const O=d&&"credentials"in a.prototype;if(V.isFormData(B)){const we=ee.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&ee.delete("content-type")}ee.set("User-Agent","axios/"+Tf,!1);const _e=me(F({},he),{signal:re,method:C.toUpperCase(),headers:dg(ee.normalize()),body:B,duplex:"half",credentials:O?ce:void 0});k=d&&new a(P,_e);let Oe=yield d?K(k,he):K(P,_e);if(Me){const we=V.toFiniteNumber(Oe.headers.get("content-length"));if(we!=null&&we>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k)}const Ce=y&&($==="stream"||$==="response");if(y&&Oe.body&&(ie||Me||Ce&&M)){const we={};["status","statusText","headers"].forEach(Rn=>{we[Rn]=Oe[Rn]});const We=V.toFiniteNumber(Oe.headers.get("content-length")),[pt,on]=ie&&_g(We,cl(Sg(ie),!0))||[];let Yr=0;const Sr=Rn=>{if(Me&&(Yr=Rn,Yr>le))throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k);pt&&pt(Rn)};Oe=new u(Ag(Oe.body,vg,Sr,()=>{on&&on(),M&&M()}),we)}$=$||"text";let $e=yield _[V.findKey(_,$)||"text"](Oe,v);if(Me&&!y&&!Ce){let we;if($e!=null&&(typeof $e.byteLength=="number"?we=$e.byteLength:typeof $e.size=="number"?we=$e.size:typeof $e=="string"&&(we=typeof r=="function"?new r().encode($e).byteLength:$e.length)),typeof we=="number"&&we>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k)}return!Ce&&M&&M(),yield new Promise((we,We)=>{bg(we,We,{data:$e,headers:Sn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:v,request:k})})}catch(O){if(M&&M(),re&&re.aborted&&re.reason instanceof Ne){const _e=re.reason;throw _e.config=v,k&&(_e.request=k),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,v,k,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,v,k,O&&O.response)}})},zA=new Map,Ng=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=zA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:HA(t)),p=f;return f};Ng();const bf={http:fA,xhr:LA,fetch:{get:Ng}};V.forEach(bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Pg=e=>`- ${e}`,jA=e=>V.isFunction(e)||e===null||e===!1;function $A(e,t){e=V.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,!jA(r)&&(s=bf[(c=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${c}'`);if(s&&(V.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
5
|
+
`+u.map(Pg).join(`
|
|
6
|
+
`):" "+Pg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Og={getAdapter:$A,adapters:bf};function _f(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function Ig(e){return _f(e),e.headers=Sn.from(e.headers),e.data=yf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Og.getAdapter(e.adapter||ha.adapter,e)(e).then(function(r){_f(e),e.response=r;try{r.data=yf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Sn.from(r.headers),r},function(r){if(!Tg(r)&&(_f(e),r&&r.response)){e.response=r.response;try{r.response.data=yf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Sn.from(r.response.headers)}return Promise.reject(r)})}const fl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Rg={};fl.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Tf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Rg[u]&&(Rg[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}},fl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function VA(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.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 Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const hl={assertOptions:VA,validators:fl},Jn=hl.validators;let rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Eg,response:new Eg}}request(t,n){return et(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=es(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&tl.assertOptions(r,{silentJSONParsing:Gn.transitional(Gn.boolean),forcedJSONParsing:Gn.transitional(Gn.boolean),clarifyTimeoutError:Gn.transitional(Gn.boolean),legacyInterceptorReqResOrdering:Gn.transitional(Gn.boolean)},!1),s!=null&&(V.isFunction(s)?n.paramsSerializer={serialize:s}:tl.assertOptions(s,{encode:Gn.function,serialize:Gn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),tl.assertOptions(n,{baseUrl:Gn.spelling("baseURL"),withXsrfToken:Gn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=En.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 v=n.transitional||nf;v&&v.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 _=[Tg.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 T=n;for(;g<b;){const _=c[g++],S=c[g++];try{T=_(T)}catch(v){S.call(this,v);break}}try{p=Tg.call(this,T)}catch(_){return Promise.reject(_)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=es(this.defaults,t);const n=cg(t.baseURL,t.url,t.allowAbsoluteUrls);return rg(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){ts.prototype[t]=function(n,r){return this.request(es(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(es(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ts.prototype[t]=n(),t!=="query"&&(ts.prototype[t+"Form"]=n(!0))});let hA=class nx{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 nx(function(s){t=s}),cancel:t}}};function pA(e){return function(n){return e.apply(null,n)}}function mA(e){return V.isObject(e)&&e.isAxiosError===!0}const cf={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(cf).forEach(([e,t])=>{cf[t]=e});function _g(e){const t=new ts(e),n=j0(ts.prototype.request,t);return V.extend(n,ts.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _g(es(e,s))},n}const Dt=_g(ia);Dt.Axios=ts,Dt.CanceledError=sa,Dt.CancelToken=hA,Dt.isCancel=og,Dt.VERSION=af,Dt.toFormData=Qu,Dt.AxiosError=Ne,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=pA,Dt.isAxiosError=mA,Dt.mergeConfig=es,Dt.AxiosHeaders=En,Dt.formToJSON=e=>sg(V.isHTMLForm(e)?new FormData(e):e),Dt.getAdapter=yg.getAdapter,Dt.HttpStatusCode=cf,Dt.default=Dt;const{Axios:oB,AxiosError:aB,CanceledError:uB,isCancel:lB,CancelToken:cB,VERSION:dB,all:fB,Cancel:hB,isAxiosError:pB,spread:mB,toFormData:gB,AxiosHeaders:EB,HttpStatusCode:yB,formToJSON:TB,getAdapter:bB,mergeConfig:_B,create:SB}=Dt;class gA{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",()=>et(this,null,function*(){try{const t=yield Dt.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);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class EA{constructor(t,n,r,s=!1){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>et(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));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 gA(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 js=(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 yA{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{js(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),TA=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:s=!1,disclaimerText:a,disclaimerMarkdown:u,clientContext:c,searchPlaceholder:d,searchButtonLabel:f,searchConfig:p,componentConfig:g,conversationHistory:b,resetConversationMessage:T="",apiKey:_,apiToken:S,baseUrl:v,theme:A,isDevelopment:R,__features:N,children:L})=>{const W=z.useMemo(()=>new EA(v,_,S,R),[v,_,S,R]),F=z.useMemo(()=>new yA(R),[R]);z.useEffect(()=>{W.config||W.getConfig()},[W]);const ne=z.useMemo(()=>Iw(A),[A]),le=z.useMemo(()=>{const j=(p==null?void 0:p.placeholder)||d,se=(p==null?void 0:p.buttonLabel)||f;let te="icon";return p!=null&&p.buttonType?te=p.buttonType:f&&(te="text"),_e(U({},p||{}),{placeholder:j,buttonLabel:se,buttonType:te})},[p,d,f]),Te=z.useMemo(()=>({configModule:W,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:s,disclaimerText:a,disclaimerMarkdown:u,clientContext:c,themeVariables:ne,logger:F,searchConfig:le,enableMinimize:!!(g!=null&&g.enableMinimize),resetConversationMessage:T,conversationHistory:{sinceHours:typeof(b==null?void 0:b.sinceHours)=="number"?b.sinceHours:1,limit:b==null?void 0:b.limit},features:N}),[W,e,t,r,n,c,a,u,s,le,g,T,F,ne,b,N]);return w.jsx(Sg.Provider,{value:Te,children:L})},ht=()=>{const e=z.useContext(Sg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class bA{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 xA(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 bA,ns=()=>ot.connected,oa=()=>ot.isOpen,_A=e=>{window.addEventListener(Yd,e)},SA=e=>{window.removeEventListener(Yd,e)},xA=(e,t)=>{const n=new CustomEvent(Yd,{detail:{property:e,value:t}});window.dispatchEvent(n)},wA=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},yi=e=>{const t=ot.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;ot.statusProxy.isOpen=n,n&&(ot.statusProxy.isMinimized=!1)},nl=e=>{const t=ot.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;ot.statusProxy.isMinimized=n,n&&(ot.statusProxy.isOpen=!1)},df=e=>{ot.modalProxy.isFullscreen=e},rl=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"},ff=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},CA=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=ht(),s=z.useCallback(L=>{n({type:dt.SET_COPILOT,payload:L})},[n]),a=z.useCallback(L=>{wA(L),n({type:dt.SET_CONNECTED,payload:L})},[n]),u=z.useCallback(L=>{n({type:dt.SET_ENTRY_TYPE,payload:L})},[n]),c=z.useCallback(()=>{n({type:dt.RESET_COPILOT,payload:{}})},[n]),d=z.useCallback(()=>{n({type:dt.RESET_STATE,payload:{}})},[n]),f=z.useCallback(L=>{r==null||r.log(`${L.name} event received`,L),n({type:dt.ADD_MESSAGE,payload:L}),L.bypassHandlers||e==null||e(L)},[e,r,n]),p=z.useCallback(L=>{n({type:dt.ADD_LOADING_MESSAGE,payload:L})},[n]),g=z.useCallback(L=>{n({type:dt.REMOVE_LOADING_MESSAGE,payload:L})},[n]),b=z.useCallback(L=>{f(L),p(L.id)},[f,p]),T=z.useCallback(L=>{n({type:dt.SET_ACTIVE_CONVERSATION_ID,payload:L})},[n]),_=z.useCallback(L=>{n({type:dt.ADD_CONVERSATION_ID,payload:L})},[n]),S=z.useCallback(L=>{n({type:dt.SET_CONVERSATION_IDS,payload:L})},[n]),v=z.useCallback(L=>{n({type:dt.SET_IMAGE_FILE,payload:L})},[n]),A=z.useCallback(L=>{n({type:dt.SET_ASK_CIM_PROMPTS,payload:L})},[n]),R=z.useCallback(L=>{n({type:dt.SET_CONVERSATION_HISTORY_LOADED,payload:L})},[n]),N=z.useMemo(()=>({setCopilot:s,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:g,handleCopilotRequestAck:b,setActiveConversationId:T,addConversationId:_,setConversationIds:S,setImageFile:v,setAskCimPrompts:A,setConversationHistoryLoaded:R}),[s,a,u,c,d,f,p,g,b,T,_,S,v,A,R]);return w.jsx(z0.Provider,{value:N,children:t})};vw();const AA=(e,t)=>{const{type:n,payload:r}=t;if(n===dt.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 dt.RESET_STATE:e.messages=gi.messages,e.groupedMessages=gi.groupedMessages,e.loadingMessages=gi.loadingMessages,e.imageFile=gi.imageFile,e.askCimPrompts=gi.askCimPrompts,e.conversationHistoryLoaded=gi.conversationHistoryLoaded;break;case dt.RESET_COPILOT:e.copilot=null;break;case dt.SET_COPILOT:e.copilot=r;break;case dt.SET_CONNECTED:e.connected=r;break;case dt.SET_ENTRY_TYPE:e.entryType=r;break;case dt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case dt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case dt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case dt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case dt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case dt.SET_IMAGE_FILE:e.imageFile=r;break;case dt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case dt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},vA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?_e(U({},gi),{entryType:e}):gi,[s,a]=B0(AA,r);return w.jsx(H0.Provider,{value:s,children:w.jsx(CA,{onCopilotEvent:t,dispatch:a,children:n})})};function kA(){var e=z.useRef(!0);return e.current?(e.current=!1,!0):e.current}var il=function(e){z.useEffect(e,[])},NA=function(e,t){return e===t};function OA(e,t){t===void 0&&(t=NA);var n=z.useRef(),r=z.useRef(e),s=kA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class PA{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(un.size).fill(1).forEach(()=>{const r=un.first();r&&(t(r),un.remove())})})}get size(){return this.items.length}}const un=new PA,xg=e=>{window.addEventListener(qd,e)},wg=e=>{window.removeEventListener(qd,e)},IA=(e,t,n)=>{const r=new CustomEvent(qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Cg=e=>{window.addEventListener(Vd,e)},Ag=e=>{window.removeEventListener(Vd,e)},RA=(e,t,n)=>{const r=new CustomEvent(Vd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},vg=e=>{window.addEventListener($d,e)},kg=e=>{window.removeEventListener($d,e)},Ng=(e,t,n)=>{const r=new CustomEvent($d,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},LA=e=>{window.addEventListener(Gd,e)},DA=e=>{window.removeEventListener(Gd,e)},sl=(e,t,n)=>{const r=new CustomEvent(Gd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class MA{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 RA(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 MA,Og=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Pg=(e,t,n)=>{var u,c;const r=U({},((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},FA=e=>{if(!ns()||!oa()){ns()&&un.clear(),un.add({context:"browse",payload:_e(U({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Mg=e=>{Og(e,at)},BA=(e,t)=>{Pg(e,t,at)},Fg=e=>{Ig(e,at)},UA=({field:e,value:t})=>{Rg({field:e,value:t},at)},HA=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=ns(),n=oa();if(!t||!n){t&&un.clear(),un.add({context:"browse",payload:U({},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},zA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Ug,updateBrowseCategoryId:FA,updateCatalogSegment:HA,updateFacetFilter:BA,updateFacetFilters:Mg,updatePricebooks:Bg,updateRangeFilter:UA,updateRangeFilters:Fg},Symbol.toStringTag,{value:"Module"}));class jA{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 fr=new jA,Hg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=ns(),n=oa();if(!t||!n){t&&un.clear(),un.add({context:"pdp",payload:U({},e)});return}fr.updateProxy(e),Ng("pdp-context",e)},$A=e=>{fr.proxy.productId=e,ns()||un.add({context:"pdp",payload:U({},fr.state)})},VA=e=>{fr.proxy.pdpLink=e},gt={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 qA{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(U({},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 Ht=new qA,YA=e=>{window.addEventListener(Wd,e)},WA=e=>{window.removeEventListener(Wd,e)},ua=(e,t)=>{const n=new CustomEvent(Wd,{detail:{property:e,value:t}});window.dispatchEvent(n)},jg=e=>{const t=Ht.isOpen,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isOpen=n},$g=e=>{const t=Ht.isInline,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isInline=n},GA=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ua("params",e),Ht.promptsStateProxy.entryType="ask_cim"},XA=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ua("params",e),Ht.promptsStateProxy.entryType="search"},KA=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ua("params",e),Ht.promptsStateProxy.entryType="browse"},QA=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ua("params",e),Ht.promptsStateProxy.entryType="pdp"},JA=({elementId:e,entryType:t,params:n,isInline:r})=>{Ht.promptsStateProxy.elementId=e,t&&(Ht.promptsStateProxy.entryType=t),typeof r=="boolean"&&$g(r),n&&Ht.updatePromptsParamsProxy(n),Ht.isOpen||jg(!0)},ZA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{sl("getConversationMessages",{payload:e,callback:t},Ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{sl("getSessionInformation",{callback:e},Ei.GET_SESSION_INFORMATION)},loadConversation:e=>{sl("loadConversation",e,Ei.LOAD_CONVERSATION)},resetConversation:()=>{sl("resetConversation",!0,Ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class ev{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 IA(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 _t=new ev,tv=e=>{const t=oa(),n=ns();if(!n||!t){n&&un.clear(),un.add({context:"search",payload:_e(U({},_t.state),{query:e})});return}_t.queryProxy.query=e},Vg=e=>{Og(e,_t)},nv=(e,t)=>{Pg(e,t,_t)},qg=e=>{Ig(e,_t)},rv=({field:e,value:t})=>{Rg({field:e,value:t},_t)},iv=e=>{Lg(e,_t)},Yg=e=>{Dg(e,_t)},Wg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=oa(),n=ns();if(!n||!t){n&&un.clear(),un.add({context:"search",payload:U({},e)});return}"facetFilters"in e&&Vg(e.facetFilters||{}),"rangeFilters"in e&&qg(e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Yg(e.pricebooks||[]),_t.queryProxy.query=e.query},sv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Wg,updateCatalogSegment:iv,updateFacetFilter:nv,updateFacetFilters:Vg,updatePricebooks:Yg,updateRangeFilter:rv,updateRangeFilters:qg,updateSearchQuery:tv},Symbol.toStringTag,{value:"Module"})),ov={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},Gg=z.createContext(ov),av=({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 T=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:T,children:e})},uv=()=>{const e=z.useContext(Gg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},lv={searchQuery:_t.query,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},Xg=z.createContext(lv),cv=({children:e})=>{const[t,n]=z.useState(_t.query),[r,s]=z.useState(_t.facetFilters),[a,u]=z.useState(_t.rangeFilters),[c,d]=z.useState(_t.catalogSegment),[f,p]=z.useState(_t.pricebooks);z.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&s(T.value),(T==null?void 0:T.property)==="rangeFilters"&&u(T.value),(T==null?void 0:T.property)==="catalogSegment"&&d(T.value),(T==null?void 0:T.property)==="pricebooks"&&p(T.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})},dv=()=>{const e=z.useContext(Xg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},fv={productId:fr.productId,pdpLink:fr.pdpLink},Kg=z.createContext(fv),hv=({children:e})=>{const[t,n]=z.useState(fr.productId),[r,s]=z.useState(fr.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})},pv=()=>{const e=z.useContext(Kg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},rs=()=>{const e=z.useContext(z0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Xn=()=>{const e=z.useContext(H0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Kn=()=>{const e=z.useContext(t1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},hf=()=>{const{status:e}=Jr(),{entryType:t,messages:n}=Xn(),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}),mv=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:s}=rs(),[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),T=OA(c.type);z.useEffect(()=>{const S=v=>{const{property:A,value:R}=v.detail||{};if(!(!A||R===void 0)){if(A==="mode"){u(R);return}if(A==="entryType"){s(R);return}if(A==="isMinimized"){d(N=>_e(U({},N),{isMinimized:R}));return}if(A==="isOpen"){d(N=>_e(U({},N),{isOpen:R}));return}if(A==="type"){d(N=>_e(U({},N),{type:R}));return}if(A==="position"){p(R);return}if(A==="isFullscreen"){b(R);return}}};return _A(S),()=>{SA(S)}},[s]),il(()=>{e&&aa(e)}),il(()=>{const S=n||(t==null?void 0:t.type);S&&rl(S),t&&"isOpen"in t&&yi(!!t.isOpen),t&&"isMinimized"in t&&nl(!!t.isMinimized)}),il(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:S}=t.options;S&&ff(S),"isModalFullscreen"in t.options&&df(!!t.options.isModalFullscreen)});const _=z.useMemo(()=>({mode:a,status:c,previousComponentType:T||"dialog",dialogPosition:f,isModalFullscreen:g}),[a,c,T,f,g]);return w.jsx(Qg.Provider,{value:_,children:r})},Jr=()=>{const e=z.useContext(Qg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Jg=z.createContext(null),Zg=z.createContext(null),e1=()=>{const e=z.useContext(Zg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e},Ti=()=>{const e=z.useContext(Jg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e},gv=({copilot:e})=>{const{logger:t,conversationHistory:n}=ht(),{isInline:r}=Ti(),{addCopilotEvent:s,setEntryType:a,setConversationHistoryLoaded:u}=rs(),{activeConversationId:c}=Xn(),d=z.useCallback(p=>{e&&e.requestSessionInformation(g=>{t==null||t.log("Retrieved session information: ",g),p==null||p(g)})},[e,t]),f=z.useCallback((p,g)=>{e&&p.conversationId&&e.getConversationEvents(p,b=>{t==null||t.log("Retrieved conversation messages: ",b),g==null||g(b)})},[e,t]);return z.useEffect(()=>{if(r||!c)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){u(!0);return}const p=3600*1e3*n.sinceHours,g=new Date(Date.now()-p).toISOString(),b={conversationId:c,since:g,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(b.limit=n.limit),f(b,T=>{const _=[];[...T.reverse()||[]].forEach(v=>{var R;const A=T.find(N=>N.id===v.eventSourceId);(R=A==null?void 0:A.name)!=null&&R.endsWith("_suggestions")||(v.bypassHandlers=!0,_.unshift(v))}),_.forEach(v=>{s(v)}),u(!0)})},[t,r,c,f,s,a,u,n]),{getSessionInformation:d,getConversationMessages:f}},t1=z.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Ev=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d,clientContext:f}=ht(),Ni=dv(),{searchQuery:p}=Ni,g=on(Ni,["searchQuery"]),oi=uv(),{categoryId:b}=oi,T=on(oi,["categoryId"]),{productId:_,pdpLink:S}=pv(),{setCopilot:v,setConnected:A,resetCopilot:R,resetCopilotState:N,addCopilotEvent:L,removeLoadingMessage:W,handleCopilotRequestAck:F,setActiveConversationId:ne,setConversationIds:le,setAskCimPrompts:Te}=rs(),{connected:j,entryType:se,copilot:te,messages:pe,groupedMessages:ce,loadingMessages:ye,askCimPrompts:De}=Xn(),{status:de}=Jr(),{isInline:K}=Ti(),{getConversationMessages:re,getSessionInformation:C}=gv({copilot:te}),M=z.useMemo(()=>ye.size>0,[ye]),Z=z.useCallback(ve=>ye.has(ve),[ye]),O=z.useCallback(({query:ve,facetFilters:Fe,rangeFilters:Le,catalogSegment:Qe,pricebooks:ft,userPrompt:ut,imageFile:Tn})=>{if(!te){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const vt={searchParams:{query:ve}};ut&&(vt.userPrompt=ut),Tn&&(vt.attachments={image:Tn}),Fe&&Object.keys(Fe).length>0&&(vt.searchParams.facetFilters=Fe),Le&&Le.length>0&&(vt.searchParams.rangeFilters=Le),Qe&&(vt.searchParams.catalogSegment=Qe),ft&&(vt.searchParams.pricebooks=ft),f&&(vt.clientContext=f),aa("search"),te.search(vt,ee=>{const ie=U({},ee);F(ie)})},[d,F,te,f]),be=z.useCallback(({categoryId:ve,categoryName:Fe,facetFilters:Le,rangeFilters:Qe,catalogSegment:ft,pricebooks:ut,userPrompt:Tn,imageFile:vt})=>{if(!te){d==null||d.error("Copilot is not initialized");return}const ee=Le&&Object.keys(Le).length>0;if(ve===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const ie={browseParams:{categoryId:ve||""}};Tn&&(ie.userPrompt=Tn),vt&&(ie.attachments={image:vt}),ee&&(ie.browseParams.facetFilters=Le),Qe&&Qe.length>0&&(ie.browseParams.rangeFilters=Qe),ft&&(ie.browseParams.catalogSegment=ft),Array.isArray(ut)&&ut.length>0&&(ie.browseParams.pricebooks=ut),(f||Fe)&&(ie.clientContext={},f&&(ie.clientContext=U({},f)),Fe&&(ie.clientContext.cimLabel=Fe)),aa("browse"),te.browse(ie,Ie=>{var tr;const Ve=U({},Ie),Xe=((tr=Ve.request)==null?void 0:tr.clientContext)||{},Tt=(Xe==null?void 0:Xe.cimLabel)||Fe;Tt&&Ve.request&&(Ve.request.label=Tt),F(Ve)})},[d,F,te,f]),Pe=z.useCallback(({productId:ve,productName:Fe,pdpLink:Le,userPrompt:Qe,imageFile:ft})=>{if(!te){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const ut={productId:ve};Qe&&(ut.userPrompt=Qe),Le&&(ut.pdpLink=Le),ft&&(ut.attachments={image:ft}),(f||Fe)&&(ut.clientContext={},f&&(ut.clientContext=U({},f)),Fe&&(ut.clientContext.cimLabel=Fe)),aa("pdp"),te.productView(ut,Tn=>{var Ie;const vt=U({},Tn),ee=((Ie=vt.request)==null?void 0:Ie.clientContext)||{},ie=(ee==null?void 0:ee.cimLabel)||Fe;ie&&vt.request&&(vt.request.label=ie),F(vt)})},[d,te,F,f]),Ce=z.useCallback(({userPrompt:ve,imageFile:Fe})=>{if(!te){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const Le={userPrompt:ve};Fe&&(Le.attachments={image:Fe}),f&&(Le.clientContext=f),te.askCim(Le,Qe=>{const ft=U({},Qe);F(ft)})},[d,te,F,f]),$e=z.useCallback(ve=>{L(ve),a==null||a(ve)},[L,a]),we=z.useCallback(ve=>{L(ve),u==null||u(ve)},[L,u]),Ge=z.useCallback(ve=>{s==null||s(ve),A(!0)},[s,A]);z.useEffect(()=>{!te||!j||!de.isOpen||un.size>0&&un.processQueue(ve=>{if(ve.context==="search"){const Fe=U({},ve.payload);Wg(Fe)}if(ve.context==="browse"){const Fe=U({},ve.payload);Ug(Fe)}if(ve.context==="pdp"){const Fe=U({},ve.payload);Hg(Fe)}})},[de.isOpen,te,j]);const mt=z.useCallback(ve=>{const Fe=Le=>{const Qe=_e(U({},Le),{id:Le.inquiryLinkId||Le.id});L(Qe)};ve.on("connect_ack",Ge),ve.on("partial_inquiry",Fe),ve.on("display_products",L),ve.on("progress",L),ve.on("refined_search",$e),ve.on("refined_browse",we),ve.on("done",Le=>{W(Le.eventSourceId)}),ve.on("error",Le=>{L(Le),W(Le.eventSourceId)}),ve.onDisconnect(Le=>{const Qe=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Le),!Qe.includes(Le)){A(!1);return}d==null||d.log("De-registering event listeners");const ft=new Date().toISOString();L({name:"error",message:"Connection was lost. Please try again.",createdAt:ft,id:`error-${ft}`,sessionId:"session"}),ve.off()})},[d,A,W,$e,we,L,Ge]);z.useEffect(()=>{if(!te)return;const ve=Fe=>{if(!K){if(!Fe.message&&Fe.eventSourceId&&Fe.eventSourceId===De.requestId){Te({requestId:Fe.eventSourceId,message:Fe});return}L(Fe)}};return te.on("follow_up",ve),()=>{te.off("follow_up",ve)}},[te,pe,De.requestId,K,L,Te]),z.useEffect(()=>{if(!te)return;const ve=Fe=>{if(K)return;const Le=_e(U({},Fe),{id:Fe.inquiryLinkId||Fe.id});L(Le)};return te.on("inquiry",ve),()=>{te.off("inquiry",ve)}},[te,K,L]),il(()=>{let ve;n?ve=n:ve=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Fe={baseUrl:ve};e?Fe.apiKey=e:t&&(Fe.apiToken=t);const Le=new gw(Fe);return v(Le),mt(Le),Le.connect(),Le.requestSessionInformation(Qe=>{d==null||d.log("Session Information: ",Qe);const{activeConversationId:ft,conversationIds:ut}=Qe.data||{};ft&&ne(ft),ut!=null&&ut.length&&le(ut)}),()=>{Le.disconnect(),Le.off(),R()}});const tn=z.useCallback(ve=>{if(!te)return;const Fe={eventId:ve,reason:"User cancelled the request"};te.cancelRequest(Fe,Le=>{L(Le),W(ve)})},[L,W,te]),zr=z.useCallback(()=>{te&&te.conversationReset({},ve=>{N(),L(ve),te.requestSessionInformation(Fe=>{d==null||d.log("Session Information: ",Fe);const{activeConversationId:Le,conversationIds:Qe}=Fe.data||{};Le&&ne(Le),Qe!=null&&Qe.length&&le(Qe)})})},[te,d,L,N,ne,le]),Tr=z.useCallback((ve,Fe)=>{if(!ve)return;const Le={userPrompt:ve};switch(Fe&&(Le.imageFile=Fe),se){case"ask_cim":Ce(Le);return;case"search":p?O(U(U({query:p},g),Le)):Ce(Le);return;case"browse":be(U(U({categoryId:b},T),Le));return;case"pdp":_?Pe(U({productId:_,pdpLink:S||""},Le)):Ce(Le);return}},[se,p,g,O,Ce,b,T,be,Pe,_,S]),Nn=z.useCallback((ve,Fe)=>{var Tn,vt,ee;const Qe=ve.params.userPrompt||"";if(!Qe)return;const ft=pe.find(ie=>ie.id===Fe);if(!ft)return;const ut=ft.name.replace("_suggestions","");if(ut==="ask_cim"){Ce({userPrompt:Qe});return}if(ut==="copilot_search"){const ie=((Tn=ft.request)==null?void 0:Tn.searchParams)||{},Ve=ie.query===p;O(_e(U({query:ie.query||p},Ve?g:{}),{userPrompt:Qe}));return}if(ut==="copilot_browse"){const ie=ft.request,Ie=ie.browseParams||{},Xe=Ie.categoryId===b,Tt=((vt=ie.clientContext)==null?void 0:vt.cimLabel)||"";be(_e(U({categoryId:Ie.categoryId||b||""},Xe?T:{}),{categoryName:Tt,userPrompt:Qe}));return}if(ut==="product_view"){const ie=ft.request||{},Ie=ie.productId,Ve=Ie===_,Xe=((ee=ie.clientContext)==null?void 0:ee.cimLabel)||"";let Tt="";Ve?Tt=S||"":Tt=ie.pdpLink||"",Pe({productId:Ie||_,pdpLink:Tt,productName:Xe,userPrompt:Qe})}},[pe,p,g,O,Ce,b,T,be,Pe,_,S]),Es=z.useMemo(()=>({copilot:te,messages:pe,groupedMessages:ce,isLoading:M,isResponseLoading:Z,handleAskCim:Ce,handleSearch:O,handleBrowse:be,handlePdp:Pe,handleUserInput:Tr,handleSuggestion:Nn,handleCancel:tn,resetConversation:zr,getSessionInformation:C,getConversationMessages:re}),[te,pe,ce,M,Z,Ce,O,be,Pe,Tr,Nn,tn,zr,C,re]);return w.jsx(t1.Provider,{value:Es,children:c})},n1=()=>{const{copilot:e}=Xn(),{addCopilotEvent:t}=rs();return{getCopilotSuggestions:z.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},yv=()=>{const{copilot:e,entryType:t,activeConversationId:n,askCimPrompts:r,conversationHistoryLoaded:s}=Xn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=rs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:g,getSessionInformation:b,getConversationMessages:T}=Kn(),{getCopilotSuggestions:_}=n1();z.useEffect(()=>{!e||!t||!n||!s||r.requestId||t==="ask_cim"&&_({},t,R=>{c({requestId:R.id,message:null})})},[e,n,r.requestId,t,s,_,c]);const S=z.useCallback(({query:R})=>{if(!e||!R)return;const{facetFilters:N}=_t.facetFiltersProxy,{rangeFilters:L}=_t.rangeFiltersProxy,{catalogSegment:W}=_t.catalogSegmentProxy,{pricebooks:F}=_t.pricebooksProxy,ne={query:R};ne.facetFilters=N||{},ne.rangeFilters=L||[],ne.catalogSegment=W||"",ne.pricebooks=F||[],d(U({},ne))},[e,d]),v=z.useCallback(({categoryId:R})=>{if(!e)return;const N=at.categoryIdProxy.categoryName,{facetFilters:L}=at.facetFiltersProxy,{rangeFilters:W}=at.rangeFiltersProxy,{catalogSegment:F}=at.catalogSegmentProxy,{pricebooks:ne}=at.pricebooksProxy,le={categoryId:R};le.categoryName=N||"",le.facetFilters=L||{},le.rangeFilters=W||[],le.catalogSegment=F||"",le.pricebooks=ne||[],f(U({},le))},[e,f]),A=z.useCallback(({productId:R})=>{if(!e||!R)return;const N={productId:R,pdpLink:fr.pdpLink,productName:fr.proxy.productName||""};p(N)},[e,p]);return z.useEffect(()=>{const R=({detail:N})=>{(N==null?void 0:N.property)==="query"&&S({query:N.value})};return xg(R),()=>{wg(R)}},[S]),z.useEffect(()=>{const R=({detail:N})=>{if((N==null?void 0:N.property)==="pdp-context"){const L=N.value;A({productId:L.productId});return}(N==null?void 0:N.property)==="productId"&&A({productId:N.value})};return vg(R),()=>{kg(R)}},[A]),z.useEffect(()=>{const R=({detail:N})=>{(N==null?void 0:N.property)==="categoryId"&&v({categoryId:N.value})};return Cg(R),()=>{Ag(R)}},[v]),z.useEffect(()=>{const R=({detail:N})=>{if((N==null?void 0:N.event)==Ei.RESET_CONVERSATION&&g(),(N==null?void 0:N.event)==Ei.GET_SESSION_INFORMATION){const L=N.value.callback;b(L)}if((N==null?void 0:N.event)==Ei.GET_CONVERSATION_MESSAGES){const{payload:L,callback:W}=N.value;if(!L.conversationId||typeof W!="function")return;T(L,W)}if((N==null?void 0:N.event)==Ei.LOAD_CONVERSATION){const L=N.value;if(!L.conversationId)return;T(L,F=>{a(),F.forEach(ne=>{u(ne)})})}};return LA(R),()=>{DA(R)}},[g,b,T,a,u]),null},Tv=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>w.jsxs(Ev,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:[w.jsx(yv,{}),c]}),bv=({children:e,dispatch:t})=>{const n=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=z.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),T=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(Zg.Provider,{value:T,children:e})},_v=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Sv=({promptsConfig:e,children:t})=>{const[n,r]=B0(_v,U(U({},zg),e||{}));return w.jsx(Jg.Provider,{value:n,children:w.jsx(bv,{dispatch:r,children:t})})},r1=({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:T,disclaimerMarkdown:_,clientContext:S,searchPlaceholder:v,searchButtonLabel:A,searchConfig:R,promptsConfig:N,resetConversationMessage:L,conversationHistory:W,onConnect:F,onCopilotEvent:ne,onRefinedSearch:le,onRefinedBrowse:Te,__features:j,children:se})=>w.jsx(TA,{baseUrl:n,apiKey:e,apiToken:t,logoUrl:r,headerText:s,entryMessage:b,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:v,searchButtonLabel:A,searchConfig:R,componentConfig:p,clientContext:S,disclaimerMarkdown:_,disclaimerText:T,resetConversationMessage:L,conversationHistory:W,isDevelopment:d,__features:j,children:w.jsx(vA,{entryType:g,onCopilotEvent:ne,children:w.jsx(hv,{children:w.jsx(av,{children:w.jsx(cv,{children:w.jsx(mv,{entryType:g,componentConfig:p,componentType:f,children:w.jsx(Sv,{promptsConfig:N,children:w.jsx(Tv,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:g,onConnect:F,onRefinedSearch:le,onRefinedBrowse:Te,onCopilotEvent:ne,children:se})})})})})})})});function i1(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=i1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function X(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=i1(e))&&(r&&(r+=" "),r+=t);return r}var s1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o1=Ki.createContext&&Ki.createContext(s1),xv=["attr","size","title"];function wv(e,t){if(e==null)return{};var n=Cv(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 Cv(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 ol(){return ol=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},ol.apply(this,arguments)}function a1(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 al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a1(Object(n),!0).forEach(function(r){Av(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Av(e,t,n){return t=vv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vv(e){var t=kv(e,"string");return typeof t=="symbol"?t:t+""}function kv(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 u1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,al({key:n},t.attr),u1(t.child)))}function Vt(e){return t=>Ki.createElement(Nv,ol({attr:al({},e.attr)},t),u1(e.child))}function Nv(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=wv(e,xv),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",ol({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:al(al({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return o1!==void 0?Ki.createElement(o1.Consumer,null,n=>t(n)):t(s1)}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:"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 c1(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 $s(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 Ov(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 d1(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 Pv(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 Iv(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 Rv(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 Lv(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 Dv(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 pf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,className:X(e,`${$}-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"})})}),ul=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:X(`${$}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Or=({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:X(e,`${$}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:X(`${$}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Mv=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:X(`${$}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx($s,{size:"16px"})},Fv=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(Or,{className:X(e,n,r,`${$}-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($s,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(ul,{className:X(e,n,r,`${$}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(Mv,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Bv(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 Uv=()=>{const{messages:e}=Xn(),{handleCancel:t}=Kn();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])}},Hv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=ht(),{cancelRequest:r}=Uv();return n!=null&&n.enableCancelSearch?w.jsx(Or,{className:X(t,`${$}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Bv,{}),disabled:!e,onClick:r}):null};function vB(){}function kB(){}function f1(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 h1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$v={};function p1(e,t){return($v.jsx?jv:zv).test(e)}const Vv=/[ \t\n\f\r]/g;function qv(e){return typeof e=="object"?e.type==="text"?m1(e.value):!1:m1(e)}function m1(e){return e.replace(Vv,"")===""}let la=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};la.prototype.normal={},la.prototype.property={},la.prototype.space=void 0;function g1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new la(n,r,t)}function ca(e){return e.toLowerCase()}let wn=class{constructor(t,n){this.attribute=n,this.property=t}};wn.prototype.attribute="",wn.prototype.booleanish=!1,wn.prototype.boolean=!1,wn.prototype.commaOrSpaceSeparated=!1,wn.prototype.commaSeparated=!1,wn.prototype.defined=!1,wn.prototype.mustUseProperty=!1,wn.prototype.number=!1,wn.prototype.overloadedBoolean=!1,wn.prototype.property="",wn.prototype.spaceSeparated=!1,wn.prototype.space=void 0;let Yv=0;const We=is(),zt=is(),mf=is(),me=is(),Et=is(),Vs=is(),Mn=is();function is(){return hd(2,++Yv)}const gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:zt,commaOrSpaceSeparated:Mn,commaSeparated:Vs,number:me,overloadedBoolean:mf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Ef=Object.keys(gf);let yf=class extends wn{constructor(t,n,r,s){let a=-1;if(super(t,n),E1(this,"space",s),typeof r=="number")for(;++a<Ef.length;){const u=Ef[a];E1(this,Ef[a],(r&gf[u])===gf[u])}}};yf.prototype.defined=!0;function E1(e,t,n){n&&(e[t]=n)}function qs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new yf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ca(r)]=r,n[ca(a.attribute)]=r}return new la(t,n,e.space)}const y1=qs({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:me,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:zt,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 T1(e,t){return t in e?e[t]:t}function b1(e,t){return T1(e,t.toLowerCase())}const Wv=qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vs,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:Et,autoFocus:We,autoPlay:We,blocking:Et,capture:null,charSet:null,checked:We,cite:null,className:Et,cols:me,colSpan:null,content:null,contentEditable:zt,controls:We,controlsList:Et,coords:me|Vs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:mf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:Et,height:me,hidden:mf,high:me,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:Et,itemRef:Et,itemScope:We,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:me,pattern:null,ping:Et,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:Et,required:We,reversed:We,rows:me,rowSpan:me,sandbox:Et,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:zt,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:We,useMap:null,value:zt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:zt,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:We,disableRemotePlayback:We,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:b1}),Gv=qs({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:Mn,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:Et,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:We,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:Vs,g2:Vs,glyphName:Vs,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:Mn,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:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,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: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:Mn,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:Mn,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:Mn,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:T1}),_1=qs({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()}}),S1=qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:b1}),x1=qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xv={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"},Kv=/[A-Z]/g,w1=/-[a-z]/g,Qv=/^data[-\w.:]+$/i;function Tf(e,t){const n=ca(t);let r=t,s=wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Qv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(w1,Zv);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!w1.test(a)){let u=a.replace(Kv,Jv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=yf}return new s(r,t)}function Jv(e){return"-"+e.toLowerCase()}function Zv(e){return e.charAt(1).toUpperCase()}const ll=g1([y1,Wv,_1,S1,x1],"html"),Ys=g1([y1,Gv,_1,S1,x1],"svg");function C1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function A1(e){return e.join(" ").trim()}var Ws={},bf,v1;function ek(){if(v1)return bf;v1=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",T="declaration";bf=function(S,v){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];v=v||{};var A=1,R=1;function N(pe){var ce=pe.match(t);ce&&(A+=ce.length);var ye=pe.lastIndexOf(d);R=~ye?pe.length-ye:R+pe.length}function L(){var pe={line:A,column:R};return function(ce){return ce.position=new W(pe),le(),ce}}function W(pe){this.start=pe,this.end={line:A,column:R},this.source=v.source}W.prototype.content=S;function F(pe){var ce=new Error(v.source+":"+A+":"+R+": "+pe);if(ce.reason=pe,ce.filename=v.source,ce.line=A,ce.column=R,ce.source=S,!v.silent)throw ce}function ne(pe){var ce=pe.exec(S);if(ce){var ye=ce[0];return N(ye),S=S.slice(ye.length),ce}}function le(){ne(n)}function Te(pe){var ce;for(pe=pe||[];ce=j();)ce!==!1&&pe.push(ce);return pe}function j(){var pe=L();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var ce=2;g!=S.charAt(ce)&&(p!=S.charAt(ce)||f!=S.charAt(ce+1));)++ce;if(ce+=2,g===S.charAt(ce-1))return F("End of comment missing");var ye=S.slice(2,ce-2);return R+=2,N(ye),S=S.slice(ce),R+=2,pe({type:b,comment:ye})}}function se(){var pe=L(),ce=ne(r);if(ce){if(j(),!ne(s))return F("property missing ':'");var ye=ne(a),De=pe({type:T,property:_(ce[0].replace(e,g)),value:ye?_(ye[0].replace(e,g)):g});return ne(u),De}}function te(){var pe=[];Te(pe);for(var ce;ce=se();)ce!==!1&&(pe.push(ce),Te(pe));return pe}return le(),te()};function _(S){return S?S.replace(c,g):g}return bf}var k1;function tk(){if(k1)return Ws;k1=1;var e=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.default=n;var t=e(ek());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 Ws}var da={},N1;function nk(){if(N1)return da;N1=1,Object.defineProperty(da,"__esModule",{value:!0}),da.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 da.camelCase=d,da}var fa,O1;function rk(){if(O1)return fa;O1=1;var e=fa&&fa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(tk()),n=nk();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,fa=r,fa}var ik=rk();const sk=Je(ik),cl=P1("end"),Pr=P1("start");function P1(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 I1(e){const t=Pr(e),n=cl(e);if(t&&n)return{start:t,end:n}}function ha(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?R1(e.position):"start"in e||"end"in e?R1(e):"line"in e||"column"in e?_f(e):""}function _f(e){return L1(e&&e.line)+":"+L1(e&&e.column)}function R1(e){return _f(e&&e.start)+"-"+_f(e&&e.end)}function L1(e){return e&&typeof e=="number"?e:1}class ln 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=U({},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=ha(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}}ln.prototype.file="",ln.prototype.name="",ln.prototype.reason="",ln.prototype.message="",ln.prototype.stack="",ln.prototype.column=void 0,ln.prototype.line=void 0,ln.prototype.ancestors=void 0,ln.prototype.cause=void 0,ln.prototype.fatal=void 0,ln.prototype.place=void 0,ln.prototype.ruleId=void 0,ln.prototype.source=void 0;const Sf={}.hasOwnProperty,ok=new Map,ak=/[A-Z]/g,uk=new Set(["table","tbody","thead","tfoot","tr"]),lk=new Set(["td","th"]),D1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ck(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=yk(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=Ek(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"?Ys:ll,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=M1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function M1(e,t,n){if(t.type==="element")return dk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pk(e,t,n);if(t.type==="mdxjsEsm")return hk(e,t);if(t.type==="root")return mk(e,t,n);if(t.type==="text")return gk(e,t)}function dk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Ys,e.schema=s),e.ancestors.push(t);const a=B1(e,t.tagName,!1),u=Tk(e,t);let c=wf(e,t);return uk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!qv(d):!0})),F1(e,u,a,t),xf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function fk(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)}pa(e,t.position)}function hk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pa(e,t.position)}function pk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Ys,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:B1(e,t.name,!0),u=bk(e,t),c=wf(e,t);return F1(e,u,a,t),xf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function mk(e,t,n){const r={};return xf(r,wf(e,t)),e.create(t,e.Fragment,r,n)}function gk(e,t){return t.value}function F1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ek(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 yk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Pr(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 Tk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Sf.call(t.properties,s)){const a=_k(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&lk.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 bk(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 pa(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 pa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function wf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:ok;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=M1(e,a,u);c!==void 0&&n.push(c)}return n}function _k(e,t,n){const r=Tf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?h1(n):A1(n)),r.property==="style"){let s=typeof n=="object"?n:Sk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=xk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Xv[r.property]||r.property:r.attribute,n]}}function Sk(e,t){try{return sk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new ln("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=D1+"#cannot-parse-style-attribute",s}}function B1(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=p1(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=p1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Sf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);pa(e)}function pa(e,t){const n=new ln("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=D1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xk(e){const t={};let n;for(n in e)Sf.call(e,n)&&(t[wk(n)]=e[n]);return t}function wk(e){let t=e.replace(ak,Ck);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ck(e){return"-"+e.toLowerCase()}const Cf={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"]},Ak={};function Af(e,t){const n=Ak,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return U1(e,r,s)}function U1(e,t,n){if(vk(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 H1(e.children,t,n)}return Array.isArray(e)?H1(e,t,n):""}function H1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=U1(e[s],t,n);return r.join("")}function vk(e){return!!(e&&typeof e=="object")}const z1=document.createElement("i");function vf(e){const t="&"+e+";";z1.innerHTML=t;const n=z1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Fn(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 Qn(e,t){return e.length>0?(Fn(e,e.length,0,t),e):t}const j1={}.hasOwnProperty;function $1(e){const t={};let n=-1;for(;++n<e.length;)kk(t,e[n]);return t}function kk(e,t){let n;for(n in t){const s=(j1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){j1.call(s,u)||(s[u]=[]);const c=a[u];Nk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function Nk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fn(e,0,0,r)}function V1(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 hr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yn=bi(/[A-Za-z]/),cn=bi(/[\dA-Za-z]/),Ok=bi(/[#-'*+\--9=?A-Z^-~]/);function dl(e){return e!==null&&(e<32||e===127)}const kf=bi(/\d/),Pk=bi(/[\dA-Fa-f]/),Ik=bi(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function pt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const fl=bi(new RegExp("\\p{P}|\\p{S}","u")),ss=bi(/\s/);function bi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&cn(e.charCodeAt(n+1))&&cn(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 nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Rk={tokenize:Lk};function Lk(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"),nt(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 Ue(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Dk={tokenize:Mk},q1={tokenize:Fk};function Mk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(N){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,d,f)(N)}return f(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const L=t.events.length;let W=L,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}A(r);let ne=L;for(;ne<t.events.length;)t.events[ne][1].end=U({},F),ne++;return Fn(t.events,W+1,0,t.events.slice(L)),t.events.length=ne,f(N)}return c(N)}function f(N){if(r===n.length){if(!s)return b(N);if(s.currentConstruct&&s.currentConstruct.concrete)return _(N);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(q1,p,g)(N)}function p(N){return s&&R(),A(r),b(N)}function g(N){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(N)}function b(N){return t.containerState={},e.attempt(q1,T,_)(N)}function T(N){return r++,n.push([t.currentConstruct,t.containerState]),b(N)}function _(N){if(N===null){s&&R(),A(0),e.consume(N);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(N)}function S(N){if(N===null){v(e.exit("chunkFlow"),!0),A(0),e.consume(N);return}return Ue(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),S)}function v(N,L){const W=t.sliceStream(N);if(L&&W.push(null),N.previous=a,a&&(a.next=N),a=N,s.defineSkip(N.start),s.write(W),t.parser.lazy[N.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 ne=t.events.length;let le=ne,Te,j;for(;le--;)if(t.events[le][0]==="exit"&&t.events[le][1].type==="chunkFlow"){if(Te){j=t.events[le][1].end;break}Te=!0}for(A(r),F=ne;F<t.events.length;)t.events[F][1].end=U({},j),F++;Fn(t.events,le+1,0,t.events.slice(ne)),t.events.length=F}}function A(N){let L=n.length;for(;L-- >N;){const W=n[L];t.containerState=W[1],W[0].exit.call(t,e)}n.length=N}function R(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Fk(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xs(e){if(e===null||pt(e)||ss(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 Nf={name:"attention",resolveAll:Bk,tokenize:Uk};function Bk(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=U({},e[r][1].end),b=U({},e[n][1].start);Y1(g,-d),Y1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:U({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},c.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Qn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Qn(f,hl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Qn(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=Qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Fn(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 Uk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Xs(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=Xs(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 Y1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Hk={name:"autolink",tokenize:zk};function zk(e,t,n){let r=0;return s;function s(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(T){return yn(T)?(e.consume(T),u):T===64?n(T):f(T)}function u(T){return T===43||T===45||T===46||cn(T)?(r=1,c(T)):f(T)}function c(T){return T===58?(e.consume(T),r=0,d):(T===43||T===45||T===46||cn(T))&&r++<32?(e.consume(T),c):(r=0,f(T))}function d(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||dl(T)?n(T):(e.consume(T),d)}function f(T){return T===64?(e.consume(T),p):Ok(T)?(e.consume(T),f):n(T)}function p(T){return cn(T)?g(T):n(T)}function g(T){return T===46?(e.consume(T),r=0,p):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):b(T)}function b(T){if((T===45||cn(T))&&r++<63){const _=T===45?b:g;return e.consume(T),_}return n(T)}}const ma={partial:!0,tokenize:jk};function jk(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ue(a)?t(a):n(a)}}const W1={continuation:{tokenize:Vk},exit:qk,name:"blockQuote",tokenize:$k};function $k(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 Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Vk(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(W1,t,n)(u)}}function qk(e){e.exit("blockQuote")}const G1={name:"characterEscape",tokenize:Yk};function Yk(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 Ik(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const X1={name:"characterReference",tokenize:Wk};function Wk(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=cn,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=Pk,p):(e.enter("characterReferenceValue"),a=7,u=kf,p(g))}function p(g){if(g===59&&s){const b=e.exit("characterReferenceValue");return u===cn&&!vf(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 K1={partial:!0,tokenize:Xk},Q1={concrete:!0,name:"codeFenced",tokenize:Gk};function Gk(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return f(F)}function f(F){const ne=r.events[r.events.length-1];return a=ne&&ne[1].type==="linePrefix"?ne[2].sliceSerialize(ne[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"),Ze(F)?nt(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Ue(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(K1,S,L)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||Ue(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ze(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,T,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function T(F){return F===null||Ue(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||Ue(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,L,v)(F)}function v(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),A}function A(F){return a>0&&Ze(F)?nt(e,R,"linePrefix",a+1)(F):R(F)}function R(F){return F===null||Ue(F)?e.check(K1,S,L)(F):(e.enter("codeFlowValue"),N(F))}function N(F){return F===null||Ue(F)?(e.exit("codeFlowValue"),R(F)):(e.consume(F),N)}function L(F){return e.exit("codeFenced"),t(F)}function W(F,ne,le){let Te=0;return j;function j(ye){return F.enter("lineEnding"),F.consume(ye),F.exit("lineEnding"),se}function se(ye){return F.enter("codeFencedFence"),Ze(ye)?nt(F,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):te(ye)}function te(ye){return ye===c?(F.enter("codeFencedFenceSequence"),pe(ye)):le(ye)}function pe(ye){return ye===c?(Te++,F.consume(ye),pe):Te>=u?(F.exit("codeFencedFenceSequence"),Ze(ye)?nt(F,ce,"whitespace")(ye):ce(ye)):le(ye)}function ce(ye){return ye===null||Ue(ye)?(F.exit("codeFencedFence"),ne(ye)):le(ye)}}}function Xk(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 Of={name:"codeIndented",tokenize:Qk},Kk={partial:!0,tokenize:Jk};function Qk(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(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):Ue(f)?e.attempt(Kk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Ue(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function Jk(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(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):Ue(u)?s(u):n(u)}}const Zk={name:"codeText",previous:tN,resolve:eN,tokenize:nN};function eN(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 tN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nN(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)):Ue(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||Ue(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 rN{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&&ga(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),ga(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ga(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);ga(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ga(this.left,n.reverse())}}}function ga(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 J1(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new rN(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,iN(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=U({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Fn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function iN(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,T=n,_=0,S=0;const v=[S];for(;T;){for(;e.get(++s)[1]!==T;);a.push(s),T._tokenizer||(p=r.sliceStream(T),T.next||p.push(null),g&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=T,T=T.next}for(T=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,v.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):v.pop(),b=v.length;b--;){const A=c.slice(v[b],v[b+1]),R=a.pop();d.push([R,R+A.length-1]),e.splice(R,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 sN={resolve:aN,tokenize:uN},oN={partial:!0,tokenize:lN};function aN(e){return J1(e),e}function uN(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):Ue(c)?e.check(oN,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 lN(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Ue(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 Z1(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"}),T(A))}function T(A){return A===62?(e.exit("chunkString"),e.exit(c),b(A)):A===null||A===60||Ue(A)?n(A):(e.consume(A),A===92?_:T)}function _(A){return A===60||A===62||A===92?(e.consume(A),T):T(A)}function S(A){return!p&&(A===null||A===41||pt(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?v:S)}function v(A){return A===40||A===41||A===92?(e.consume(A),S):S(A)}}function eE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(T){return e.enter(r),e.enter(s),e.consume(T),e.exit(s),e.enter(a),p}function p(T){return c>999||T===null||T===91||T===93&&!d||T===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):Ue(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||T===91||T===93||Ue(T)||c++>999?(e.exit("chunkString"),p(T)):(e.consume(T),d||(d=!Ze(T)),T===92?b:g)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,g):g(T)}}function tE(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):Ue(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Ue(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 Ea(e,t){let n;return r;function r(s){return Ue(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const cN={name:"definition",tokenize:fN},dN={partial:!0,tokenize:hN};function fN(e,t,n){const r=this;let s;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return eE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return s=hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),d):n(T)}function d(T){return pt(T)?Ea(e,f)(T):f(T)}function f(T){return Z1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function p(T){return e.attempt(dN,g,g)(T)}function g(T){return Ze(T)?nt(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Ue(T)?(e.exit("definition"),r.parser.defined.push(s),t(T)):n(T)}}function hN(e,t,n){return r;function r(c){return pt(c)?Ea(e,s)(c):n(c)}function s(c){return tE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Ue(c)?t(c):n(c)}}const pN={name:"hardBreakEscape",tokenize:mN};function mN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const gN={name:"headingAtx",resolve:EN,tokenize:yN};function EN(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"},Fn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function yN(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||pt(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ue(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(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||pt(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const TN=["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"],nE=["pre","script","style","textarea"],bN={concrete:!0,name:"htmlFlow",resolveTo:xN,tokenize:wN},_N={partial:!0,tokenize:AN},SN={partial:!0,tokenize:CN};function xN(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 wN(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:C):yn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function b(O){return O===45?(e.consume(O),s=2,T):O===91?(e.consume(O),s=5,c=0,_):yn(O)?(e.consume(O),s=4,r.interrupt?t:C):n(O)}function T(O){return O===45?(e.consume(O),r.interrupt?t:C):n(O)}function _(O){const be="CDATA[";return O===be.charCodeAt(c++)?(e.consume(O),c===be.length?r.interrupt?t:te:_):n(O)}function S(O){return yn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||pt(O)){const be=O===47,Pe=u.toLowerCase();return!be&&!a&&nE.includes(Pe)?(s=1,r.interrupt?t(O):te(O)):TN.includes(u.toLowerCase())?(s=6,be?(e.consume(O),A):r.interrupt?t(O):te(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?R(O):N(O))}return O===45||cn(O)?(e.consume(O),u+=String.fromCharCode(O),v):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:te):n(O)}function R(O){return Ze(O)?(e.consume(O),R):j(O)}function N(O){return O===47?(e.consume(O),j):O===58||O===95||yn(O)?(e.consume(O),L):Ze(O)?(e.consume(O),N):j(O)}function L(O){return O===45||O===46||O===58||O===95||cn(O)?(e.consume(O),L):W(O)}function W(O){return O===61?(e.consume(O),F):Ze(O)?(e.consume(O),W):N(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,ne):Ze(O)?(e.consume(O),F):le(O)}function ne(O){return O===d?(e.consume(O),d=null,Te):O===null||Ue(O)?n(O):(e.consume(O),ne)}function le(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||pt(O)?W(O):(e.consume(O),le)}function Te(O){return O===47||O===62||Ze(O)?N(O):n(O)}function j(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||Ue(O)?te(O):Ze(O)?(e.consume(O),se):n(O)}function te(O){return O===45&&s===2?(e.consume(O),De):O===60&&s===1?(e.consume(O),de):O===62&&s===4?(e.consume(O),M):O===63&&s===3?(e.consume(O),C):O===93&&s===5?(e.consume(O),re):Ue(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(_N,Z,pe)(O)):O===null||Ue(O)?(e.exit("htmlFlowData"),pe(O)):(e.consume(O),te)}function pe(O){return e.check(SN,ce,Z)(O)}function ce(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ye}function ye(O){return O===null||Ue(O)?pe(O):(e.enter("htmlFlowData"),te(O))}function De(O){return O===45?(e.consume(O),C):te(O)}function de(O){return O===47?(e.consume(O),u="",K):te(O)}function K(O){if(O===62){const be=u.toLowerCase();return nE.includes(be)?(e.consume(O),M):te(O)}return yn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),K):te(O)}function re(O){return O===93?(e.consume(O),C):te(O)}function C(O){return O===62?(e.consume(O),M):O===45&&s===2?(e.consume(O),C):te(O)}function M(O){return O===null||Ue(O)?(e.exit("htmlFlowData"),Z(O)):(e.consume(O),M)}function Z(O){return e.exit("htmlFlow"),t(O)}}function CN(e,t,n){const r=this;return s;function s(u){return Ue(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 AN(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ma,t,n)}}const vN={name:"htmlText",tokenize:kN};function kN(e,t,n){const r=this;let s,a,u;return c;function c(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),W):C===63?(e.consume(C),N):yn(C)?(e.consume(C),le):n(C)}function f(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,_):yn(C)?(e.consume(C),R):n(C)}function p(C){return C===45?(e.consume(C),T):n(C)}function g(C){return C===null?n(C):C===45?(e.consume(C),b):Ue(C)?(u=g,de(C)):(e.consume(C),g)}function b(C){return C===45?(e.consume(C),T):g(C)}function T(C){return C===62?De(C):C===45?b(C):g(C)}function _(C){const M="CDATA[";return C===M.charCodeAt(a++)?(e.consume(C),a===M.length?S:_):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),v):Ue(C)?(u=S,de(C)):(e.consume(C),S)}function v(C){return C===93?(e.consume(C),A):S(C)}function A(C){return C===62?De(C):C===93?(e.consume(C),A):S(C)}function R(C){return C===null||C===62?De(C):Ue(C)?(u=R,de(C)):(e.consume(C),R)}function N(C){return C===null?n(C):C===63?(e.consume(C),L):Ue(C)?(u=N,de(C)):(e.consume(C),N)}function L(C){return C===62?De(C):N(C)}function W(C){return yn(C)?(e.consume(C),F):n(C)}function F(C){return C===45||cn(C)?(e.consume(C),F):ne(C)}function ne(C){return Ue(C)?(u=ne,de(C)):Ze(C)?(e.consume(C),ne):De(C)}function le(C){return C===45||cn(C)?(e.consume(C),le):C===47||C===62||pt(C)?Te(C):n(C)}function Te(C){return C===47?(e.consume(C),De):C===58||C===95||yn(C)?(e.consume(C),j):Ue(C)?(u=Te,de(C)):Ze(C)?(e.consume(C),Te):De(C)}function j(C){return C===45||C===46||C===58||C===95||cn(C)?(e.consume(C),j):se(C)}function se(C){return C===61?(e.consume(C),te):Ue(C)?(u=se,de(C)):Ze(C)?(e.consume(C),se):Te(C)}function te(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,pe):Ue(C)?(u=te,de(C)):Ze(C)?(e.consume(C),te):(e.consume(C),ce)}function pe(C){return C===s?(e.consume(C),s=void 0,ye):C===null?n(C):Ue(C)?(u=pe,de(C)):(e.consume(C),pe)}function ce(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||pt(C)?Te(C):(e.consume(C),ce)}function ye(C){return C===47||C===62||pt(C)?Te(C):n(C)}function De(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function de(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),K}function K(C){return Ze(C)?nt(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):re(C)}function re(C){return e.enter("htmlTextData"),u(C)}}const Pf={name:"labelEnd",resolveAll:IN,resolveTo:RN,tokenize:LN},NN={tokenize:DN},ON={tokenize:MN},PN={tokenize:FN};function IN(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&&Fn(e,0,e.length,n),e}function RN(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:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},f={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},p={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=Qn(c,e.slice(a+1,a+r+3)),c=Qn(c,[["enter",p,t]]),c=Qn(c,hl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Qn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=Qn(c,e.slice(u+1)),c=Qn(c,[["exit",d,t]]),Fn(e,a,e.length,c),e}function LN(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(hr(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(NN,p,u?p:g)(b):b===91?e.attempt(ON,p,u?f:g)(b):u?p(b):g(b)}function f(b){return e.attempt(PN,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function DN(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 pt(g)?Ea(e,a)(g):a(g)}function a(g){return g===41?p(g):Z1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return pt(g)?Ea(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?tE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function f(g){return pt(g)?Ea(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 MN(e,t,n){const r=this;return s;function s(c){return eE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function FN(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 BN={name:"labelStartImage",resolveAll:Pf.resolveAll,tokenize:UN};function UN(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 HN={name:"labelStartLink",resolveAll:Pf.resolveAll,tokenize:zN};function zN(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 If={name:"lineEnding",tokenize:jN};function jN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const pl={name:"thematicBreak",tokenize:$N};function $N(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||Ue(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Cn={continuation:{tokenize:WN},exit:XN,name:"list",tokenize:YN},VN={partial:!0,tokenize:KN},qN={partial:!0,tokenize:GN};function YN(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(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:kf(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(pl,n,f)(T):f(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(T)}return n(T)}function d(T){return kf(T)&&++u<10?(e.consume(T),d):(!r.interrupt||u<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),f(T)):n(T)}function f(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(ma,r.interrupt?n:p,e.attempt(VN,b,g))}function p(T){return r.containerState.initialBlankLine=!0,a++,b(T)}function g(T){return Ze(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function WN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ma,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(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(qN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Cn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function GN(e,t,n){const r=this;return nt(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 XN(e){e.exit(this.containerState.type)}function KN(e,t,n){const r=this;return nt(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!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const rE={name:"setextUnderline",resolveTo:QN,tokenize:JN};function QN(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:U({},e[r][1].start),end:U({},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=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function JN(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"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const ZN={tokenize:eO};function eO(e){const t=this,n=e.attempt(ma,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(sN,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 tO={resolveAll:sE()},nO=iE("string"),rO=iE("text");function iE(e){return{resolveAll:sE(e==="text"?iO: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 T=g[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function sE(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 iO(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:U({},r.end)};r.end=U({},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 sO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:cN},disable:{null:[]},document:{42:Cn,43:Cn,45:Cn,48:Cn,49:Cn,50:Cn,51:Cn,52:Cn,53:Cn,54:Cn,55:Cn,56:Cn,57:Cn,62:W1},flow:{35:gN,42:pl,45:[rE,pl],60:bN,61:rE,95:pl,96:Q1,126:Q1},flowInitial:{[-2]:Of,[-1]:Of,32:Of},insideSpan:{null:[Nf,tO]},string:{38:X1,92:G1},text:{[-5]:If,[-4]:If,[-3]:If,33:BN,38:X1,42:Nf,60:[Hk,vN],91:HN,92:[pN,G1],93:Pf,95:Nf,96:Zk}},Symbol.toStringTag,{value:"Module"}));function oO(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:ne(W),check:ne(F),consume:R,enter:N,exit:L,interrupt:ne(F,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:g};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function g(se){return u=Qn(u,se),v(),u[u.length-1]!==null?[]:(le(t,0),f.events=hl(a,f.events,f),f.events)}function b(se,te){return uO(T(se),te)}function T(se){return aO(u,se)}function _(){const{_bufferIndex:se,_index:te,line:pe,column:ce,offset:ye}=r;return{_bufferIndex:se,_index:te,line:pe,column:ce,offset:ye}}function S(se){s[se.line]=se.column,j()}function v(){let se;for(;r._index<u.length;){const te=u[r._index];if(typeof te=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<te.length;)A(te.charCodeAt(r._bufferIndex));else A(te)}}function A(se){p=p(se)}function R(se){Ue(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,j()):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 N(se,te){const pe=te||{};return pe.type=se,pe.start=_(),f.events.push(["enter",pe,f]),c.push(pe),pe}function L(se){const te=c.pop();return te.end=_(),f.events.push(["exit",te,f]),te}function W(se,te){le(se,te.from)}function F(se,te){te.restore()}function ne(se,te){return pe;function pe(ce,ye,De){let de,K,re,C;return Array.isArray(ce)?Z(ce):"tokenize"in ce?Z([ce]):M(ce);function M(Ce){return $e;function $e(we){const Ge=we!==null&&Ce[we],mt=we!==null&&Ce.null,tn=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(mt)?mt:mt?[mt]:[]];return Z(tn)(we)}}function Z(Ce){return de=Ce,K=0,Ce.length===0?De:O(Ce[K])}function O(Ce){return $e;function $e(we){return C=Te(),re=Ce,Ce.partial||(f.currentConstruct=Ce),Ce.name&&f.parser.constructs.disable.null.includes(Ce.name)?Pe():Ce.tokenize.call(te?Object.assign(Object.create(f),te):f,d,be,Pe)(we)}}function be(Ce){return se(re,C),ye}function Pe(Ce){return C.restore(),++K<de.length?O(de[K]):De}}}function le(se,te){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Fn(f.events,te,f.events.length-te,se.resolve(f.events.slice(te),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function Te(){const se=_(),te=f.previous,pe=f.currentConstruct,ce=f.events.length,ye=Array.from(c);return{from:ce,restore:De};function De(){r=se,f.previous=te,f.currentConstruct=pe,f.events.length=ce,c=ye,j()}}function j(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function aO(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 uO(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=ns(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&hl.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean),legacyInterceptorReqResOrdering:Jn.transitional(Jn.boolean)},!1),s!=null&&(V.isFunction(s)?n.paramsSerializer={serialize:s}:hl.assertOptions(s,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),hl.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","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 A=n.transitional||mf;A&&A.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 _=[Ig.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(A){S.call(this,A);break}}try{p=Ig.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=ns(this.defaults,t);const n=xg(t.baseURL,t.url,t.allowAbsoluteUrls);return gg(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){rs.prototype[t]=function(n,r){return this.request(ns(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ns(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}rs.prototype[t]=n(),t!=="query"&&(rs.prototype[t+"Form"]=n(!0))});let qA=class D2{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 pa(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 D2(function(s){t=s}),cancel:t}}};function YA(e){return function(n){return e.apply(null,n)}}function GA(e){return V.isObject(e)&&e.isAxiosError===!0}const Sf={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(Sf).forEach(([e,t])=>{Sf[t]=e});function Lg(e){const t=new rs(e),n=tg(rs.prototype.request,t);return V.extend(n,rs.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Lg(ns(e,s))},n}const Rt=Lg(ha);Rt.Axios=rs,Rt.CanceledError=pa,Rt.CancelToken=qA,Rt.isCancel=Tg,Rt.VERSION=Tf,Rt.toFormData=ll,Rt.AxiosError=Ne,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=YA,Rt.isAxiosError=GA,Rt.mergeConfig=ns,Rt.AxiosHeaders=Sn,Rt.formToJSON=e=>yg(V.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Og.getAdapter,Rt.HttpStatusCode=Sf,Rt.default=Rt;const{Axios:_7,AxiosError:S7,CanceledError:x7,isCancel:w7,CancelToken:C7,VERSION:A7,all:v7,Cancel:k7,isAxiosError:N7,spread:P7,toFormData:O7,AxiosHeaders:I7,HttpStatusCode:R7,formToJSON:L7,getAdapter:D7,mergeConfig:M7,create:F7}=Rt;class WA{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",()=>et(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class XA{constructor(t,n,r,s=!1){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>et(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));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 WA(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 qs=(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 KA{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{qs(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 Dg=H.createContext(null),QA=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",globalClassName:r="",entryMessage:s,openLinksInNewTab:a=!1,disclaimerText:u,disclaimerMarkdown:c,clientContext:d,searchPlaceholder:f,searchButtonLabel:p,searchConfig:g,componentConfig:b,conversationHistory:y,resetConversationMessage:_="",apiKey:S,apiToken:A,baseUrl:v,theme:P,isDevelopment:C,__features:B,children:q})=>{const D=H.useMemo(()=>e==="messaging"?{config:null}:new XA(v,S,A,C),[e,v,S,A,C]),J=H.useMemo(()=>new KA(C),[C]);H.useEffect(()=>{e!=="messaging"&&(!D||D.config||D.getConfig())},[D,e]);const ie=H.useMemo(()=>cC(P),[P]),Te=H.useMemo(()=>{const ee=(g==null?void 0:g.placeholder)||f,ce=(g==null?void 0:g.buttonLabel)||p;let he="icon";return g!=null&&g.buttonType?he=g.buttonType:p&&(he="text"),me(F({},g||{}),{placeholder:ee,buttonLabel:ce,buttonType:he})},[g,f,p]),$=H.useMemo(()=>({configModule:D,logoUrl:t,headerText:n,entryMessage:s,globalClassName:r,openLinksInNewTab:a,disclaimerText:u,disclaimerMarkdown:c,clientContext:d,themeVariables:ie,logger:J,searchConfig:Te,enableMinimize:!!(b!=null&&b.enableMinimize),resetConversationMessage:_,conversationHistory:{sinceHours:typeof(y==null?void 0:y.sinceHours)=="number"?y.sinceHours:1,limit:y==null?void 0:y.limit},features:B}),[D,t,n,s,r,d,u,c,a,Te,b,_,J,ie,y,B]);return w.jsx(Dg.Provider,{value:$,children:q})},ft=()=>{const e=H.useContext(Dg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class JA{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 tv(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 st=new JA,is=()=>st.connected,ma=()=>st.isOpen,ZA=e=>{window.addEventListener(sf,e)},ev=e=>{window.removeEventListener(sf,e)},tv=(e,t)=>{const n=new CustomEvent(sf,{detail:{property:e,value:t}});window.dispatchEvent(n)},nv=e=>{st.connectedProxy.connected=e},ga=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);st.entryTypeProxy.entryType=e},bi=e=>{const t=st.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;st.statusProxy.isOpen=n,n&&(st.statusProxy.isMinimized=!1)},pl=e=>{const t=st.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;st.statusProxy.isMinimized=n,n&&(st.statusProxy.isOpen=!1)},xf=e=>{st.modalProxy.isFullscreen=e},ml=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);st.statusProxy.type=e,e==="dialog"||e==="chat"?st.modeProxy.mode="embedded":st.modeProxy.mode="standalone"},wf=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(", ")}.`);st.dialogProxy.position=e},rv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=ft(),s=H.useCallback(C=>{n({type:mt.SET_COPILOT,payload:C})},[n]),a=H.useCallback(C=>{nv(C),n({type:mt.SET_CONNECTED,payload:C})},[n]),u=H.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=H.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=H.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:mt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=H.useCallback(C=>{n({type:mt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=H.useCallback(C=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),g=H.useCallback(C=>{d(C),f(C.id)},[d,f]),b=H.useCallback(C=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=H.useCallback(C=>{n({type:mt.ADD_CONVERSATION_ID,payload:C})},[n]),_=H.useCallback(C=>{n({type:mt.SET_CONVERSATION_IDS,payload:C})},[n]),S=H.useCallback(C=>{n({type:mt.SET_IMAGE_FILE,payload:C})},[n]),A=H.useCallback(C=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),v=H.useCallback(C=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),P=H.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:g,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:S,setAskCimPrompts:A,setConversationHistoryLoaded:v}),[s,a,u,c,d,f,p,g,b,y,_,S,A,v]);return w.jsx(eg.Provider,{value:P,children:t})};sC();const iv=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.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 mt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},sv=({onCopilotEvent:e,children:t})=>{const[n,r]=Q0(iv,Zi);return w.jsx(Z0.Provider,{value:n,children:w.jsx(rv,{onCopilotEvent:e,dispatch:r,children:t})})};function ov(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function av(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function uv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Cf=typeof window!="undefined",Ea=function(e){H.useEffect(e,[])},lv=function(e){var t=H.useRef(e);t.current=e,Ea(function(){return function(){return t.current()}})},cv=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return lv(function(){cancelAnimationFrame(t.current)}),[r,a]},dv=function(e,t){return e===t};function fv(e,t){t===void 0&&(t=dv);var n=H.useRef(),r=H.useRef(e),s=ov();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var hv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=cv({width:Cf?window.innerWidth:r,height:Cf?window.innerHeight:a}),d=c[0],f=c[1];return H.useEffect(function(){if(Cf){var p=function(){var g=window.innerWidth,b=window.innerHeight;f({width:g,height:b}),u&&u(g,b)};return av(window,"resize",p),function(){uv(window,"resize",p)}}},[]),d};class pv{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(dn.size).fill(1).forEach(()=>{const r=dn.first();r&&(t(r),dn.remove())})})}get size(){return this.items.length}}const dn=new pv,Mg=e=>{window.addEventListener(rf,e)},Fg=e=>{window.removeEventListener(rf,e)},mv=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Bg=e=>{window.addEventListener(nf,e)},Ug=e=>{window.removeEventListener(nf,e)},gv=(e,t,n)=>{const r=new CustomEvent(nf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Hg=e=>{window.addEventListener(tf,e)},zg=e=>{window.removeEventListener(tf,e)},jg=(e,t,n)=>{const r=new CustomEvent(tf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Ev=e=>{window.addEventListener(af,e)},yv=e=>{window.removeEventListener(af,e)},gl=(e,t,n)=>{const r=new CustomEvent(af,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Tv{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=uC[n];return gv(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 ut=new Tv,$g=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Vg=(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},qg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Yg=({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},Gg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Wg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},bv=e=>{if(!is()||!ma()){is()&&dn.clear(),dn.add({context:"browse",payload:me(F({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Xg=e=>{$g(e,ut)},_v=(e,t)=>{Vg(e,t,ut)},Kg=e=>{qg(e,ut)},Sv=({field:e,value:t})=>{Yg({field:e,value:t},ut)},xv=e=>{Gg(e,ut)},Qg=e=>{Wg(e,ut)},Jg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=is(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Xg(e.facetFilters||{}),"rangeFilters"in e&&Kg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Qg(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},wv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Jg,updateBrowseCategoryId:bv,updateCatalogSegment:xv,updateFacetFilter:_v,updateFacetFilters:Xg,updatePricebooks:Qg,updateRangeFilter:Sv,updateRangeFilters:Kg},Symbol.toStringTag,{value:"Module"}));class Cv{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)=>(jg(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 pr=new Cv,Zg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=is(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"pdp",payload:F({},e)});return}pr.updateProxy(e),jg("pdp-context",e)},Av=e=>{pr.proxy.productId=e,is()||dn.add({context:"pdp",payload:F({},pr.state)})},vv=e=>{pr.proxy.pdpLink=e},gt={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"},e1={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 kv{constructor(){Se(this,"initialState",e1);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 ya(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 Ht=new kv,Nv=e=>{window.addEventListener(of,e)},Pv=e=>{window.removeEventListener(of,e)},ya=(e,t)=>{const n=new CustomEvent(of,{detail:{property:e,value:t}});window.dispatchEvent(n)},t1=e=>{const t=Ht.isOpen,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isOpen=n},n1=e=>{const t=Ht.isInline,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isInline=n},Ov=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="ask_cim"},Iv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="search"},Rv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="browse"},Lv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="pdp"},Dv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ht.promptsStateProxy.elementId=e,t&&(Ht.promptsStateProxy.entryType=t),typeof r=="boolean"&&n1(r),n&&Ht.updatePromptsParamsProxy(n),Ht.isOpen||t1(!0)},Mv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{gl("getConversationMessages",{payload:e,callback:t},Ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{gl("getSessionInformation",{callback:e},Ti.GET_SESSION_INFORMATION)},loadConversation:e=>{gl("loadConversation",e,Ti.LOAD_CONVERSATION)},resetConversation:()=>{gl("resetConversation",!0,Ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Fv{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=lC[n];return mv(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 _t=new Fv,Bv=e=>{const t=ma(),n=is();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:me(F({},_t.state),{query:e})});return}_t.queryProxy.query=e},r1=e=>{$g(e,_t)},Uv=(e,t)=>{Vg(e,t,_t)},i1=e=>{qg(e,_t)},Hv=({field:e,value:t})=>{Yg({field:e,value:t},_t)},zv=e=>{Gg(e,_t)},s1=e=>{Wg(e,_t)},o1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=is();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&r1(e.facetFilters||{}),"rangeFilters"in e&&i1(e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&s1(e.pricebooks||[]),_t.queryProxy.query=e.query},jv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:o1,updateCatalogSegment:zv,updateFacetFilter:Uv,updateFacetFilters:r1,updatePricebooks:s1,updateRangeFilter:Hv,updateRangeFilters:i1,updateSearchQuery:Bv},Symbol.toStringTag,{value:"Module"})),$v={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},a1=H.createContext($v),Vv=({children:e})=>{const[t,n]=H.useState(ut.categoryId),[r,s]=H.useState(ut.categoryIdProxy.categoryName||""),[a,u]=H.useState(ut.facetFilters||{}),[c,d]=H.useState(ut.rangeFilters||[]),[f,p]=H.useState(ut.catalogSegment||null),[g,b]=H.useState(ut.pricebooks||null);H.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 Bg(_),()=>{Ug(_)}},[]);const y=H.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:g}),[t,r,a,c,f,g]);return w.jsx(a1.Provider,{value:y,children:e})},qv=()=>{const e=H.useContext(a1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Yv={searchQuery:_t.query,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},u1=H.createContext(Yv),Gv=({children:e})=>{const[t,n]=H.useState(_t.query),[r,s]=H.useState(_t.facetFilters),[a,u]=H.useState(_t.rangeFilters),[c,d]=H.useState(_t.catalogSegment),[f,p]=H.useState(_t.pricebooks);H.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 Mg(b),()=>{Fg(b)}},[]);const g=H.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return w.jsx(u1.Provider,{value:g,children:e})},Wv=()=>{const e=H.useContext(u1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Xv={productId:pr.productId,pdpLink:pr.pdpLink},l1=H.createContext(Xv),Kv=({children:e})=>{const[t,n]=H.useState(pr.productId),[r,s]=H.useState(pr.pdpLink);H.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 Hg(u),()=>{zg(u)}},[]);const a=H.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(l1.Provider,{value:a,children:e})},Qv=()=>{const e=H.useContext(l1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},c1=H.createContext({mode:st.modeProxy.mode,entryType:st.entryType,status:st.statusProxy,dialogPosition:st.dialogProxy.position,isModalFullscreen:st.modalProxy.isFullscreen,previousComponentType:st.statusProxy.type}),Jv=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:st.entryTypeProxy.entryType),[u,c]=H.useState(st.modeProxy.mode),[d,f]=H.useState({type:n||st.statusProxy.type,isOpen:st.statusProxy.isOpen,isMinimized:st.statusProxy.isMinimized}),[p,g]=H.useState(st.dialogProxy.position),[b,y]=H.useState(st.modalProxy.isFullscreen),_=fv(d.type);H.useEffect(()=>{const A=v=>{const{property:P,value:C}=v.detail||{};if(!(!P||C===void 0)){if(P==="mode"){c(C);return}if(P==="entryType"){a(C);return}if(P==="isMinimized"){f(B=>me(F({},B),{isMinimized:C}));return}if(P==="isOpen"){f(B=>me(F({},B),{isOpen:C}));return}if(P==="type"){f(B=>me(F({},B),{type:C}));return}if(P==="position"){g(C);return}if(P==="isFullscreen"){y(C);return}}};return ZA(A),()=>{ev(A)}},[]),Ea(()=>{e&&ga(e)}),Ea(()=>{const A=n||(t==null?void 0:t.type);A&&ml(A),t&&"isOpen"in t&&bi(!!t.isOpen),t&&"isMinimized"in t&&pl(!!t.isMinimized)}),Ea(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:A}=t.options;A&&wf(A),"isModalFullscreen"in t.options&&xf(!!t.options.isModalFullscreen)});const S=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:_||"dialog",dialogPosition:p,isModalFullscreen:b}),[u,s,d,_,p,b]);return w.jsx(c1.Provider,{value:S,children:r})},mr=()=>{const e=H.useContext(c1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},d1=H.createContext(null),f1=H.createContext(null),h1=()=>{const e=H.useContext(f1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},_i=()=>{const e=H.useContext(d1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Ys=()=>{const e=H.useContext(eg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Zn=()=>{const e=H.useContext(Z0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Zv=({copilot:e})=>{const{logger:t,conversationHistory:n}=ft(),{isInline:r}=_i(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Ys(),{activeConversationId:u}=Zn(),c=H.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=H.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,g=>{t==null||t.log("Retrieved conversation messages: ",g),p==null||p(g)})},[e,t]);return H.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),g={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(g.limit=n.limit),d(g,b=>{const y=[];[...b.reverse()||[]].forEach(S=>{var v;const A=b.find(P=>P.id===S.eventSourceId);(v=A==null?void 0:A.name)!=null&&v.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{s(S)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},p1=H.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),ek=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d,clientContext:f}=ft(),Pi=Wv(),{searchQuery:p}=Pi,g=rn(Pi,["searchQuery"]),li=qv(),{categoryId:b}=li,y=rn(li,["categoryId"]),{productId:_,pdpLink:S}=Qv(),{setCopilot:A,setConnected:v,resetCopilot:P,resetCopilotState:C,addCopilotEvent:B,removeLoadingMessage:q,handleCopilotRequestAck:D,setActiveConversationId:J,setConversationIds:ie,setAskCimPrompts:Te}=Ys(),{connected:$,copilot:ee,messages:ce,groupedMessages:he,loadingMessages:le,askCimPrompts:be}=Zn(),{status:Me,entryType:de}=mr(),{isInline:K}=_i(),{getConversationMessages:re,getSessionInformation:k}=Zv({copilot:ee}),M=H.useMemo(()=>le.size>0,[le]),te=H.useCallback(ve=>le.has(ve),[le]),O=H.useCallback(({query:ve,facetFilters:Fe,rangeFilters:De,catalogSegment:Qe,pricebooks:dt,userPrompt:lt,imageFile:wn})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const At={searchParams:{query:ve}};lt&&(At.userPrompt=lt),wn&&(At.attachments={image:wn}),Fe&&Object.keys(Fe).length>0&&(At.searchParams.facetFilters=Fe),De&&De.length>0&&(At.searchParams.rangeFilters=De),Qe&&(At.searchParams.catalogSegment=Qe),dt&&(At.searchParams.pricebooks=dt),f&&(At.clientContext=f),ga("search"),ee.search(At,ne=>{const se=F({},ne);D(se)})},[d,D,ee,f]),_e=H.useCallback(({categoryId:ve,categoryName:Fe,facetFilters:De,rangeFilters:Qe,catalogSegment:dt,pricebooks:lt,userPrompt:wn,imageFile:At})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}const ne=De&&Object.keys(De).length>0;if(ve===""&&!ne){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const se={browseParams:{categoryId:ve||""}};wn&&(se.userPrompt=wn),At&&(se.attachments={image:At}),ne&&(se.browseParams.facetFilters=De),Qe&&Qe.length>0&&(se.browseParams.rangeFilters=Qe),dt&&(se.browseParams.catalogSegment=dt),Array.isArray(lt)&<.length>0&&(se.browseParams.pricebooks=lt),(f||Fe)&&(se.clientContext={},f&&(se.clientContext=F({},f)),Fe&&(se.clientContext.cimLabel=Fe)),ga("browse"),ee.browse(se,Ie=>{var ir;const Ve=F({},Ie),Xe=((ir=Ve.request)==null?void 0:ir.clientContext)||{},Tt=(Xe==null?void 0:Xe.cimLabel)||Fe;Tt&&Ve.request&&(Ve.request.label=Tt),D(Ve)})},[d,D,ee,f]),Oe=H.useCallback(({productId:ve,productName:Fe,pdpLink:De,userPrompt:Qe,imageFile:dt})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const lt={productId:ve};Qe&&(lt.userPrompt=Qe),De&&(lt.pdpLink=De),dt&&(lt.attachments={image:dt}),(f||Fe)&&(lt.clientContext={},f&&(lt.clientContext=F({},f)),Fe&&(lt.clientContext.cimLabel=Fe)),ga("pdp"),ee.productView(lt,wn=>{var Ie;const At=F({},wn),ne=((Ie=At.request)==null?void 0:Ie.clientContext)||{},se=(ne==null?void 0:ne.cimLabel)||Fe;se&&At.request&&(At.request.label=se),D(At)})},[d,ee,D,f]),Ce=H.useCallback(({userPrompt:ve,imageFile:Fe})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const De={userPrompt:ve};Fe&&(De.attachments={image:Fe}),f&&(De.clientContext=f),ee.askCim(De,Qe=>{const dt=F({},Qe);D(dt)})},[d,ee,D,f]),$e=H.useCallback(ve=>{B(ve),a==null||a(ve)},[B,a]),we=H.useCallback(ve=>{B(ve),u==null||u(ve)},[B,u]),We=H.useCallback(ve=>{s==null||s(ve),v(!0)},[s,v]);H.useEffect(()=>{!ee||!$||!Me.isOpen||dn.size>0&&dn.processQueue(ve=>{if(ve.context==="search"){const Fe=F({},ve.payload);o1(Fe)}if(ve.context==="browse"){const Fe=F({},ve.payload);Jg(Fe)}if(ve.context==="pdp"){const Fe=F({},ve.payload);Zg(Fe)}})},[Me.isOpen,ee,$]);const pt=H.useCallback(ve=>{const Fe=De=>{const Qe=me(F({},De),{id:De.inquiryLinkId||De.id});B(Qe)};ve.on("connect_ack",We),ve.on("partial_inquiry",Fe),ve.on("display_products",B),ve.on("progress",B),ve.on("refined_search",$e),ve.on("refined_browse",we),ve.on("done",De=>{q(De.eventSourceId)}),ve.on("error",De=>{B(De),q(De.eventSourceId)}),ve.onDisconnect(De=>{const Qe=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",De),!Qe.includes(De)){v(!1);return}d==null||d.log("De-registering event listeners");const dt=new Date().toISOString();B({name:"error",message:"Connection was lost. Please try again.",createdAt:dt,id:`error-${dt}`,sessionId:"session"}),ve.off()})},[d,v,q,$e,we,B,We]);H.useEffect(()=>{if(!ee)return;const ve=Fe=>{if(!K){if(!Fe.message&&Fe.eventSourceId&&Fe.eventSourceId===be.requestId){Te({requestId:Fe.eventSourceId,message:Fe});return}B(Fe)}};return ee.on("follow_up",ve),()=>{ee.off("follow_up",ve)}},[ee,ce,be.requestId,K,B,Te]),H.useEffect(()=>{if(!ee)return;const ve=Fe=>{if(K)return;const De=me(F({},Fe),{id:Fe.inquiryLinkId||Fe.id});B(De)};return ee.on("inquiry",ve),()=>{ee.off("inquiry",ve)}},[ee,K,B]),Ea(()=>{let ve;n?ve=n:ve=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Fe={baseUrl:ve};e?Fe.apiKey=e:t&&(Fe.apiToken=t);const De=new Ww(Fe);return A(De),pt(De),De.connect(),De.requestSessionInformation(Qe=>{d==null||d.log("Session Information: ",Qe);const{activeConversationId:dt,conversationIds:lt}=Qe.data||{};dt&&J(dt),lt!=null&<.length&&ie(lt)}),()=>{De.disconnect(),De.off(),P()}});const on=H.useCallback(ve=>{if(!ee)return;const Fe={eventId:ve,reason:"User cancelled the request"};ee.cancelRequest(Fe,De=>{B(De),q(ve)})},[B,q,ee]),Yr=H.useCallback(()=>{ee&&ee.conversationReset({},ve=>{C(),B(ve),ee.requestSessionInformation(Fe=>{d==null||d.log("Session Information: ",Fe);const{activeConversationId:De,conversationIds:Qe}=Fe.data||{};De&&J(De),Qe!=null&&Qe.length&&ie(Qe)})})},[ee,d,B,C,J,ie]),Sr=H.useCallback((ve,Fe)=>{if(!ve)return;const De={userPrompt:ve};switch(Fe&&(De.imageFile=Fe),de){case"ask_cim":Ce(De);return;case"search":p?O(F(F({query:p},g),De)):Ce(De);return;case"browse":_e(F(F({categoryId:b},y),De));return;case"pdp":_?Oe(F({productId:_,pdpLink:S||""},De)):Ce(De);return}},[de,p,g,O,Ce,b,y,_e,Oe,_,S]),Rn=H.useCallback((ve,Fe)=>{var wn,At,ne;const Qe=ve.params.userPrompt||"";if(!Qe)return;const dt=ce.find(se=>se.id===Fe);if(!dt)return;const lt=dt.name.replace("_suggestions","");if(lt==="ask_cim"){Ce({userPrompt:Qe});return}if(lt==="copilot_search"){const se=((wn=dt.request)==null?void 0:wn.searchParams)||{},Ve=se.query===p;O(me(F({query:se.query||p},Ve?g:{}),{userPrompt:Qe}));return}if(lt==="copilot_browse"){const se=dt.request,Ie=se.browseParams||{},Xe=Ie.categoryId===b,Tt=((At=se.clientContext)==null?void 0:At.cimLabel)||"";_e(me(F({categoryId:Ie.categoryId||b||""},Xe?y:{}),{categoryName:Tt,userPrompt:Qe}));return}if(lt==="product_view"){const se=dt.request||{},Ie=se.productId,Ve=Ie===_,Xe=((ne=se.clientContext)==null?void 0:ne.cimLabel)||"";let Tt="";Ve?Tt=S||"":Tt=se.pdpLink||"",Oe({productId:Ie||_,pdpLink:Tt,productName:Xe,userPrompt:Qe})}},[ce,p,g,O,Ce,b,y,_e,Oe,_,S]),_s=H.useMemo(()=>({copilot:ee,messages:ce,groupedMessages:he,isLoading:M,isResponseLoading:te,handleAskCim:Ce,handleSearch:O,handleBrowse:_e,handlePdp:Oe,handleUserInput:Sr,handleSuggestion:Rn,handleCancel:on,resetConversation:Yr,getSessionInformation:k,getConversationMessages:re}),[ee,ce,he,M,te,Ce,O,_e,Oe,Sr,Rn,on,Yr,k,re]);return w.jsx(p1.Provider,{value:_s,children:c})},m1=()=>{const{copilot:e}=Zn(),{addCopilotEvent:t}=Ys();return{getCopilotSuggestions:H.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},gr=()=>{const e=H.useContext(p1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},tk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Zn(),{entryType:s}=mr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Ys(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:g,getSessionInformation:b,getConversationMessages:y}=gr(),{getCopilotSuggestions:_}=m1();H.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,P=>{c({requestId:P.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const S=H.useCallback(({query:P})=>{if(!e||!P)return;const{facetFilters:C}=_t.facetFiltersProxy,{rangeFilters:B}=_t.rangeFiltersProxy,{catalogSegment:q}=_t.catalogSegmentProxy,{pricebooks:D}=_t.pricebooksProxy,J={query:P};J.facetFilters=C||{},J.rangeFilters=B||[],J.catalogSegment=q||"",J.pricebooks=D||[],d(F({},J))},[e,d]),A=H.useCallback(({categoryId:P})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:B}=ut.facetFiltersProxy,{rangeFilters:q}=ut.rangeFiltersProxy,{catalogSegment:D}=ut.catalogSegmentProxy,{pricebooks:J}=ut.pricebooksProxy,ie={categoryId:P};ie.categoryName=C||"",ie.facetFilters=B||{},ie.rangeFilters=q||[],ie.catalogSegment=D||"",ie.pricebooks=J||[],f(F({},ie))},[e,f]),v=H.useCallback(({productId:P})=>{if(!e||!P)return;const C={productId:P,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(C)},[e,p]);return H.useEffect(()=>{const P=({detail:C})=>{(C==null?void 0:C.property)==="query"&&S({query:C.value})};return Mg(P),()=>{Fg(P)}},[S]),H.useEffect(()=>{const P=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const B=C.value;v({productId:B.productId});return}(C==null?void 0:C.property)==="productId"&&v({productId:C.value})};return Hg(P),()=>{zg(P)}},[v]),H.useEffect(()=>{const P=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&A({categoryId:C.value})};return Bg(P),()=>{Ug(P)}},[A]),H.useEffect(()=>{const P=({detail:C})=>{if((C==null?void 0:C.event)==Ti.RESET_CONVERSATION&&g(),(C==null?void 0:C.event)==Ti.GET_SESSION_INFORMATION){const B=C.value.callback;b(B)}if((C==null?void 0:C.event)==Ti.GET_CONVERSATION_MESSAGES){const{payload:B,callback:q}=C.value;if(!B.conversationId||typeof q!="function")return;y(B,q)}if((C==null?void 0:C.event)==Ti.LOAD_CONVERSATION){const B=C.value;if(!B.conversationId)return;y(B,D=>{a(),D.forEach(J=>{u(J)})})}};return Ev(P),()=>{yv(P)}},[g,b,y,a,u]),null},nk=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>w.jsxs(ek,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:s,onRefinedSearch:a,onRefinedBrowse:u,children:[w.jsx(tk,{}),c]}),rk=({children:e,dispatch:t})=>{const n=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=H.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(f1.Provider,{value:y,children:e})},ik=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},sk=({promptsConfig:e,children:t})=>{const[n,r]=Q0(ik,F(F({},e1),e||{}));return w.jsx(d1.Provider,{value:n,children:w.jsx(rk,{dispatch:r,children:t})})},g1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,theme:u,openLinksInNewTab:c,globalClassName:d,isDevelopment:f=!1,componentType:p,componentConfig:g,entryType:b,entryMessage:y,disclaimerText:_,disclaimerMarkdown:S,clientContext:A,searchPlaceholder:v,searchButtonLabel:P,searchConfig:C,promptsConfig:B,resetConversationMessage:q,conversationHistory:D,onConnect:J,onCopilotEvent:ie,onRefinedSearch:Te,onRefinedBrowse:$,__features:ee,children:ce})=>w.jsx(QA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,entryMessage:y,theme:u,globalClassName:d,openLinksInNewTab:c,searchPlaceholder:v,searchButtonLabel:P,searchConfig:C,componentConfig:g,clientContext:A,disclaimerMarkdown:S,disclaimerText:_,resetConversationMessage:q,conversationHistory:D,isDevelopment:f,__features:ee,children:w.jsx(Jv,{entryType:b,componentConfig:g,componentType:p,children:w.jsx(sv,{onCopilotEvent:ie,children:w.jsx(Kv,{children:w.jsx(Vv,{children:w.jsx(Gv,{children:w.jsx(sk,{promptsConfig:B,children:w.jsx(nk,{apiKey:t,apiToken:n,baseUrl:r,isDevelopment:f,entryType:b,onConnect:J,onRefinedSearch:Te,onRefinedBrowse:$,onCopilotEvent:ie,children:ce})})})})})})})});var Af={exports:{}},kn={},vf={exports:{}},kf={};var E1;function ok(){return E1||(E1=1,(function(e){function t(K,re){var k=K.length;K.push(re);e:for(;0<k;){var M=k-1>>>1,te=K[M];if(0<s(te,re))K[M]=re,K[k]=te,k=M;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var re=K[0],k=K.pop();if(k!==re){K[0]=k;e:for(var M=0,te=K.length,O=te>>>1;M<O;){var _e=2*(M+1)-1,Oe=K[_e],Ce=_e+1,$e=K[Ce];if(0>s(Oe,k))Ce<te&&0>s($e,Oe)?(K[M]=$e,K[Ce]=k,M=Ce):(K[M]=Oe,K[_e]=k,M=_e);else if(Ce<te&&0>s($e,k))K[M]=$e,K[Ce]=k,M=Ce;else break e}}return re}function s(K,re){var k=K.sortIndex-re.sortIndex;return k!==0?k:K.id-re.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,A=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(K){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=K)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function B(K){if(S=!1,C(K),!_)if(n(d)!==null)_=!0,Me(q);else{var re=n(f);re!==null&&de(B,re.startTime-K)}}function q(K,re){_=!1,S&&(S=!1,v(ie),ie=-1),y=!0;var k=b;try{for(C(re),g=n(d);g!==null&&(!(g.expirationTime>re)||K&&!ee());){var M=g.callback;if(typeof M=="function"){g.callback=null,b=g.priorityLevel;var te=M(g.expirationTime<=re);re=e.unstable_now(),typeof te=="function"?g.callback=te:g===n(d)&&r(d),C(re)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var _e=n(f);_e!==null&&de(B,_e.startTime-re),O=!1}return O}finally{g=null,b=k,y=!1}}var D=!1,J=null,ie=-1,Te=5,$=-1;function ee(){return!(e.unstable_now()-$<Te)}function ce(){if(J!==null){var K=e.unstable_now();$=K;var re=!0;try{re=J(!0,K)}finally{re?he():(D=!1,J=null)}}else D=!1}var he;if(typeof P=="function")he=function(){P(ce)};else if(typeof MessageChannel!="undefined"){var le=new MessageChannel,be=le.port2;le.port1.onmessage=ce,he=function(){be.postMessage(null)}}else he=function(){A(ce,0)};function Me(K){J=K,D||(D=!0,he())}function de(K,re){ie=A(function(){K(e.unstable_now())},re)}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(K){K.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Me(q))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var re=3;break;default:re=b}var k=b;b=re;try{return K()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,re){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var k=b;b=K;try{return re()}finally{b=k}},e.unstable_scheduleCallback=function(K,re,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,K){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=k+te,K={id:p++,callback:re,priorityLevel:K,startTime:k,expirationTime:te,sortIndex:-1},k>M?(K.sortIndex=k,t(f,K),n(d)===null&&K===n(f)&&(S?(v(ie),ie=-1):S=!0,de(B,k-M))):(K.sortIndex=te,t(d,K),_||y||(_=!0,Me(q))),K},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(K){var re=b;return function(){var k=b;b=re;try{return K.apply(this,arguments)}finally{b=k}}}})(kf)),kf}var y1;function ak(){return y1||(y1=1,vf.exports=ok()),vf.exports}var T1;function uk(){if(T1)return kn;T1=1;var e=bn(),t=ak();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 A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[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];A[o]=new S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[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){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function P(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(v,P);A[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(v,P);A[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(v,P);A[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=A.hasOwnProperty(o)?A[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 B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),D=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),ee=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),K=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function te(i){if(M===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
|
|
11
|
+
`+M+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(Q){var h=Q}Reflect.construct(i,[],o)}else{try{o.call()}catch(Q){h=Q}i.call(o.prototype)}else{try{throw Error()}catch(Q){h=Q}i()}}catch(Q){if(Q&&h&&typeof Q.stack=="string"){for(var E=Q.stack.split(`
|
|
12
|
+
`),T=h.stack.split(`
|
|
13
|
+
`),x=E.length-1,R=T.length-1;1<=x&&0<=R&&E[x]!==T[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==T[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==T[R]){var U=`
|
|
14
|
+
`+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?te(i):""}function Oe(i){switch(i.tag){case 5:return te(i.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("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 Ce(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 J:return"Fragment";case D:return"Portal";case Te:return"Profiler";case ie:return"StrictMode";case he:return"Suspense";case le:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ee:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ce:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return o=i.displayName||null,o!==null?o:Ce(i.type)||"Memo";case Me:o=i._payload,i=i._init;try{return Ce(i(o))}catch(l){}}return null}function $e(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 Ce(o);case 8:return o===ie?"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 we(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function We(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function pt(i){var o=We(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 on(i){i._valueTracker||(i._valueTracker=pt(i))}function Yr(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=We(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function Sr(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 Rn(i,o){var l=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function _s(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=we(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 Pi(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function li(i,o){Pi(i,o);var l=we(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")?Fe(i,o.type,l):o.hasOwnProperty("defaultValue")&&Fe(i,o.type,we(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function ve(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 Fe(i,o,l){(o!=="number"||Sr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var De=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=""+we(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 dt(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function lt(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(De(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:we(l)}}function wn(i,o){var l=we(o.value),h=we(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 At(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ne(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 se(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ne(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ie,Ve=(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(Ie=Ie||document.createElement("div"),Ie.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ie.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Xe(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var Tt={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},ir=["Webkit","ms","Moz","O"];Object.keys(Tt).forEach(function(i){ir.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Tt[o]=Tt[i]})});function sr(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||Tt.hasOwnProperty(i)&&Tt[i]?(""+o).trim():o+"px"}function Oi(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=sr(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Ss=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(i,o){if(o){if(Ss[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 Gr(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 qn=null;function kp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Np=null,No=null,Po=null;function W_(i){if(i=wu(i)){if(typeof Np!="function")throw Error(n(280));var o=i.stateNode;o&&(o=zc(o),Np(i.stateNode,i.type,o))}}function X_(i){No?Po?Po.push(i):Po=[i]:No=i}function K_(){if(No){var i=No,o=Po;if(Po=No=null,W_(i),o)for(i=0;i<o.length;i++)W_(o[i])}}function Q_(i,o){return i(o)}function J_(){}var Pp=!1;function Z_(i,o,l){if(Pp)return i(o,l);Pp=!0;try{return Q_(i,o,l)}finally{Pp=!1,(No!==null||Po!==null)&&(J_(),K_())}}function ru(i,o){var l=i.stateNode;if(l===null)return null;var h=zc(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 Op=!1;if(c)try{var iu={};Object.defineProperty(iu,"passive",{get:function(){Op=!0}}),window.addEventListener("test",iu,iu),window.removeEventListener("test",iu,iu)}catch(i){Op=!1}function gB(i,o,l,h,E,T,x,R,U){var Q=Array.prototype.slice.call(arguments,3);try{o.apply(l,Q)}catch(ue){this.onError(ue)}}var su=!1,Tc=null,bc=!1,Ip=null,EB={onError:function(i){su=!0,Tc=i}};function yB(i,o,l,h,E,T,x,R,U){su=!1,Tc=null,gB.apply(EB,arguments)}function TB(i,o,l,h,E,T,x,R,U){if(yB.apply(this,arguments),su){if(su){var Q=Tc;su=!1,Tc=null}else throw Error(n(198));bc||(bc=!0,Ip=Q)}}function xs(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 eS(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 tS(i){if(xs(i)!==i)throw Error(n(188))}function bB(i){var o=i.alternate;if(!o){if(o=xs(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 tS(E),i;if(T===h)return tS(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=T;break}if(R===h){x=!0,h=E,l=T;break}R=R.sibling}if(!x){for(R=T.child;R;){if(R===l){x=!0,l=T,h=E;break}if(R===h){x=!0,h=T,l=E;break}R=R.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 nS(i){return i=bB(i),i!==null?rS(i):null}function rS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=rS(i);if(o!==null)return o;i=i.sibling}return null}var iS=t.unstable_scheduleCallback,sS=t.unstable_cancelCallback,_B=t.unstable_shouldYield,SB=t.unstable_requestPaint,Mt=t.unstable_now,xB=t.unstable_getCurrentPriorityLevel,Rp=t.unstable_ImmediatePriority,oS=t.unstable_UserBlockingPriority,_c=t.unstable_NormalPriority,wB=t.unstable_LowPriority,aS=t.unstable_IdlePriority,Sc=null,Wr=null;function CB(i){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(Sc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var xr=Math.clz32?Math.clz32:kB,AB=Math.log,vB=Math.LN2;function kB(i){return i>>>=0,i===0?32:31-(AB(i)/vB|0)|0}var xc=64,wc=4194304;function ou(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 R=x&~E;R!==0?h=ou(R):(T&=x,T!==0&&(h=ou(T)))}else x=l&~E,x!==0?h=ou(x):T!==0&&(h=ou(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-xr(o),E=1<<l,h|=i[l],o&=~E;return h}function NB(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 PB(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-xr(T),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=NB(R,o)):U<=o&&(i.expiredLanes|=R),T&=~R}}function Lp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function uS(){var i=xc;return xc<<=1,(xc&4194240)===0&&(xc=64),i}function Dp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function au(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-xr(o),i[o]=l}function OB(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-xr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function Mp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-xr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function lS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var cS,Fp,dS,fS,hS,Bp=!1,Ac=[],Ii=null,Ri=null,Li=null,uu=new Map,lu=new Map,Di=[],IB="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 pS(i,o){switch(i){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":uu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":lu.delete(o.pointerId)}}function cu(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=wu(o),o!==null&&Fp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function RB(i,o,l,h,E){switch(o){case"focusin":return Ii=cu(Ii,i,o,l,h,E),!0;case"dragenter":return Ri=cu(Ri,i,o,l,h,E),!0;case"mouseover":return Li=cu(Li,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return uu.set(T,cu(uu.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,lu.set(T,cu(lu.get(T)||null,i,o,l,h,E)),!0}return!1}function mS(i){var o=ws(i.target);if(o!==null){var l=xs(o);if(l!==null){if(o=l.tag,o===13){if(o=eS(l),o!==null){i.blockedOn=o,hS(i.priority,function(){dS(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 vc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Hp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);qn=h,l.target.dispatchEvent(h),qn=null}else return o=wu(l),o!==null&&Fp(o),i.blockedOn=l,!1;o.shift()}return!0}function gS(i,o,l){vc(i)&&l.delete(o)}function LB(){Bp=!1,Ii!==null&&vc(Ii)&&(Ii=null),Ri!==null&&vc(Ri)&&(Ri=null),Li!==null&&vc(Li)&&(Li=null),uu.forEach(gS),lu.forEach(gS)}function du(i,o){i.blockedOn===o&&(i.blockedOn=null,Bp||(Bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,LB)))}function fu(i){function o(E){return du(E,i)}if(0<Ac.length){du(Ac[0],i);for(var l=1;l<Ac.length;l++){var h=Ac[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Ii!==null&&du(Ii,i),Ri!==null&&du(Ri,i),Li!==null&&du(Li,i),uu.forEach(o),lu.forEach(o),l=0;l<Di.length;l++)h=Di[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Di.length&&(l=Di[0],l.blockedOn===null);)mS(l),l.blockedOn===null&&Di.shift()}var Oo=B.ReactCurrentBatchConfig,kc=!0;function DB(i,o,l,h){var E=ct,T=Oo.transition;Oo.transition=null;try{ct=1,Up(i,o,l,h)}finally{ct=E,Oo.transition=T}}function MB(i,o,l,h){var E=ct,T=Oo.transition;Oo.transition=null;try{ct=4,Up(i,o,l,h)}finally{ct=E,Oo.transition=T}}function Up(i,o,l,h){if(kc){var E=Hp(i,o,l,h);if(E===null)rm(i,o,h,Nc,l),pS(i,h);else if(RB(E,i,o,l,h))h.stopPropagation();else if(pS(i,h),o&4&&-1<IB.indexOf(i)){for(;E!==null;){var T=wu(E);if(T!==null&&cS(T),T=Hp(i,o,l,h),T===null&&rm(i,o,h,Nc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else rm(i,o,h,null,l)}}var Nc=null;function Hp(i,o,l,h){if(Nc=null,i=kp(h),i=ws(i),i!==null)if(o=xs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=eS(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 Nc=i,null}function ES(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(xB()){case Rp:return 1;case oS:return 4;case _c:case wB:return 16;case aS:return 536870912;default:return 16}default:return 16}}var Mi=null,zp=null,Pc=null;function yS(){if(Pc)return Pc;var i,o=zp,l=o.length,h,E="value"in Mi?Mi.value:Mi.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 Pc=E.slice(i,1<h?1-h:void 0)}function Oc(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 Ic(){return!0}function TS(){return!1}function Yn(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 R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(T):T[R]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ic:TS,this.isPropagationStopped=TS,this}return k(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=Ic)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ic)},persist:function(){},isPersistent:Ic}),o}var Io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jp=Yn(Io),hu=k({},Io,{view:0,detail:0}),FB=Yn(hu),$p,Vp,pu,Rc=k({},hu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==pu&&(pu&&i.type==="mousemove"?($p=i.screenX-pu.screenX,Vp=i.screenY-pu.screenY):Vp=$p=0,pu=i),$p)},movementY:function(i){return"movementY"in i?i.movementY:Vp}}),bS=Yn(Rc),BB=k({},Rc,{dataTransfer:0}),UB=Yn(BB),HB=k({},hu,{relatedTarget:0}),qp=Yn(HB),zB=k({},Io,{animationName:0,elapsedTime:0,pseudoElement:0}),jB=Yn(zB),$B=k({},Io,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),VB=Yn($B),qB=k({},Io,{data:0}),_S=Yn(qB),YB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GB={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"},WB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=WB[i])?!!o[i]:!1}function Yp(){return XB}var KB=k({},hu,{key:function(i){if(i.key){var o=YB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Oc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?GB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yp,charCode:function(i){return i.type==="keypress"?Oc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Oc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),QB=Yn(KB),JB=k({},Rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SS=Yn(JB),ZB=k({},hu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yp}),e9=Yn(ZB),t9=k({},Io,{propertyName:0,elapsedTime:0,pseudoElement:0}),n9=Yn(t9),r9=k({},Rc,{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}),i9=Yn(r9),s9=[9,13,27,32],Gp=c&&"CompositionEvent"in window,mu=null;c&&"documentMode"in document&&(mu=document.documentMode);var o9=c&&"TextEvent"in window&&!mu,xS=c&&(!Gp||mu&&8<mu&&11>=mu),wS=" ",CS=!1;function AS(i,o){switch(i){case"keyup":return s9.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ro=!1;function a9(i,o){switch(i){case"compositionend":return vS(o);case"keypress":return o.which!==32?null:(CS=!0,wS);case"textInput":return i=o.data,i===wS&&CS?null:i;default:return null}}function u9(i,o){if(Ro)return i==="compositionend"||!Gp&&AS(i,o)?(i=yS(),Pc=zp=Mi=null,Ro=!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 xS&&o.locale!=="ko"?null:o.data;default:return null}}var l9={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 kS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!l9[i.type]:o==="textarea"}function NS(i,o,l,h){X_(h),o=Bc(o,"onChange"),0<o.length&&(l=new jp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var gu=null,Eu=null;function c9(i){GS(i,0)}function Lc(i){var o=Bo(i);if(Yr(o))return i}function d9(i,o){if(i==="change")return o}var PS=!1;if(c){var Wp;if(c){var Xp="oninput"in document;if(!Xp){var OS=document.createElement("div");OS.setAttribute("oninput","return;"),Xp=typeof OS.oninput=="function"}Wp=Xp}else Wp=!1;PS=Wp&&(!document.documentMode||9<document.documentMode)}function IS(){gu&&(gu.detachEvent("onpropertychange",RS),Eu=gu=null)}function RS(i){if(i.propertyName==="value"&&Lc(Eu)){var o=[];NS(o,Eu,i,kp(i)),Z_(c9,o)}}function f9(i,o,l){i==="focusin"?(IS(),gu=o,Eu=l,gu.attachEvent("onpropertychange",RS)):i==="focusout"&&IS()}function h9(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Lc(Eu)}function p9(i,o){if(i==="click")return Lc(o)}function m9(i,o){if(i==="input"||i==="change")return Lc(o)}function g9(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var wr=typeof Object.is=="function"?Object.is:g9;function yu(i,o){if(wr(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)||!wr(i[E],o[E]))return!1}return!0}function LS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function DS(i,o){var l=LS(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=LS(l)}}function MS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?MS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function FS(){for(var i=window,o=Sr();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=Sr(i.document)}return o}function Kp(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 E9(i){var o=FS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&MS(l.ownerDocument.documentElement,l)){if(h!==null&&Kp(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=DS(l,T);var x=DS(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 y9=c&&"documentMode"in document&&11>=document.documentMode,Lo=null,Qp=null,Tu=null,Jp=!1;function BS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Jp||Lo==null||Lo!==Sr(h)||(h=Lo,"selectionStart"in h&&Kp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Tu&&yu(Tu,h)||(Tu=h,h=Bc(Qp,"onSelect"),0<h.length&&(o=new jp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Lo)))}function Dc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Do={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},Zp={},US={};c&&(US=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function Mc(i){if(Zp[i])return Zp[i];if(!Do[i])return i;var o=Do[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in US)return Zp[i]=o[l];return i}var HS=Mc("animationend"),zS=Mc("animationiteration"),jS=Mc("animationstart"),$S=Mc("transitionend"),VS=new Map,qS="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 Fi(i,o){VS.set(i,o),a(o,[i])}for(var em=0;em<qS.length;em++){var tm=qS[em],T9=tm.toLowerCase(),b9=tm[0].toUpperCase()+tm.slice(1);Fi(T9,"on"+b9)}Fi(HS,"onAnimationEnd"),Fi(zS,"onAnimationIteration"),Fi(jS,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi($S,"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 bu="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(" "),_9=new Set("cancel close invalid load scroll toggle".split(" ").concat(bu));function YS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,TB(h,o,void 0,i),i.currentTarget=null}function GS(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 R=h[x],U=R.instance,Q=R.currentTarget;if(R=R.listener,U!==T&&E.isPropagationStopped())break e;YS(E,R,Q),T=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,Q=R.currentTarget,R=R.listener,U!==T&&E.isPropagationStopped())break e;YS(E,R,Q),T=U}}}if(bc)throw i=Ip,bc=!1,Ip=null,i}function St(i,o){var l=o[lm];l===void 0&&(l=o[lm]=new Set);var h=i+"__bubble";l.has(h)||(WS(o,i,2,!1),l.add(h))}function nm(i,o,l){var h=0;o&&(h|=4),WS(l,i,h,o)}var Fc="_reactListening"+Math.random().toString(36).slice(2);function _u(i){if(!i[Fc]){i[Fc]=!0,r.forEach(function(l){l!=="selectionchange"&&(_9.has(l)||nm(l,!1,i),nm(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Fc]||(o[Fc]=!0,nm("selectionchange",!1,o))}}function WS(i,o,l,h){switch(ES(o)){case 1:var E=DB;break;case 4:E=MB;break;default:E=Up}l=E.bind(null,o,l,i),E=void 0,!Op||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 rm(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 R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=ws(R),x===null)return;if(U=x.tag,U===5||U===6){h=T=x;continue e}R=R.parentNode}}h=h.return}Z_(function(){var Q=T,ue=kp(l),pe=[];e:{var oe=VS.get(i);if(oe!==void 0){var xe=jp,ke=i;switch(i){case"keypress":if(Oc(l)===0)break e;case"keydown":case"keyup":xe=QB;break;case"focusin":ke="focus",xe=qp;break;case"focusout":ke="blur",xe=qp;break;case"beforeblur":case"afterblur":xe=qp;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=bS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=UB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=e9;break;case HS:case zS:case jS:xe=jB;break;case $S:xe=n9;break;case"scroll":xe=FB;break;case"wheel":xe=i9;break;case"copy":case"cut":case"paste":xe=VB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=SS}var Pe=(o&4)!==0,Ft=!Pe&&i==="scroll",Y=Pe?oe!==null?oe+"Capture":null:oe;Pe=[];for(var z=Q,X;z!==null;){X=z;var ye=X.stateNode;if(X.tag===5&&ye!==null&&(X=ye,Y!==null&&(ye=ru(z,Y),ye!=null&&Pe.push(Su(z,ye,X)))),Ft)break;z=z.return}0<Pe.length&&(oe=new xe(oe,ke,null,l,ue),pe.push({event:oe,listeners:Pe}))}}if((o&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",oe&&l!==qn&&(ke=l.relatedTarget||l.fromElement)&&(ws(ke)||ke[ci]))break e;if((xe||oe)&&(oe=ue.window===ue?ue:(oe=ue.ownerDocument)?oe.defaultView||oe.parentWindow:window,xe?(ke=l.relatedTarget||l.toElement,xe=Q,ke=ke?ws(ke):null,ke!==null&&(Ft=xs(ke),ke!==Ft||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(xe=null,ke=Q),xe!==ke)){if(Pe=bS,ye="onMouseLeave",Y="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=SS,ye="onPointerLeave",Y="onPointerEnter",z="pointer"),Ft=xe==null?oe:Bo(xe),X=ke==null?oe:Bo(ke),oe=new Pe(ye,z+"leave",xe,l,ue),oe.target=Ft,oe.relatedTarget=X,ye=null,ws(ue)===Q&&(Pe=new Pe(Y,z+"enter",ke,l,ue),Pe.target=X,Pe.relatedTarget=Ft,ye=Pe),Ft=ye,xe&&ke)t:{for(Pe=xe,Y=ke,z=0,X=Pe;X;X=Mo(X))z++;for(X=0,ye=Y;ye;ye=Mo(ye))X++;for(;0<z-X;)Pe=Mo(Pe),z--;for(;0<X-z;)Y=Mo(Y),X--;for(;z--;){if(Pe===Y||Y!==null&&Pe===Y.alternate)break t;Pe=Mo(Pe),Y=Mo(Y)}Pe=null}else Pe=null;xe!==null&&XS(pe,oe,xe,Pe,!1),ke!==null&&Ft!==null&&XS(pe,Ft,ke,Pe,!0)}}e:{if(oe=Q?Bo(Q):window,xe=oe.nodeName&&oe.nodeName.toLowerCase(),xe==="select"||xe==="input"&&oe.type==="file")var Re=d9;else if(kS(oe))if(PS)Re=m9;else{Re=h9;var Ue=f9}else(xe=oe.nodeName)&&xe.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Re=p9);if(Re&&(Re=Re(i,Q))){NS(pe,Re,l,ue);break e}Ue&&Ue(i,oe,Q),i==="focusout"&&(Ue=oe._wrapperState)&&Ue.controlled&&oe.type==="number"&&Fe(oe,"number",oe.value)}switch(Ue=Q?Bo(Q):window,i){case"focusin":(kS(Ue)||Ue.contentEditable==="true")&&(Lo=Ue,Qp=Q,Tu=null);break;case"focusout":Tu=Qp=Lo=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,BS(pe,l,ue);break;case"selectionchange":if(y9)break;case"keydown":case"keyup":BS(pe,l,ue)}var He;if(Gp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Ro?AS(i,l)&&(qe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(xS&&l.locale!=="ko"&&(Ro||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Ro&&(He=yS()):(Mi=ue,zp="value"in Mi?Mi.value:Mi.textContent,Ro=!0)),Ue=Bc(Q,qe),0<Ue.length&&(qe=new _S(qe,i,null,l,ue),pe.push({event:qe,listeners:Ue}),He?qe.data=He:(He=vS(l),He!==null&&(qe.data=He)))),(He=o9?a9(i,l):u9(i,l))&&(Q=Bc(Q,"onBeforeInput"),0<Q.length&&(ue=new _S("onBeforeInput","beforeinput",null,l,ue),pe.push({event:ue,listeners:Q}),ue.data=He))}GS(pe,o)})}function Su(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Bc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=ru(i,l),T!=null&&h.unshift(Su(i,T,E)),T=ru(i,o),T!=null&&h.push(Su(i,T,E))),i=i.return}return h}function Mo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function XS(i,o,l,h,E){for(var T=o._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,Q=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Q!==null&&(R=Q,E?(U=ru(l,T),U!=null&&x.unshift(Su(l,U,R))):E||(U=ru(l,T),U!=null&&x.push(Su(l,U,R)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var S9=/\r\n?/g,x9=/\u0000|\uFFFD/g;function KS(i){return(typeof i=="string"?i:""+i).replace(S9,`
|
|
15
|
+
`).replace(x9,"")}function Uc(i,o,l){if(o=KS(o),KS(i)!==o&&l)throw Error(n(425))}function Hc(){}var im=null,sm=null;function om(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 am=typeof setTimeout=="function"?setTimeout:void 0,w9=typeof clearTimeout=="function"?clearTimeout:void 0,QS=typeof Promise=="function"?Promise:void 0,C9=typeof queueMicrotask=="function"?queueMicrotask:typeof QS!="undefined"?function(i){return QS.resolve(null).then(i).catch(A9)}:am;function A9(i){setTimeout(function(){throw i})}function um(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),fu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);fu(o)}function Bi(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 JS(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 Fo=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Fo,xu="__reactProps$"+Fo,ci="__reactContainer$"+Fo,lm="__reactEvents$"+Fo,v9="__reactListeners$"+Fo,k9="__reactHandles$"+Fo;function ws(i){var o=i[Xr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ci]||l[Xr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=JS(i);i!==null;){if(l=i[Xr])return l;i=JS(i)}return o}i=l,l=i.parentNode}return null}function wu(i){return i=i[Xr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Bo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function zc(i){return i[xu]||null}var cm=[],Uo=-1;function Ui(i){return{current:i}}function xt(i){0>Uo||(i.current=cm[Uo],cm[Uo]=null,Uo--)}function bt(i,o){Uo++,cm[Uo]=i.current,i.current=o}var Hi={},gn=Ui(Hi),Ln=Ui(!1),Cs=Hi;function Ho(i,o){var l=i.type.contextTypes;if(!l)return Hi;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 Dn(i){return i=i.childContextTypes,i!=null}function jc(){xt(Ln),xt(gn)}function ZS(i,o,l){if(gn.current!==Hi)throw Error(n(168));bt(gn,o),bt(Ln,l)}function ex(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,$e(i)||"Unknown",E));return k({},l,h)}function $c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Hi,Cs=gn.current,bt(gn,i),bt(Ln,Ln.current),!0}function tx(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=ex(i,o,Cs),h.__reactInternalMemoizedMergedChildContext=i,xt(Ln),xt(gn),bt(gn,i)):xt(Ln),bt(Ln,l)}var di=null,Vc=!1,dm=!1;function nx(i){di===null?di=[i]:di.push(i)}function N9(i){Vc=!0,nx(i)}function zi(){if(!dm&&di!==null){dm=!0;var i=0,o=ct;try{var l=di;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,Vc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),iS(Rp,zi),E}finally{ct=o,dm=!1}}return null}var zo=[],jo=0,qc=null,Yc=0,or=[],ar=0,As=null,fi=1,hi="";function vs(i,o){zo[jo++]=Yc,zo[jo++]=qc,qc=i,Yc=o}function rx(i,o,l){or[ar++]=fi,or[ar++]=hi,or[ar++]=As,As=i;var h=fi;i=hi;var E=32-xr(h)-1;h&=~(1<<E),l+=1;var T=32-xr(o)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-xr(o)+E|l<<E|h,hi=T+i}else fi=1<<T|l<<E|h,hi=i}function fm(i){i.return!==null&&(vs(i,1),rx(i,1,0))}function hm(i){for(;i===qc;)qc=zo[--jo],zo[jo]=null,Yc=zo[--jo],zo[jo]=null;for(;i===As;)As=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null,fi=or[--ar],or[ar]=null}var Gn=null,Wn=null,vt=!1,Cr=null;function ix(i,o){var l=dr(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 sx(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,Gn=i,Wn=Bi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Gn=i,Wn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=As!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Gn=i,Wn=null,!0):!1;default:return!1}}function pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function mm(i){if(vt){var o=Wn;if(o){var l=o;if(!sx(i,o)){if(pm(i))throw Error(n(418));o=Bi(l.nextSibling);var h=Gn;o&&sx(i,o)?ix(h,l):(i.flags=i.flags&-4097|2,vt=!1,Gn=i)}}else{if(pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,vt=!1,Gn=i}}}function ox(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function Gc(i){if(i!==Gn)return!1;if(!vt)return ox(i),vt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!om(i.type,i.memoizedProps)),o&&(o=Wn)){if(pm(i))throw ax(),Error(n(418));for(;o;)ix(i,o),o=Bi(o.nextSibling)}if(ox(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){Wn=Bi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Wn=null}}else Wn=Gn?Bi(i.stateNode.nextSibling):null;return!0}function ax(){for(var i=Wn;i;)i=Bi(i.nextSibling)}function $o(){Wn=Gn=null,vt=!1}function gm(i){Cr===null?Cr=[i]:Cr.push(i)}var P9=B.ReactCurrentBatchConfig;function Cu(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 R=E.refs;x===null?delete R[T]:R[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 Wc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function ux(i){var o=i._init;return o(i._payload)}function lx(i){function o(Y,z){if(i){var X=Y.deletions;X===null?(Y.deletions=[z],Y.flags|=16):X.push(z)}}function l(Y,z){if(!i)return null;for(;z!==null;)o(Y,z),z=z.sibling;return null}function h(Y,z){for(Y=new Map;z!==null;)z.key!==null?Y.set(z.key,z):Y.set(z.index,z),z=z.sibling;return Y}function E(Y,z){return Y=Xi(Y,z),Y.index=0,Y.sibling=null,Y}function T(Y,z,X){return Y.index=X,i?(X=Y.alternate,X!==null?(X=X.index,X<z?(Y.flags|=2,z):X):(Y.flags|=2,z)):(Y.flags|=1048576,z)}function x(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function R(Y,z,X,ye){return z===null||z.tag!==6?(z=a0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function U(Y,z,X,ye){var Re=X.type;return Re===J?ue(Y,z,X.props.children,ye,X.key):z!==null&&(z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===Me&&ux(Re)===z.type)?(ye=E(z,X.props),ye.ref=Cu(Y,z,X),ye.return=Y,ye):(ye=yd(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Cu(Y,z,X),ye.return=Y,ye)}function Q(Y,z,X,ye){return z===null||z.tag!==4||z.stateNode.containerInfo!==X.containerInfo||z.stateNode.implementation!==X.implementation?(z=u0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X.children||[]),z.return=Y,z)}function ue(Y,z,X,ye,Re){return z===null||z.tag!==7?(z=Ds(X,Y.mode,ye,Re),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function pe(Y,z,X){if(typeof z=="string"&&z!==""||typeof z=="number")return z=a0(""+z,Y.mode,X),z.return=Y,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case q:return X=yd(z.type,z.key,z.props,null,Y.mode,X),X.ref=Cu(Y,null,z),X.return=Y,X;case D:return z=u0(z,Y.mode,X),z.return=Y,z;case Me:var ye=z._init;return pe(Y,ye(z._payload),X)}if(De(z)||re(z))return z=Ds(z,Y.mode,X,null),z.return=Y,z;Wc(Y,z)}return null}function oe(Y,z,X,ye){var Re=z!==null?z.key:null;if(typeof X=="string"&&X!==""||typeof X=="number")return Re!==null?null:R(Y,z,""+X,ye);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case q:return X.key===Re?U(Y,z,X,ye):null;case D:return X.key===Re?Q(Y,z,X,ye):null;case Me:return Re=X._init,oe(Y,z,Re(X._payload),ye)}if(De(X)||re(X))return Re!==null?null:ue(Y,z,X,ye,null);Wc(Y,X)}return null}function xe(Y,z,X,ye,Re){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Y=Y.get(X)||null,R(z,Y,""+ye,Re);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case q:return Y=Y.get(ye.key===null?X:ye.key)||null,U(z,Y,ye,Re);case D:return Y=Y.get(ye.key===null?X:ye.key)||null,Q(z,Y,ye,Re);case Me:var Ue=ye._init;return xe(Y,z,X,Ue(ye._payload),Re)}if(De(ye)||re(ye))return Y=Y.get(X)||null,ue(z,Y,ye,Re,null);Wc(z,ye)}return null}function ke(Y,z,X,ye){for(var Re=null,Ue=null,He=z,qe=z=0,nn=null;He!==null&&qe<X.length;qe++){He.index>qe?(nn=He,He=null):nn=He.sibling;var it=oe(Y,He,X[qe],ye);if(it===null){He===null&&(He=nn);break}i&&He&&it.alternate===null&&o(Y,He),z=T(it,z,qe),Ue===null?Re=it:Ue.sibling=it,Ue=it,He=nn}if(qe===X.length)return l(Y,He),vt&&vs(Y,qe),Re;if(He===null){for(;qe<X.length;qe++)He=pe(Y,X[qe],ye),He!==null&&(z=T(He,z,qe),Ue===null?Re=He:Ue.sibling=He,Ue=He);return vt&&vs(Y,qe),Re}for(He=h(Y,He);qe<X.length;qe++)nn=xe(He,Y,qe,X[qe],ye),nn!==null&&(i&&nn.alternate!==null&&He.delete(nn.key===null?qe:nn.key),z=T(nn,z,qe),Ue===null?Re=nn:Ue.sibling=nn,Ue=nn);return i&&He.forEach(function(Ki){return o(Y,Ki)}),vt&&vs(Y,qe),Re}function Pe(Y,z,X,ye){var Re=re(X);if(typeof Re!="function")throw Error(n(150));if(X=Re.call(X),X==null)throw Error(n(151));for(var Ue=Re=null,He=z,qe=z=0,nn=null,it=X.next();He!==null&&!it.done;qe++,it=X.next()){He.index>qe?(nn=He,He=null):nn=He.sibling;var Ki=oe(Y,He,it.value,ye);if(Ki===null){He===null&&(He=nn);break}i&&He&&Ki.alternate===null&&o(Y,He),z=T(Ki,z,qe),Ue===null?Re=Ki:Ue.sibling=Ki,Ue=Ki,He=nn}if(it.done)return l(Y,He),vt&&vs(Y,qe),Re;if(He===null){for(;!it.done;qe++,it=X.next())it=pe(Y,it.value,ye),it!==null&&(z=T(it,z,qe),Ue===null?Re=it:Ue.sibling=it,Ue=it);return vt&&vs(Y,qe),Re}for(He=h(Y,He);!it.done;qe++,it=X.next())it=xe(He,Y,qe,it.value,ye),it!==null&&(i&&it.alternate!==null&&He.delete(it.key===null?qe:it.key),z=T(it,z,qe),Ue===null?Re=it:Ue.sibling=it,Ue=it);return i&&He.forEach(function(l7){return o(Y,l7)}),vt&&vs(Y,qe),Re}function Ft(Y,z,X,ye){if(typeof X=="object"&&X!==null&&X.type===J&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case q:e:{for(var Re=X.key,Ue=z;Ue!==null;){if(Ue.key===Re){if(Re=X.type,Re===J){if(Ue.tag===7){l(Y,Ue.sibling),z=E(Ue,X.props.children),z.return=Y,Y=z;break e}}else if(Ue.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===Me&&ux(Re)===Ue.type){l(Y,Ue.sibling),z=E(Ue,X.props),z.ref=Cu(Y,Ue,X),z.return=Y,Y=z;break e}l(Y,Ue);break}else o(Y,Ue);Ue=Ue.sibling}X.type===J?(z=Ds(X.props.children,Y.mode,ye,X.key),z.return=Y,Y=z):(ye=yd(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Cu(Y,z,X),ye.return=Y,Y=ye)}return x(Y);case D:e:{for(Ue=X.key;z!==null;){if(z.key===Ue)if(z.tag===4&&z.stateNode.containerInfo===X.containerInfo&&z.stateNode.implementation===X.implementation){l(Y,z.sibling),z=E(z,X.children||[]),z.return=Y,Y=z;break e}else{l(Y,z);break}else o(Y,z);z=z.sibling}z=u0(X,Y.mode,ye),z.return=Y,Y=z}return x(Y);case Me:return Ue=X._init,Ft(Y,z,Ue(X._payload),ye)}if(De(X))return ke(Y,z,X,ye);if(re(X))return Pe(Y,z,X,ye);Wc(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"?(X=""+X,z!==null&&z.tag===6?(l(Y,z.sibling),z=E(z,X),z.return=Y,Y=z):(l(Y,z),z=a0(X,Y.mode,ye),z.return=Y,Y=z),x(Y)):l(Y,z)}return Ft}var Vo=lx(!0),cx=lx(!1),Xc=Ui(null),Kc=null,qo=null,Em=null;function ym(){Em=qo=Kc=null}function Tm(i){var o=Xc.current;xt(Xc),i._currentValue=o}function bm(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 Yo(i,o){Kc=i,Em=qo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Mn=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(Em!==i)if(i={context:i,memoizedValue:o,next:null},qo===null){if(Kc===null)throw Error(n(308));qo=i,Kc.dependencies={lanes:0,firstContext:i}}else qo=qo.next=i;return o}var ks=null;function _m(i){ks===null?ks=[i]:ks.push(i)}function dx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,_m(o)):(l.next=E.next,E.next=l),o.interleaved=l,pi(i,h)}function pi(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 ji=!1;function Sm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fx(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 mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function $i(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,pi(i,l)}return E=h.interleaved,E===null?(o.next=o,_m(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,l)}function Qc(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,Mp(i,l)}}function hx(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 Jc(i,o,l,h){var E=i.updateQueue;ji=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Q=U.next;U.next=null,x===null?T=Q:x.next=Q,x=U;var ue=i.alternate;ue!==null&&(ue=ue.updateQueue,R=ue.lastBaseUpdate,R!==x&&(R===null?ue.firstBaseUpdate=Q:R.next=Q,ue.lastBaseUpdate=U))}if(T!==null){var pe=E.baseState;x=0,ue=Q=U=null,R=T;do{var oe=R.lane,xe=R.eventTime;if((h&oe)===oe){ue!==null&&(ue=ue.next={eventTime:xe,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Pe=R;switch(oe=o,xe=l,Pe.tag){case 1:if(ke=Pe.payload,typeof ke=="function"){pe=ke.call(xe,pe,oe);break e}pe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Pe.payload,oe=typeof ke=="function"?ke.call(xe,pe,oe):ke,oe==null)break e;pe=k({},pe,oe);break e;case 2:ji=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,oe=E.effects,oe===null?E.effects=[R]:oe.push(R))}else xe={eventTime:xe,lane:oe,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ue===null?(Q=ue=xe,U=pe):ue=ue.next=xe,x|=oe;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;oe=R,R=oe.next,oe.next=null,E.lastBaseUpdate=oe,E.shared.pending=null}}while(!0);if(ue===null&&(U=pe),E.baseState=U,E.firstBaseUpdate=Q,E.lastBaseUpdate=ue,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);Os|=x,i.lanes=x,i.memoizedState=pe}}function px(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 Au={},Kr=Ui(Au),vu=Ui(Au),ku=Ui(Au);function Ns(i){if(i===Au)throw Error(n(174));return i}function xm(i,o){switch(bt(ku,o),bt(vu,i),bt(Kr,Au),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:se(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=se(o,i)}xt(Kr),bt(Kr,o)}function Go(){xt(Kr),xt(vu),xt(ku)}function mx(i){Ns(ku.current);var o=Ns(Kr.current),l=se(o,i.type);o!==l&&(bt(vu,i),bt(Kr,l))}function wm(i){vu.current===i&&(xt(Kr),xt(vu))}var Nt=Ui(0);function Zc(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 Cm=[];function Am(){for(var i=0;i<Cm.length;i++)Cm[i]._workInProgressVersionPrimary=null;Cm.length=0}var ed=B.ReactCurrentDispatcher,vm=B.ReactCurrentBatchConfig,Ps=0,Pt=null,Gt=null,en=null,td=!1,Nu=!1,Pu=0,O9=0;function En(){throw Error(n(321))}function km(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!wr(i[l],o[l]))return!1;return!0}function Nm(i,o,l,h,E,T){if(Ps=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ed.current=i===null||i.memoizedState===null?D9:M9,i=l(h,E),Nu){T=0;do{if(Nu=!1,Pu=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,o.updateQueue=null,ed.current=F9,i=l(h,E)}while(Nu)}if(ed.current=id,o=Gt!==null&&Gt.next!==null,Ps=0,en=Gt=Pt=null,td=!1,o)throw Error(n(300));return i}function Pm(){var i=Pu!==0;return Pu=0,i}function Qr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Ou(i,o){return typeof o=="function"?o(i):o}function Om(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Gt,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 R=x=null,U=null,Q=T;do{var ue=Q.lane;if((Ps&ue)===ue)U!==null&&(U=U.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),h=Q.hasEagerState?Q.eagerState:i(h,Q.action);else{var pe={lane:ue,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};U===null?(R=U=pe,x=h):U=U.next=pe,Pt.lanes|=ue,Os|=ue}Q=Q.next}while(Q!==null&&Q!==T);U===null?x=h:U.next=R,wr(h,o.memoizedState)||(Mn=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,Os|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Im(i){var o=lr(),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);wr(T,o.memoizedState)||(Mn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function gx(){}function Ex(i,o){var l=Pt,h=lr(),E=o(),T=!wr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Rm(bx.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Iu(9,Tx.bind(null,l,h,E,o),void 0,null),tn===null)throw Error(n(349));(Ps&30)!==0||yx(l,o,E)}return E}function yx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Tx(i,o,l,h){o.value=l,o.getSnapshot=h,_x(o)&&Sx(i)}function bx(i,o,l){return l(function(){_x(o)&&Sx(i)})}function _x(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!wr(i,l)}catch(h){return!0}}function Sx(i){var o=pi(i,1);o!==null&&Nr(o,i,1,-1)}function xx(i){var o=Qr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ou,lastRenderedState:i},o.queue=i,i=i.dispatch=L9.bind(null,Pt,i),[o.memoizedState,i]}function Iu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.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 wx(){return lr().memoizedState}function nd(i,o,l,h){var E=Qr();Pt.flags|=i,E.memoizedState=Iu(1|o,l,void 0,h===void 0?null:h)}function rd(i,o,l,h){var E=lr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var x=Gt.memoizedState;if(T=x.destroy,h!==null&&km(h,x.deps)){E.memoizedState=Iu(o,l,T,h);return}}Pt.flags|=i,E.memoizedState=Iu(1|o,l,T,h)}function Cx(i,o){return nd(8390656,8,i,o)}function Rm(i,o){return rd(2048,8,i,o)}function Ax(i,o){return rd(4,2,i,o)}function vx(i,o){return rd(4,4,i,o)}function kx(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 Nx(i,o,l){return l=l!=null?l.concat([i]):null,rd(4,4,kx.bind(null,o,i),l)}function Lm(){}function Px(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&km(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Ox(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&km(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Ix(i,o,l){return(Ps&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=l):(wr(l,o)||(l=uS(),Pt.lanes|=l,Os|=l,i.baseState=!0),o)}function I9(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=vm.transition;vm.transition={};try{i(!1),o()}finally{ct=l,vm.transition=h}}function Rx(){return lr().memoizedState}function R9(i,o,l){var h=Gi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Lx(i))Dx(o,l);else if(l=dx(i,o,l,h),l!==null){var E=An();Nr(l,i,h,E),Mx(l,o,h)}}function L9(i,o,l){var h=Gi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Lx(i))Dx(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,R=T(x,l);if(E.hasEagerState=!0,E.eagerState=R,wr(R,x)){var U=o.interleaved;U===null?(E.next=E,_m(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(Q){}l=dx(i,o,E,h),l!==null&&(E=An(),Nr(l,i,h,E),Mx(l,o,h))}}function Lx(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function Dx(i,o){Nu=td=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Mx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Mp(i,l)}}var id={readContext:ur,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useInsertionEffect:En,useLayoutEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useMutableSource:En,useSyncExternalStore:En,useId:En,unstable_isNewReconciler:!1},D9={readContext:ur,useCallback:function(i,o){return Qr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:Cx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,nd(4194308,4,kx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return nd(4194308,4,i,o)},useInsertionEffect:function(i,o){return nd(4,2,i,o)},useMemo:function(i,o){var l=Qr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Qr();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=R9.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Qr();return i={current:i},o.memoizedState=i},useState:xx,useDebugValue:Lm,useDeferredValue:function(i){return Qr().memoizedState=i},useTransition:function(){var i=xx(!1),o=i[0];return i=I9.bind(null,i[1]),Qr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Qr();if(vt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),tn===null)throw Error(n(349));(Ps&30)!==0||yx(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,Cx(bx.bind(null,h,T,i),[i]),h.flags|=2048,Iu(9,Tx.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Qr(),o=tn.identifierPrefix;if(vt){var l=hi,h=fi;l=(h&~(1<<32-xr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=Pu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=O9++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},M9={readContext:ur,useCallback:Px,useContext:ur,useEffect:Rm,useImperativeHandle:Nx,useInsertionEffect:Ax,useLayoutEffect:vx,useMemo:Ox,useReducer:Om,useRef:wx,useState:function(){return Om(Ou)},useDebugValue:Lm,useDeferredValue:function(i){var o=lr();return Ix(o,Gt.memoizedState,i)},useTransition:function(){var i=Om(Ou)[0],o=lr().memoizedState;return[i,o]},useMutableSource:gx,useSyncExternalStore:Ex,useId:Rx,unstable_isNewReconciler:!1},F9={readContext:ur,useCallback:Px,useContext:ur,useEffect:Rm,useImperativeHandle:Nx,useInsertionEffect:Ax,useLayoutEffect:vx,useMemo:Ox,useReducer:Im,useRef:wx,useState:function(){return Im(Ou)},useDebugValue:Lm,useDeferredValue:function(i){var o=lr();return Gt===null?o.memoizedState=i:Ix(o,Gt.memoizedState,i)},useTransition:function(){var i=Im(Ou)[0],o=lr().memoizedState;return[i,o]},useMutableSource:gx,useSyncExternalStore:Ex,useId:Rx,unstable_isNewReconciler:!1};function Ar(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Dm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:k({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var sd={isMounted:function(i){return(i=i._reactInternals)?xs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=An(),E=Gi(i),T=mi(h,E);T.payload=o,l!=null&&(T.callback=l),o=$i(i,T,E),o!==null&&(Nr(o,i,E,h),Qc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=An(),E=Gi(i),T=mi(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=$i(i,T,E),o!==null&&(Nr(o,i,E,h),Qc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=An(),h=Gi(i),E=mi(l,h);E.tag=2,o!=null&&(E.callback=o),o=$i(i,E,h),o!==null&&(Nr(o,i,h,l),Qc(o,i,h))}};function Fx(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?!yu(l,h)||!yu(E,T):!0}function Bx(i,o,l){var h=!1,E=Hi,T=o.contextType;return typeof T=="object"&&T!==null?T=ur(T):(E=Dn(o)?Cs:gn.current,h=o.contextTypes,T=(h=h!=null)?Ho(i,E):Hi),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=sd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Ux(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&&sd.enqueueReplaceState(o,o.state,null)}function Mm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Sm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=ur(T):(T=Dn(o)?Cs:gn.current,E.context=Ho(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Dm(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&&sd.enqueueReplaceState(E,E.state,null),Jc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Wo(i,o){try{var l="",h=o;do l+=Oe(h),h=h.return;while(h);var E=l}catch(T){E=`
|
|
16
|
+
Error generating stack: `+T.message+`
|
|
17
|
+
`+T.stack}return{value:i,source:o,stack:E,digest:null}}function Fm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Bm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var B9=typeof WeakMap=="function"?WeakMap:Map;function Hx(i,o,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){fd||(fd=!0,Zm=h),Bm(i,o)},l}function zx(i,o,l){l=mi(-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(){Bm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Bm(i,o),typeof h!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function jx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new B9;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=J9.bind(null,i,o,l),o.then(i,i))}function $x(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 Vx(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=mi(-1,1),o.tag=2,$i(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var U9=B.ReactCurrentOwner,Mn=!1;function Cn(i,o,l,h){o.child=i===null?cx(o,null,l,h):Vo(o,i.child,l,h)}function qx(i,o,l,h,E){l=l.render;var T=o.ref;return Yo(o,E),h=Nm(i,o,l,h,T,E),l=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(vt&&l&&fm(o),o.flags|=1,Cn(i,o,h,E),o.child)}function Yx(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!o0(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,Gx(i,o,T,h,E)):(i=yd(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:yu,l(x,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Xi(T,h),i.ref=o.ref,i.return=o,o.child=i}function Gx(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(yu(T,h)&&i.ref===o.ref)if(Mn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return o.lanes=i.lanes,gi(i,o,E)}return Um(i,o,l,h,E)}function Wx(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},bt(Ko,Xn),Xn|=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,bt(Ko,Xn),Xn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,bt(Ko,Xn),Xn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,bt(Ko,Xn),Xn|=h;return Cn(i,o,E,l),o.child}function Xx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Um(i,o,l,h,E){var T=Dn(l)?Cs:gn.current;return T=Ho(o,T),Yo(o,E),l=Nm(i,o,l,h,T,E),h=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(vt&&h&&fm(o),o.flags|=1,Cn(i,o,l,E),o.child)}function Kx(i,o,l,h,E){if(Dn(l)){var T=!0;$c(o)}else T=!1;if(Yo(o,E),o.stateNode===null)ad(i,o),Bx(o,l,h),Mm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,R=o.memoizedProps;x.props=R;var U=x.context,Q=l.contextType;typeof Q=="object"&&Q!==null?Q=ur(Q):(Q=Dn(l)?Cs:gn.current,Q=Ho(o,Q));var ue=l.getDerivedStateFromProps,pe=typeof ue=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==Q)&&Ux(o,x,h,Q),ji=!1;var oe=o.memoizedState;x.state=oe,Jc(o,h,x,E),U=o.memoizedState,R!==h||oe!==U||Ln.current||ji?(typeof ue=="function"&&(Dm(o,l,ue,h),U=o.memoizedState),(R=ji||Fx(o,l,R,h,oe,U,Q))?(pe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),x.props=h,x.state=U,x.context=Q,h=R):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,fx(i,o),R=o.memoizedProps,Q=o.type===o.elementType?R:Ar(o.type,R),x.props=Q,pe=o.pendingProps,oe=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Dn(l)?Cs:gn.current,U=Ho(o,U));var xe=l.getDerivedStateFromProps;(ue=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==pe||oe!==U)&&Ux(o,x,h,U),ji=!1,oe=o.memoizedState,x.state=oe,Jc(o,h,x,E);var ke=o.memoizedState;R!==pe||oe!==ke||Ln.current||ji?(typeof xe=="function"&&(Dm(o,l,xe,h),ke=o.memoizedState),(Q=ji||Fx(o,l,Q,h,oe,ke,U)||!1)?(ue||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,U)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&oe===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&oe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),x.props=h,x.state=ke,x.context=U,h=Q):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&oe===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&oe===i.memoizedState||(o.flags|=1024),h=!1)}return Hm(i,o,l,h,T,E)}function Hm(i,o,l,h,E,T){Xx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&tx(o,l,!1),gi(i,o,T);h=o.stateNode,U9.current=o;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=Vo(o,i.child,null,T),o.child=Vo(o,null,R,T)):Cn(i,o,R,T),o.memoizedState=h.state,E&&tx(o,l,!0),o.child}function Qx(i){var o=i.stateNode;o.pendingContext?ZS(i,o.pendingContext,o.pendingContext!==o.context):o.context&&ZS(i,o.context,!1),xm(i,o.containerInfo)}function Jx(i,o,l,h,E){return $o(),gm(E),o.flags|=256,Cn(i,o,l,h),o.child}var zm={dehydrated:null,treeContext:null,retryLane:0};function jm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Zx(i,o,l){var h=o.pendingProps,E=Nt.current,T=!1,x=(o.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Nt,E&1),i===null)return mm(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=Td(x,h,0,null),i=Ds(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=jm(l),o.memoizedState=zm,i):$m(o,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return H9(i,o,x,h,R,E,l);if(T){T=h.fallback,x=o.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=Xi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?T=Xi(R,T):(T=Ds(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?jm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,o.memoizedState=zm,h}return T=i.child,i=T.sibling,h=Xi(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 $m(i,o){return o=Td({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function od(i,o,l,h){return h!==null&&gm(h),Vo(o,i.child,null,l),i=$m(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=Fm(Error(n(422))),od(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=Td({mode:"visible",children:h.children},E,0,null),T=Ds(T,E,x,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Vo(o,i.child,null,x),o.child.memoizedState=jm(x),o.memoizedState=zm,T);if((o.mode&1)===0)return od(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,T=Error(n(419)),h=Fm(T,h,void 0),od(i,o,x,h)}if(R=(x&i.childLanes)!==0,Mn||R){if(h=tn,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,pi(i,E),Nr(h,i,E,-1))}return s0(),h=Fm(Error(n(421))),od(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=Z9.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Wn=Bi(E.nextSibling),Gn=o,vt=!0,Cr=null,i!==null&&(or[ar++]=fi,or[ar++]=hi,or[ar++]=As,fi=i.id,hi=i.overflow,As=o),o=$m(o,h.children),o.flags|=4096,o)}function e2(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),bm(i.return,o,l)}function Vm(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 t2(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(Cn(i,o,h.children,l),h=Nt.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&&e2(i,l,o);else if(i.tag===19)e2(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(bt(Nt,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&&Zc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Vm(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&&Zc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Vm(o,!0,l,null,T);break;case"together":Vm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ad(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Os|=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=Xi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Xi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function z9(i,o,l){switch(o.tag){case 3:Qx(o),$o();break;case 5:mx(o);break;case 1:Dn(o.type)&&$c(o);break;case 4:xm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(Xc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(Nt,Nt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Zx(i,o,l):(bt(Nt,Nt.current&1),i=gi(i,o,l),i!==null?i.sibling:null);bt(Nt,Nt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return t2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Nt,Nt.current),h)break;return null;case 22:case 23:return o.lanes=0,Wx(i,o,l)}return gi(i,o,l)}var n2,qm,r2,i2;n2=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}},qm=function(){},r2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ns(Kr.current);var T=null;switch(l){case"input":E=Rn(i,E),h=Rn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=dt(i,E),h=dt(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Hc)}an(l,h);var x;l=null;for(Q in E)if(!h.hasOwnProperty(Q)&&E.hasOwnProperty(Q)&&E[Q]!=null)if(Q==="style"){var R=E[Q];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(s.hasOwnProperty(Q)?T||(T=[]):(T=T||[]).push(Q,null));for(Q in h){var U=h[Q];if(R=E!=null?E[Q]:void 0,h.hasOwnProperty(Q)&&U!==R&&(U!=null||R!=null))if(Q==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(T||(T=[]),T.push(Q,l)),l=U;else Q==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(T=T||[]).push(Q,U)):Q==="children"?typeof U!="string"&&typeof U!="number"||(T=T||[]).push(Q,""+U):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(s.hasOwnProperty(Q)?(U!=null&&Q==="onScroll"&&St("scroll",i),T||R===U||(T=[])):(T=T||[]).push(Q,U))}l&&(T=T||[]).push("style",l);var Q=T;(o.updateQueue=Q)&&(o.flags|=4)}},i2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Ru(i,o){if(!vt)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 yn(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 j9(i,o,l){var h=o.pendingProps;switch(hm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(o),null;case 1:return Dn(o.type)&&jc(),yn(o),null;case 3:return h=o.stateNode,Go(),xt(Ln),xt(gn),Am(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Gc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Cr!==null&&(n0(Cr),Cr=null))),qm(i,o),yn(o),null;case 5:wm(o);var E=Ns(ku.current);if(l=o.type,i!==null&&o.stateNode!=null)r2(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 yn(o),null}if(i=Ns(Kr.current),Gc(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Xr]=o,h[xu]=T,i=(o.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":_s(h,T),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},St("invalid",h);break;case"textarea":lt(h,T),St("invalid",h)}an(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var R=T[x];x==="children"?typeof R=="string"?h.textContent!==R&&(T.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(T.suppressHydrationWarning!==!0&&Uc(h.textContent,R,i),E=["children",""+R]):s.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":on(h),ve(h,T,!0);break;case"textarea":on(h),At(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Hc)}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=ne(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[Xr]=o,i[xu]=h,n2(i,o,!1,!1),o.stateNode=i;e:{switch(x=Gr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":_s(i,h),E=Rn(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":lt(i,h),E=dt(i,h),St("invalid",i);break;default:E=h}an(l,E),R=E;for(T in R)if(R.hasOwnProperty(T)){var U=R[T];T==="style"?Oi(i,U):T==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ve(i,U)):T==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Xe(i,U):typeof U=="number"&&Xe(i,""+U):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?U!=null&&T==="onScroll"&&St("scroll",i):U!=null&&C(i,T,U,x))}switch(l){case"input":on(i),ve(i,h,!1);break;case"textarea":on(i),At(i);break;case"option":h.value!=null&&i.setAttribute("value",""+we(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=Hc)}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 yn(o),null;case 6:if(i&&o.stateNode!=null)i2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ns(ku.current),Ns(Kr.current),Gc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Xr]=o,(T=h.nodeValue!==l)&&(i=Gn,i!==null))switch(i.tag){case 3:Uc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Uc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Xr]=o,o.stateNode=h}return yn(o),null;case 13:if(xt(Nt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(vt&&Wn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)ax(),$o(),o.flags|=98560,T=!1;else if(T=Gc(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[Xr]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yn(o),T=!1}else Cr!==null&&(n0(Cr),Cr=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||(Nt.current&1)!==0?Wt===0&&(Wt=3):s0())),o.updateQueue!==null&&(o.flags|=4),yn(o),null);case 4:return Go(),qm(i,o),i===null&&_u(o.stateNode.containerInfo),yn(o),null;case 10:return Tm(o.type._context),yn(o),null;case 17:return Dn(o.type)&&jc(),yn(o),null;case 19:if(xt(Nt),T=o.memoizedState,T===null)return yn(o),null;if(h=(o.flags&128)!==0,x=T.rendering,x===null)if(h)Ru(T,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Zc(i),x!==null){for(o.flags|=128,Ru(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 bt(Nt,Nt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Mt()>Qo&&(o.flags|=128,h=!0,Ru(T,!1),o.lanes=4194304)}else{if(!h)if(i=Zc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Ru(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!vt)return yn(o),null}else 2*Mt()-T.renderingStartTime>Qo&&l!==1073741824&&(o.flags|=128,h=!0,Ru(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=Nt.current,bt(Nt,h?l&1|2:l&1),o):(yn(o),null);case 22:case 23:return i0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Xn&1073741824)!==0&&(yn(o),o.subtreeFlags&6&&(o.flags|=8192)):yn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function $9(i,o){switch(hm(o),o.tag){case 1:return Dn(o.type)&&jc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Go(),xt(Ln),xt(gn),Am(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return wm(o),null;case 13:if(xt(Nt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));$o()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return xt(Nt),null;case 4:return Go(),null;case 10:return Tm(o.type._context),null;case 22:case 23:return i0(),null;case 24:return null;default:return null}}var ud=!1,Tn=!1,V9=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function Xo(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 Ym(i,o,l){try{l()}catch(h){It(i,o,h)}}var s2=!1;function q9(i,o){if(im=kc,i=FS(),Kp(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(ye){l=null;break e}var x=0,R=-1,U=-1,Q=0,ue=0,pe=i,oe=null;t:for(;;){for(var xe;pe!==l||E!==0&&pe.nodeType!==3||(R=x+E),pe!==T||h!==0&&pe.nodeType!==3||(U=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(xe=pe.firstChild)!==null;)oe=pe,pe=xe;for(;;){if(pe===i)break t;if(oe===l&&++Q===E&&(R=x),oe===T&&++ue===h&&(U=x),(xe=pe.nextSibling)!==null)break;pe=oe,oe=pe.parentNode}pe=xe}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(sm={focusedElem:i,selectionRange:l},kc=!1,Ae=o;Ae!==null;)if(o=Ae,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ae=i;else for(;Ae!==null;){o=Ae;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Pe=ke.memoizedProps,Ft=ke.memoizedState,Y=o.stateNode,z=Y.getSnapshotBeforeUpdate(o.elementType===o.type?Pe:Ar(o.type,Pe),Ft);Y.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var X=o.stateNode.containerInfo;X.nodeType===1?X.textContent="":X.nodeType===9&&X.documentElement&&X.removeChild(X.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){It(o,o.return,ye)}if(i=o.sibling,i!==null){i.return=o.return,Ae=i;break}Ae=o.return}return ke=s2,s2=!1,ke}function Lu(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&&Ym(o,l,T)}E=E.next}while(E!==h)}}function ld(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 Gm(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 o2(i){var o=i.alternate;o!==null&&(i.alternate=null,o2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Xr],delete o[xu],delete o[lm],delete o[v9],delete o[k9])),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 a2(i){return i.tag===5||i.tag===3||i.tag===4}function u2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||a2(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 Wm(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=Hc));else if(h!==4&&(i=i.child,i!==null))for(Wm(i,o,l),i=i.sibling;i!==null;)Wm(i,o,l),i=i.sibling}function Xm(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(Xm(i,o,l),i=i.sibling;i!==null;)Xm(i,o,l),i=i.sibling}var un=null,vr=!1;function Vi(i,o,l){for(l=l.child;l!==null;)l2(i,o,l),l=l.sibling}function l2(i,o,l){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(Sc,l)}catch(R){}switch(l.tag){case 5:Tn||Xo(l,o);case 6:var h=un,E=vr;un=null,Vi(i,o,l),un=h,vr=E,un!==null&&(vr?(i=un,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):un.removeChild(l.stateNode));break;case 18:un!==null&&(vr?(i=un,l=l.stateNode,i.nodeType===8?um(i.parentNode,l):i.nodeType===1&&um(i,l),fu(i)):um(un,l.stateNode));break;case 4:h=un,E=vr,un=l.stateNode.containerInfo,vr=!0,Vi(i,o,l),un=h,vr=E;break;case 0:case 11:case 14:case 15:if(!Tn&&(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)&&Ym(l,o,x),E=E.next}while(E!==h)}Vi(i,o,l);break;case 1:if(!Tn&&(Xo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,o,R)}Vi(i,o,l);break;case 21:Vi(i,o,l);break;case 22:l.mode&1?(Tn=(h=Tn)||l.memoizedState!==null,Vi(i,o,l),Tn=h):Vi(i,o,l);break;default:Vi(i,o,l)}}function c2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new V9),o.forEach(function(h){var E=e7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function kr(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,R=x;e:for(;R!==null;){switch(R.tag){case 5:un=R.stateNode,vr=!1;break e;case 3:un=R.stateNode.containerInfo,vr=!0;break e;case 4:un=R.stateNode.containerInfo,vr=!0;break e}R=R.return}if(un===null)throw Error(n(160));l2(T,x,E),un=null,vr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Q){It(E,o,Q)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)d2(o,i),o=o.sibling}function d2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(kr(o,i),Jr(i),h&4){try{Lu(3,i,i.return),ld(3,i)}catch(Pe){It(i,i.return,Pe)}try{Lu(5,i,i.return)}catch(Pe){It(i,i.return,Pe)}}break;case 1:kr(o,i),Jr(i),h&512&&l!==null&&Xo(l,l.return);break;case 5:if(kr(o,i),Jr(i),h&512&&l!==null&&Xo(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(Pe){It(i,i.return,Pe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&T.type==="radio"&&T.name!=null&&Pi(E,T),Gr(R,x);var Q=Gr(R,T);for(x=0;x<U.length;x+=2){var ue=U[x],pe=U[x+1];ue==="style"?Oi(E,pe):ue==="dangerouslySetInnerHTML"?Ve(E,pe):ue==="children"?Xe(E,pe):C(E,ue,pe,Q)}switch(R){case"input":li(E,T);break;case"textarea":wn(E,T);break;case"select":var oe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?Qe(E,!!T.multiple,xe,!1):oe!==!!T.multiple&&(T.defaultValue!=null?Qe(E,!!T.multiple,T.defaultValue,!0):Qe(E,!!T.multiple,T.multiple?[]:"",!1))}E[xu]=T}catch(Pe){It(i,i.return,Pe)}}break;case 6:if(kr(o,i),Jr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Pe){It(i,i.return,Pe)}}break;case 3:if(kr(o,i),Jr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{fu(o.containerInfo)}catch(Pe){It(i,i.return,Pe)}break;case 4:kr(o,i),Jr(i);break;case 13:kr(o,i),Jr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Jm=Mt())),h&4&&c2(i);break;case 22:if(ue=l!==null&&l.memoizedState!==null,i.mode&1?(Tn=(Q=Tn)||ue,kr(o,i),Tn=Q):kr(o,i),Jr(i),h&8192){if(Q=i.memoizedState!==null,(i.stateNode.isHidden=Q)&&!ue&&(i.mode&1)!==0)for(Ae=i,ue=i.child;ue!==null;){for(pe=Ae=ue;Ae!==null;){switch(oe=Ae,xe=oe.child,oe.tag){case 0:case 11:case 14:case 15:Lu(4,oe,oe.return);break;case 1:Xo(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){h=oe,l=oe.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Pe){It(h,l,Pe)}}break;case 5:Xo(oe,oe.return);break;case 22:if(oe.memoizedState!==null){p2(pe);continue}}xe!==null?(xe.return=oe,Ae=xe):p2(pe)}ue=ue.sibling}e:for(ue=null,pe=i;;){if(pe.tag===5){if(ue===null){ue=pe;try{E=pe.stateNode,Q?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(R=pe.stateNode,U=pe.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=sr("display",x))}catch(Pe){It(i,i.return,Pe)}}}else if(pe.tag===6){if(ue===null)try{pe.stateNode.nodeValue=Q?"":pe.memoizedProps}catch(Pe){It(i,i.return,Pe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ue===pe&&(ue=null),pe=pe.return}ue===pe&&(ue=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:kr(o,i),Jr(i),h&4&&c2(i);break;case 21:break;default:kr(o,i),Jr(i)}}function Jr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(a2(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&&(Xe(E,""),h.flags&=-33);var T=u2(i);Xm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=u2(i);Wm(i,R,x);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Y9(i,o,l){Ae=i,f2(i)}function f2(i,o,l){for(var h=(i.mode&1)!==0;Ae!==null;){var E=Ae,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||ud;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||Tn;R=ud;var Q=Tn;if(ud=x,(Tn=U)&&!Q)for(Ae=E;Ae!==null;)x=Ae,U=x.child,x.tag===22&&x.memoizedState!==null?m2(E):U!==null?(U.return=x,Ae=U):m2(E);for(;T!==null;)Ae=T,f2(T),T=T.sibling;Ae=E,ud=R,Tn=Q}h2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ae=T):h2(i)}}function h2(i){for(;Ae!==null;){var o=Ae;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Tn||ld(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!Tn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Ar(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&px(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}px(o,x,l)}break;case 5:var R=o.stateNode;if(l===null&&o.flags&4){l=R;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Q=o.alternate;if(Q!==null){var ue=Q.memoizedState;if(ue!==null){var pe=ue.dehydrated;pe!==null&&fu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tn||o.flags&512&&Gm(o)}catch(oe){It(o,o.return,oe)}}if(o===i){Ae=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ae=l;break}Ae=o.return}}function p2(i){for(;Ae!==null;){var o=Ae;if(o===i){Ae=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ae=l;break}Ae=o.return}}function m2(i){for(;Ae!==null;){var o=Ae;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{ld(4,o)}catch(U){It(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){It(o,E,U)}}var T=o.return;try{Gm(o)}catch(U){It(o,T,U)}break;case 5:var x=o.return;try{Gm(o)}catch(U){It(o,x,U)}}}catch(U){It(o,o.return,U)}if(o===i){Ae=null;break}var R=o.sibling;if(R!==null){R.return=o.return,Ae=R;break}Ae=o.return}}var G9=Math.ceil,cd=B.ReactCurrentDispatcher,Km=B.ReactCurrentOwner,cr=B.ReactCurrentBatchConfig,rt=0,tn=null,$t=null,ln=0,Xn=0,Ko=Ui(0),Wt=0,Du=null,Os=0,dd=0,Qm=0,Mu=null,Fn=null,Jm=0,Qo=1/0,Ei=null,fd=!1,Zm=null,qi=null,hd=!1,Yi=null,pd=0,Fu=0,e0=null,md=-1,gd=0;function An(){return(rt&6)!==0?Mt():md!==-1?md:md=Mt()}function Gi(i){return(i.mode&1)===0?1:(rt&2)!==0&&ln!==0?ln&-ln:P9.transition!==null?(gd===0&&(gd=uS()),gd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:ES(i.type)),i)}function Nr(i,o,l,h){if(50<Fu)throw Fu=0,e0=null,Error(n(185));au(i,l,h),((rt&2)===0||i!==tn)&&(i===tn&&((rt&2)===0&&(dd|=l),Wt===4&&Wi(i,ln)),Bn(i,h),l===1&&rt===0&&(o.mode&1)===0&&(Qo=Mt()+500,Vc&&zi()))}function Bn(i,o){var l=i.callbackNode;PB(i,o);var h=Cc(i,i===tn?ln:0);if(h===0)l!==null&&sS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&sS(l),o===1)i.tag===0?N9(E2.bind(null,i)):nx(E2.bind(null,i)),C9(function(){(rt&6)===0&&zi()}),l=null;else{switch(lS(h)){case 1:l=Rp;break;case 4:l=oS;break;case 16:l=_c;break;case 536870912:l=aS;break;default:l=_c}l=C2(l,g2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function g2(i,o){if(md=-1,gd=0,(rt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Jo()&&i.callbackNode!==l)return null;var h=Cc(i,i===tn?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Ed(i,h);else{o=h;var E=rt;rt|=2;var T=T2();(tn!==i||ln!==o)&&(Ei=null,Qo=Mt()+500,Rs(i,o));do try{K9();break}catch(R){y2(i,R)}while(!0);ym(),cd.current=T,rt=E,$t!==null?o=0:(tn=null,ln=0,o=Wt)}if(o!==0){if(o===2&&(E=Lp(i),E!==0&&(h=E,o=t0(i,E))),o===1)throw l=Du,Rs(i,0),Wi(i,h),Bn(i,Mt()),l;if(o===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!W9(E)&&(o=Ed(i,h),o===2&&(T=Lp(i),T!==0&&(h=T,o=t0(i,T))),o===1))throw l=Du,Rs(i,0),Wi(i,h),Bn(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ls(i,Fn,Ei);break;case 3:if(Wi(i,h),(h&130023424)===h&&(o=Jm+500-Mt(),10<o)){if(Cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){An(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=am(Ls.bind(null,i,Fn,Ei),o);break}Ls(i,Fn,Ei);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-xr(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*G9(h/1960))-h,10<h){i.timeoutHandle=am(Ls.bind(null,i,Fn,Ei),h);break}Ls(i,Fn,Ei);break;case 5:Ls(i,Fn,Ei);break;default:throw Error(n(329))}}}return Bn(i,Mt()),i.callbackNode===l?g2.bind(null,i):null}function t0(i,o){var l=Mu;return i.current.memoizedState.isDehydrated&&(Rs(i,o).flags|=256),i=Ed(i,o),i!==2&&(o=Fn,Fn=l,o!==null&&n0(o)),i}function n0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function W9(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(!wr(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 Wi(i,o){for(o&=~Qm,o&=~dd,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-xr(o),h=1<<l;i[l]=-1,o&=~h}}function E2(i){if((rt&6)!==0)throw Error(n(327));Jo();var o=Cc(i,0);if((o&1)===0)return Bn(i,Mt()),null;var l=Ed(i,o);if(i.tag!==0&&l===2){var h=Lp(i);h!==0&&(o=h,l=t0(i,h))}if(l===1)throw l=Du,Rs(i,0),Wi(i,o),Bn(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ls(i,Fn,Ei),Bn(i,Mt()),null}function r0(i,o){var l=rt;rt|=1;try{return i(o)}finally{rt=l,rt===0&&(Qo=Mt()+500,Vc&&zi())}}function Is(i){Yi!==null&&Yi.tag===0&&(rt&6)===0&&Jo();var o=rt;rt|=1;var l=cr.transition,h=ct;try{if(cr.transition=null,ct=1,i)return i()}finally{ct=h,cr.transition=l,rt=o,(rt&6)===0&&zi()}}function i0(){Xn=Ko.current,xt(Ko)}function Rs(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,w9(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(hm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&jc();break;case 3:Go(),xt(Ln),xt(gn),Am();break;case 5:wm(h);break;case 4:Go();break;case 13:xt(Nt);break;case 19:xt(Nt);break;case 10:Tm(h.type._context);break;case 22:case 23:i0()}l=l.return}if(tn=i,$t=i=Xi(i.current,null),ln=Xn=o,Wt=0,Du=null,Qm=dd=Os=0,Fn=Mu=null,ks!==null){for(o=0;o<ks.length;o++)if(l=ks[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}ks=null}return i}function y2(i,o){do{var l=$t;try{if(ym(),ed.current=id,td){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}td=!1}if(Ps=0,en=Gt=Pt=null,Nu=!1,Pu=0,Km.current=null,l===null||l.return===null){Wt=1,Du=o,$t=null;break}e:{var T=i,x=l.return,R=l,U=o;if(o=ln,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Q=U,ue=R,pe=ue.tag;if((ue.mode&1)===0&&(pe===0||pe===11||pe===15)){var oe=ue.alternate;oe?(ue.updateQueue=oe.updateQueue,ue.memoizedState=oe.memoizedState,ue.lanes=oe.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var xe=$x(x);if(xe!==null){xe.flags&=-257,Vx(xe,x,R,T,o),xe.mode&1&&jx(T,Q,o),o=xe,U=Q;var ke=o.updateQueue;if(ke===null){var Pe=new Set;Pe.add(U),o.updateQueue=Pe}else ke.add(U);break e}else{if((o&1)===0){jx(T,Q,o),s0();break e}U=Error(n(426))}}else if(vt&&R.mode&1){var Ft=$x(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),Vx(Ft,x,R,T,o),gm(Wo(U,R));break e}}T=U=Wo(U,R),Wt!==4&&(Wt=2),Mu===null?Mu=[T]:Mu.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var Y=Hx(T,U,o);hx(T,Y);break e;case 1:R=U;var z=T.type,X=T.stateNode;if((T.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||X!==null&&typeof X.componentDidCatch=="function"&&(qi===null||!qi.has(X)))){T.flags|=65536,o&=-o,T.lanes|=o;var ye=zx(T,R,o);hx(T,ye);break e}}T=T.return}while(T!==null)}_2(l)}catch(Re){o=Re,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function T2(){var i=cd.current;return cd.current=id,i===null?id:i}function s0(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),tn===null||(Os&268435455)===0&&(dd&268435455)===0||Wi(tn,ln)}function Ed(i,o){var l=rt;rt|=2;var h=T2();(tn!==i||ln!==o)&&(Ei=null,Rs(i,o));do try{X9();break}catch(E){y2(i,E)}while(!0);if(ym(),rt=l,cd.current=h,$t!==null)throw Error(n(261));return tn=null,ln=0,Wt}function X9(){for(;$t!==null;)b2($t)}function K9(){for(;$t!==null&&!_B();)b2($t)}function b2(i){var o=w2(i.alternate,i,Xn);i.memoizedProps=i.pendingProps,o===null?_2(i):$t=o,Km.current=null}function _2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=j9(l,o,Xn),l!==null){$t=l;return}}else{if(l=$9(l,o),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Wt=6,$t=null;return}}if(o=o.sibling,o!==null){$t=o;return}$t=o=i}while(o!==null);Wt===0&&(Wt=5)}function Ls(i,o,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,Q9(i,o,l,h)}finally{cr.transition=E,ct=h}return null}function Q9(i,o,l,h){do Jo();while(Yi!==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(OB(i,T),i===tn&&($t=tn=null,ln=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||hd||(hd=!0,C2(_c,function(){return Jo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=cr.transition,cr.transition=null;var x=ct;ct=1;var R=rt;rt|=4,Km.current=null,q9(i,l),d2(l,i),E9(sm),kc=!!im,sm=im=null,i.current=l,Y9(l),SB(),rt=R,ct=x,cr.transition=T}else i.current=l;if(hd&&(hd=!1,Yi=i,pd=E),T=i.pendingLanes,T===0&&(qi=null),CB(l.stateNode),Bn(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(fd)throw fd=!1,i=Zm,Zm=null,i;return(pd&1)!==0&&i.tag!==0&&Jo(),T=i.pendingLanes,(T&1)!==0?i===e0?Fu++:(Fu=0,e0=i):Fu=0,zi(),null}function Jo(){if(Yi!==null){var i=lS(pd),o=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,Yi===null)var h=!1;else{if(i=Yi,Yi=null,pd=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Ae=i.current;Ae!==null;){var T=Ae,x=T.child;if((Ae.flags&16)!==0){var R=T.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Q=R[U];for(Ae=Q;Ae!==null;){var ue=Ae;switch(ue.tag){case 0:case 11:case 15:Lu(8,ue,T)}var pe=ue.child;if(pe!==null)pe.return=ue,Ae=pe;else for(;Ae!==null;){ue=Ae;var oe=ue.sibling,xe=ue.return;if(o2(ue),ue===Q){Ae=null;break}if(oe!==null){oe.return=xe,Ae=oe;break}Ae=xe}}}var ke=T.alternate;if(ke!==null){var Pe=ke.child;if(Pe!==null){ke.child=null;do{var Ft=Pe.sibling;Pe.sibling=null,Pe=Ft}while(Pe!==null)}}Ae=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,Ae=x;else e:for(;Ae!==null;){if(T=Ae,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Lu(9,T,T.return)}var Y=T.sibling;if(Y!==null){Y.return=T.return,Ae=Y;break e}Ae=T.return}}var z=i.current;for(Ae=z;Ae!==null;){x=Ae;var X=x.child;if((x.subtreeFlags&2064)!==0&&X!==null)X.return=x,Ae=X;else e:for(x=z;Ae!==null;){if(R=Ae,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:ld(9,R)}}catch(Re){It(R,R.return,Re)}if(R===x){Ae=null;break e}var ye=R.sibling;if(ye!==null){ye.return=R.return,Ae=ye;break e}Ae=R.return}}if(rt=E,zi(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(Sc,i)}catch(Re){}h=!0}return h}finally{ct=l,cr.transition=o}}return!1}function S2(i,o,l){o=Wo(l,o),o=Hx(i,o,1),i=$i(i,o,1),o=An(),i!==null&&(au(i,1,o),Bn(i,o))}function It(i,o,l){if(i.tag===3)S2(i,i,l);else for(;o!==null;){if(o.tag===3){S2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(qi===null||!qi.has(h))){i=Wo(l,i),i=zx(o,i,1),o=$i(o,i,1),i=An(),o!==null&&(au(o,1,i),Bn(o,i));break}}o=o.return}}function J9(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=An(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(ln&l)===l&&(Wt===4||Wt===3&&(ln&130023424)===ln&&500>Mt()-Jm?Rs(i,0):Qm|=l),Bn(i,o)}function x2(i,o){o===0&&((i.mode&1)===0?o=1:(o=wc,wc<<=1,(wc&130023424)===0&&(wc=4194304)));var l=An();i=pi(i,o),i!==null&&(au(i,o,l),Bn(i,l))}function Z9(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),x2(i,l)}function e7(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),x2(i,l)}var w2;w2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Mn=!1,z9(i,o,l);Mn=(i.flags&131072)!==0}else Mn=!1,vt&&(o.flags&1048576)!==0&&rx(o,Yc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;ad(i,o),i=o.pendingProps;var E=Ho(o,gn.current);Yo(o,l),E=Nm(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,Dn(h)?(T=!0,$c(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Sm(o),E.updater=sd,o.stateNode=E,E._reactInternals=o,Mm(o,h,i,l),o=Hm(null,o,h,!0,T,l)):(o.tag=0,vt&&T&&fm(o),Cn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(ad(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=n7(h),i=Ar(h,i),E){case 0:o=Um(null,o,h,i,l);break e;case 1:o=Kx(null,o,h,i,l);break e;case 11:o=qx(null,o,h,i,l);break e;case 14:o=Yx(null,o,h,Ar(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:Ar(h,E),Um(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Kx(i,o,h,E,l);case 3:e:{if(Qx(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,fx(i,o),Jc(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=Wo(Error(n(423)),o),o=Jx(i,o,h,l,E);break e}else if(h!==E){E=Wo(Error(n(424)),o),o=Jx(i,o,h,l,E);break e}else for(Wn=Bi(o.stateNode.containerInfo.firstChild),Gn=o,vt=!0,Cr=null,l=cx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if($o(),h===E){o=gi(i,o,l);break e}Cn(i,o,h,l)}o=o.child}return o;case 5:return mx(o),i===null&&mm(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,om(h,E)?x=null:T!==null&&om(h,T)&&(o.flags|=32),Xx(i,o),Cn(i,o,x,l),o.child;case 6:return i===null&&mm(o),null;case 13:return Zx(i,o,l);case 4:return xm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Vo(o,null,h,l):Cn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),qx(i,o,h,E,l);case 7:return Cn(i,o,o.pendingProps,l),o.child;case 8:return Cn(i,o,o.pendingProps.children,l),o.child;case 12:return Cn(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,bt(Xc,h._currentValue),h._currentValue=x,T!==null)if(wr(T.value,x)){if(T.children===E.children&&!Ln.current){o=gi(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var R=T.dependencies;if(R!==null){x=T.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(T.tag===1){U=mi(-1,l&-l),U.tag=2;var Q=T.updateQueue;if(Q!==null){Q=Q.shared;var ue=Q.pending;ue===null?U.next=U:(U.next=ue.next,ue.next=U),Q.pending=U}}T.lanes|=l,U=T.alternate,U!==null&&(U.lanes|=l),bm(T.return,l,o),R.lanes|=l;break}U=U.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,R=x.alternate,R!==null&&(R.lanes|=l),bm(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}Cn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Yo(o,l),E=ur(E),h=h(E),o.flags|=1,Cn(i,o,h,l),o.child;case 14:return h=o.type,E=Ar(h,o.pendingProps),E=Ar(h.type,E),Yx(i,o,h,E,l);case 15:return Gx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),ad(i,o),o.tag=1,Dn(h)?(i=!0,$c(o)):i=!1,Yo(o,l),Bx(o,h,E),Mm(o,h,E,l),Hm(null,o,h,!0,i,l);case 19:return t2(i,o,l);case 22:return Wx(i,o,l)}throw Error(n(156,o.tag))};function C2(i,o){return iS(i,o)}function t7(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 dr(i,o,l,h){return new t7(i,o,l,h)}function o0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function n7(i){if(typeof i=="function")return o0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===be)return 14}return 2}function Xi(i,o){var l=i.alternate;return l===null?(l=dr(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 yd(i,o,l,h,E,T){var x=2;if(h=i,typeof i=="function")o0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case J:return Ds(l.children,E,T,o);case ie:x=8,E|=8;break;case Te:return i=dr(12,l,o,E|2),i.elementType=Te,i.lanes=T,i;case he:return i=dr(13,l,o,E),i.elementType=he,i.lanes=T,i;case le:return i=dr(19,l,o,E),i.elementType=le,i.lanes=T,i;case de:return Td(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case ee:x=9;break e;case ce:x=11;break e;case be:x=14;break e;case Me:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=dr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ds(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function Td(i,o,l,h){return i=dr(22,i,h,o),i.elementType=de,i.lanes=l,i.stateNode={isHidden:!1},i}function a0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function u0(i,o,l){return o=dr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function r7(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=Dp(0),this.expirationTimes=Dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function l0(i,o,l,h,E,T,x,R,U){return i=new r7(i,o,l,R,U),o===1?(o=1,T===!0&&(o|=8)):o=0,T=dr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sm(T),i}function i7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function A2(i){if(!i)return Hi;i=i._reactInternals;e:{if(xs(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(Dn(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(Dn(l))return ex(i,l,o)}return o}function v2(i,o,l,h,E,T,x,R,U){return i=l0(l,h,!0,i,E,T,x,R,U),i.context=A2(null),l=i.current,h=An(),E=Gi(l),T=mi(h,E),T.callback=o!=null?o:null,$i(l,T,E),i.current.lanes=E,au(i,E,h),Bn(i,h),i}function bd(i,o,l,h){var E=o.current,T=An(),x=Gi(E);return l=A2(l),o.context===null?o.context=l:o.pendingContext=l,o=mi(T,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=$i(E,o,x),i!==null&&(Nr(i,E,x,T),Qc(i,E,x)),x}function _d(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function k2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function c0(i,o){k2(i,o),(i=i.alternate)&&k2(i,o)}function s7(){return null}var N2=typeof reportError=="function"?reportError:function(i){console.error(i)};function d0(i){this._internalRoot=i}Sd.prototype.render=d0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));bd(i,o,null,null)},Sd.prototype.unmount=d0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Is(function(){bd(null,i,null,null)}),o[ci]=null}};function Sd(i){this._internalRoot=i}Sd.prototype.unstable_scheduleHydration=function(i){if(i){var o=fS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Di.length&&o!==0&&o<Di[l].priority;l++);Di.splice(l,0,i),l===0&&mS(i)}};function f0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function P2(){}function o7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Q=_d(x);T.call(Q)}}var x=v2(o,h,i,0,null,!1,!1,"",P2);return i._reactRootContainer=x,i[ci]=x.current,_u(i.nodeType===8?i.parentNode:i),Is(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Q=_d(U);R.call(Q)}}var U=l0(i,0,!1,null,null,!1,!1,"",P2);return i._reactRootContainer=U,i[ci]=U.current,_u(i.nodeType===8?i.parentNode:i),Is(function(){bd(o,U,l,h)}),U}function wd(i,o,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var R=E;E=function(){var U=_d(x);R.call(U)}}bd(o,x,i,E)}else x=o7(l,o,i,E,h);return _d(x)}cS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=ou(o.pendingLanes);l!==0&&(Mp(o,l|1),Bn(o,Mt()),(rt&6)===0&&(Qo=Mt()+500,zi()))}break;case 13:Is(function(){var h=pi(i,1);if(h!==null){var E=An();Nr(h,i,1,E)}}),c0(i,1)}},Fp=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var l=An();Nr(o,i,134217728,l)}c0(i,134217728)}},dS=function(i){if(i.tag===13){var o=Gi(i),l=pi(i,o);if(l!==null){var h=An();Nr(l,i,o,h)}c0(i,o)}},fS=function(){return ct},hS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},Np=function(i,o,l){switch(o){case"input":if(li(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=zc(h);if(!E)throw Error(n(90));Yr(h),li(h,E)}}}break;case"textarea":wn(i,l);break;case"select":o=l.value,o!=null&&Qe(i,!!l.multiple,o,!1)}},Q_=r0,J_=Is;var a7={usingClientEntryPoint:!1,Events:[wu,Bo,zc,X_,K_,r0]},Bu={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},u7={bundleType:Bu.bundleType,version:Bu.version,rendererPackageName:Bu.rendererPackageName,rendererConfig:Bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:B.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=nS(i),i===null?null:i.stateNode},findFiberByHostInstance:Bu.findFiberByHostInstance||s7,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{Sc=Cd.inject(u7),Wr=Cd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a7,kn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f0(o))throw Error(n(200));return i7(i,o,null,l)},kn.createRoot=function(i,o){if(!f0(i))throw Error(n(299));var l=!1,h="",E=N2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=l0(i,1,!1,null,null,l,!1,h,E),i[ci]=o.current,_u(i.nodeType===8?i.parentNode:i),new d0(o)},kn.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=nS(o),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return Is(i)},kn.hydrate=function(i,o,l){if(!xd(o))throw Error(n(200));return wd(null,i,o,!0,l)},kn.hydrateRoot=function(i,o,l){if(!f0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=N2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=v2(o,null,i,1,l!=null?l:null,E,!1,T,x),i[ci]=o.current,_u(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 Sd(o)},kn.render=function(i,o,l){if(!xd(o))throw Error(n(200));return wd(null,i,o,!1,l)},kn.unmountComponentAtNode=function(i){if(!xd(i))throw Error(n(40));return i._reactRootContainer?(Is(function(){wd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},kn.unstable_batchedUpdates=r0,kn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!xd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return wd(i,o,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var b1;function _1(){if(b1)return Af.exports;b1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Af.exports=uk(),Af.exports}var Gs=_1();function S1(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=S1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=S1(e))&&(r&&(r+=" "),r+=t);return r}const Lr=({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:W(e,`${j}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),lk="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",ck=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=ft(),r=()=>{pl(!1),bi(!0)};return Gs.createPortal(w.jsx("div",{className:W(e,`${j}-minimized-container`),style:n,children:w.jsx(Lr,{className:W(e,`${j}-minimized-button`),ariaLabel:"Open Copilot",icon:w.jsx("img",{src:t||lk,alt:"Copilot",className:W(e,`${j}-minimized-icon-img`)}),onClick:r})}),document.body)};var x1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},w1=Qi.createContext&&Qi.createContext(x1),dk=["attr","size","title"];function fk(e,t){if(e==null)return{};var n=hk(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 hk(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 El(){return El=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},El.apply(this,arguments)}function C1(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 yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(n),!0).forEach(function(r){pk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pk(e,t,n){return t=mk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mk(e){var t=gk(e,"string");return typeof t=="symbol"?t:t+""}function gk(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 A1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,yl({key:n},t.attr),A1(t.child)))}function Lt(e){return t=>Qi.createElement(Ek,El({attr:yl({},e.attr)},t),A1(e.child))}function Ek(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=fk(e,dk),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",El({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:yl(yl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Qi.createElement("title",null,a),e.children)};return w1!==void 0?Qi.createElement(w1.Consumer,null,n=>t(n)):t(x1)}function v1(e){return Lt({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 k1(e){return Lt({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 Ws(e){return Lt({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 yk(e){return Lt({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 N1(e){return Lt({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 Tk(e){return Lt({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 bk(e){return Lt({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 _k(e){return Lt({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 Sk(e){return Lt({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 xk(e){return Lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const Nf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,className:W(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"})})}),Tl=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),wk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Ws,{size:"16px"})},Ck=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(Lr,{className:W(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(Ws,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Tl,{className:W(e,n,r,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(wk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Ak(e){return Lt({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 vk=()=>{const{messages:e}=Zn(),{handleCancel:t}=gr();return{cancelRequest:H.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},kk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=ft(),{cancelRequest:r}=vk();return n!=null&&n.enableCancelSearch?w.jsx(Lr,{className:W(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Ak,{}),disabled:!e,onClick:r}):null};function j7(){}function $7(){}function P1(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 O1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ok={};function I1(e,t){return(Ok.jsx?Pk:Nk).test(e)}const Ik=/[ \t\n\f\r]/g;function Rk(e){return typeof e=="object"?e.type==="text"?R1(e.value):!1:R1(e)}function R1(e){return e.replace(Ik,"")===""}let Ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function L1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ta(n,r,t)}function ba(e){return e.toLowerCase()}let Nn=class{constructor(t,n){this.attribute=n,this.property=t}};Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let Lk=0;const Ge=ss(),zt=ss(),Pf=ss(),ge=ss(),Et=ss(),Xs=ss(),Hn=ss();function ss(){return ea(2,++Lk)}const Of=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:zt,commaOrSpaceSeparated:Hn,commaSeparated:Xs,number:ge,overloadedBoolean:Pf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),If=Object.keys(Of);let Rf=class extends Nn{constructor(t,n,r,s){let a=-1;if(super(t,n),D1(this,"space",s),typeof r=="number")for(;++a<If.length;){const u=If[a];D1(this,If[a],(r&Of[u])===Of[u])}}};Rf.prototype.defined=!0;function D1(e,t,n){n&&(e[t]=n)}function Ks(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Rf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ba(r)]=r,n[ba(a.attribute)]=r}return new Ta(t,n,e.space)}const M1=Ks({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ge,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:zt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function F1(e,t){return t in e?e[t]:t}function B1(e,t){return F1(e,t.toLowerCase())}const Dk=Ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xs,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Et,autoFocus:Ge,autoPlay:Ge,blocking:Et,capture:null,charSet:null,checked:Ge,cite:null,className:Et,cols:ge,colSpan:null,content:null,contentEditable:zt,controls:Ge,controlsList:Et,coords:ge|Xs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Pf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Et,height:ge,hidden:Pf,high:ge,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ge,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:ge,pattern:null,ping:Et,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Et,required:Ge,reversed:Ge,rows:ge,rowSpan:ge,sandbox:Et,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,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:Ge,useMap:null,value:zt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,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:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:B1}),Mk=Ks({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:Hn,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:Et,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:Ge,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:Xs,g2:Xs,glyphName:Xs,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:Hn,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:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:Hn,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:Hn,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:Hn,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},space:"svg",transform:F1}),U1=Ks({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()}}),H1=Ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B1}),z1=Ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Fk={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"},Bk=/[A-Z]/g,j1=/-[a-z]/g,Uk=/^data[-\w.:]+$/i;function Lf(e,t){const n=ba(t);let r=t,s=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(j1,zk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!j1.test(a)){let u=a.replace(Bk,Hk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Rf}return new s(r,t)}function Hk(e){return"-"+e.toLowerCase()}function zk(e){return e.charAt(1).toUpperCase()}const bl=L1([M1,Dk,U1,H1,z1],"html"),Qs=L1([M1,Mk,U1,H1,z1],"svg");function $1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function V1(e){return e.join(" ").trim()}var Js={},Df,q1;function jk(){if(q1)return Df;q1=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=`
|
|
18
|
+
`,f="/",p="*",g="",b="comment",y="declaration";Df=function(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var v=1,P=1;function C(he){var le=he.match(t);le&&(v+=le.length);var be=he.lastIndexOf(d);P=~be?he.length-be:P+he.length}function B(){var he={line:v,column:P};return function(le){return le.position=new q(he),ie(),le}}function q(he){this.start=he,this.end={line:v,column:P},this.source=A.source}q.prototype.content=S;function D(he){var le=new Error(A.source+":"+v+":"+P+": "+he);if(le.reason=he,le.filename=A.source,le.line=v,le.column=P,le.source=S,!A.silent)throw le}function J(he){var le=he.exec(S);if(le){var be=le[0];return C(be),S=S.slice(be.length),le}}function ie(){J(n)}function Te(he){var le;for(he=he||[];le=$();)le!==!1&&he.push(le);return he}function $(){var he=B();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var le=2;g!=S.charAt(le)&&(p!=S.charAt(le)||f!=S.charAt(le+1));)++le;if(le+=2,g===S.charAt(le-1))return D("End of comment missing");var be=S.slice(2,le-2);return P+=2,C(be),S=S.slice(le),P+=2,he({type:b,comment:be})}}function ee(){var he=B(),le=J(r);if(le){if($(),!J(s))return D("property missing ':'");var be=J(a),Me=he({type:y,property:_(le[0].replace(e,g)),value:be?_(be[0].replace(e,g)):g});return J(u),Me}}function ce(){var he=[];Te(he);for(var le;le=ee();)le!==!1&&(he.push(le),Te(he));return he}return ie(),ce()};function _(S){return S?S.replace(c,g):g}return Df}var Y1;function $k(){if(Y1)return Js;Y1=1;var e=Js&&Js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=n;var t=e(jk());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 Js}var _a={},G1;function Vk(){if(G1)return _a;G1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.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 _a.camelCase=d,_a}var Sa,W1;function qk(){if(W1)return Sa;W1=1;var e=Sa&&Sa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e($k()),n=Vk();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,Sa=r,Sa}var Yk=qk();const Gk=ze(Yk),_l=X1("end"),Dr=X1("start");function X1(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 K1(e){const t=Dr(e),n=_l(e);if(t&&n)return{start:t,end:n}}function xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Q1(e.position):"start"in e||"end"in e?Q1(e):"line"in e||"column"in e?Mf(e):""}function Mf(e){return J1(e&&e.line)+":"+J1(e&&e.column)}function Q1(e){return Mf(e&&e.start)+"-"+Mf(e&&e.end)}function J1(e){return e&&typeof e=="number"?e:1}class fn 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=xa(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}}fn.prototype.file="",fn.prototype.name="",fn.prototype.reason="",fn.prototype.message="",fn.prototype.stack="",fn.prototype.column=void 0,fn.prototype.line=void 0,fn.prototype.ancestors=void 0,fn.prototype.cause=void 0,fn.prototype.fatal=void 0,fn.prototype.place=void 0,fn.prototype.ruleId=void 0,fn.prototype.source=void 0;const Ff={}.hasOwnProperty,Wk=new Map,Xk=/[A-Z]/g,Kk=new Set(["table","tbody","thead","tfoot","tr"]),Qk=new Set(["td","th"]),Z1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jk(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=oN(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=sN(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"?Qs:bl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=eE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function eE(e,t,n){if(t.type==="element")return Zk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nN(e,t,n);if(t.type==="mdxjsEsm")return tN(e,t);if(t.type==="root")return rN(e,t,n);if(t.type==="text")return iN(e,t)}function Zk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Qs,e.schema=s),e.ancestors.push(t);const a=nE(e,t.tagName,!1),u=aN(e,t);let c=Uf(e,t);return Kk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Rk(d):!0})),tE(e,u,a,t),Bf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function eN(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)}wa(e,t.position)}function tN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wa(e,t.position)}function nN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Qs,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:nE(e,t.name,!0),u=uN(e,t),c=Uf(e,t);return tE(e,u,a,t),Bf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function rN(e,t,n){const r={};return Bf(r,Uf(e,t)),e.create(t,e.Fragment,r,n)}function iN(e,t){return t.value}function tE(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 sN(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 oN(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Dr(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 aN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Ff.call(t.properties,s)){const a=lN(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Qk.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 uN(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 wa(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 wa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Uf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Wk;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=eE(e,a,u);c!==void 0&&n.push(c)}return n}function lN(e,t,n){const r=Lf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O1(n):V1(n)),r.property==="style"){let s=typeof n=="object"?n:cN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=dN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Fk[r.property]||r.property:r.attribute,n]}}function cN(e,t){try{return Gk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new fn("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=Z1+"#cannot-parse-style-attribute",s}}function nE(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=I1(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=I1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Ff.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);wa(e)}function wa(e,t){const n=new fn("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=Z1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dN(e){const t={};let n;for(n in e)Ff.call(e,n)&&(t[fN(n)]=e[n]);return t}function fN(e){let t=e.replace(Xk,hN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hN(e){return"-"+e.toLowerCase()}const Hf={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"]},pN={};function zf(e,t){const n=pN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rE(e,r,s)}function rE(e,t,n){if(mN(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 iE(e.children,t,n)}return Array.isArray(e)?iE(e,t,n):""}function iE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=rE(e[s],t,n);return r.join("")}function mN(e){return!!(e&&typeof e=="object")}const sE=document.createElement("i");function jf(e){const t="&"+e+";";sE.innerHTML=t;const n=sE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(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 er(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const oE={}.hasOwnProperty;function aE(e){const t={};let n=-1;for(;++n<e.length;)gN(t,e[n]);return t}function gN(e,t){let n;for(n in t){const s=(oE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){oE.call(s,u)||(s[u]=[]);const c=a[u];EN(s[u],Array.isArray(c)?c:c?[c]:[])}}}function EN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function uE(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 Er(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=Si(/[A-Za-z]/),hn=Si(/[\dA-Za-z]/),yN=Si(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const $f=Si(/\d/),TN=Si(/[\dA-Fa-f]/),bN=Si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const xl=Si(new RegExp("\\p{P}|\\p{S}","u")),os=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Zs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&hn(e.charCodeAt(n+1))&&hn(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 nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const _N={tokenize:SN};function SN(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"),nt(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 Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const xN={tokenize:wN},lE={tokenize:CN};function wN(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&P();const B=t.events.length;let q=B,D;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){D=t.events[q][1].end;break}v(r);let J=B;for(;J<t.events.length;)t.events[J][1].end=F({},D),J++;return zn(t.events,q+1,0,t.events.slice(B)),t.events.length=J,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lE,p,g)(C)}function p(C){return s&&P(),v(r),b(C)}function g(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(lE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){s&&P(),v(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(C)}function S(C){if(C===null){A(e.exit("chunkFlow"),!0),v(0),e.consume(C);return}return Be(C)?(e.consume(C),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),S)}function A(C,B){const q=t.sliceStream(C);if(B&&q.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(q),t.parser.lazy[C.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const J=t.events.length;let ie=J,Te,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(Te){$=t.events[ie][1].end;break}Te=!0}for(v(r),D=J;D<t.events.length;)t.events[D][1].end=F({},$),D++;zn(t.events,ie+1,0,t.events.slice(J)),t.events.length=D}}function v(C){let B=n.length;for(;B-- >C;){const q=n[B];t.containerState=q[1],q[0].exit.call(t,e)}n.length=C}function P(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function CN(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function eo(e){if(e===null||ht(e)||os(e))return 1;if(xl(e))return 2}function wl(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 Vf={name:"attention",resolveAll:AN,tokenize:vN};function AN(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);cE(g,-d),cE(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=er(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=er(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=er(f,wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=er(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=er(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zn(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 vN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=eo(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=eo(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 cE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kN={name:"autolink",tokenize:NN};function NN(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 xn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||hn(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||hn(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||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):yN(y)?(e.consume(y),f):n(y)}function p(y){return hn(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||hn(y))&&r++<63){const _=y===45?b:g;return e.consume(y),_}return n(y)}}const Ca={partial:!0,tokenize:PN};function PN(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const dE={continuation:{tokenize:IN},exit:RN,name:"blockQuote",tokenize:ON};function ON(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 Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function IN(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(dE,t,n)(u)}}function RN(e){e.exit("blockQuote")}const fE={name:"characterEscape",tokenize:LN};function LN(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 bN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const hE={name:"characterReference",tokenize:DN};function DN(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=hn,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=TN,p):(e.enter("characterReferenceValue"),a=7,u=$f,p(g))}function p(g){if(g===59&&s){const b=e.exit("characterReferenceValue");return u===hn&&!jf(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 pE={partial:!0,tokenize:FN},mE={concrete:!0,name:"codeFenced",tokenize:MN};function MN(e,t,n){const r=this,s={partial:!0,tokenize:q};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const J=r.events[r.events.length-1];return a=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),Ze(D)?nt(e,g,"whitespace")(D):g(D))}function g(D){return D===null||Be(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(pE,S,B)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),b)}function y(D){return D===null||Be(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===c?n(D):(e.consume(D),_)}function S(D){return e.attempt(s,B,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v}function v(D){return a>0&&Ze(D)?nt(e,P,"linePrefix",a+1)(D):P(D)}function P(D){return D===null||Be(D)?e.check(pE,S,B)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||Be(D)?(e.exit("codeFlowValue"),P(D)):(e.consume(D),C)}function B(D){return e.exit("codeFenced"),t(D)}function q(D,J,ie){let Te=0;return $;function $(be){return D.enter("lineEnding"),D.consume(be),D.exit("lineEnding"),ee}function ee(be){return D.enter("codeFencedFence"),Ze(be)?nt(D,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):ce(be)}function ce(be){return be===c?(D.enter("codeFencedFenceSequence"),he(be)):ie(be)}function he(be){return be===c?(Te++,D.consume(be),he):Te>=u?(D.exit("codeFencedFenceSequence"),Ze(be)?nt(D,le,"whitespace")(be):le(be)):ie(be)}function le(be){return be===null||Be(be)?(D.exit("codeFencedFence"),J(be)):ie(be)}}}function FN(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 qf={name:"codeIndented",tokenize:UN},BN={partial:!0,tokenize:HN};function UN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(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):Be(f)?e.attempt(BN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function HN(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(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):Be(u)?s(u):n(u)}}const zN={name:"codeText",previous:$N,resolve:jN,tokenize:VN};function jN(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 $N(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VN(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)):Be(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||Be(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 qN{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&&Aa(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),Aa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Aa(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);Aa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Aa(this.left,n.reverse())}}}function Aa(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 gE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new qN(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,YN(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 zn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function YN(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 A=[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,A.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):A.pop(),b=A.length;b--;){const v=c.slice(A[b],A[b+1]),P=a.pop();d.push([P,P+v.length-1]),e.splice(P,2,v)}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 GN={resolve:XN,tokenize:KN},WN={partial:!0,tokenize:QN};function XN(e){return gE(e),e}function KN(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):Be(c)?e.check(WN,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 QN(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Be(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 EE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),b):v===null||v===32||v===41||Sl(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(v))}function b(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===62?(e.exit("chunkString"),e.exit(c),b(v)):v===null||v===60||Be(v)?n(v):(e.consume(v),v===92?_:y)}function _(v){return v===60||v===62||v===92?(e.consume(v),y):y(v)}function S(v){return!p&&(v===null||v===41||ht(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,S):v===41?(e.consume(v),p--,S):v===null||v===32||v===40||Sl(v)?n(v):(e.consume(v),v===92?A:S)}function A(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function yE(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):Be(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||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function TE(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):Be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Be(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 va(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const JN={name:"definition",tokenize:eP},ZN={partial:!0,tokenize:tP};function eP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return yE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Er(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 ht(y)?va(e,f)(y):f(y)}function f(y){return EE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(ZN,g,g)(y)}function g(y){return Ze(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function tP(e,t,n){return r;function r(c){return ht(c)?va(e,s)(c):n(c)}function s(c){return TE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const nP={name:"hardBreakEscape",tokenize:rP};function rP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const iP={name:"headingAtx",resolve:sP,tokenize:oP};function sP(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"},zn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function oP(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||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(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||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const aP=["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"],bE=["pre","script","style","textarea"],uP={concrete:!0,name:"htmlFlow",resolveTo:dP,tokenize:fP},lP={partial:!0,tokenize:pP},cP={partial:!0,tokenize:hP};function dP(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 fP(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:k):xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function b(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,_):xn(O)?(e.consume(O),s=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:ce:_):n(O)}function S(O){return xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ht(O)){const _e=O===47,Oe=u.toLowerCase();return!_e&&!a&&bE.includes(Oe)?(s=1,r.interrupt?t(O):ce(O)):aP.includes(u.toLowerCase())?(s=6,_e?(e.consume(O),v):r.interrupt?t(O):ce(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?P(O):C(O))}return O===45||hn(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:ce):n(O)}function P(O){return Ze(O)?(e.consume(O),P):$(O)}function C(O){return O===47?(e.consume(O),$):O===58||O===95||xn(O)?(e.consume(O),B):Ze(O)?(e.consume(O),C):$(O)}function B(O){return O===45||O===46||O===58||O===95||hn(O)?(e.consume(O),B):q(O)}function q(O){return O===61?(e.consume(O),D):Ze(O)?(e.consume(O),q):C(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,J):Ze(O)?(e.consume(O),D):ie(O)}function J(O){return O===d?(e.consume(O),d=null,Te):O===null||Be(O)?n(O):(e.consume(O),J)}function ie(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ht(O)?q(O):(e.consume(O),ie)}function Te(O){return O===47||O===62||Ze(O)?C(O):n(O)}function $(O){return O===62?(e.consume(O),ee):n(O)}function ee(O){return O===null||Be(O)?ce(O):Ze(O)?(e.consume(O),ee):n(O)}function ce(O){return O===45&&s===2?(e.consume(O),Me):O===60&&s===1?(e.consume(O),de):O===62&&s===4?(e.consume(O),M):O===63&&s===3?(e.consume(O),k):O===93&&s===5?(e.consume(O),re):Be(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(lP,te,he)(O)):O===null||Be(O)?(e.exit("htmlFlowData"),he(O)):(e.consume(O),ce)}function he(O){return e.check(cP,le,te)(O)}function le(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Be(O)?he(O):(e.enter("htmlFlowData"),ce(O))}function Me(O){return O===45?(e.consume(O),k):ce(O)}function de(O){return O===47?(e.consume(O),u="",K):ce(O)}function K(O){if(O===62){const _e=u.toLowerCase();return bE.includes(_e)?(e.consume(O),M):ce(O)}return xn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),K):ce(O)}function re(O){return O===93?(e.consume(O),k):ce(O)}function k(O){return O===62?(e.consume(O),M):O===45&&s===2?(e.consume(O),k):ce(O)}function M(O){return O===null||Be(O)?(e.exit("htmlFlowData"),te(O)):(e.consume(O),M)}function te(O){return e.exit("htmlFlow"),t(O)}}function hP(e,t,n){const r=this;return s;function s(u){return Be(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 pP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const mP={name:"htmlText",tokenize:gP};function gP(e,t,n){const r=this;let s,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),q):k===63?(e.consume(k),C):xn(k)?(e.consume(k),ie):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):xn(k)?(e.consume(k),P):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function g(k){return k===null?n(k):k===45?(e.consume(k),b):Be(k)?(u=g,de(k)):(e.consume(k),g)}function b(k){return k===45?(e.consume(k),y):g(k)}function y(k){return k===62?Me(k):k===45?b(k):g(k)}function _(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?S:_):n(k)}function S(k){return k===null?n(k):k===93?(e.consume(k),A):Be(k)?(u=S,de(k)):(e.consume(k),S)}function A(k){return k===93?(e.consume(k),v):S(k)}function v(k){return k===62?Me(k):k===93?(e.consume(k),v):S(k)}function P(k){return k===null||k===62?Me(k):Be(k)?(u=P,de(k)):(e.consume(k),P)}function C(k){return k===null?n(k):k===63?(e.consume(k),B):Be(k)?(u=C,de(k)):(e.consume(k),C)}function B(k){return k===62?Me(k):C(k)}function q(k){return xn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||hn(k)?(e.consume(k),D):J(k)}function J(k){return Be(k)?(u=J,de(k)):Ze(k)?(e.consume(k),J):Me(k)}function ie(k){return k===45||hn(k)?(e.consume(k),ie):k===47||k===62||ht(k)?Te(k):n(k)}function Te(k){return k===47?(e.consume(k),Me):k===58||k===95||xn(k)?(e.consume(k),$):Be(k)?(u=Te,de(k)):Ze(k)?(e.consume(k),Te):Me(k)}function $(k){return k===45||k===46||k===58||k===95||hn(k)?(e.consume(k),$):ee(k)}function ee(k){return k===61?(e.consume(k),ce):Be(k)?(u=ee,de(k)):Ze(k)?(e.consume(k),ee):Te(k)}function ce(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,he):Be(k)?(u=ce,de(k)):Ze(k)?(e.consume(k),ce):(e.consume(k),le)}function he(k){return k===s?(e.consume(k),s=void 0,be):k===null?n(k):Be(k)?(u=he,de(k)):(e.consume(k),he)}function le(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ht(k)?Te(k):(e.consume(k),le)}function be(k){return k===47||k===62||ht(k)?Te(k):n(k)}function Me(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),K}function K(k){return Ze(k)?nt(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):re(k)}function re(k){return e.enter("htmlTextData"),u(k)}}const Yf={name:"labelEnd",resolveAll:bP,resolveTo:_P,tokenize:SP},EP={tokenize:xP},yP={tokenize:wP},TP={tokenize:CP};function bP(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&&zn(e,0,e.length,n),e}function _P(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=er(c,e.slice(a+1,a+r+3)),c=er(c,[["enter",p,t]]),c=er(c,wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=er(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=er(c,e.slice(u+1)),c=er(c,[["exit",d,t]]),zn(e,a,e.length,c),e}function SP(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(Er(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(EP,p,u?p:g)(b):b===91?e.attempt(yP,p,u?f:g)(b):u?p(b):g(b)}function f(b){return e.attempt(TP,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function xP(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 ht(g)?va(e,a)(g):a(g)}function a(g){return g===41?p(g):EE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return ht(g)?va(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?TE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function f(g){return ht(g)?va(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 wP(e,t,n){const r=this;return s;function s(c){return yE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Er(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function CP(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 AP={name:"labelStartImage",resolveAll:Yf.resolveAll,tokenize:vP};function vP(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 kP={name:"labelStartLink",resolveAll:Yf.resolveAll,tokenize:NP};function NP(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 Gf={name:"lineEnding",tokenize:PP};function PP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:OP};function OP(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||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Pn={continuation:{tokenize:DP},exit:FP,name:"list",tokenize:LP},IP={partial:!0,tokenize:BP},RP={partial:!0,tokenize:MP};function LP(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:$f(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,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 $f(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(Ca,r.interrupt?n:p,e.attempt(IP,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return Ze(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 DP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ca,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(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(RP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Pn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function MP(e,t,n){const r=this;return nt(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 FP(e){e.exit(this.containerState.type)}function BP(e,t,n){const r=this;return nt(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!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const _E={name:"setextUnderline",resolveTo:UP,tokenize:HP};function UP(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 HP(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"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const zP={tokenize:jP};function jP(e){const t=this,n=e.attempt(Ca,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(GN,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 $P={resolveAll:xE()},VP=SE("string"),qP=SE("text");function SE(e){return{resolveAll:xE(e==="text"?YP: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 xE(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 YP(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 GP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:JN},disable:{null:[]},document:{42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:dE},flow:{35:iP,42:Cl,45:[_E,Cl],60:uP,61:_E,95:Cl,96:mE,126:mE},flowInitial:{[-2]:qf,[-1]:qf,32:qf},insideSpan:{null:[Vf,$P]},string:{38:hE,92:fE},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:AP,38:hE,42:Vf,60:[kN,mP],91:kP,92:[nP,fE],93:Yf,95:Vf,96:zN}},Symbol.toStringTag,{value:"Module"}));function WP(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:J(q),check:J(D),consume:P,enter:C,exit:B,interrupt:J(D,{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(ee){return u=er(u,ee),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=wl(a,f.events,f),f.events)}function b(ee,ce){return KP(y(ee),ce)}function y(ee){return XP(u,ee)}function _(){const{_bufferIndex:ee,_index:ce,line:he,column:le,offset:be}=r;return{_bufferIndex:ee,_index:ce,line:he,column:le,offset:be}}function S(ee){s[ee.line]=ee.column,$()}function A(){let ee;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<ce.length;)v(ce.charCodeAt(r._bufferIndex));else v(ce)}}function v(ee){p=p(ee)}function P(ee){Be(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,$()):ee!==-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=ee}function C(ee,ce){const he=ce||{};return he.type=ee,he.start=_(),f.events.push(["enter",he,f]),c.push(he),he}function B(ee){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function q(ee,ce){ie(ee,ce.from)}function D(ee,ce){ce.restore()}function J(ee,ce){return he;function he(le,be,Me){let de,K,re,k;return Array.isArray(le)?te(le):"tokenize"in le?te([le]):M(le);function M(Ce){return $e;function $e(we){const We=we!==null&&Ce[we],pt=we!==null&&Ce.null,on=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(pt)?pt:pt?[pt]:[]];return te(on)(we)}}function te(Ce){return de=Ce,K=0,Ce.length===0?Me:O(Ce[K])}function O(Ce){return $e;function $e(we){return k=Te(),re=Ce,Ce.partial||(f.currentConstruct=Ce),Ce.name&&f.parser.constructs.disable.null.includes(Ce.name)?Oe():Ce.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,_e,Oe)(we)}}function _e(Ce){return ee(re,k),be}function Oe(Ce){return k.restore(),++K<de.length?O(de[K]):Me}}}function ie(ee,ce){ee.resolveAll&&!a.includes(ee)&&a.push(ee),ee.resolve&&zn(f.events,ce,f.events.length-ce,ee.resolve(f.events.slice(ce),f)),ee.resolveTo&&(f.events=ee.resolveTo(f.events,f))}function Te(){const ee=_(),ce=f.previous,he=f.currentConstruct,le=f.events.length,be=Array.from(c);return{from:le,restore:Me};function Me(){r=ee,f.previous=ce,f.currentConstruct=he,f.events.length=le,c=be,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function XP(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 KP(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
19
|
`;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 lO(e){const r={constructs:$1([sO,...(e||{}).extensions||[]]),content:s(Rk),defined:[],document:s(Dk),flow:s(ZN),lazy:{},string:s(nO),text:s(rO)};return r;function s(a){return u;function u(c){return oO(r,a,c)}}}function cO(e){for(;!J1(e););return e}const oE=/[\0\t\n\r]/g;function dO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,g,b,T;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(oE.lastIndex=g,f=oE.exec(a),b=f&&f.index!==void 0?f.index:a.length,T=a.charCodeAt(b),!f){t=a.slice(g);break}if(T===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),T){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 fO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hO(e){return e.replace(fO,pO)}function pO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return V1(n.slice(a?2:1),a?16:10)}return vf(n)||e}const aE={}.hasOwnProperty;function mO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),gO(n)(cO(lO(n).document().write(dO()(e,t,!0))))}function gO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:Te,autolinkEmail:Te,atxHeading:a(Es),blockQuote:a(mt),characterEscape:Te,characterReference:Te,codeFenced:a(tn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(tn,u),codeText:a(zr,u),codeTextData:Te,data:Te,codeFlowValue:Te,definition:a(Tr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Nn),hardBreakEscape:a(Ni),hardBreakTrailing:a(Ni),htmlFlow:a(oi,u),htmlFlowData:Te,htmlText:a(oi,u),htmlTextData:Te,image:a(ve),label:u,link:a(Fe),listItem:a(Qe),listItemValue:b,listOrdered:a(Le,g),listUnordered:a(Le),paragraph:a(ft),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Es),strong:a(ut),thematicBreak:a(vt)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Ge,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:Ce,characterReference:$e,codeFenced:d(v),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:j,codeIndented:d(A),codeText:d(ye),codeTextData:j,data:j,definition:d(),definitionDestinationString:L,definitionLabelString:R,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(pe),htmlFlowData:j,htmlText:d(ce),htmlTextData:j,image:d(de),label:re,labelText:K,lineEnding:se,link:d(De),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:be,resourceDestinationString:C,resourceTitleString:M,resource:Z,setextHeading:d(le),setextHeadingLineSequence:ne,setextHeadingText:F,strong:d(),thematicBreak:d()}};uE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let ie={type:"root",children:[]};const Ie={stack:[ie],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Xe=-1;for(;++Xe<ee.length;)if(ee[Xe][1].type==="listOrdered"||ee[Xe][1].type==="listUnordered")if(ee[Xe][0]==="enter")Ve.push(Xe);else{const Tt=Ve.pop();Xe=s(ee,Tt,Xe)}for(Xe=-1;++Xe<ee.length;){const Tt=t[ee[Xe][0]];aE.call(Tt,ee[Xe][1].type)&&Tt[ee[Xe][1].type].call(Object.assign({sliceSerialize:ee[Xe][2].sliceSerialize},Ie),ee[Xe][1])}if(Ie.tokenStack.length>0){const Tt=Ie.tokenStack[Ie.tokenStack.length-1];(Tt[1]||lE).call(Ie,void 0,Tt[0])}for(ie.position={start:_i(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:_i(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)ie=t.transforms[Xe](ie)||ie;return ie}function s(ee,ie,Ie){let Ve=ie-1,Xe=-1,Tt=!1,tr,nr,Oi,ys;for(;++Ve<=Ie;){const nn=ee[Ve];switch(nn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nn[0]==="enter"?Xe++:Xe--,ys=void 0;break}case"lineEndingBlank":{nn[0]==="enter"&&(tr&&!ys&&!Xe&&!Oi&&(Oi=Ve),ys=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ys=void 0}if(!Xe&&nn[0]==="enter"&&nn[1].type==="listItemPrefix"||Xe===-1&&nn[0]==="exit"&&(nn[1].type==="listUnordered"||nn[1].type==="listOrdered")){if(tr){let jr=Ve;for(nr=void 0;jr--;){const zn=ee[jr];if(zn[1].type==="lineEnding"||zn[1].type==="lineEndingBlank"){if(zn[0]==="exit")continue;nr&&(ee[nr][1].type="lineEndingBlank",Tt=!0),zn[1].type="lineEnding",nr=jr}else if(!(zn[1].type==="linePrefix"||zn[1].type==="blockQuotePrefix"||zn[1].type==="blockQuotePrefixWhitespace"||zn[1].type==="blockQuoteMarker"||zn[1].type==="listItemIndent"))break}Oi&&(!nr||Oi<nr)&&(tr._spread=!0),tr.end=Object.assign({},nr?ee[nr][1].start:nn[1].end),ee.splice(nr||Ve,0,["exit",tr,nn[2]]),Ve++,Ie++}if(nn[1].type==="listItemPrefix"){const jr={type:"listItem",_spread:!1,start:Object.assign({},nn[1].start),end:void 0};tr=jr,ee.splice(Ve,0,["enter",jr,nn[2]]),Ve++,Ie++,Oi=void 0,ys=!0}}}return ee[ie][1]._spread=Tt,Ie}function a(ee,ie){return Ie;function Ie(Ve){c.call(this,ee(Ve),Ve),ie&&ie.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,ie,Ie){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([ie,Ie||void 0]),ee.position={start:_i(ie.start),end:void 0}}function d(ee){return ie;function ie(Ie){ee&&ee.call(this,Ie),f.call(this,Ie)}}function f(ee,ie){const Ie=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ee.type&&(ie?ie.call(this,ee,Ve[0]):(Ve[1]||lE).call(this,ee,Ve[0]));else throw new Error("Cannot close `"+ee.type+"` ("+ha({start:ee.start,end:ee.end})+"): it’s not open");Ie.position.end=_i(ee.end)}function p(){return Af(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ee){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function T(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=ee}function _(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=ee}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.value=ee.replace(/(\r?\n|\r)$/g,"")}function R(ee){const ie=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ie,Ie.identifier=hr(this.sliceSerialize(ee)).toLowerCase()}function N(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.title=ee}function L(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.url=ee}function W(ee){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Ie=this.sliceSerialize(ee).length;ie.depth=Ie}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function ne(ee){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function Te(ee){const Ie=this.stack[this.stack.length-1].children;let Ve=Ie[Ie.length-1];(!Ve||Ve.type!=="text")&&(Ve=Tn(),Ve.position={start:_i(ee.start),end:void 0},Ie.push(Ve)),this.stack.push(Ve)}function j(ee){const ie=this.stack.pop();ie.value+=this.sliceSerialize(ee),ie.position.end=_i(ee.end)}function se(ee){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=ie.children[ie.children.length-1];Ie.position.end=_i(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(Te.call(this,ee),j.call(this,ee))}function te(){this.data.atHardBreak=!0}function pe(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.value=ee}function ce(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.value=ee}function ye(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.value=ee}function De(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ie,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function de(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=ie,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function K(ee){const ie=this.sliceSerialize(ee),Ie=this.stack[this.stack.length-2];Ie.label=hO(ie),Ie.identifier=hr(ie).toLowerCase()}function re(){const ee=this.stack[this.stack.length-1],ie=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const Ve=ee.children;Ie.children=Ve}else Ie.alt=ie}function C(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.url=ee}function M(){const ee=this.resume(),ie=this.stack[this.stack.length-1];ie.title=ee}function Z(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function be(ee){const ie=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ie,Ie.identifier=hr(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Pe(ee){this.data.characterReferenceType=ee.type}function Ce(ee){const ie=this.sliceSerialize(ee),Ie=this.data.characterReferenceType;let Ve;Ie?(Ve=V1(ie,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=vf(ie);const Xe=this.stack[this.stack.length-1];Xe.value+=Ve}function $e(ee){const ie=this.stack.pop();ie.position.end=_i(ee.end)}function we(ee){j.call(this,ee);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(ee)}function Ge(ee){j.call(this,ee);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(ee)}function mt(){return{type:"blockquote",children:[]}}function tn(){return{type:"code",lang:null,meta:null,value:""}}function zr(){return{type:"inlineCode",value:""}}function Tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Nn(){return{type:"emphasis",children:[]}}function Es(){return{type:"heading",depth:0,children:[]}}function Ni(){return{type:"break"}}function oi(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Le(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Qe(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function ut(){return{type:"strong",children:[]}}function Tn(){return{type:"text",value:""}}function vt(){return{type:"thematicBreak"}}}function _i(e){return{line:e.line,column:e.column,offset:e.offset}}function uE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?uE(e,r):EO(e,r)}}function EO(e,t){let n;for(n in t)if(aE.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 lE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ha({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ha({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ha({start:t.start,end:t.end})+") is still open")}function yO(e){const t=this;t.parser=n;function n(r){return mO(r,_e(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function TO(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 bO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
-
`}]}function
|
|
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
|
|
20
|
+
`;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 QP(e){const r={constructs:aE([GP,...(e||{}).extensions||[]]),content:s(_N),defined:[],document:s(xN),flow:s(zP),lazy:{},string:s(VP),text:s(qP)};return r;function s(a){return u;function u(c){return WP(r,a,c)}}}function JP(e){for(;!gE(e););return e}const wE=/[\0\t\n\r]/g;function ZP(){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(wE.lastIndex=g,f=wE.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 eO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tO(e){return e.replace(eO,nO)}function nO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return uE(n.slice(a?2:1),a?16:10)}return jf(n)||e}const CE={}.hasOwnProperty;function rO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),iO(n)(JP(QP(n).document().write(ZP()(e,t,!0))))}function iO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:Te,autolinkEmail:Te,atxHeading:a(_s),blockQuote:a(pt),characterEscape:Te,characterReference:Te,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a(Yr,u),codeTextData:Te,data:Te,codeFlowValue:Te,definition:a(Sr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rn),hardBreakEscape:a(Pi),hardBreakTrailing:a(Pi),htmlFlow:a(li,u),htmlFlowData:Te,htmlText:a(li,u),htmlTextData:Te,image:a(ve),label:u,link:a(Fe),listItem:a(Qe),listItemValue:b,listOrdered:a(De,g),listUnordered:a(De),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(_s),strong:a(lt),thematicBreak:a(At)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:We,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Ce,characterReference:$e,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(v),codeText:d(be),codeTextData:$,data:$,definition:d(),definitionDestinationString:B,definitionLabelString:P,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(he),htmlFlowData:$,htmlText:d(le),htmlTextData:$,image:d(de),label:re,labelText:K,lineEnding:ee,link:d(Me),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:M,resource:te,setextHeading:d(ie),setextHeadingLineSequence:J,setextHeadingText:D,strong:d(),thematicBreak:d()}};AE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ne){let se={type:"root",children:[]};const Ie={stack:[se],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Xe=-1;for(;++Xe<ne.length;)if(ne[Xe][1].type==="listOrdered"||ne[Xe][1].type==="listUnordered")if(ne[Xe][0]==="enter")Ve.push(Xe);else{const Tt=Ve.pop();Xe=s(ne,Tt,Xe)}for(Xe=-1;++Xe<ne.length;){const Tt=t[ne[Xe][0]];CE.call(Tt,ne[Xe][1].type)&&Tt[ne[Xe][1].type].call(Object.assign({sliceSerialize:ne[Xe][2].sliceSerialize},Ie),ne[Xe][1])}if(Ie.tokenStack.length>0){const Tt=Ie.tokenStack[Ie.tokenStack.length-1];(Tt[1]||vE).call(Ie,void 0,Tt[0])}for(se.position={start:xi(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:xi(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)se=t.transforms[Xe](se)||se;return se}function s(ne,se,Ie){let Ve=se-1,Xe=-1,Tt=!1,ir,sr,Oi,Ss;for(;++Ve<=Ie;){const an=ne[Ve];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Xe++:Xe--,Ss=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&(ir&&!Ss&&!Xe&&!Oi&&(Oi=Ve),Ss=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ss=void 0}if(!Xe&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Xe===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if(ir){let Gr=Ve;for(sr=void 0;Gr--;){const qn=ne[Gr];if(qn[1].type==="lineEnding"||qn[1].type==="lineEndingBlank"){if(qn[0]==="exit")continue;sr&&(ne[sr][1].type="lineEndingBlank",Tt=!0),qn[1].type="lineEnding",sr=Gr}else if(!(qn[1].type==="linePrefix"||qn[1].type==="blockQuotePrefix"||qn[1].type==="blockQuotePrefixWhitespace"||qn[1].type==="blockQuoteMarker"||qn[1].type==="listItemIndent"))break}Oi&&(!sr||Oi<sr)&&(ir._spread=!0),ir.end=Object.assign({},sr?ne[sr][1].start:an[1].end),ne.splice(sr||Ve,0,["exit",ir,an[2]]),Ve++,Ie++}if(an[1].type==="listItemPrefix"){const Gr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};ir=Gr,ne.splice(Ve,0,["enter",Gr,an[2]]),Ve++,Ie++,Oi=void 0,Ss=!0}}}return ne[se][1]._spread=Tt,Ie}function a(ne,se){return Ie;function Ie(Ve){c.call(this,ne(Ve),Ve),se&&se.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ne,se,Ie){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([se,Ie||void 0]),ne.position={start:xi(se.start),end:void 0}}function d(ne){return se;function se(Ie){ne&&ne.call(this,Ie),f.call(this,Ie)}}function f(ne,se){const Ie=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ne.type&&(se?se.call(this,ne,Ve[0]):(Ve[1]||vE).call(this,ne,Ve[0]));else throw new Error("Cannot close `"+ne.type+"` ("+xa({start:ne.start,end:ne.end})+"): it’s not open");Ie.position.end=xi(ne.end)}function p(){return zf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ne){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.lang=ne}function _(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.meta=ne}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.value=ne.replace(/(\r?\n|\r)$/g,"")}function P(ne){const se=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=se,Ie.identifier=Er(this.sliceSerialize(ne)).toLowerCase()}function C(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.title=ne}function B(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.url=ne}function q(ne){const se=this.stack[this.stack.length-1];if(!se.depth){const Ie=this.sliceSerialize(ne).length;se.depth=Ie}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function J(ne){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function Te(ne){const Ie=this.stack[this.stack.length-1].children;let Ve=Ie[Ie.length-1];(!Ve||Ve.type!=="text")&&(Ve=wn(),Ve.position={start:xi(ne.start),end:void 0},Ie.push(Ve)),this.stack.push(Ve)}function $(ne){const se=this.stack.pop();se.value+=this.sliceSerialize(ne),se.position.end=xi(ne.end)}function ee(ne){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=se.children[se.children.length-1];Ie.position.end=xi(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(Te.call(this,ne),$.call(this,ne))}function ce(){this.data.atHardBreak=!0}function he(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.value=ne}function le(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.value=ne}function be(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.value=ne}function Me(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=se,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function de(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=se,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function K(ne){const se=this.sliceSerialize(ne),Ie=this.stack[this.stack.length-2];Ie.label=tO(se),Ie.identifier=Er(se).toLowerCase()}function re(){const ne=this.stack[this.stack.length-1],se=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const Ve=ne.children;Ie.children=Ve}else Ie.alt=se}function k(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.url=ne}function M(){const ne=this.resume(),se=this.stack[this.stack.length-1];se.title=ne}function te(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ne){const se=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=se,Ie.identifier=Er(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Oe(ne){this.data.characterReferenceType=ne.type}function Ce(ne){const se=this.sliceSerialize(ne),Ie=this.data.characterReferenceType;let Ve;Ie?(Ve=uE(se,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=jf(se);const Xe=this.stack[this.stack.length-1];Xe.value+=Ve}function $e(ne){const se=this.stack.pop();se.position.end=xi(ne.end)}function we(ne){$.call(this,ne);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(ne)}function We(ne){$.call(this,ne);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(ne)}function pt(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function Yr(){return{type:"inlineCode",value:""}}function Sr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function _s(){return{type:"heading",depth:0,children:[]}}function Pi(){return{type:"break"}}function li(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function De(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Qe(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wn(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function AE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?AE(e,r):sO(e,r)}}function sO(e,t){let n;for(n in t)if(CE.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 vE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is still open")}function oO(e){const t=this;t.parser=n;function n(r){return rO(r,me(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function aO(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 uO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
+
`}]}function lO(e,t){const n=t.value?t.value+`
|
|
22
|
+
`:"",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 cO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Zs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+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 hO(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 pO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kE(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 mO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={src:Zs(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 gO(e,t){const n={src:Zs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function EO(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 yO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={href:Zs(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 TO(e,t){const n={href:Zs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bO(e,t,n){const r=e.all(t),s=n?_O(n):NE(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
23
|
`}),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
|
|
24
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function _O(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=NE(n[r])}return t}function NE(e){const t=e.spread;return t==null?e.children.length>1:t}function SO(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 xO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AO(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=Dr(t.children[1]),d=_l(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 vO(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 kO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PE=9,OE=32;function NO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(IE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(IE(t.slice(s),s>0,!1)),a.join("")}function IE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===PE||a===OE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===PE||a===OE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function PO(e,t){const n={type:"text",value:NO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function OO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const IO={blockquote:aO,break:uO,code:lO,delete:cO,emphasis:dO,footnoteReference:fO,heading:hO,html:pO,imageReference:mO,image:gO,inlineCode:EO,linkReference:yO,link:TO,listItem:bO,list:SO,paragraph:xO,root:wO,strong:CO,table:AO,tableCell:kO,tableRow:vO,text:PO,thematicBreak:OO,toml:Al,yaml:Al,definition:Al,footnoteDefinition:Al};function Al(){}const RE=-1,vl=0,ka=1,kl=2,Wf=3,Xf=4,Kf=5,Qf=6,LE=7,DE=8,ME=typeof self=="object"?self:globalThis,RO=(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 vl:case RE:return n(u,s);case ka:{const c=n([],s);for(const d of u)c.push(r(d));return c}case kl:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case Wf:return n(new Date(u),s);case Xf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Kf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Qf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case LE:{const{name:c,message:d}=u;return n(new ME[c](d),s)}case DE: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 ME[a](u),s)};return r},FE=e=>RO(new Map,e)(0),to="",{toString:LO}={},{keys:DO}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[vl,t];const n=LO.call(e).slice(8,-1);switch(n){case"Array":return[ka,to];case"Object":return[kl,to];case"Date":return[Wf,to];case"RegExp":return[Xf,to];case"Map":return[Kf,to];case"Set":return[Qf,to];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:n.includes("Error")?[LE,n]:[kl,n]},Nl=([e,t])=>e===vl&&(t==="function"||t==="symbol"),MO=(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]=Na(u);switch(c){case vl:{let p=u;switch(d){case"bigint":c=DE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([RE],u)}return s([c,p],u)}case ka:{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 kl:{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 DO(u))(e||!Nl(Na(u[b])))&&p.push([a(b),a(u[b])]);return g}case Wf:return s([c,u.toISOString()],u);case Xf:{const{source:p,flags:g}=u;return s([c,{source:p,flags:g}],u)}case Kf:{const p=[],g=s([c,p],u);for(const[b,y]of u)(e||!(Nl(Na(b))||Nl(Na(y))))&&p.push([a(b),a(y)]);return g}case Qf:{const p=[],g=s([c,p],u);for(const b of u)(e||!Nl(Na(b)))&&p.push(a(b));return g}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},BE=(e,{json:t,lossy:n}={})=>{const r=[];return MO(!(t||n),!!t,new Map,r)(e),r},as=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?FE(BE(e,t)):structuredClone(e):(e,t)=>FE(BE(e,t));function FO(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 BO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function UO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||FO,r=e.options.footnoteBackLabel||BO,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=Zs(g.toLowerCase());let y=0;const _=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++y<=S;){_.length>0&&_.push({type:"text",value:" "});let P=typeof n=="string"?n:n(d,y);typeof P=="string"&&(P={type:"text",value:P}),_.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(P)?P:[P]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const P=A.children[A.children.length-1];P&&P.type==="text"?P.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(F({},as(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
|
|
18
25
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
19
|
-
`}]}}const
|
|
26
|
+
`}]}}const Pl=(function(e){if(e==null)return $O;if(typeof e=="function")return Ol(e);if(typeof e=="object")return Array.isArray(e)?HO(e):zO(e);if(typeof e=="string")return jO(e);throw new Error("Expected function, string, or object as test")});function HO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pl(e[n]);return Ol(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function zO(e){const t=e;return Ol(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function jO(e){return Ol(t);function t(n){return n&&n.type===e}}function Ol(e){return t;function t(n,r,s){return!!(VO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function $O(){return!0}function VO(e){return e!==null&&typeof e=="object"&&"type"in e}function Z7(e){return e}const UE=[],qO=!0,Jf=!1,YO="skip";function HE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Pl(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=UE,_,S,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=GO(n(d,p)),y[0]===Jf))return y;if("children"in d&&d.children){const v=d;if(v.children&&y[0]!==YO)for(S=(r?v.children.length:-1)+u,A=p.concat(v);S>-1&&S<v.children.length;){const P=v.children[S];if(_=c(P,S,A)(),_[0]===Jf)return _;S=typeof _[1]=="number"?_[1]:S+u}}return y}}}function GO(e){return Array.isArray(e)?e:typeof e=="number"?[qO,e]:e==null?UE:[e]}function Il(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),HE(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 Zf={}.hasOwnProperty,WO={};function XO(e,t){const n=t||WO,r=new Map,s=new Map,a=new Map,u=F(F({},IO),n.handlers),c={all:f,applyData:QO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:KO,wrap:ZO};return Il(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(Zf.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:A}=S,v=rn(S,["children"]),P=as(v);return P.children=c.all(p),P}return as(p)}return(c.options.unknownHandler||JO)(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=zE(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=zE(S.value))}Array.isArray(_)?g.push(..._):g.push(_)}}}return g}}function KO(e,t){e.position&&(t.position=K1(e))}function QO(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,as(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function JO(e,t){const n=t.data||{},r="value"in t&&!(Zf.call(n,"hProperties")||Zf.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 ZO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
20
27
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
21
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
22
|
-
`}),n}function
|
|
23
|
-
`},s),a}function fP(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const s=wE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return wE(n,U({file:r},e||t))}}function CE(e){if(e)throw e}var Uf,AE;function hP(){if(AE)return Uf;AE=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 Uf=function d(){var f,p,g,b,T,_,S=arguments[0],v=1,A=arguments.length,R=!1;for(typeof S=="boolean"&&(R=S,S=arguments[1]||{},v=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});v<A;++v)if(f=arguments[v],f!=null)for(p in f)g=c(S,p),b=c(f,p),S!==b&&(R&&b&&(a(b)||(T=s(b)))?(T?(T=!1,_=g&&s(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(R,_,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},Uf}var pP=hP();const Hf=Je(pP);function zf(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 mP(){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?gP(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 gP(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 Ir={basename:EP,dirname:yP,extname:TP,join:bP,sep:"/"};function EP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ba(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 yP(e){if(ba(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 TP(e){ba(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 bP(...e){let t=-1,n;for(;++t<e.length;)ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":_P(n)}function _P(e){ba(e);const t=e.codePointAt(0)===47;let n=SP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function SP(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 ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xP={cwd:wP};function wP(){return"/"}function jf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function CP(e){if(typeof e=="string")e=new URL(e);else if(!jf(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 AP(e)}function AP(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 $f=["history","path","basename","stem","extname","dirname"];class vE{constructor(t){let n;t?jf(t)?n={path:t}:typeof t=="string"||vP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$f.length;){const a=$f[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)$f.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ir.basename(this.path):void 0}set basename(t){qf(t,"basename"),Vf(t,"basename"),this.path=Ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ir.dirname(this.path):void 0}set dirname(t){kE(this.basename,"dirname"),this.path=Ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ir.extname(this.path):void 0}set extname(t){if(Vf(t,"extname"),kE(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=Ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jf(t)&&(t=CP(t)),qf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ir.basename(this.path,this.extname):void 0}set stem(t){qf(t,"stem"),Vf(t,"stem"),this.path=Ir.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 ln(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 Vf(e,t){if(e&&e.includes(Ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ir.sep+"`")}function qf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function kE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kP=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),NP={}.hasOwnProperty;class Yf extends kP{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=mP()}copy(){const t=new Yf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Hf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xf("data",this.frozen),this.namespace[t]=n,this):NP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xf("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 Wf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Wf("process",this.parser||this.Parser),Gf("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 T=g,_=r.stringify(T,b);IP(_)?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(),Wf("processSync",this.parser||this.Parser),Gf("processSync",this.compiler||this.Compiler),this.process(t,s),OE("processSync","process",n),r;function s(a,u){n=!0,CE(a),r=u}}run(t,n,r){NE(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 T=g||t;p?c(p):u?u(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),OE("runSync","run",r),s;function a(u,c){CE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Sl(n),s=this.compiler||this.Compiler;return Gf("stringify",s),NE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Xf("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=Hf(!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[T,..._]=p;const S=r[b][1];zf(S)&&zf(T)&&(T=Hf(!0,S,T)),r[b]=[f,T,..._]}}}}const OP=new Yf().freeze();function Wf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xf(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 NE(e){if(!zf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function OE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sl(e){return PP(e)?e:new vE(e)}function PP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IP(e){return typeof e=="string"||RP(e)}function RP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",PE=[],IE={allowDangerousHtml:!0},DP=/^(https?|ircs?|mailto|xmpp)$/i,MP=[{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 RE(e){const t=FP(e),n=BP(e);return UP(t.runSync(t.parse(n),n),e)}function FP(e){const t=e.rehypePlugins||PE,n=e.remarkPlugins||PE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),IE):IE;return OP().use(yO).use(n).use(fP,r).use(t)}function BP(e){const t=e.children||"",n=new vE;return typeof t=="string"&&(n.value=t),n}function UP(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||HP;for(const p of MP)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+LP+p.id,void 0);return _l(e,f),ck(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 T;for(T in Cf)if(Object.hasOwn(Cf,T)&&Object.hasOwn(p.properties,T)){const _=p.properties[T],S=Cf[T];(S===null||S.includes(p.tagName))&&(p.properties[T]=d(String(_||""),T,p))}}if(p.type==="element"){let T=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!T&&r&&typeof g=="number"&&(T=!r(p,g,b)),T&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function HP(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||DP.test(e.slice(0,t))?e:""}const LE=/[#.]/g;function zP(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){LE.lastIndex=s;const c=LE.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 DE(e,t,n){const r=n?qP(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=zP(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,jP(u))c.unshift(u);else for(const[g,b]of Object.entries(u))$P(e,d.properties,g,b)}for(const f of c)Kf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function jP(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 $P(e,t,n,r){const s=Tf(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=C1(r):s.commaSeparated?a=f1(r):s.commaOrSpaceSeparated?a=C1(f1(r).join(" ")):a=ME(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?VP(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ME(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Kf(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)Kf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Kf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ME(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ca(n)===ca(t)))return!0}return n}function VP(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function qP(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const YP=["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"],WP=DE(ll,"div"),GP=DE(Ys,"g",YP);function XP(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=FE(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=FE(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 FE(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 as={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/"},BE={}.hasOwnProperty,KP=Object.prototype;function QP(e,t){const n=t||{};return Qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ys:ll,verbose:n.verbose||!1},e)}function Qf(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:UE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=XP(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=JP(e,t),n}}function UE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Qf(e,t[n]);r.push(s)}return r}function JP(e,t){const n=e.schema;e.schema=t.namespaceURI===as.svg?Ys:ll;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;BE.call(KP,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?GP:WP)(t.tagName,s,UE(e,t.childNodes));if(xl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Qs(d.startTag),p=d&&d.endTag&&Qs(d.endTag),g=Qf(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=ZP(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ZP(e,t,n){const r=Qs(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)BE.call(n.attrs,u)&&(a[Tf(e.schema,u).property]=Qs(n.attrs[u]));n.startTag;const c=Qs(n.startTag),d=n.endTag?Qs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Qs(e){const t=HE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=HE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function HE(e){return e.line&&e.column?e:void 0}class _a{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}_a.prototype.property={},_a.prototype.normal={},_a.prototype.space=null;function zE(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 _a(n,r,t)}function Jf(e){return e.toLowerCase()}class Jn{constructor(t,n){this.property=t,this.attribute=n}}Jn.prototype.space=null,Jn.prototype.boolean=!1,Jn.prototype.booleanish=!1,Jn.prototype.overloadedBoolean=!1,Jn.prototype.number=!1,Jn.prototype.commaSeparated=!1,Jn.prototype.spaceSeparated=!1,Jn.prototype.commaOrSpaceSeparated=!1,Jn.prototype.mustUseProperty=!1,Jn.prototype.defined=!1;let eI=0;const Ye=us(),jt=us(),jE=us(),ge=us(),yt=us(),Js=us(),Bn=us();function us(){return hd(2,++eI)}const Zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:jt,commaOrSpaceSeparated:Bn,commaSeparated:Js,number:ge,overloadedBoolean:jE,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),eh=Object.keys(Zf);class th extends Jn{constructor(t,n,r,s){let a=-1;if(super(t,n),$E(this,"space",s),typeof r=="number")for(;++a<eh.length;){const u=eh[a];$E(this,eh[a],(r&Zf[u])===Zf[u])}}}th.prototype.defined=!0;function $E(e,t,n){n&&(e[t]=n)}const tI={}.hasOwnProperty;function Zs(e){const t={},n={};let r;for(r in e.properties)if(tI.call(e.properties,r)){const s=e.properties[r],a=new th(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jf(r)]=r,n[Jf(a.attribute)]=r}return new _a(t,n,e.space)}const VE=Zs({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}}),qE=Zs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function YE(e,t){return t in e?e[t]:t}function WE(e,t){return YE(e,t.toLowerCase())}const GE=Zs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:WE,properties:{xmlns:null,xmlnsXLink:null}}),XE=Zs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:yt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ge,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:yt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:jt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),nI=Zs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:WE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Js,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:yt,autoFocus:Ye,autoPlay:Ye,blocking:yt,capture:null,charSet:null,checked:Ye,cite:null,className:yt,cols:ge,colSpan:null,content:null,contentEditable:jt,controls:Ye,controlsList:yt,coords:ge|Js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:jE,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:yt,height:ge,hidden:Ye,high:ge,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ye,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:ge,pattern:null,ping:yt,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:yt,required:Ye,reversed:Ye,rows:ge,rowSpan:ge,sandbox:yt,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:jt,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:Ye,useMap:null,value:jt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,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:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:jt,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:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:ge,security:null,unselectable:null}}),rI=Zs({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:YE,properties:{about:Bn,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:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ye,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:Js,g2:Js,glyphName:Js,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:Bn,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:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bn,rev:Bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bn,requiredFeatures:Bn,requiredFonts:Bn,requiredFormats:Bn,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:Bn,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:Bn,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:Bn,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}}),iI=/^data[-\w.:]+$/i,KE=/-[a-z]/g,sI=/[A-Z]/g;function oI(e,t){const n=Jf(t);let r=t,s=Jn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(KE,uI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!KE.test(a)){let u=a.replace(sI,aI);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=th}return new s(r,t)}function aI(e){return"-"+e.toLowerCase()}function uI(e){return e.charAt(1).toUpperCase()}const lI=zE([qE,VE,GE,XE,nI],"html"),QE=zE([qE,VE,GE,XE,rI],"svg"),JE={}.hasOwnProperty;function ZE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&JE.call(s,e)){const d=String(s[e]);u=JE.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 cI={},dI={}.hasOwnProperty,ey=ZE("type",{handlers:{root:hI,element:yI,text:gI,comment:EI,doctype:mI}});function fI(e,t){const r=(t||cI).space;return ey(e,r==="svg"?QE:lI)}function hI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=nh(e.children,n,t),eo(e,n),n}function pI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=nh(e.children,n,t),eo(e,n),n}function mI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return eo(e,t),t}function gI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return eo(e,t),t}function EI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return eo(e,t),t}function yI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=QE);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&dI.call(e.properties,a)){const d=TI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:as[u],childNodes:[],parentNode:null};return c.childNodes=nh(e.children,c,r),eo(e,c),e.tagName==="template"&&e.content&&(c.content=pI(e.content,r)),c}function TI(e,t,n){const r=oI(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?h1(n):A1(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=as[r.space]}return s}function nh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=ey(e[r],n);a.parentNode=t,s.push(a)}return s}function eo(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 bI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_I=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]),Ct="�";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 An={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ty(e){return e>=55296&&e<=57343}function SI(e){return e>=56320&&e<=57343}function xI(e,t){return(e-55296)*1024+9216+t}function ny(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ry(e){return e>=64976&&e<=65007||_I.has(e)}var J;(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"})(J||(J={}));const wI=65536;class CI{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=wI,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(SI(n))return this.pos++,this._addGap(),xI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(J.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,ty(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){ny(t)?this._err(J.controlCharacterInInputStream):ry(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function iy(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const AI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),vI=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 kI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=vI.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 NI=32;var Si;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Si||(Si={}));function rh(e){return e>=Xt.ZERO&&e<=Xt.NINE}function OI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function PI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||rh(e)}function II(e){return e===Xt.EQUALS||PI(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 Zr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Zr||(Zr={}));class RI{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=Zr.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)|NI)===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(rh(s)||OI(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(rh(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===Zr.Strict)return 0;return this.emitCodePoint(kI(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&Si.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=LI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Zr.Attribute&&(a===0||II(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&Si.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Zr.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]&Si.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]&~Si.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!==Zr.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 LI(e,t,n,r){const s=(t&Si.BRANCH_LENGTH)>>7,a=t&Si.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 ae;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ae||(ae={}));var ls;(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"})(ls||(ls={}));var Zn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Zn||(Zn={}));var Y;(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"})(Y||(Y={}));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 DI=new Map([[Y.A,m.A],[Y.ADDRESS,m.ADDRESS],[Y.ANNOTATION_XML,m.ANNOTATION_XML],[Y.APPLET,m.APPLET],[Y.AREA,m.AREA],[Y.ARTICLE,m.ARTICLE],[Y.ASIDE,m.ASIDE],[Y.B,m.B],[Y.BASE,m.BASE],[Y.BASEFONT,m.BASEFONT],[Y.BGSOUND,m.BGSOUND],[Y.BIG,m.BIG],[Y.BLOCKQUOTE,m.BLOCKQUOTE],[Y.BODY,m.BODY],[Y.BR,m.BR],[Y.BUTTON,m.BUTTON],[Y.CAPTION,m.CAPTION],[Y.CENTER,m.CENTER],[Y.CODE,m.CODE],[Y.COL,m.COL],[Y.COLGROUP,m.COLGROUP],[Y.DD,m.DD],[Y.DESC,m.DESC],[Y.DETAILS,m.DETAILS],[Y.DIALOG,m.DIALOG],[Y.DIR,m.DIR],[Y.DIV,m.DIV],[Y.DL,m.DL],[Y.DT,m.DT],[Y.EM,m.EM],[Y.EMBED,m.EMBED],[Y.FIELDSET,m.FIELDSET],[Y.FIGCAPTION,m.FIGCAPTION],[Y.FIGURE,m.FIGURE],[Y.FONT,m.FONT],[Y.FOOTER,m.FOOTER],[Y.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Y.FORM,m.FORM],[Y.FRAME,m.FRAME],[Y.FRAMESET,m.FRAMESET],[Y.H1,m.H1],[Y.H2,m.H2],[Y.H3,m.H3],[Y.H4,m.H4],[Y.H5,m.H5],[Y.H6,m.H6],[Y.HEAD,m.HEAD],[Y.HEADER,m.HEADER],[Y.HGROUP,m.HGROUP],[Y.HR,m.HR],[Y.HTML,m.HTML],[Y.I,m.I],[Y.IMG,m.IMG],[Y.IMAGE,m.IMAGE],[Y.INPUT,m.INPUT],[Y.IFRAME,m.IFRAME],[Y.KEYGEN,m.KEYGEN],[Y.LABEL,m.LABEL],[Y.LI,m.LI],[Y.LINK,m.LINK],[Y.LISTING,m.LISTING],[Y.MAIN,m.MAIN],[Y.MALIGNMARK,m.MALIGNMARK],[Y.MARQUEE,m.MARQUEE],[Y.MATH,m.MATH],[Y.MENU,m.MENU],[Y.META,m.META],[Y.MGLYPH,m.MGLYPH],[Y.MI,m.MI],[Y.MO,m.MO],[Y.MN,m.MN],[Y.MS,m.MS],[Y.MTEXT,m.MTEXT],[Y.NAV,m.NAV],[Y.NOBR,m.NOBR],[Y.NOFRAMES,m.NOFRAMES],[Y.NOEMBED,m.NOEMBED],[Y.NOSCRIPT,m.NOSCRIPT],[Y.OBJECT,m.OBJECT],[Y.OL,m.OL],[Y.OPTGROUP,m.OPTGROUP],[Y.OPTION,m.OPTION],[Y.P,m.P],[Y.PARAM,m.PARAM],[Y.PLAINTEXT,m.PLAINTEXT],[Y.PRE,m.PRE],[Y.RB,m.RB],[Y.RP,m.RP],[Y.RT,m.RT],[Y.RTC,m.RTC],[Y.RUBY,m.RUBY],[Y.S,m.S],[Y.SCRIPT,m.SCRIPT],[Y.SEARCH,m.SEARCH],[Y.SECTION,m.SECTION],[Y.SELECT,m.SELECT],[Y.SOURCE,m.SOURCE],[Y.SMALL,m.SMALL],[Y.SPAN,m.SPAN],[Y.STRIKE,m.STRIKE],[Y.STRONG,m.STRONG],[Y.STYLE,m.STYLE],[Y.SUB,m.SUB],[Y.SUMMARY,m.SUMMARY],[Y.SUP,m.SUP],[Y.TABLE,m.TABLE],[Y.TBODY,m.TBODY],[Y.TEMPLATE,m.TEMPLATE],[Y.TEXTAREA,m.TEXTAREA],[Y.TFOOT,m.TFOOT],[Y.TD,m.TD],[Y.TH,m.TH],[Y.THEAD,m.THEAD],[Y.TITLE,m.TITLE],[Y.TR,m.TR],[Y.TRACK,m.TRACK],[Y.TT,m.TT],[Y.U,m.U],[Y.UL,m.UL],[Y.SVG,m.SVG],[Y.VAR,m.VAR],[Y.WBR,m.WBR],[Y.XMP,m.XMP]]);function to(e){var t;return(t=DI.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,MI={[ae.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},ih=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var P;(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"})(P||(P={}));const Mt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function FI(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Sa(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function BI(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function xi(e){return BI(e)||Sa(e)}function sy(e){return xi(e)||FI(e)}function wl(e){return e+32}function oy(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function ay(e){return oy(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function UI(e){return e===k.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:ty(e)?J.surrogateCharacterReference:ry(e)?J.noncharacterCharacterReference:ny(e)||e===k.CARRIAGE_RETURN?J.controlCharacterReference:null}class HI{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=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new CI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new RI(AI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=UI(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:Ke.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(iy(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(J.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=to(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=oy(t)?Ke.WHITESPACE_CHARACTER:t===k.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Zr.Attribute:Zr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(J.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=P.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(xi(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(xi(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=P.DATA;break}case k.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.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=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=Ct;break}case k.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Sa(t)?wl(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){xi(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.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=P.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){xi(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){xi(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:xi(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){xi(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(An.SCRIPT,!1)&&ay(this.preprocessor.peek(An.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<An.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.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=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case k.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(An.SCRIPT,!1)&&ay(this.preprocessor.peek(An.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<An.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.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=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.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=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=Ct;break}default:this.currentAttr.name+=String.fromCodePoint(Sa(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=P.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.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=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case k.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case k.EOF:{this._err(J.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=P.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(J.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=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ct;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(An.DASH_DASH,!0)?(this._createCommentToken(An.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(An.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(An.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(An.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(An.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ct;break}case k.EOF:{this._err(J.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=P.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(J.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Sa(t))this._createDoctypeToken(String.fromCharCode(wl(t))),this.state=P.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(J.unexpectedNullCharacter),this._createDoctypeToken(Ct),this.state=P.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(J.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=P.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=P.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.name+=Ct;break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Sa(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=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(An.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(An.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.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=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.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=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ct;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(J.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=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ct;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(J.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=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.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=P.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.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=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.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=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ct;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(J.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=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ct;break}case k.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(J.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=P.DATA;break}case k.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.NULL:{this._err(J.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.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()&&sy(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){sy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const uy=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),ly=new Set([...uy,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]),zI=new Set([...Cl,m.OL,m.UL]),jI=new Set([...Cl,m.BUTTON]),cy=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),dy=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),$I=new Set([m.TR,m.TEMPLATE,m.HTML]),VI=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),qI=new Set([m.TABLE,m.TEMPLATE,m.HTML]),YI=new Set([m.TD,m.TH]);class WI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ae.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==ae.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ih,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(YI,ae.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(qI,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(VI,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo($I,ae.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ae.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ae.SVG:{if(dy.has(s))return!1;break}case ae.MATHML:{if(cy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Cl)}hasInListItemScope(t){return this.hasInDynamicScope(t,zI)}hasInButtonScope(t){return this.hasInDynamicScope(t,jI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(ih.has(n))return!0;if(Cl.has(n))return!1;break}case ae.SVG:{if(dy.has(n))return!1;break}case ae.MATHML:{if(cy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ae.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&uy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ly.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ly.has(this.currentTagId);)this.pop()}}const sh=3;var Rr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Rr||(Rr={}));const fy={type:Rr.Marker};class GI{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===Rr.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<sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<sh)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>=sh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(fy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Rr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Rr.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(fy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Rr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Rr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Rr.Element&&n.element===t)}}const wi={createDocument(){return{nodeName:"#document",mode:Zn.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};wi.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(wi.isTextNode(n)){n.value+=t;return}}wi.appendChild(e,wi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&wi.isTextNode(r)?r.value+=t:wi.insertBefore(e,wi.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=U(U({},e.sourceCodeLocation),t)}},hy="html",XI="about:legacy-compat",KI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",py=["+//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//"],QI=[...py,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],JI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),my=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ZI=[...my,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function gy(e,t){return t.some(n=>e.startsWith(n))}function e3(e){return e.name===hy&&e.publicId===null&&(e.systemId===null||e.systemId===XI)}function t3(e){if(e.name!==hy)return Zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===KI)return Zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),JI.has(n))return Zn.QUIRKS;let r=t===null?QI:py;if(gy(n,r))return Zn.QUIRKS;if(r=t===null?my:ZI,gy(n,r))return Zn.LIMITED_QUIRKS}return Zn.NO_QUIRKS}const Ey={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},n3="definitionurl",r3="definitionURL",i3=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])),s3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),o3=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])),a3=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 u3(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ls.COLOR||r===ls.SIZE||r===ls.FACE)||a3.has(t)}function yy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===n3){e.attrs[t].name=r3;break}}function Ty(e){for(let t=0;t<e.attrs.length;t++){const n=i3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function oh(e){for(let t=0;t<e.attrs.length;t++){const n=s3.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 l3(e){const t=o3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=to(e.tagName))}function c3(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function d3(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ls.ENCODING){const s=n[r].value.toLowerCase();return s===Ey.TEXT_HTML||s===Ey.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function f3(e,t,n,r){return(!r||r===ae.HTML)&&d3(e,t,n)||(!r||r===ae.MATHML)&&c3(e,t)}const h3="hidden",p3=8,m3=3;var D;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(D||(D={}));const g3={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},by=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),_y={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:wi,onParseError:null};class Sy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},_y),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 HI(this.options,this),this.activeFormattingElements=new GI(this.treeAdapter),this.fragmentContextID=r?to(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new WI(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=U(U({},_y),n);t!=null||(t=r.treeAdapter.createElement(Y.TEMPLATE,ae.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:g3,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=Mt.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)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Mt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Mt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Mt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Mt.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&&_e(U({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Y.HTML,ae.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const 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===Ke.END_TAG&&s===n.tagName?{endTag:U({},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)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return f3(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Rr.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=D.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=D.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=D.IN_TABLE;return}case m.BODY:{this.insertionMode=D.IN_BODY;return}case m.FRAMESET:{this.insertionMode=D.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?D.AFTER_HEAD:D.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return by.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ae.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return MI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YR(this,t);return}switch(this.insertionMode){case D.INITIAL:{xa(this,t);break}case D.BEFORE_HTML:{wa(this,t);break}case D.BEFORE_HEAD:{Ca(this,t);break}case D.IN_HEAD:{Aa(this,t);break}case D.IN_HEAD_NO_SCRIPT:{va(this,t);break}case D.AFTER_HEAD:{ka(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{wy(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{ch(this,t);break}case D.IN_TABLE_TEXT:{Iy(this,t);break}case D.IN_COLUMN_GROUP:{kl(this,t);break}case D.AFTER_BODY:{Pl(this,t);break}case D.AFTER_AFTER_BODY:{Il(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qR(this,t);return}switch(this.insertionMode){case D.INITIAL:{xa(this,t);break}case D.BEFORE_HTML:{wa(this,t);break}case D.BEFORE_HEAD:{Ca(this,t);break}case D.IN_HEAD:{Aa(this,t);break}case D.IN_HEAD_NO_SCRIPT:{va(this,t);break}case D.AFTER_HEAD:{ka(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{ch(this,t);break}case D.IN_COLUMN_GROUP:{kl(this,t);break}case D.AFTER_BODY:{Pl(this,t);break}case D.AFTER_AFTER_BODY:{Il(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){uh(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{uh(this,t);break}case D.IN_TABLE_TEXT:{Pa(this,t);break}case D.AFTER_BODY:{x3(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{w3(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{C3(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case D.IN_TABLE_TEXT:{Pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?WR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{xa(this,t);break}case D.BEFORE_HTML:{A3(this,t);break}case D.BEFORE_HEAD:{k3(this,t);break}case D.IN_HEAD:{pr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{P3(this,t);break}case D.AFTER_HEAD:{R3(this,t);break}case D.IN_BODY:{dn(this,t);break}case D.IN_TABLE:{no(this,t);break}case D.IN_TABLE_TEXT:{Pa(this,t);break}case D.IN_CAPTION:{NR(this,t);break}case D.IN_COLUMN_GROUP:{dh(this,t);break}case D.IN_TABLE_BODY:{Nl(this,t);break}case D.IN_ROW:{Ol(this,t);break}case D.IN_CELL:{IR(this,t);break}case D.IN_SELECT:{Dy(this,t);break}case D.IN_SELECT_IN_TABLE:{LR(this,t);break}case D.IN_TEMPLATE:{MR(this,t);break}case D.AFTER_BODY:{BR(this,t);break}case D.IN_FRAMESET:{UR(this,t);break}case D.AFTER_FRAMESET:{zR(this,t);break}case D.AFTER_AFTER_BODY:{$R(this,t);break}case D.AFTER_AFTER_FRAMESET:{VR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?GR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{xa(this,t);break}case D.BEFORE_HTML:{v3(this,t);break}case D.BEFORE_HEAD:{N3(this,t);break}case D.IN_HEAD:{O3(this,t);break}case D.IN_HEAD_NO_SCRIPT:{I3(this,t);break}case D.AFTER_HEAD:{L3(this,t);break}case D.IN_BODY:{vl(this,t);break}case D.TEXT:{TR(this,t);break}case D.IN_TABLE:{Na(this,t);break}case D.IN_TABLE_TEXT:{Pa(this,t);break}case D.IN_CAPTION:{OR(this,t);break}case D.IN_COLUMN_GROUP:{PR(this,t);break}case D.IN_TABLE_BODY:{fh(this,t);break}case D.IN_ROW:{Ly(this,t);break}case D.IN_CELL:{RR(this,t);break}case D.IN_SELECT:{My(this,t);break}case D.IN_SELECT_IN_TABLE:{DR(this,t);break}case D.IN_TEMPLATE:{FR(this,t);break}case D.AFTER_BODY:{By(this,t);break}case D.IN_FRAMESET:{HR(this,t);break}case D.AFTER_FRAMESET:{jR(this,t);break}case D.AFTER_AFTER_BODY:{Il(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{xa(this,t);break}case D.BEFORE_HTML:{wa(this,t);break}case D.BEFORE_HEAD:{Ca(this,t);break}case D.IN_HEAD:{Aa(this,t);break}case D.IN_HEAD_NO_SCRIPT:{va(this,t);break}case D.AFTER_HEAD:{ka(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{Oy(this,t);break}case D.TEXT:{bR(this,t);break}case D.IN_TABLE_TEXT:{Pa(this,t);break}case D.IN_TEMPLATE:{Fy(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{lh(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 D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{xy(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{ch(this,t);break}case D.IN_TABLE_TEXT:{Py(this,t);break}}}}function E3(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):Ny(e,t),n}function y3(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 T3(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>=m3;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=b3(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function b3(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 _3(e,t,n){const r=e.treeAdapter.getTagName(t),s=to(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function S3(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 ah(e,t){for(let n=0;n<p3;n++){const r=E3(e,t);if(!r)break;const s=y3(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=T3(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&_3(e,u,a),S3(e,s,r)}}function uh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function x3(e,t){e._appendCommentNode(t,e.openElements.items[0])}function w3(e,t){e._appendCommentNode(t,e.document)}function lh(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 C3(e,t){e._setDocumentType(t);const n=t.forceQuirks?Zn.QUIRKS:t3(t);e3(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=D.BEFORE_HTML}function xa(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Zn.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function A3(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=D.BEFORE_HEAD):wa(e,t)}function v3(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&wa(e,t)}function wa(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function k3(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Ca(e,t)}}function N3(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ca(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ca(e,t){e._insertFakeElement(Y.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function pr(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Mt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Mt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Mt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Mt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Aa(e,t)}}function O3(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Aa(e,t);break}case m.TEMPLATE:{cs(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function cs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function Aa(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function P3(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{pr(e,t);break}case m.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:va(e,t)}}function I3(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case m.BR:{va(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function va(e,t){const n=t.type===Ke.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function R3(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=D.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,J.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),pr(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:ka(e,t)}}function L3(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{ka(e,t);break}case m.TEMPLATE:{cs(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function ka(e,t){e._insertFakeElement(Y.BODY,m.BODY),e.insertionMode=D.IN_BODY,Al(e,t)}function Al(e,t){switch(t.type){case Ke.CHARACTER:{wy(e,t);break}case Ke.WHITESPACE_CHARACTER:{xy(e,t);break}case Ke.COMMENT:{uh(e,t);break}case Ke.START_TAG:{dn(e,t);break}case Ke.END_TAG:{vl(e,t);break}case Ke.EOF:{Oy(e,t);break}}}function xy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function wy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function D3(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function M3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function F3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=D.IN_FRAMESET)}function B3(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function U3(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ih.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function H3(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function z3(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function j3(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,ae.HTML)}function $3(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Mt.PLAINTEXT}function V3(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function q3(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function W3(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function G3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function X3(e,t){e.treeAdapter.getDocumentMode(e.document)!==Zn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function Cy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ay(e){const t=iy(e,ls.TYPE);return t!=null&&t.toLowerCase()===h3}function K3(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),Ay(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Q3(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function J3(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Z3(e,t){t.tagName=Y.IMG,t.tagID=m.IMG,Cy(e,t)}function eR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Mt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function tR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function nR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function vy(e,t){e._switchToTextParsing(t,Mt.RAWTEXT)}function rR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function iR(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function sR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function oR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function aR(e,t){e._reconstructActiveFormattingElements(),yy(t),oh(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function uR(e,t){e._reconstructActiveFormattingElements(),Ty(t),oh(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function ky(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function dn(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:{Y3(e,t);break}case m.A:{q3(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{U3(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:{B3(e,t);break}case m.LI:case m.DD:case m.DT:{j3(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Cy(e,t);break}case m.HR:{J3(e,t);break}case m.RB:case m.RTC:{sR(e,t);break}case m.RT:case m.RP:{oR(e,t);break}case m.PRE:case m.LISTING:{H3(e,t);break}case m.XMP:{tR(e,t);break}case m.SVG:{uR(e,t);break}case m.HTML:{D3(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:{pr(e,t);break}case m.BODY:{M3(e,t);break}case m.FORM:{z3(e,t);break}case m.NOBR:{W3(e,t);break}case m.MATH:{aR(e,t);break}case m.TABLE:{X3(e,t);break}case m.INPUT:{K3(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{Q3(e,t);break}case m.IMAGE:{Z3(e,t);break}case m.BUTTON:{V3(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{G3(e,t);break}case m.IFRAME:{nR(e,t);break}case m.SELECT:{rR(e,t);break}case m.OPTION:case m.OPTGROUP:{iR(e,t);break}case m.NOEMBED:case m.NOFRAMES:{vy(e,t);break}case m.FRAMESET:{F3(e,t);break}case m.TEXTAREA:{eR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?vy(e,t):ky(e,t);break}case m.PLAINTEXT:{$3(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:ky(e,t)}}function lR(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cR(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=D.AFTER_BODY,By(e,t))}function dR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function fR(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 hR(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Y.P,m.P),e._closePElement()}function pR(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function mR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ER(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function yR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Ny(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:{ah(e,t);break}case m.P:{hR(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:{dR(e,t);break}case m.LI:{pR(e);break}case m.DD:case m.DT:{mR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{gR(e);break}case m.BR:{yR(e);break}case m.BODY:{lR(e,t);break}case m.HTML:{cR(e,t);break}case m.FORM:{fR(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{ER(e,t);break}case m.TEMPLATE:{cs(e,t);break}default:Ny(e,t)}}function Oy(e,t){e.tmplInsertionModeStack.length>0?Fy(e,t):lh(e,t)}function TR(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 bR(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ch(e,t){if(e.openElements.currentTagId!==void 0&&by.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Iy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Py(e,t);break}}else Oa(e,t)}function _R(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=D.IN_CAPTION}function SR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function xR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,m.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,dh(e,t)}function wR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=D.IN_TABLE_BODY}function CR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,m.TBODY),e.insertionMode=D.IN_TABLE_BODY,Nl(e,t)}function AR(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vR(e,t){Ay(t)?e._appendElement(t,ae.HTML):Oa(e,t),t.ackSelfClosing=!0}function kR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function no(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{CR(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{pr(e,t);break}case m.COL:{xR(e,t);break}case m.FORM:{kR(e,t);break}case m.TABLE:{AR(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{wR(e,t);break}case m.INPUT:{vR(e,t);break}case m.CAPTION:{_R(e,t);break}case m.COLGROUP:{SR(e,t);break}default:Oa(e,t)}}function Na(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{cs(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:Oa(e,t)}}function Oa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Al(e,t),e.fosterParentingEnabled=n}function Py(e,t){e.pendingCharacterTokens.push(t)}function Iy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Oa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ry=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function NR(e,t){const n=t.tagID;Ry.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,no(e,t)):dn(e,t)}function OR(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=D.IN_TABLE,n===m.TABLE&&Na(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 dh(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{pr(e,t);break}default:kl(e,t)}}function PR(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case m.TEMPLATE:{cs(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=D.IN_TABLE,e._processToken(t))}function Nl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=D.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,m.TR),e.insertionMode=D.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=D.IN_TABLE,no(e,t));break}default:no(e,t)}}function fh(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=D.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,Na(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:Na(e,t)}}function Ol(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=D.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=D.IN_TABLE_BODY,Nl(e,t));break}default:no(e,t)}}function Ly(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,fh(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=D.IN_TABLE_BODY,fh(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:Na(e,t)}}function IR(e,t){const n=t.tagID;Ry.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Ol(e,t)):dn(e,t)}function RR(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ly(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:vl(e,t)}}function Dy(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{pr(e,t);break}}}function My(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:{cs(e,t);break}}}function LR(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)):Dy(e,t)}function DR(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)):My(e,t)}function MR(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:{pr(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,no(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,dh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,Nl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,Ol(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,dn(e,t)}}function FR(e,t){t.tagID===m.TEMPLATE&&cs(e,t)}function Fy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):lh(e,t)}function BR(e,t){t.tagID===m.HTML?dn(e,t):Pl(e,t)}function By(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=D.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=D.IN_BODY,Al(e,t)}function UR(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{pr(e,t);break}}}function HR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function zR(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.NOFRAMES:{pr(e,t);break}}}function jR(e,t){t.tagID===m.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function $R(e,t){t.tagID===m.HTML?dn(e,t):Il(e,t)}function Il(e,t){e.insertionMode=D.IN_BODY,Al(e,t)}function VR(e,t){switch(t.tagID){case m.HTML:{dn(e,t);break}case m.NOFRAMES:{pr(e,t);break}}}function qR(e,t){t.chars=Ct,e._insertCharacters(t)}function YR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Uy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function WR(e,t){if(u3(t))Uy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?yy(t):r===ae.SVG&&(l3(t),Ty(t)),oh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function GR(e,t){if(t.tagID===m.P||t.tagID===m.BR){Uy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ae.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const XR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,KR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Hy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function zy(e,t){const n=oL(e),r=ZE("type",{handlers:{root:QR,element:JR,text:ZR,comment:$y,doctype:eL,raw:nL},unknown:rL}),s={parser:n?new Sy(Hy):Sy.getFragmentParser(void 0,Hy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),ro(s,Pr());const a=n?s.parser.document:s.parser.getFragment(),u=QP(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 jy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function QR(e,t){jy(e.children,t)}function JR(e,t){iL(e,t),jy(e.children,t),sL(e,t)}function ZR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Ia(e)};ro(t,Pr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function eL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ia(e)};ro(t,Pr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tL(e,t){t.stitches=!0;const n=aL(e);if("children"in e&&"children"in n){const r=zy({type:"root",children:e.children},t.options);n.children=r.children}$y({type:"comment",value:{stitch:n}},t)}function $y(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Ia(e)};ro(t,Pr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function nL(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,Vy(t,Pr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(XR,"<$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 rL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))tL(n,t);else{let r="";throw KR.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 ro(e,t){Vy(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=Mt.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 Vy(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 iL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Mt.PLAINTEXT)return;ro(t,Pr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:as.html;s===as.html&&n==="svg"&&(s=as.svg);const a=fI(_e(U({},e),{children:[]}),{space:s===as.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:to(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ia(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function sL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&bI.includes(n)||t.parser.tokenizer.state===Mt.PLAINTEXT)return;ro(t,cl(e));const r={type:Ke.END_TAG,tagName:n,tagID:to(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ia(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Mt.RCDATA||t.parser.tokenizer.state===Mt.RAWTEXT||t.parser.tokenizer.state===Mt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Mt.DATA)}function oL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ia(e){const t=Pr(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 aL(e){return"children"in e?os(_e(U({},e),{children:[]})):os(e)}function qy(e){return function(t,n){return zy(t,_e(U({},e),{file:n}))}}const ds=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Yy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ds,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ds],h2:[["className","sr-only"]],img:[...ds,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ds,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ds],table:[...ds],ul:[...ds,["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"]},Ci={}.hasOwnProperty;function uL(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Yy),t):Yy,stack:[]},s=Wy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Wy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return lL(e,n);case"doctype":return cL(e,n);case"element":return dL(e,n);case"root":return fL(e,n);case"text":return hL(e,n)}}}function lL(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 Ra(a,t),a}}function cL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ra(n,t),n}}function dL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Gy(e,t.children),s=pL(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&&Ci.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 Ra(u,t),u}function fL(e,t){const r={type:"root",children:Gy(e,t.children)};return Ra(r,t),r}function hL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ra(r,t),r}function Gy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Wy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function pL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ci.call(c,f)){const p=c[f];let g=Xy(e,Qy(a,f),f,p);g==null&&(g=Xy(e,Qy(u,f),f,p)),g!=null&&(d[f]=g)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function Xy(e,t,n,r){return t?Array.isArray(r)?mL(e,t,n,r):Ky(e,t,n,r):void 0}function mL(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Ky(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ky(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&gL(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 gL(e,t,n){const r=e.schema.protocols&&Ci.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 Ra(e,t){const n=I1(t);t.data&&(e.data=os(t.data)),n&&(e.position=n)}function Qy(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 EL(e){return function(t){return uL(t,e)}}const Jy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",_e(U(U({className:X(e,`${$}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},yL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=ht();return!e&&!t?null:w.jsx("div",{className:X(n,`${$}-disclaimer`),children:t?w.jsx(RE,{rehypePlugins:[qy,EL],components:{ul:({children:s})=>w.jsx("ul",{className:X(n,`${$}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:X(n,`${$}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:X(n,`${$}-li`),children:s}),a:({href:s,title:a,children:u})=>w.jsx(Jy,{globalClassName:n,openLinksInNewTab:r,href:s,title:a,children:u}),img:({src:s,alt:a})=>w.jsx("img",{className:X(n,`${$}-disclaimer-image`),src:s,alt:a}),p:({children:s})=>w.jsx("p",{className:X(n,`${$}-disclaimer-text`),children:s}),span:({children:s})=>w.jsx("span",{className:X(n,`${$}-disclaimer-text-span`),children:s})},children:t}):w.jsx("p",{className:X(n,`${$}-disclaimer-text`),children:e})})},hh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Xn(),{setImageFile:u}=rs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=ht(),g=z.useRef(null),b=z.useRef(null),T=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!s||!1,v=S?"connected":"disconnected",A=t||!S,R=()=>a?new Promise((F,ne)=>{const le=new FileReader;le.readAsDataURL(a),le.onload=()=>F(le.result),le.onerror=Te=>ne(Te)}):Promise.resolve(""),N=F=>et(null,null,function*(){var Te;if(A)return;const ne=10*1024*1024,le=(Te=F.target.files)==null?void 0:Te[0];if(le){if(le.size>ne){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(le)}}),L=()=>{u(null),b.current&&(b.current.value="")},W=F=>et(null,null,function*(){var Te;F.preventDefault();const ne=(((Te=g.current)==null?void 0:Te.value)||"").trim();let le="";try{le=yield R()}catch(j){c==null||c.error("Error converting file to base64:",j),alert("There was an error processing the file. Please try again.");return}ne&&(L(),g.current.value="",r(ne,le))});return w.jsxs("div",{className:X(d,e,n,a&&"with-attachments",`${$}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:X(d,n,`${$}-image-file-preview`),children:[w.jsx("img",{className:X(d,n,`${$}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:X(d,n,`${$}-image-file-name`),title:_,children:_}),w.jsx(pf,{className:X(n,"clear-attachment"),label:"Remove image",onClick:L})]}),w.jsxs("form",{className:X(d,e,n,`${$}-search-bar`),name:`${$}-search-form`,onSubmit:W,children:[w.jsx("span",{role:"status",className:X(`${$}-connection-status-icon`,v)}),T&&w.jsxs("div",{role:"button",className:X(d,e,n,A&&"disabled",`${$}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[w.jsx("label",{className:X(d,e,n,A&&"disabled",`${$}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Dv,{})}),w.jsx("input",{className:X(d,e,n,`${$}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${$}-file-input`,disabled:A,onInput:N})]}),w.jsx("input",{className:X(d,e,n,`${$}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${$}-user-input`}),w.jsx(Hv,{isLoading:A}),w.jsx(Fv,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),w.jsx(yL,{})]})};function TL(e){return e==null?[]:Array.isArray(e)?e:[e]}var bL=e=>e!=null&&typeof e=="object",Rl=e=>typeof e=="string",io=e=>typeof e=="function",_L=e=>e==null,SL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xL=e=>Object.prototype.toString.call(e),Zy=Function.prototype.toString,wL=Zy.call(Object),CL=e=>{if(!bL(e)||xL(e)!="[object Object]"||kL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=SL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zy.call(n)==wL},AL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,vL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,kL=e=>AL(e)||vL(e),NL=e=>e(),OL=()=>{},ph=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function mh(e){if(!CL(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]=mh(s))}return n}function gh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function PL(e,t){if(e==null)throw new Error(t())}var IL=Object.defineProperty,RL=(e,t,n)=>t in e?IL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eh=(e,t,n)=>RL(e,typeof t!="symbol"?t+"":t,n),eT=()=>{},Ll=e=>typeof e=="object"&&e!==null,LL=e=>e?"":void 0,DL=e=>e?"true":void 0,ML=1,FL=9,BL=11,Qt=e=>Ll(e)&&e.nodeType===ML&&typeof e.nodeName=="string",Dl=e=>Ll(e)&&e.nodeType===FL,UL=e=>Ll(e)&&e===e.window,tT=e=>Qt(e)?e.localName||"":"#document";function HL(e){return["html","body","#document"].includes(tT(e))}var zL=e=>Ll(e)&&e.nodeType!==void 0,fs=e=>zL(e)&&e.nodeType===BL&&"host"in e,jL=e=>Qt(e)&&e.localName==="input",$L=e=>Qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function La(e){if(!e)return!1;const t=e.getRootNode();return oo(t)===e}var VL=/(textarea|select)/;function qL(e){if(e==null||!Qt(e))return!1;try{return jL(e)&&e.selectionStart!=null||VL.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&&fs(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Lr(e){var t;return Dl(e)?e:UL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function YL(e){return Lr(e).documentElement}function so(e){var t,n,r;return fs(e)?so(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 oo(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 WL(e){if(tT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fs(e)&&e.host||YL(e);return fs(t)?t.host:t}function yh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Dl(t)||fs(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Th=new WeakMap;function Fl(e){return Th.has(e)||Th.set(e,so(e).getComputedStyle(e)),Th.get(e)}var bh=new Set(["menu","listbox","dialog","grid","tree","region"]),GL=e=>bh.has(e),nT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function rT(e,t){const n=new Set,r=yh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=nT(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&&GL(g)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function iT(e,t){const n=yh(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=nT(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&&bh.has(g)&&!b&&(t(p),s(p))}}}};s(e)}function XL(e){const t=new Set;return iT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function KL(e){const t=e.getAttribute("role");return!!(t&&bh.has(t))}function QL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function JL(e){var t;return QL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function ZL(e){if(!e.id)return!1;const t=yh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&KL(e))}var _h=()=>typeof document!="undefined";function e6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Sh=e=>_h()&&e.test(e6()),t6=e=>_h()&&e.test(navigator.vendor),sT=()=>_h()&&!!navigator.maxTouchPoints,n6=()=>Sh(/^iPhone/i),r6=()=>Sh(/^iPad/i)||xh()&&navigator.maxTouchPoints>1,oT=()=>n6()||r6(),i6=()=>xh()||oT(),xh=()=>Sh(/^Mac/i),s6=()=>i6()&&t6(/apple/i);function o6(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 ei(e){var n;const t=o6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var a6=e=>e.button===0,u6=e=>e.button===2||xh()&&e.ctrlKey&&e.button===0,mr=(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)}},aT=e=>Qt(e)&&e.tagName==="IFRAME",l6=/^(audio|video|details)$/;function uT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var c6=e=>!Number.isNaN(uT(e)),d6=e=>uT(e)<0;function f6(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 lT(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=f6(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((T,_)=>{u.set(T,b+_)});for(let T=b+p.length;T<r.length;T++)u.set(r[T],T)}else{const b=r.length;r.push(...p),p.forEach((T,_)=>{u.set(T,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",cT=(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)&&ti(e)&&s.unshift(e);const u=[];for(const c of s)if(ti(c)){if(aT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...cT(d,{getShadowRoot:r}));continue}u.push(c)}return r?lT(u,r,ti):u};function ti(e){return!Qt(e)||e.closest("[inert]")?!1:e.matches(Bl)&&$L(e)}function Da(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Bl));n&&hs(e)&&s.unshift(e);const a=[];for(const u of s)if(hs(u)){if(aT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Da(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=lT(a,r,hs);return!u.length&&n?s:u}return!a.length&&n?s:a}function hs(e){return Qt(e)&&e.tabIndex>0?!0:ti(e)&&!d6(e)}function h6(e,t={}){const n=Da(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function p6(e,t={}){const{current:n,getShadowRoot:r}=t,s=Da(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:oo(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Ma(e){return e.tabIndex<0&&(l6.test(e.localName)||qL(e))&&!c6(e)?0:e.tabIndex}function dT(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=Da(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var m6=class rx{constructor(){Eh(this,"id",null),Eh(this,"fn_cleanup"),Eh(this,"cleanup",()=>{this.cancel()})}static create(){return new rx}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 vn(e){const t=m6.create();return t.request(e),t.cleanup}function g6(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 wh(e){const t=WL(e);return HL(t)?Lr(t).body:Qt(t)&&T6(t)?t:wh(t)}var E6=/auto|scroll|overlay|hidden|clip/,y6=new Set(["inline","contents"]);function T6(e){const t=so(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return E6.test(n+s+r)&&!y6.has(a)}function b6(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]=h6(e,{includeContainer:!0,getShadowRoot:a}),T=p6(c,{current:n,getShadowRoot:a}),_=!g&&!b;f.shiftKey&&La(T)?(s==null||s(),p=b):f.shiftKey&&(La(g)||_)?p=n:!f.shiftKey&&La(n)?(s==null||s(),p=g):!f.shiftKey&&(La(b)||_)&&(p=T),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return mr(u,"keydown",d,!0)}function _6(e,t){const c=t,{defer:n,triggerElement:r}=c,s=on(c,["defer","triggerElement"]),a=n?vn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(b6(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Ul(e,t){if(!e)return eT;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 S6(e,t,n){if(!e)return eT;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 x6(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 w6(e,t){const{timeout:n,rootNode:r}=t,s=so(r),a=Lr(r),u=new s.AbortController;return x6(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 C6=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),A6=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,fT=e=>{const t={};let n;for(;n=A6.exec(e);)t[n[1]]=n[2];return t},v6=(e,t)=>{if(Rl(e)){if(Rl(t))return`${e};${t}`;e=fT(e)}else Rl(t)&&(t=fT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function gr(...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]=ph(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=C6(t[s],n[s]);continue}if(s==="style"){t[s]=v6(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 UB(e){return e}var ao=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ao||{}),Ch="__init__";function k6(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Lr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>oo(t()),a=u=>t().getElementById(u);return _e(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:La,getById:a})}var Ah={exports:{}},kn={},vh={exports:{}},kh={};var hT;function N6(){return hT||(hT=1,(function(e){function t(K,re){var C=K.length;K.push(re);e:for(;0<C;){var M=C-1>>>1,Z=K[M];if(0<s(Z,re))K[M]=re,K[C]=Z,C=M;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var re=K[0],C=K.pop();if(C!==re){K[0]=C;e:for(var M=0,Z=K.length,O=Z>>>1;M<O;){var be=2*(M+1)-1,Pe=K[be],Ce=be+1,$e=K[Ce];if(0>s(Pe,C))Ce<Z&&0>s($e,Pe)?(K[M]=$e,K[Ce]=C,M=Ce):(K[M]=Pe,K[be]=C,M=be);else if(Ce<Z&&0>s($e,C))K[M]=$e,K[Ce]=C,M=Ce;else break e}}return re}function s(K,re){var C=K.sortIndex-re.sortIndex;return C!==0?C:K.id-re.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,T=!1,_=!1,S=!1,v=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(K){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=K)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function L(K){if(S=!1,N(K),!_)if(n(d)!==null)_=!0,De(W);else{var re=n(f);re!==null&&de(L,re.startTime-K)}}function W(K,re){_=!1,S&&(S=!1,A(le),le=-1),T=!0;var C=b;try{for(N(re),g=n(d);g!==null&&(!(g.expirationTime>re)||K&&!se());){var M=g.callback;if(typeof M=="function"){g.callback=null,b=g.priorityLevel;var Z=M(g.expirationTime<=re);re=e.unstable_now(),typeof Z=="function"?g.callback=Z:g===n(d)&&r(d),N(re)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var be=n(f);be!==null&&de(L,be.startTime-re),O=!1}return O}finally{g=null,b=C,T=!1}}var F=!1,ne=null,le=-1,Te=5,j=-1;function se(){return!(e.unstable_now()-j<Te)}function te(){if(ne!==null){var K=e.unstable_now();j=K;var re=!0;try{re=ne(!0,K)}finally{re?pe():(F=!1,ne=null)}}else F=!1}var pe;if(typeof R=="function")pe=function(){R(te)};else if(typeof MessageChannel!="undefined"){var ce=new MessageChannel,ye=ce.port2;ce.port1.onmessage=te,pe=function(){ye.postMessage(null)}}else pe=function(){v(te,0)};function De(K){ne=K,F||(F=!0,pe())}function de(K,re){le=v(function(){K(e.unstable_now())},re)}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(K){K.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,De(W))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var re=3;break;default:re=b}var C=b;b=re;try{return K()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,re){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var C=b;b=K;try{return re()}finally{b=C}},e.unstable_scheduleCallback=function(K,re,C){var M=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?M+C:M):C=M,K){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=C+Z,K={id:p++,callback:re,priorityLevel:K,startTime:C,expirationTime:Z,sortIndex:-1},C>M?(K.sortIndex=C,t(f,K),n(d)===null&&K===n(f)&&(S?(A(le),le=-1):S=!0,de(L,C-M))):(K.sortIndex=Z,t(d,K),_||T||(_=!0,De(W))),K},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(K){var re=b;return function(){var C=b;b=re;try{return K.apply(this,arguments)}finally{b=C}}}})(kh)),kh}var pT;function O6(){return pT||(pT=1,vh.exports=N6()),vh.exports}var mT;function P6(){if(mT)return kn;mT=1;var e=Is(),t=O6();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 T(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"||T(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,y,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=y,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[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];v[o]=new S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[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){v[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function R(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,R);v[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,R);v[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,R);v[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function N(i,o,l,h){var E=v.hasOwnProperty(o)?v[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 L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),le=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),se=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),K=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,M;function Z(i){if(M===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
|
|
25
|
-
|
|
26
|
-
`),
|
|
27
|
-
|
|
28
|
-
`+E[x].replace(" at new "," at ");return i.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",i.displayName)),B}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Z(i):""}function Pe(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=be(i.type,!1),i;case 11:return i=be(i.type.render,!1),i;case 1:return i=be(i.type,!0),i;default:return""}}function Ce(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 ne:return"Fragment";case F:return"Portal";case Te:return"Profiler";case le:return"StrictMode";case pe:return"Suspense";case ce:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case j:return(i._context.displayName||"Context")+".Provider";case te:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ye:return o=i.displayName||null,o!==null?o:Ce(i.type)||"Memo";case De:o=i._payload,i=i._init;try{return Ce(i(o))}catch(l){}}return null}function $e(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 Ce(o);case 8:return o===le?"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 we(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function mt(i){var o=Ge(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,y=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,y.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 tn(i){i._valueTracker||(i._valueTracker=mt(i))}function zr(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function Tr(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 Nn(i,o){var l=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Es(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=we(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 Ni(i,o){o=o.checked,o!=null&&N(i,"checked",o,!1)}function oi(i,o){Ni(i,o);var l=we(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")?Fe(i,o.type,l):o.hasOwnProperty("defaultValue")&&Fe(i,o.type,we(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function ve(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 Fe(i,o,l){(o!=="number"||Tr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Le=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=""+we(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 ft(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ut(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(Le(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:we(l)}}function Tn(i,o){var l=we(o.value),h=we(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 ee(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ie(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ie,Ve=(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(Ie=Ie||document.createElement("div"),Ie.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ie.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Xe(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var Tt={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},tr=["Webkit","ms","Moz","O"];Object.keys(Tt).forEach(function(i){tr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Tt[o]=Tt[i]})});function nr(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||Tt.hasOwnProperty(i)&&Tt[i]?(""+o).trim():o+"px"}function Oi(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=nr(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var ys=C({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 nn(i,o){if(o){if(ys[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 jr(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 zn=null;function mp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var gp=null,_o=null,So=null;function m_(i){if(i=pu(i)){if(typeof gp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=vc(o),gp(i.stateNode,i.type,o))}}function g_(i){_o?So?So.push(i):So=[i]:_o=i}function E_(){if(_o){var i=_o,o=So;if(So=_o=null,m_(i),o)for(i=0;i<o.length;i++)m_(o[i])}}function y_(i,o){return i(o)}function T_(){}var Ep=!1;function b_(i,o,l){if(Ep)return i(o,l);Ep=!0;try{return y_(i,o,l)}finally{Ep=!1,(_o!==null||So!==null)&&(T_(),E_())}}function Wa(i,o){var l=i.stateNode;if(l===null)return null;var h=vc(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 yp=!1;if(c)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){yp=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch(i){yp=!1}function tF(i,o,l,h,E,y,x,I,B){var Q=Array.prototype.slice.call(arguments,3);try{o.apply(l,Q)}catch(ue){this.onError(ue)}}var Xa=!1,sc=null,oc=!1,Tp=null,nF={onError:function(i){Xa=!0,sc=i}};function rF(i,o,l,h,E,y,x,I,B){Xa=!1,sc=null,tF.apply(nF,arguments)}function iF(i,o,l,h,E,y,x,I,B){if(rF.apply(this,arguments),Xa){if(Xa){var Q=sc;Xa=!1,sc=null}else throw Error(n(198));oc||(oc=!0,Tp=Q)}}function Ts(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 __(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 S_(i){if(Ts(i)!==i)throw Error(n(188))}function sF(i){var o=i.alternate;if(!o){if(o=Ts(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 y=E.alternate;if(y===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===y.child){for(y=E.child;y;){if(y===l)return S_(E),i;if(y===h)return S_(E),o;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=y;else{for(var x=!1,I=E.child;I;){if(I===l){x=!0,l=E,h=y;break}if(I===h){x=!0,h=E,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,h=E;break}if(I===h){x=!0,h=y,l=E;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function x_(i){return i=sF(i),i!==null?w_(i):null}function w_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=w_(i);if(o!==null)return o;i=i.sibling}return null}var C_=t.unstable_scheduleCallback,A_=t.unstable_cancelCallback,oF=t.unstable_shouldYield,aF=t.unstable_requestPaint,Ft=t.unstable_now,uF=t.unstable_getCurrentPriorityLevel,bp=t.unstable_ImmediatePriority,v_=t.unstable_UserBlockingPriority,ac=t.unstable_NormalPriority,lF=t.unstable_LowPriority,k_=t.unstable_IdlePriority,uc=null,$r=null;function cF(i){if($r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(uc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var br=Math.clz32?Math.clz32:hF,dF=Math.log,fF=Math.LN2;function hF(i){return i>>>=0,i===0?32:31-(dF(i)/fF|0)|0}var lc=64,cc=4194304;function Ka(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 dc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~E;I!==0?h=Ka(I):(y&=x,y!==0&&(h=Ka(y)))}else x=l&~E,x!==0?h=Ka(x):y!==0&&(h=Ka(y));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,y=o&-o,E>=y||E===16&&(y&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-br(o),E=1<<l,h|=i[l],o&=~E;return h}function pF(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 mF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-br(y),I=1<<x,B=E[x];B===-1?((I&l)===0||(I&h)!==0)&&(E[x]=pF(I,o)):B<=o&&(i.expiredLanes|=I),y&=~I}}function _p(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function N_(){var i=lc;return lc<<=1,(lc&4194240)===0&&(lc=64),i}function Sp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function Qa(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-br(o),i[o]=l}function gF(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-br(l),y=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~y}}function xp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-br(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function O_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var P_,wp,I_,R_,L_,Cp=!1,fc=[],Pi=null,Ii=null,Ri=null,Ja=new Map,Za=new Map,Li=[],EF="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 D_(i,o){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":Ja.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Za.delete(o.pointerId)}}function eu(i,o,l,h,E,y){return i===null||i.nativeEvent!==y?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[E]},o!==null&&(o=pu(o),o!==null&&wp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function yF(i,o,l,h,E){switch(o){case"focusin":return Pi=eu(Pi,i,o,l,h,E),!0;case"dragenter":return Ii=eu(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=eu(Ri,i,o,l,h,E),!0;case"pointerover":var y=E.pointerId;return Ja.set(y,eu(Ja.get(y)||null,i,o,l,h,E)),!0;case"gotpointercapture":return y=E.pointerId,Za.set(y,eu(Za.get(y)||null,i,o,l,h,E)),!0}return!1}function M_(i){var o=bs(i.target);if(o!==null){var l=Ts(o);if(l!==null){if(o=l.tag,o===13){if(o=__(l),o!==null){i.blockedOn=o,L_(i.priority,function(){I_(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 hc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);zn=h,l.target.dispatchEvent(h),zn=null}else return o=pu(l),o!==null&&wp(o),i.blockedOn=l,!1;o.shift()}return!0}function F_(i,o,l){hc(i)&&l.delete(o)}function TF(){Cp=!1,Pi!==null&&hc(Pi)&&(Pi=null),Ii!==null&&hc(Ii)&&(Ii=null),Ri!==null&&hc(Ri)&&(Ri=null),Ja.forEach(F_),Za.forEach(F_)}function tu(i,o){i.blockedOn===o&&(i.blockedOn=null,Cp||(Cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,TF)))}function nu(i){function o(E){return tu(E,i)}if(0<fc.length){tu(fc[0],i);for(var l=1;l<fc.length;l++){var h=fc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&tu(Pi,i),Ii!==null&&tu(Ii,i),Ri!==null&&tu(Ri,i),Ja.forEach(o),Za.forEach(o),l=0;l<Li.length;l++)h=Li[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Li.length&&(l=Li[0],l.blockedOn===null);)M_(l),l.blockedOn===null&&Li.shift()}var xo=L.ReactCurrentBatchConfig,pc=!0;function bF(i,o,l,h){var E=lt,y=xo.transition;xo.transition=null;try{lt=1,Ap(i,o,l,h)}finally{lt=E,xo.transition=y}}function _F(i,o,l,h){var E=lt,y=xo.transition;xo.transition=null;try{lt=4,Ap(i,o,l,h)}finally{lt=E,xo.transition=y}}function Ap(i,o,l,h){if(pc){var E=vp(i,o,l,h);if(E===null)Vp(i,o,h,mc,l),D_(i,h);else if(yF(E,i,o,l,h))h.stopPropagation();else if(D_(i,h),o&4&&-1<EF.indexOf(i)){for(;E!==null;){var y=pu(E);if(y!==null&&P_(y),y=vp(i,o,l,h),y===null&&Vp(i,o,h,mc,l),y===E)break;E=y}E!==null&&h.stopPropagation()}else Vp(i,o,h,null,l)}}var mc=null;function vp(i,o,l,h){if(mc=null,i=mp(h),i=bs(i),i!==null)if(o=Ts(i),o===null)i=null;else if(l=o.tag,l===13){if(i=__(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 mc=i,null}function B_(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(uF()){case bp:return 1;case v_:return 4;case ac:case lF:return 16;case k_:return 536870912;default:return 16}default:return 16}}var Di=null,kp=null,gc=null;function U_(){if(gc)return gc;var i,o=kp,l=o.length,h,E="value"in Di?Di.value:Di.textContent,y=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[y-h];h++);return gc=E.slice(i,1<h?1-h:void 0)}function Ec(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 yc(){return!0}function H_(){return!1}function jn(i){function o(l,h,E,y,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?yc:H_,this.isPropagationStopped=H_,this}return C(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=yc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),o}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=jn(wo),ru=C({},wo,{view:0,detail:0}),SF=jn(ru),Op,Pp,iu,Tc=C({},ru,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rp,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!==iu&&(iu&&i.type==="mousemove"?(Op=i.screenX-iu.screenX,Pp=i.screenY-iu.screenY):Pp=Op=0,iu=i),Op)},movementY:function(i){return"movementY"in i?i.movementY:Pp}}),z_=jn(Tc),xF=C({},Tc,{dataTransfer:0}),wF=jn(xF),CF=C({},ru,{relatedTarget:0}),Ip=jn(CF),AF=C({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),vF=jn(AF),kF=C({},wo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),NF=jn(kF),OF=C({},wo,{data:0}),j_=jn(OF),PF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IF={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"},RF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=RF[i])?!!o[i]:!1}function Rp(){return LF}var DF=C({},ru,{key:function(i){if(i.key){var o=PF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Ec(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?IF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rp,charCode:function(i){return i.type==="keypress"?Ec(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ec(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),MF=jn(DF),FF=C({},Tc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$_=jn(FF),BF=C({},ru,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rp}),UF=jn(BF),HF=C({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),zF=jn(HF),jF=C({},Tc,{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}),$F=jn(jF),VF=[9,13,27,32],Lp=c&&"CompositionEvent"in window,su=null;c&&"documentMode"in document&&(su=document.documentMode);var qF=c&&"TextEvent"in window&&!su,V_=c&&(!Lp||su&&8<su&&11>=su),q_=" ",Y_=!1;function W_(i,o){switch(i){case"keyup":return VF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Co=!1;function YF(i,o){switch(i){case"compositionend":return G_(o);case"keypress":return o.which!==32?null:(Y_=!0,q_);case"textInput":return i=o.data,i===q_&&Y_?null:i;default:return null}}function WF(i,o){if(Co)return i==="compositionend"||!Lp&&W_(i,o)?(i=U_(),gc=kp=Di=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 V_&&o.locale!=="ko"?null:o.data;default:return null}}var GF={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 X_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!GF[i.type]:o==="textarea"}function K_(i,o,l,h){g_(h),o=wc(o,"onChange"),0<o.length&&(l=new Np("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var ou=null,au=null;function XF(i){p2(i,0)}function bc(i){var o=Oo(i);if(zr(o))return i}function KF(i,o){if(i==="change")return o}var Q_=!1;if(c){var Dp;if(c){var Mp="oninput"in document;if(!Mp){var J_=document.createElement("div");J_.setAttribute("oninput","return;"),Mp=typeof J_.oninput=="function"}Dp=Mp}else Dp=!1;Q_=Dp&&(!document.documentMode||9<document.documentMode)}function Z_(){ou&&(ou.detachEvent("onpropertychange",e2),au=ou=null)}function e2(i){if(i.propertyName==="value"&&bc(au)){var o=[];K_(o,au,i,mp(i)),b_(XF,o)}}function QF(i,o,l){i==="focusin"?(Z_(),ou=o,au=l,ou.attachEvent("onpropertychange",e2)):i==="focusout"&&Z_()}function JF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return bc(au)}function ZF(i,o){if(i==="click")return bc(o)}function e9(i,o){if(i==="input"||i==="change")return bc(o)}function t9(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _r=typeof Object.is=="function"?Object.is:t9;function uu(i,o){if(_r(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)||!_r(i[E],o[E]))return!1}return!0}function t2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function n2(i,o){var l=t2(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=t2(l)}}function r2(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?r2(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function i2(){for(var i=window,o=Tr();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=Tr(i.document)}return o}function Fp(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 n9(i){var o=i2(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&r2(l.ownerDocument.documentElement,l)){if(h!==null&&Fp(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,y=Math.min(h.start,E);h=h.end===void 0?y:Math.min(h.end,E),!i.extend&&y>h&&(E=h,h=y,y=E),E=n2(l,y);var x=n2(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(),y>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 r9=c&&"documentMode"in document&&11>=document.documentMode,Ao=null,Bp=null,lu=null,Up=!1;function s2(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Up||Ao==null||Ao!==Tr(h)||(h=Ao,"selectionStart"in h&&Fp(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}),lu&&uu(lu,h)||(lu=h,h=wc(Bp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ao)))}function _c(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var vo={animationend:_c("Animation","AnimationEnd"),animationiteration:_c("Animation","AnimationIteration"),animationstart:_c("Animation","AnimationStart"),transitionend:_c("Transition","TransitionEnd")},Hp={},o2={};c&&(o2=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 Sc(i){if(Hp[i])return Hp[i];if(!vo[i])return i;var o=vo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in o2)return Hp[i]=o[l];return i}var a2=Sc("animationend"),u2=Sc("animationiteration"),l2=Sc("animationstart"),c2=Sc("transitionend"),d2=new Map,f2="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 Mi(i,o){d2.set(i,o),a(o,[i])}for(var zp=0;zp<f2.length;zp++){var jp=f2[zp],i9=jp.toLowerCase(),s9=jp[0].toUpperCase()+jp.slice(1);Mi(i9,"on"+s9)}Mi(a2,"onAnimationEnd"),Mi(u2,"onAnimationIteration"),Mi(l2,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(c2,"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 cu="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(" "),o9=new Set("cancel close invalid load scroll toggle".split(" ").concat(cu));function h2(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,iF(h,o,void 0,i),i.currentTarget=null}function p2(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 y=void 0;if(o)for(var x=h.length-1;0<=x;x--){var I=h[x],B=I.instance,Q=I.currentTarget;if(I=I.listener,B!==y&&E.isPropagationStopped())break e;h2(E,I,Q),y=B}else for(x=0;x<h.length;x++){if(I=h[x],B=I.instance,Q=I.currentTarget,I=I.listener,B!==y&&E.isPropagationStopped())break e;h2(E,I,Q),y=B}}}if(oc)throw i=Tp,oc=!1,Tp=null,i}function St(i,o){var l=o[Kp];l===void 0&&(l=o[Kp]=new Set);var h=i+"__bubble";l.has(h)||(m2(o,i,2,!1),l.add(h))}function $p(i,o,l){var h=0;o&&(h|=4),m2(l,i,h,o)}var xc="_reactListening"+Math.random().toString(36).slice(2);function du(i){if(!i[xc]){i[xc]=!0,r.forEach(function(l){l!=="selectionchange"&&(o9.has(l)||$p(l,!1,i),$p(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[xc]||(o[xc]=!0,$p("selectionchange",!1,o))}}function m2(i,o,l,h){switch(B_(o)){case 1:var E=bF;break;case 4:E=_F;break;default:E=Ap}l=E.bind(null,o,l,i),E=void 0,!yp||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 Vp(i,o,l,h,E){var y=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 I=h.stateNode.containerInfo;if(I===E||I.nodeType===8&&I.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var B=x.tag;if((B===3||B===4)&&(B=x.stateNode.containerInfo,B===E||B.nodeType===8&&B.parentNode===E))return;x=x.return}for(;I!==null;){if(x=bs(I),x===null)return;if(B=x.tag,B===5||B===6){h=y=x;continue e}I=I.parentNode}}h=h.return}b_(function(){var Q=y,ue=mp(l),he=[];e:{var oe=d2.get(i);if(oe!==void 0){var xe=Np,ke=i;switch(i){case"keypress":if(Ec(l)===0)break e;case"keydown":case"keyup":xe=MF;break;case"focusin":ke="focus",xe=Ip;break;case"focusout":ke="blur",xe=Ip;break;case"beforeblur":case"afterblur":xe=Ip;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=z_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=wF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=UF;break;case a2:case u2:case l2:xe=vF;break;case c2:xe=zF;break;case"scroll":xe=SF;break;case"wheel":xe=$F;break;case"copy":case"cut":case"paste":xe=NF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=$_}var Oe=(o&4)!==0,Bt=!Oe&&i==="scroll",q=Oe?oe!==null?oe+"Capture":null:oe;Oe=[];for(var H=Q,G;H!==null;){G=H;var Ee=G.stateNode;if(G.tag===5&&Ee!==null&&(G=Ee,q!==null&&(Ee=Wa(H,q),Ee!=null&&Oe.push(fu(H,Ee,G)))),Bt)break;H=H.return}0<Oe.length&&(oe=new xe(oe,ke,null,l,ue),he.push({event:oe,listeners:Oe}))}}if((o&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",oe&&l!==zn&&(ke=l.relatedTarget||l.fromElement)&&(bs(ke)||ke[ai]))break e;if((xe||oe)&&(oe=ue.window===ue?ue:(oe=ue.ownerDocument)?oe.defaultView||oe.parentWindow:window,xe?(ke=l.relatedTarget||l.toElement,xe=Q,ke=ke?bs(ke):null,ke!==null&&(Bt=Ts(ke),ke!==Bt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(xe=null,ke=Q),xe!==ke)){if(Oe=z_,Ee="onMouseLeave",q="onMouseEnter",H="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=$_,Ee="onPointerLeave",q="onPointerEnter",H="pointer"),Bt=xe==null?oe:Oo(xe),G=ke==null?oe:Oo(ke),oe=new Oe(Ee,H+"leave",xe,l,ue),oe.target=Bt,oe.relatedTarget=G,Ee=null,bs(ue)===Q&&(Oe=new Oe(q,H+"enter",ke,l,ue),Oe.target=G,Oe.relatedTarget=Bt,Ee=Oe),Bt=Ee,xe&&ke)t:{for(Oe=xe,q=ke,H=0,G=Oe;G;G=ko(G))H++;for(G=0,Ee=q;Ee;Ee=ko(Ee))G++;for(;0<H-G;)Oe=ko(Oe),H--;for(;0<G-H;)q=ko(q),G--;for(;H--;){if(Oe===q||q!==null&&Oe===q.alternate)break t;Oe=ko(Oe),q=ko(q)}Oe=null}else Oe=null;xe!==null&&g2(he,oe,xe,Oe,!1),ke!==null&&Bt!==null&&g2(he,Bt,ke,Oe,!0)}}e:{if(oe=Q?Oo(Q):window,xe=oe.nodeName&&oe.nodeName.toLowerCase(),xe==="select"||xe==="input"&&oe.type==="file")var Re=KF;else if(X_(oe))if(Q_)Re=e9;else{Re=JF;var He=QF}else(xe=oe.nodeName)&&xe.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Re=ZF);if(Re&&(Re=Re(i,Q))){K_(he,Re,l,ue);break e}He&&He(i,oe,Q),i==="focusout"&&(He=oe._wrapperState)&&He.controlled&&oe.type==="number"&&Fe(oe,"number",oe.value)}switch(He=Q?Oo(Q):window,i){case"focusin":(X_(He)||He.contentEditable==="true")&&(Ao=He,Bp=Q,lu=null);break;case"focusout":lu=Bp=Ao=null;break;case"mousedown":Up=!0;break;case"contextmenu":case"mouseup":case"dragend":Up=!1,s2(he,l,ue);break;case"selectionchange":if(r9)break;case"keydown":case"keyup":s2(he,l,ue)}var ze;if(Lp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Co?W_(i,l)&&(qe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(V_&&l.locale!=="ko"&&(Co||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Co&&(ze=U_()):(Di=ue,kp="value"in Di?Di.value:Di.textContent,Co=!0)),He=wc(Q,qe),0<He.length&&(qe=new j_(qe,i,null,l,ue),he.push({event:qe,listeners:He}),ze?qe.data=ze:(ze=G_(l),ze!==null&&(qe.data=ze)))),(ze=qF?YF(i,l):WF(i,l))&&(Q=wc(Q,"onBeforeInput"),0<Q.length&&(ue=new j_("onBeforeInput","beforeinput",null,l,ue),he.push({event:ue,listeners:Q}),ue.data=ze))}p2(he,o)})}function fu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function wc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,y=E.stateNode;E.tag===5&&y!==null&&(E=y,y=Wa(i,l),y!=null&&h.unshift(fu(i,y,E)),y=Wa(i,o),y!=null&&h.push(fu(i,y,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 g2(i,o,l,h,E){for(var y=o._reactName,x=[];l!==null&&l!==h;){var I=l,B=I.alternate,Q=I.stateNode;if(B!==null&&B===h)break;I.tag===5&&Q!==null&&(I=Q,E?(B=Wa(l,y),B!=null&&x.unshift(fu(l,B,I))):E||(B=Wa(l,y),B!=null&&x.push(fu(l,B,I)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var a9=/\r\n?/g,u9=/\u0000|\uFFFD/g;function E2(i){return(typeof i=="string"?i:""+i).replace(a9,`
|
|
29
|
-
`).replace(u9,"")}function Cc(i,o,l){if(o=E2(o),E2(i)!==o&&l)throw Error(n(425))}function Ac(){}var qp=null,Yp=null;function Wp(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 Gp=typeof setTimeout=="function"?setTimeout:void 0,l9=typeof clearTimeout=="function"?clearTimeout:void 0,y2=typeof Promise=="function"?Promise:void 0,c9=typeof queueMicrotask=="function"?queueMicrotask:typeof y2!="undefined"?function(i){return y2.resolve(null).then(i).catch(d9)}:Gp;function d9(i){setTimeout(function(){throw i})}function Xp(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),nu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);nu(o)}function Fi(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 T2(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),Vr="__reactFiber$"+No,hu="__reactProps$"+No,ai="__reactContainer$"+No,Kp="__reactEvents$"+No,f9="__reactListeners$"+No,h9="__reactHandles$"+No;function bs(i){var o=i[Vr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ai]||l[Vr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=T2(i);i!==null;){if(l=i[Vr])return l;i=T2(i)}return o}i=l,l=i.parentNode}return null}function pu(i){return i=i[Vr]||i[ai],!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 vc(i){return i[hu]||null}var Qp=[],Po=-1;function Bi(i){return{current:i}}function xt(i){0>Po||(i.current=Qp[Po],Qp[Po]=null,Po--)}function bt(i,o){Po++,Qp[Po]=i.current,i.current=o}var Ui={},fn=Bi(Ui),On=Bi(!1),_s=Ui;function Io(i,o){var l=i.type.contextTypes;if(!l)return Ui;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},y;for(y in l)E[y]=o[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Pn(i){return i=i.childContextTypes,i!=null}function kc(){xt(On),xt(fn)}function b2(i,o,l){if(fn.current!==Ui)throw Error(n(168));bt(fn,o),bt(On,l)}function _2(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,$e(i)||"Unknown",E));return C({},l,h)}function Nc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,_s=fn.current,bt(fn,i),bt(On,On.current),!0}function S2(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=_2(i,o,_s),h.__reactInternalMemoizedMergedChildContext=i,xt(On),xt(fn),bt(fn,i)):xt(On),bt(On,l)}var ui=null,Oc=!1,Jp=!1;function x2(i){ui===null?ui=[i]:ui.push(i)}function p9(i){Oc=!0,x2(i)}function Hi(){if(!Jp&&ui!==null){Jp=!0;var i=0,o=lt;try{var l=ui;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ui=null,Oc=!1}catch(E){throw ui!==null&&(ui=ui.slice(i+1)),C_(bp,Hi),E}finally{lt=o,Jp=!1}}return null}var Ro=[],Lo=0,Pc=null,Ic=0,rr=[],ir=0,Ss=null,li=1,ci="";function xs(i,o){Ro[Lo++]=Ic,Ro[Lo++]=Pc,Pc=i,Ic=o}function w2(i,o,l){rr[ir++]=li,rr[ir++]=ci,rr[ir++]=Ss,Ss=i;var h=li;i=ci;var E=32-br(h)-1;h&=~(1<<E),l+=1;var y=32-br(o)+E;if(30<y){var x=E-E%5;y=(h&(1<<x)-1).toString(32),h>>=x,E-=x,li=1<<32-br(o)+E|l<<E|h,ci=y+i}else li=1<<y|l<<E|h,ci=i}function Zp(i){i.return!==null&&(xs(i,1),w2(i,1,0))}function em(i){for(;i===Pc;)Pc=Ro[--Lo],Ro[Lo]=null,Ic=Ro[--Lo],Ro[Lo]=null;for(;i===Ss;)Ss=rr[--ir],rr[ir]=null,ci=rr[--ir],rr[ir]=null,li=rr[--ir],rr[ir]=null}var $n=null,Vn=null,kt=!1,Sr=null;function C2(i,o){var l=ur(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 A2(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,$n=i,Vn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,$n=i,Vn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=Ss!==null?{id:li,overflow:ci}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=ur(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,$n=i,Vn=null,!0):!1;default:return!1}}function tm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function nm(i){if(kt){var o=Vn;if(o){var l=o;if(!A2(i,o)){if(tm(i))throw Error(n(418));o=Fi(l.nextSibling);var h=$n;o&&A2(i,o)?C2(h,l):(i.flags=i.flags&-4097|2,kt=!1,$n=i)}}else{if(tm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,$n=i}}}function v2(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;$n=i}function Rc(i){if(i!==$n)return!1;if(!kt)return v2(i),kt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Wp(i.type,i.memoizedProps)),o&&(o=Vn)){if(tm(i))throw k2(),Error(n(418));for(;o;)C2(i,o),o=Fi(o.nextSibling)}if(v2(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){Vn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Vn=null}}else Vn=$n?Fi(i.stateNode.nextSibling):null;return!0}function k2(){for(var i=Vn;i;)i=Fi(i.nextSibling)}function Do(){Vn=$n=null,kt=!1}function rm(i){Sr===null?Sr=[i]:Sr.push(i)}var m9=L.ReactCurrentBatchConfig;function mu(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,y=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===y?o.ref:(o=function(x){var I=E.refs;x===null?delete I[y]:I[y]=x},o._stringRef=y,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Lc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function N2(i){var o=i._init;return o(i._payload)}function O2(i){function o(q,H){if(i){var G=q.deletions;G===null?(q.deletions=[H],q.flags|=16):G.push(H)}}function l(q,H){if(!i)return null;for(;H!==null;)o(q,H),H=H.sibling;return null}function h(q,H){for(q=new Map;H!==null;)H.key!==null?q.set(H.key,H):q.set(H.index,H),H=H.sibling;return q}function E(q,H){return q=Gi(q,H),q.index=0,q.sibling=null,q}function y(q,H,G){return q.index=G,i?(G=q.alternate,G!==null?(G=G.index,G<H?(q.flags|=2,H):G):(q.flags|=2,H)):(q.flags|=1048576,H)}function x(q){return i&&q.alternate===null&&(q.flags|=2),q}function I(q,H,G,Ee){return H===null||H.tag!==6?(H=Gm(G,q.mode,Ee),H.return=q,H):(H=E(H,G),H.return=q,H)}function B(q,H,G,Ee){var Re=G.type;return Re===ne?ue(q,H,G.props.children,Ee,G.key):H!==null&&(H.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===De&&N2(Re)===H.type)?(Ee=E(H,G.props),Ee.ref=mu(q,H,G),Ee.return=q,Ee):(Ee=id(G.type,G.key,G.props,null,q.mode,Ee),Ee.ref=mu(q,H,G),Ee.return=q,Ee)}function Q(q,H,G,Ee){return H===null||H.tag!==4||H.stateNode.containerInfo!==G.containerInfo||H.stateNode.implementation!==G.implementation?(H=Xm(G,q.mode,Ee),H.return=q,H):(H=E(H,G.children||[]),H.return=q,H)}function ue(q,H,G,Ee,Re){return H===null||H.tag!==7?(H=Ps(G,q.mode,Ee,Re),H.return=q,H):(H=E(H,G),H.return=q,H)}function he(q,H,G){if(typeof H=="string"&&H!==""||typeof H=="number")return H=Gm(""+H,q.mode,G),H.return=q,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case W:return G=id(H.type,H.key,H.props,null,q.mode,G),G.ref=mu(q,null,H),G.return=q,G;case F:return H=Xm(H,q.mode,G),H.return=q,H;case De:var Ee=H._init;return he(q,Ee(H._payload),G)}if(Le(H)||re(H))return H=Ps(H,q.mode,G,null),H.return=q,H;Lc(q,H)}return null}function oe(q,H,G,Ee){var Re=H!==null?H.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Re!==null?null:I(q,H,""+G,Ee);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case W:return G.key===Re?B(q,H,G,Ee):null;case F:return G.key===Re?Q(q,H,G,Ee):null;case De:return Re=G._init,oe(q,H,Re(G._payload),Ee)}if(Le(G)||re(G))return Re!==null?null:ue(q,H,G,Ee,null);Lc(q,G)}return null}function xe(q,H,G,Ee,Re){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return q=q.get(G)||null,I(H,q,""+Ee,Re);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case W:return q=q.get(Ee.key===null?G:Ee.key)||null,B(H,q,Ee,Re);case F:return q=q.get(Ee.key===null?G:Ee.key)||null,Q(H,q,Ee,Re);case De:var He=Ee._init;return xe(q,H,G,He(Ee._payload),Re)}if(Le(Ee)||re(Ee))return q=q.get(G)||null,ue(H,q,Ee,Re,null);Lc(H,Ee)}return null}function ke(q,H,G,Ee){for(var Re=null,He=null,ze=H,qe=H=0,en=null;ze!==null&&qe<G.length;qe++){ze.index>qe?(en=ze,ze=null):en=ze.sibling;var it=oe(q,ze,G[qe],Ee);if(it===null){ze===null&&(ze=en);break}i&&ze&&it.alternate===null&&o(q,ze),H=y(it,H,qe),He===null?Re=it:He.sibling=it,He=it,ze=en}if(qe===G.length)return l(q,ze),kt&&xs(q,qe),Re;if(ze===null){for(;qe<G.length;qe++)ze=he(q,G[qe],Ee),ze!==null&&(H=y(ze,H,qe),He===null?Re=ze:He.sibling=ze,He=ze);return kt&&xs(q,qe),Re}for(ze=h(q,ze);qe<G.length;qe++)en=xe(ze,q,qe,G[qe],Ee),en!==null&&(i&&en.alternate!==null&&ze.delete(en.key===null?qe:en.key),H=y(en,H,qe),He===null?Re=en:He.sibling=en,He=en);return i&&ze.forEach(function(Xi){return o(q,Xi)}),kt&&xs(q,qe),Re}function Oe(q,H,G,Ee){var Re=re(G);if(typeof Re!="function")throw Error(n(150));if(G=Re.call(G),G==null)throw Error(n(151));for(var He=Re=null,ze=H,qe=H=0,en=null,it=G.next();ze!==null&&!it.done;qe++,it=G.next()){ze.index>qe?(en=ze,ze=null):en=ze.sibling;var Xi=oe(q,ze,it.value,Ee);if(Xi===null){ze===null&&(ze=en);break}i&&ze&&Xi.alternate===null&&o(q,ze),H=y(Xi,H,qe),He===null?Re=Xi:He.sibling=Xi,He=Xi,ze=en}if(it.done)return l(q,ze),kt&&xs(q,qe),Re;if(ze===null){for(;!it.done;qe++,it=G.next())it=he(q,it.value,Ee),it!==null&&(H=y(it,H,qe),He===null?Re=it:He.sibling=it,He=it);return kt&&xs(q,qe),Re}for(ze=h(q,ze);!it.done;qe++,it=G.next())it=xe(ze,q,qe,it.value,Ee),it!==null&&(i&&it.alternate!==null&&ze.delete(it.key===null?qe:it.key),H=y(it,H,qe),He===null?Re=it:He.sibling=it,He=it);return i&&ze.forEach(function(G9){return o(q,G9)}),kt&&xs(q,qe),Re}function Bt(q,H,G,Ee){if(typeof G=="object"&&G!==null&&G.type===ne&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case W:e:{for(var Re=G.key,He=H;He!==null;){if(He.key===Re){if(Re=G.type,Re===ne){if(He.tag===7){l(q,He.sibling),H=E(He,G.props.children),H.return=q,q=H;break e}}else if(He.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===De&&N2(Re)===He.type){l(q,He.sibling),H=E(He,G.props),H.ref=mu(q,He,G),H.return=q,q=H;break e}l(q,He);break}else o(q,He);He=He.sibling}G.type===ne?(H=Ps(G.props.children,q.mode,Ee,G.key),H.return=q,q=H):(Ee=id(G.type,G.key,G.props,null,q.mode,Ee),Ee.ref=mu(q,H,G),Ee.return=q,q=Ee)}return x(q);case F:e:{for(He=G.key;H!==null;){if(H.key===He)if(H.tag===4&&H.stateNode.containerInfo===G.containerInfo&&H.stateNode.implementation===G.implementation){l(q,H.sibling),H=E(H,G.children||[]),H.return=q,q=H;break e}else{l(q,H);break}else o(q,H);H=H.sibling}H=Xm(G,q.mode,Ee),H.return=q,q=H}return x(q);case De:return He=G._init,Bt(q,H,He(G._payload),Ee)}if(Le(G))return ke(q,H,G,Ee);if(re(G))return Oe(q,H,G,Ee);Lc(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,H!==null&&H.tag===6?(l(q,H.sibling),H=E(H,G),H.return=q,q=H):(l(q,H),H=Gm(G,q.mode,Ee),H.return=q,q=H),x(q)):l(q,H)}return Bt}var Mo=O2(!0),P2=O2(!1),Dc=Bi(null),Mc=null,Fo=null,im=null;function sm(){im=Fo=Mc=null}function om(i){var o=Dc.current;xt(Dc),i._currentValue=o}function am(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){Mc=i,im=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(In=!0),i.firstContext=null)}function sr(i){var o=i._currentValue;if(im!==i)if(i={context:i,memoizedValue:o,next:null},Fo===null){if(Mc===null)throw Error(n(308));Fo=i,Mc.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return o}var ws=null;function um(i){ws===null?ws=[i]:ws.push(i)}function I2(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,um(o)):(l.next=E.next,E.next=l),o.interleaved=l,di(i,h)}function di(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 zi=!1;function lm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function R2(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 fi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ji(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,di(i,l)}return E=h.interleaved,E===null?(o.next=o,um(h)):(o.next=E.next,E.next=o),h.interleaved=o,di(i,l)}function Fc(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,xp(i,l)}}function L2(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?E=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?E=y=o:y=y.next=o}else E=y=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:y,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 Bc(i,o,l,h){var E=i.updateQueue;zi=!1;var y=E.firstBaseUpdate,x=E.lastBaseUpdate,I=E.shared.pending;if(I!==null){E.shared.pending=null;var B=I,Q=B.next;B.next=null,x===null?y=Q:x.next=Q,x=B;var ue=i.alternate;ue!==null&&(ue=ue.updateQueue,I=ue.lastBaseUpdate,I!==x&&(I===null?ue.firstBaseUpdate=Q:I.next=Q,ue.lastBaseUpdate=B))}if(y!==null){var he=E.baseState;x=0,ue=Q=B=null,I=y;do{var oe=I.lane,xe=I.eventTime;if((h&oe)===oe){ue!==null&&(ue=ue.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ke=i,Oe=I;switch(oe=o,xe=l,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){he=ke.call(xe,he,oe);break e}he=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,oe=typeof ke=="function"?ke.call(xe,he,oe):ke,oe==null)break e;he=C({},he,oe);break e;case 2:zi=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,oe=E.effects,oe===null?E.effects=[I]:oe.push(I))}else xe={eventTime:xe,lane:oe,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ue===null?(Q=ue=xe,B=he):ue=ue.next=xe,x|=oe;if(I=I.next,I===null){if(I=E.shared.pending,I===null)break;oe=I,I=oe.next,oe.next=null,E.lastBaseUpdate=oe,E.shared.pending=null}}while(!0);if(ue===null&&(B=he),E.baseState=B,E.firstBaseUpdate=Q,E.lastBaseUpdate=ue,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else y===null&&(E.shared.lanes=0);vs|=x,i.lanes=x,i.memoizedState=he}}function D2(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 gu={},qr=Bi(gu),Eu=Bi(gu),yu=Bi(gu);function Cs(i){if(i===gu)throw Error(n(174));return i}function cm(i,o){switch(bt(yu,o),bt(Eu,i),bt(qr,gu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ie(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ie(o,i)}xt(qr),bt(qr,o)}function Uo(){xt(qr),xt(Eu),xt(yu)}function M2(i){Cs(yu.current);var o=Cs(qr.current),l=ie(o,i.type);o!==l&&(bt(Eu,i),bt(qr,l))}function dm(i){Eu.current===i&&(xt(qr),xt(Eu))}var Ot=Bi(0);function Uc(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 fm=[];function hm(){for(var i=0;i<fm.length;i++)fm[i]._workInProgressVersionPrimary=null;fm.length=0}var Hc=L.ReactCurrentDispatcher,pm=L.ReactCurrentBatchConfig,As=0,Pt=null,qt=null,Jt=null,zc=!1,Tu=!1,bu=0,g9=0;function hn(){throw Error(n(321))}function mm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!_r(i[l],o[l]))return!1;return!0}function gm(i,o,l,h,E,y){if(As=y,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Hc.current=i===null||i.memoizedState===null?b9:_9,i=l(h,E),Tu){y=0;do{if(Tu=!1,bu=0,25<=y)throw Error(n(301));y+=1,Jt=qt=null,o.updateQueue=null,Hc.current=S9,i=l(h,E)}while(Tu)}if(Hc.current=Vc,o=qt!==null&&qt.next!==null,As=0,Jt=qt=Pt=null,zc=!1,o)throw Error(n(300));return i}function Em(){var i=bu!==0;return bu=0,i}function Yr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Pt.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function or(){if(qt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=Jt===null?Pt.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?Pt.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function _u(i,o){return typeof o=="function"?o(i):o}function ym(i){var o=or(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=qt,E=h.baseQueue,y=l.pending;if(y!==null){if(E!==null){var x=E.next;E.next=y.next,y.next=x}h.baseQueue=E=y,l.pending=null}if(E!==null){y=E.next,h=h.baseState;var I=x=null,B=null,Q=y;do{var ue=Q.lane;if((As&ue)===ue)B!==null&&(B=B.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),h=Q.hasEagerState?Q.eagerState:i(h,Q.action);else{var he={lane:ue,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};B===null?(I=B=he,x=h):B=B.next=he,Pt.lanes|=ue,vs|=ue}Q=Q.next}while(Q!==null&&Q!==y);B===null?x=h:B.next=I,_r(h,o.memoizedState)||(In=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=B,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do y=E.lane,Pt.lanes|=y,vs|=y,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Tm(i){var o=or(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,y=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do y=i(y,x.action),x=x.next;while(x!==E);_r(y,o.memoizedState)||(In=!0),o.memoizedState=y,o.baseQueue===null&&(o.baseState=y),l.lastRenderedState=y}return[y,h]}function F2(){}function B2(i,o){var l=Pt,h=or(),E=o(),y=!_r(h.memoizedState,E);if(y&&(h.memoizedState=E,In=!0),h=h.queue,bm(z2.bind(null,l,h,i),[i]),h.getSnapshot!==o||y||Jt!==null&&Jt.memoizedState.tag&1){if(l.flags|=2048,Su(9,H2.bind(null,l,h,E,o),void 0,null),Zt===null)throw Error(n(349));(As&30)!==0||U2(l,o,E)}return E}function U2(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function H2(i,o,l,h){o.value=l,o.getSnapshot=h,j2(o)&&$2(i)}function z2(i,o,l){return l(function(){j2(o)&&$2(i)})}function j2(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!_r(i,l)}catch(h){return!0}}function $2(i){var o=di(i,1);o!==null&&Ar(o,i,1,-1)}function V2(i){var o=Yr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:i},o.queue=i,i=i.dispatch=T9.bind(null,Pt,i),[o.memoizedState,i]}function Su(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.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 q2(){return or().memoizedState}function jc(i,o,l,h){var E=Yr();Pt.flags|=i,E.memoizedState=Su(1|o,l,void 0,h===void 0?null:h)}function $c(i,o,l,h){var E=or();h=h===void 0?null:h;var y=void 0;if(qt!==null){var x=qt.memoizedState;if(y=x.destroy,h!==null&&mm(h,x.deps)){E.memoizedState=Su(o,l,y,h);return}}Pt.flags|=i,E.memoizedState=Su(1|o,l,y,h)}function Y2(i,o){return jc(8390656,8,i,o)}function bm(i,o){return $c(2048,8,i,o)}function W2(i,o){return $c(4,2,i,o)}function G2(i,o){return $c(4,4,i,o)}function X2(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 K2(i,o,l){return l=l!=null?l.concat([i]):null,$c(4,4,X2.bind(null,o,i),l)}function _m(){}function Q2(i,o){var l=or();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&mm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function J2(i,o){var l=or();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&mm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Z2(i,o,l){return(As&21)===0?(i.baseState&&(i.baseState=!1,In=!0),i.memoizedState=l):(_r(l,o)||(l=N_(),Pt.lanes|=l,vs|=l,i.baseState=!0),o)}function E9(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=pm.transition;pm.transition={};try{i(!1),o()}finally{lt=l,pm.transition=h}}function eS(){return or().memoizedState}function y9(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},tS(i))nS(o,l);else if(l=I2(i,o,l,h),l!==null){var E=_n();Ar(l,i,h,E),rS(l,o,h)}}function T9(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(tS(i))nS(o,E);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=o.lastRenderedReducer,y!==null))try{var x=o.lastRenderedState,I=y(x,l);if(E.hasEagerState=!0,E.eagerState=I,_r(I,x)){var B=o.interleaved;B===null?(E.next=E,um(o)):(E.next=B.next,B.next=E),o.interleaved=E;return}}catch(Q){}l=I2(i,o,E,h),l!==null&&(E=_n(),Ar(l,i,h,E),rS(l,o,h))}}function tS(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function nS(i,o){Tu=zc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function rS(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,xp(i,l)}}var Vc={readContext:sr,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},b9={readContext:sr,useCallback:function(i,o){return Yr().memoizedState=[i,o===void 0?null:o],i},useContext:sr,useEffect:Y2,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,jc(4194308,4,X2.bind(null,o,i),l)},useLayoutEffect:function(i,o){return jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return jc(4,2,i,o)},useMemo:function(i,o){var l=Yr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Yr();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=y9.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Yr();return i={current:i},o.memoizedState=i},useState:V2,useDebugValue:_m,useDeferredValue:function(i){return Yr().memoizedState=i},useTransition:function(){var i=V2(!1),o=i[0];return i=E9.bind(null,i[1]),Yr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Yr();if(kt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Zt===null)throw Error(n(349));(As&30)!==0||U2(h,o,l)}E.memoizedState=l;var y={value:l,getSnapshot:o};return E.queue=y,Y2(z2.bind(null,h,y,i),[i]),h.flags|=2048,Su(9,H2.bind(null,h,y,l,o),void 0,null),l},useId:function(){var i=Yr(),o=Zt.identifierPrefix;if(kt){var l=ci,h=li;l=(h&~(1<<32-br(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=bu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=g9++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},_9={readContext:sr,useCallback:Q2,useContext:sr,useEffect:bm,useImperativeHandle:K2,useInsertionEffect:W2,useLayoutEffect:G2,useMemo:J2,useReducer:ym,useRef:q2,useState:function(){return ym(_u)},useDebugValue:_m,useDeferredValue:function(i){var o=or();return Z2(o,qt.memoizedState,i)},useTransition:function(){var i=ym(_u)[0],o=or().memoizedState;return[i,o]},useMutableSource:F2,useSyncExternalStore:B2,useId:eS,unstable_isNewReconciler:!1},S9={readContext:sr,useCallback:Q2,useContext:sr,useEffect:bm,useImperativeHandle:K2,useInsertionEffect:W2,useLayoutEffect:G2,useMemo:J2,useReducer:Tm,useRef:q2,useState:function(){return Tm(_u)},useDebugValue:_m,useDeferredValue:function(i){var o=or();return qt===null?o.memoizedState=i:Z2(o,qt.memoizedState,i)},useTransition:function(){var i=Tm(_u)[0],o=or().memoizedState;return[i,o]},useMutableSource:F2,useSyncExternalStore:B2,useId:eS,unstable_isNewReconciler:!1};function xr(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Sm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:C({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var qc={isMounted:function(i){return(i=i._reactInternals)?Ts(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=_n(),E=Yi(i),y=fi(h,E);y.payload=o,l!=null&&(y.callback=l),o=ji(i,y,E),o!==null&&(Ar(o,i,E,h),Fc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=_n(),E=Yi(i),y=fi(h,E);y.tag=1,y.payload=o,l!=null&&(y.callback=l),o=ji(i,y,E),o!==null&&(Ar(o,i,E,h),Fc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=_n(),h=Yi(i),E=fi(l,h);E.tag=2,o!=null&&(E.callback=o),o=ji(i,E,h),o!==null&&(Ar(o,i,h,l),Fc(o,i,h))}};function iS(i,o,l,h,E,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,x):o.prototype&&o.prototype.isPureReactComponent?!uu(l,h)||!uu(E,y):!0}function sS(i,o,l){var h=!1,E=Ui,y=o.contextType;return typeof y=="object"&&y!==null?y=sr(y):(E=Pn(o)?_s:fn.current,h=o.contextTypes,y=(h=h!=null)?Io(i,E):Ui),o=new o(l,y),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=qc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=y),o}function oS(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&&qc.enqueueReplaceState(o,o.state,null)}function xm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},lm(i);var y=o.contextType;typeof y=="object"&&y!==null?E.context=sr(y):(y=Pn(o)?_s:fn.current,E.context=Io(i,y)),E.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Sm(i,o,y,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&&qc.enqueueReplaceState(E,E.state,null),Bc(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+=Pe(h),h=h.return;while(h);var E=l}catch(y){E=`
|
|
30
|
-
Error generating stack: `+y.message+`
|
|
31
|
-
`+y.stack}return{value:i,source:o,stack:E,digest:null}}function wm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Cm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var x9=typeof WeakMap=="function"?WeakMap:Map;function aS(i,o,l){l=fi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){Jc||(Jc=!0,Hm=h),Cm(i,o)},l}function uS(i,o,l){l=fi(-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(){Cm(i,o)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){Cm(i,o),typeof h!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function lS(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new x9;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=F9.bind(null,i,o,l),o.then(i,i))}function cS(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 dS(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=fi(-1,1),o.tag=2,ji(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var w9=L.ReactCurrentOwner,In=!1;function bn(i,o,l,h){o.child=i===null?P2(o,null,l,h):Mo(o,i.child,l,h)}function fS(i,o,l,h,E){l=l.render;var y=o.ref;return Bo(o,E),h=gm(i,o,l,h,y,E),l=Em(),i!==null&&!In?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,hi(i,o,E)):(kt&&l&&Zp(o),o.flags|=1,bn(i,o,h,E),o.child)}function hS(i,o,l,h,E){if(i===null){var y=l.type;return typeof y=="function"&&!Wm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=y,pS(i,o,y,h,E)):(i=id(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(y=i.child,(i.lanes&E)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:uu,l(x,h)&&i.ref===o.ref)return hi(i,o,E)}return o.flags|=1,i=Gi(y,h),i.ref=o.ref,i.return=o,o.child=i}function pS(i,o,l,h,E){if(i!==null){var y=i.memoizedProps;if(uu(y,h)&&i.ref===o.ref)if(In=!1,o.pendingProps=h=y,(i.lanes&E)!==0)(i.flags&131072)!==0&&(In=!0);else return o.lanes=i.lanes,hi(i,o,E)}return Am(i,o,l,h,E)}function mS(i,o,l){var h=o.pendingProps,E=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(jo,qn),qn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,bt(jo,qn),qn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,bt(jo,qn),qn|=h}else y!==null?(h=y.baseLanes|l,o.memoizedState=null):h=l,bt(jo,qn),qn|=h;return bn(i,o,E,l),o.child}function gS(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Am(i,o,l,h,E){var y=Pn(l)?_s:fn.current;return y=Io(o,y),Bo(o,E),l=gm(i,o,l,h,y,E),h=Em(),i!==null&&!In?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,hi(i,o,E)):(kt&&h&&Zp(o),o.flags|=1,bn(i,o,l,E),o.child)}function ES(i,o,l,h,E){if(Pn(l)){var y=!0;Nc(o)}else y=!1;if(Bo(o,E),o.stateNode===null)Wc(i,o),sS(o,l,h),xm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,I=o.memoizedProps;x.props=I;var B=x.context,Q=l.contextType;typeof Q=="object"&&Q!==null?Q=sr(Q):(Q=Pn(l)?_s:fn.current,Q=Io(o,Q));var ue=l.getDerivedStateFromProps,he=typeof ue=="function"||typeof x.getSnapshotBeforeUpdate=="function";he||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==h||B!==Q)&&oS(o,x,h,Q),zi=!1;var oe=o.memoizedState;x.state=oe,Bc(o,h,x,E),B=o.memoizedState,I!==h||oe!==B||On.current||zi?(typeof ue=="function"&&(Sm(o,l,ue,h),B=o.memoizedState),(I=zi||iS(o,l,I,h,oe,B,Q))?(he||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=B),x.props=h,x.state=B,x.context=Q,h=I):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,R2(i,o),I=o.memoizedProps,Q=o.type===o.elementType?I:xr(o.type,I),x.props=Q,he=o.pendingProps,oe=x.context,B=l.contextType,typeof B=="object"&&B!==null?B=sr(B):(B=Pn(l)?_s:fn.current,B=Io(o,B));var xe=l.getDerivedStateFromProps;(ue=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==he||oe!==B)&&oS(o,x,h,B),zi=!1,oe=o.memoizedState,x.state=oe,Bc(o,h,x,E);var ke=o.memoizedState;I!==he||oe!==ke||On.current||zi?(typeof xe=="function"&&(Sm(o,l,xe,h),ke=o.memoizedState),(Q=zi||iS(o,l,Q,h,oe,ke,B)||!1)?(ue||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,B),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,B)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),x.props=h,x.state=ke,x.context=B,h=Q):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,l,h,y,E)}function vm(i,o,l,h,E,y){gS(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&S2(o,l,!1),hi(i,o,y);h=o.stateNode,w9.current=o;var I=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=Mo(o,i.child,null,y),o.child=Mo(o,null,I,y)):bn(i,o,I,y),o.memoizedState=h.state,E&&S2(o,l,!0),o.child}function yS(i){var o=i.stateNode;o.pendingContext?b2(i,o.pendingContext,o.pendingContext!==o.context):o.context&&b2(i,o.context,!1),cm(i,o.containerInfo)}function TS(i,o,l,h,E){return Do(),rm(E),o.flags|=256,bn(i,o,l,h),o.child}var km={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function bS(i,o,l){var h=o.pendingProps,E=Ot.current,y=!1,x=(o.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(E&2)!==0),I?(y=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Ot,E&1),i===null)return nm(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,y?(h=o.mode,y=o.child,x={mode:"hidden",children:x},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=sd(x,h,0,null),i=Ps(i,h,l,null),y.return=o,i.return=o,y.sibling=i,o.child=y,o.child.memoizedState=Nm(l),o.memoizedState=km,i):Om(o,x));if(E=i.memoizedState,E!==null&&(I=E.dehydrated,I!==null))return C9(i,o,x,h,I,E,l);if(y){y=h.fallback,x=o.mode,E=i.child,I=E.sibling;var B={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=B,o.deletions=null):(h=Gi(E,B),h.subtreeFlags=E.subtreeFlags&14680064),I!==null?y=Gi(I,y):(y=Ps(y,x,l,null),y.flags|=2),y.return=o,h.return=o,h.sibling=y,o.child=h,h=y,y=o.child,x=i.child.memoizedState,x=x===null?Nm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,o.memoizedState=km,h}return y=i.child,i=y.sibling,h=Gi(y,{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 Om(i,o){return o=sd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Yc(i,o,l,h){return h!==null&&rm(h),Mo(o,i.child,null,l),i=Om(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function C9(i,o,l,h,E,y,x){if(l)return o.flags&256?(o.flags&=-257,h=wm(Error(n(422))),Yc(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(y=h.fallback,E=o.mode,h=sd({mode:"visible",children:h.children},E,0,null),y=Ps(y,E,x,null),y.flags|=2,h.return=o,y.return=o,h.sibling=y,o.child=h,(o.mode&1)!==0&&Mo(o,i.child,null,x),o.child.memoizedState=Nm(x),o.memoizedState=km,y);if((o.mode&1)===0)return Yc(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=wm(y,h,void 0),Yc(i,o,x,h)}if(I=(x&i.childLanes)!==0,In||I){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!==y.retryLane&&(y.retryLane=E,di(i,E),Ar(h,i,E,-1))}return Ym(),h=wm(Error(n(421))),Yc(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=B9.bind(null,i),E._reactRetry=o,null):(i=y.treeContext,Vn=Fi(E.nextSibling),$n=o,kt=!0,Sr=null,i!==null&&(rr[ir++]=li,rr[ir++]=ci,rr[ir++]=Ss,li=i.id,ci=i.overflow,Ss=o),o=Om(o,h.children),o.flags|=4096,o)}function _S(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),am(i.return,o,l)}function Pm(i,o,l,h,E){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(y.isBackwards=o,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=E)}function SS(i,o,l){var h=o.pendingProps,E=h.revealOrder,y=h.tail;if(bn(i,o,h.children,l),h=Ot.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&&_S(i,l,o);else if(i.tag===19)_S(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(bt(Ot,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&&Uc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Pm(o,!1,E,l,y);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Uc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Pm(o,!0,l,null,y);break;case"together":Pm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Wc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function hi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),vs|=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=Gi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Gi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function A9(i,o,l){switch(o.tag){case 3:yS(o),Do();break;case 5:M2(o);break;case 1:Pn(o.type)&&Nc(o);break;case 4:cm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(Dc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(Ot,Ot.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?bS(i,o,l):(bt(Ot,Ot.current&1),i=hi(i,o,l),i!==null?i.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return SS(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Ot,Ot.current),h)break;return null;case 22:case 23:return o.lanes=0,mS(i,o,l)}return hi(i,o,l)}var xS,Im,wS,CS;xS=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}},Im=function(){},wS=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Cs(qr.current);var y=null;switch(l){case"input":E=Nn(i,E),h=Nn(i,h),y=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),y=[];break;case"textarea":E=ft(i,E),h=ft(i,h),y=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Ac)}nn(l,h);var x;l=null;for(Q in E)if(!h.hasOwnProperty(Q)&&E.hasOwnProperty(Q)&&E[Q]!=null)if(Q==="style"){var I=E[Q];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(s.hasOwnProperty(Q)?y||(y=[]):(y=y||[]).push(Q,null));for(Q in h){var B=h[Q];if(I=E!=null?E[Q]:void 0,h.hasOwnProperty(Q)&&B!==I&&(B!=null||I!=null))if(Q==="style")if(I){for(x in I)!I.hasOwnProperty(x)||B&&B.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in B)B.hasOwnProperty(x)&&I[x]!==B[x]&&(l||(l={}),l[x]=B[x])}else l||(y||(y=[]),y.push(Q,l)),l=B;else Q==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,I=I?I.__html:void 0,B!=null&&I!==B&&(y=y||[]).push(Q,B)):Q==="children"?typeof B!="string"&&typeof B!="number"||(y=y||[]).push(Q,""+B):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(s.hasOwnProperty(Q)?(B!=null&&Q==="onScroll"&&St("scroll",i),y||I===B||(y=[])):(y=y||[]).push(Q,B))}l&&(y=y||[]).push("style",l);var Q=y;(o.updateQueue=Q)&&(o.flags|=4)}},CS=function(i,o,l,h){l!==h&&(o.flags|=4)};function xu(i,o){if(!kt)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 pn(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 v9(i,o,l){var h=o.pendingProps;switch(em(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pn(o),null;case 1:return Pn(o.type)&&kc(),pn(o),null;case 3:return h=o.stateNode,Uo(),xt(On),xt(fn),hm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Rc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sr!==null&&($m(Sr),Sr=null))),Im(i,o),pn(o),null;case 5:dm(o);var E=Cs(yu.current);if(l=o.type,i!==null&&o.stateNode!=null)wS(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 pn(o),null}if(i=Cs(qr.current),Rc(o)){h=o.stateNode,l=o.type;var y=o.memoizedProps;switch(h[Vr]=o,h[hu]=y,i=(o.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<cu.length;E++)St(cu[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Es(h,y),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},St("invalid",h);break;case"textarea":ut(h,y),St("invalid",h)}nn(l,y),E=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&Cc(h.textContent,I,i),E=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&Cc(h.textContent,I,i),E=["children",""+I]):s.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":tn(h),ve(h,y,!0);break;case"textarea":tn(h),vt(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=Ac)}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=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Vr]=o,i[hu]=h,xS(i,o,!1,!1),o.stateNode=i;e:{switch(x=jr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<cu.length;E++)St(cu[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Es(i,h),E=Nn(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),St("invalid",i);break;case"textarea":ut(i,h),E=ft(i,h),St("invalid",i);break;default:E=h}nn(l,E),I=E;for(y in I)if(I.hasOwnProperty(y)){var B=I[y];y==="style"?Oi(i,B):y==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&Ve(i,B)):y==="children"?typeof B=="string"?(l!=="textarea"||B!=="")&&Xe(i,B):typeof B=="number"&&Xe(i,""+B):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(s.hasOwnProperty(y)?B!=null&&y==="onScroll"&&St("scroll",i):B!=null&&N(i,y,B,x))}switch(l){case"input":tn(i),ve(i,h,!1);break;case"textarea":tn(i),vt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+we(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Qe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Qe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Ac)}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 pn(o),null;case 6:if(i&&o.stateNode!=null)CS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Cs(yu.current),Cs(qr.current),Rc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Vr]=o,(y=h.nodeValue!==l)&&(i=$n,i!==null))switch(i.tag){case 3:Cc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Cc(h.nodeValue,l,(i.mode&1)!==0)}y&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Vr]=o,o.stateNode=h}return pn(o),null;case 13:if(xt(Ot),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&Vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)k2(),Do(),o.flags|=98560,y=!1;else if(y=Rc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Vr]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;pn(o),y=!1}else Sr!==null&&($m(Sr),Sr=null),y=!0;if(!y)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||(Ot.current&1)!==0?Yt===0&&(Yt=3):Ym())),o.updateQueue!==null&&(o.flags|=4),pn(o),null);case 4:return Uo(),Im(i,o),i===null&&du(o.stateNode.containerInfo),pn(o),null;case 10:return om(o.type._context),pn(o),null;case 17:return Pn(o.type)&&kc(),pn(o),null;case 19:if(xt(Ot),y=o.memoizedState,y===null)return pn(o),null;if(h=(o.flags&128)!==0,x=y.rendering,x===null)if(h)xu(y,!1);else{if(Yt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Uc(i),x!==null){for(o.flags|=128,xu(y,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)y=l,i=h,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Ot,Ot.current&1|2),o.child}i=i.sibling}y.tail!==null&&Ft()>$o&&(o.flags|=128,h=!0,xu(y,!1),o.lanes=4194304)}else{if(!h)if(i=Uc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),xu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!kt)return pn(o),null}else 2*Ft()-y.renderingStartTime>$o&&l!==1073741824&&(o.flags|=128,h=!0,xu(y,!1),o.lanes=4194304);y.isBackwards?(x.sibling=o.child,o.child=x):(l=y.last,l!==null?l.sibling=x:o.child=x,y.last=x)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=Ft(),o.sibling=null,l=Ot.current,bt(Ot,h?l&1|2:l&1),o):(pn(o),null);case 22:case 23:return qm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(qn&1073741824)!==0&&(pn(o),o.subtreeFlags&6&&(o.flags|=8192)):pn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function k9(i,o){switch(em(o),o.tag){case 1:return Pn(o.type)&&kc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Uo(),xt(On),xt(fn),hm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return dm(o),null;case 13:if(xt(Ot),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 xt(Ot),null;case 4:return Uo(),null;case 10:return om(o.type._context),null;case 22:case 23:return qm(),null;case 24:return null;default:return null}}var Gc=!1,mn=!1,N9=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function zo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Rt(i,o,h)}else l.current=null}function Rm(i,o,l){try{l()}catch(h){Rt(i,o,h)}}var AS=!1;function O9(i,o){if(qp=pc,i=i2(),Fp(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,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,B=-1,Q=0,ue=0,he=i,oe=null;t:for(;;){for(var xe;he!==l||E!==0&&he.nodeType!==3||(I=x+E),he!==y||h!==0&&he.nodeType!==3||(B=x+h),he.nodeType===3&&(x+=he.nodeValue.length),(xe=he.firstChild)!==null;)oe=he,he=xe;for(;;){if(he===i)break t;if(oe===l&&++Q===E&&(I=x),oe===y&&++ue===h&&(B=x),(xe=he.nextSibling)!==null)break;he=oe,oe=he.parentNode}he=xe}l=I===-1||B===-1?null:{start:I,end:B}}else l=null}l=l||{start:0,end:0}}else l=null;for(Yp={focusedElem:i,selectionRange:l},pc=!1,Ae=o;Ae!==null;)if(o=Ae,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ae=i;else for(;Ae!==null;){o=Ae;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Bt=ke.memoizedState,q=o.stateNode,H=q.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:xr(o.type,Oe),Bt);q.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var G=o.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Rt(o,o.return,Ee)}if(i=o.sibling,i!==null){i.return=o.return,Ae=i;break}Ae=o.return}return ke=AS,AS=!1,ke}function wu(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 y=E.destroy;E.destroy=void 0,y!==void 0&&Rm(o,l,y)}E=E.next}while(E!==h)}}function Xc(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 Lm(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 vS(i){var o=i.alternate;o!==null&&(i.alternate=null,vS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Vr],delete o[hu],delete o[Kp],delete o[f9],delete o[h9])),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 kS(i){return i.tag===5||i.tag===3||i.tag===4}function NS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||kS(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 Dm(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=Ac));else if(h!==4&&(i=i.child,i!==null))for(Dm(i,o,l),i=i.sibling;i!==null;)Dm(i,o,l),i=i.sibling}function Mm(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(Mm(i,o,l),i=i.sibling;i!==null;)Mm(i,o,l),i=i.sibling}var rn=null,wr=!1;function $i(i,o,l){for(l=l.child;l!==null;)OS(i,o,l),l=l.sibling}function OS(i,o,l){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(uc,l)}catch(I){}switch(l.tag){case 5:mn||zo(l,o);case 6:var h=rn,E=wr;rn=null,$i(i,o,l),rn=h,wr=E,rn!==null&&(wr?(i=rn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):rn.removeChild(l.stateNode));break;case 18:rn!==null&&(wr?(i=rn,l=l.stateNode,i.nodeType===8?Xp(i.parentNode,l):i.nodeType===1&&Xp(i,l),nu(i)):Xp(rn,l.stateNode));break;case 4:h=rn,E=wr,rn=l.stateNode.containerInfo,wr=!0,$i(i,o,l),rn=h,wr=E;break;case 0:case 11:case 14:case 15:if(!mn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var y=E,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&Rm(l,o,x),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!mn&&(zo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Rt(l,o,I)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(mn=(h=mn)||l.memoizedState!==null,$i(i,o,l),mn=h):$i(i,o,l);break;default:$i(i,o,l)}}function PS(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new N9),o.forEach(function(h){var E=U9.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Cr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var y=i,x=o,I=x;e:for(;I!==null;){switch(I.tag){case 5:rn=I.stateNode,wr=!1;break e;case 3:rn=I.stateNode.containerInfo,wr=!0;break e;case 4:rn=I.stateNode.containerInfo,wr=!0;break e}I=I.return}if(rn===null)throw Error(n(160));OS(y,x,E),rn=null,wr=!1;var B=E.alternate;B!==null&&(B.return=null),E.return=null}catch(Q){Rt(E,o,Q)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)IS(o,i),o=o.sibling}function IS(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Cr(o,i),Wr(i),h&4){try{wu(3,i,i.return),Xc(3,i)}catch(Oe){Rt(i,i.return,Oe)}try{wu(5,i,i.return)}catch(Oe){Rt(i,i.return,Oe)}}break;case 1:Cr(o,i),Wr(i),h&512&&l!==null&&zo(l,l.return);break;case 5:if(Cr(o,i),Wr(i),h&512&&l!==null&&zo(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(Oe){Rt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&Ni(E,y),jr(I,x);var Q=jr(I,y);for(x=0;x<B.length;x+=2){var ue=B[x],he=B[x+1];ue==="style"?Oi(E,he):ue==="dangerouslySetInnerHTML"?Ve(E,he):ue==="children"?Xe(E,he):N(E,ue,he,Q)}switch(I){case"input":oi(E,y);break;case"textarea":Tn(E,y);break;case"select":var oe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Qe(E,!!y.multiple,xe,!1):oe!==!!y.multiple&&(y.defaultValue!=null?Qe(E,!!y.multiple,y.defaultValue,!0):Qe(E,!!y.multiple,y.multiple?[]:"",!1))}E[hu]=y}catch(Oe){Rt(i,i.return,Oe)}}break;case 6:if(Cr(o,i),Wr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,y=i.memoizedProps;try{E.nodeValue=y}catch(Oe){Rt(i,i.return,Oe)}}break;case 3:if(Cr(o,i),Wr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{nu(o.containerInfo)}catch(Oe){Rt(i,i.return,Oe)}break;case 4:Cr(o,i),Wr(i);break;case 13:Cr(o,i),Wr(i),E=i.child,E.flags&8192&&(y=E.memoizedState!==null,E.stateNode.isHidden=y,!y||E.alternate!==null&&E.alternate.memoizedState!==null||(Um=Ft())),h&4&&PS(i);break;case 22:if(ue=l!==null&&l.memoizedState!==null,i.mode&1?(mn=(Q=mn)||ue,Cr(o,i),mn=Q):Cr(o,i),Wr(i),h&8192){if(Q=i.memoizedState!==null,(i.stateNode.isHidden=Q)&&!ue&&(i.mode&1)!==0)for(Ae=i,ue=i.child;ue!==null;){for(he=Ae=ue;Ae!==null;){switch(oe=Ae,xe=oe.child,oe.tag){case 0:case 11:case 14:case 15:wu(4,oe,oe.return);break;case 1:zo(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){h=oe,l=oe.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Oe){Rt(h,l,Oe)}}break;case 5:zo(oe,oe.return);break;case 22:if(oe.memoizedState!==null){DS(he);continue}}xe!==null?(xe.return=oe,Ae=xe):DS(he)}ue=ue.sibling}e:for(ue=null,he=i;;){if(he.tag===5){if(ue===null){ue=he;try{E=he.stateNode,Q?(y=E.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=he.stateNode,B=he.memoizedProps.style,x=B!=null&&B.hasOwnProperty("display")?B.display:null,I.style.display=nr("display",x))}catch(Oe){Rt(i,i.return,Oe)}}}else if(he.tag===6){if(ue===null)try{he.stateNode.nodeValue=Q?"":he.memoizedProps}catch(Oe){Rt(i,i.return,Oe)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;ue===he&&(ue=null),he=he.return}ue===he&&(ue=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Cr(o,i),Wr(i),h&4&&PS(i);break;case 21:break;default:Cr(o,i),Wr(i)}}function Wr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(kS(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&&(Xe(E,""),h.flags&=-33);var y=NS(i);Mm(i,y,E);break;case 3:case 4:var x=h.stateNode.containerInfo,I=NS(i);Dm(i,I,x);break;default:throw Error(n(161))}}catch(B){Rt(i,i.return,B)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function P9(i,o,l){Ae=i,RS(i)}function RS(i,o,l){for(var h=(i.mode&1)!==0;Ae!==null;){var E=Ae,y=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||Gc;if(!x){var I=E.alternate,B=I!==null&&I.memoizedState!==null||mn;I=Gc;var Q=mn;if(Gc=x,(mn=B)&&!Q)for(Ae=E;Ae!==null;)x=Ae,B=x.child,x.tag===22&&x.memoizedState!==null?MS(E):B!==null?(B.return=x,Ae=B):MS(E);for(;y!==null;)Ae=y,RS(y),y=y.sibling;Ae=E,Gc=I,mn=Q}LS(i)}else(E.subtreeFlags&8772)!==0&&y!==null?(y.return=E,Ae=y):LS(i)}}function LS(i){for(;Ae!==null;){var o=Ae;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:mn||Xc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!mn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:xr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=o.updateQueue;y!==null&&D2(o,y,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}D2(o,x,l)}break;case 5:var I=o.stateNode;if(l===null&&o.flags&4){l=I;var B=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&l.focus();break;case"img":B.src&&(l.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Q=o.alternate;if(Q!==null){var ue=Q.memoizedState;if(ue!==null){var he=ue.dehydrated;he!==null&&nu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}mn||o.flags&512&&Lm(o)}catch(oe){Rt(o,o.return,oe)}}if(o===i){Ae=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ae=l;break}Ae=o.return}}function DS(i){for(;Ae!==null;){var o=Ae;if(o===i){Ae=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ae=l;break}Ae=o.return}}function MS(i){for(;Ae!==null;){var o=Ae;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Xc(4,o)}catch(B){Rt(o,l,B)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(B){Rt(o,E,B)}}var y=o.return;try{Lm(o)}catch(B){Rt(o,y,B)}break;case 5:var x=o.return;try{Lm(o)}catch(B){Rt(o,x,B)}}}catch(B){Rt(o,o.return,B)}if(o===i){Ae=null;break}var I=o.sibling;if(I!==null){I.return=o.return,Ae=I;break}Ae=o.return}}var I9=Math.ceil,Kc=L.ReactCurrentDispatcher,Fm=L.ReactCurrentOwner,ar=L.ReactCurrentBatchConfig,rt=0,Zt=null,$t=null,sn=0,qn=0,jo=Bi(0),Yt=0,Cu=null,vs=0,Qc=0,Bm=0,Au=null,Rn=null,Um=0,$o=1/0,pi=null,Jc=!1,Hm=null,Vi=null,Zc=!1,qi=null,ed=0,vu=0,zm=null,td=-1,nd=0;function _n(){return(rt&6)!==0?Ft():td!==-1?td:td=Ft()}function Yi(i){return(i.mode&1)===0?1:(rt&2)!==0&&sn!==0?sn&-sn:m9.transition!==null?(nd===0&&(nd=N_()),nd):(i=lt,i!==0||(i=window.event,i=i===void 0?16:B_(i.type)),i)}function Ar(i,o,l,h){if(50<vu)throw vu=0,zm=null,Error(n(185));Qa(i,l,h),((rt&2)===0||i!==Zt)&&(i===Zt&&((rt&2)===0&&(Qc|=l),Yt===4&&Wi(i,sn)),Ln(i,h),l===1&&rt===0&&(o.mode&1)===0&&($o=Ft()+500,Oc&&Hi()))}function Ln(i,o){var l=i.callbackNode;mF(i,o);var h=dc(i,i===Zt?sn:0);if(h===0)l!==null&&A_(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&A_(l),o===1)i.tag===0?p9(BS.bind(null,i)):x2(BS.bind(null,i)),c9(function(){(rt&6)===0&&Hi()}),l=null;else{switch(O_(h)){case 1:l=bp;break;case 4:l=v_;break;case 16:l=ac;break;case 536870912:l=k_;break;default:l=ac}l=YS(l,FS.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function FS(i,o){if(td=-1,nd=0,(rt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Vo()&&i.callbackNode!==l)return null;var h=dc(i,i===Zt?sn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=rd(i,h);else{o=h;var E=rt;rt|=2;var y=HS();(Zt!==i||sn!==o)&&(pi=null,$o=Ft()+500,Ns(i,o));do try{D9();break}catch(I){US(i,I)}while(!0);sm(),Kc.current=y,rt=E,$t!==null?o=0:(Zt=null,sn=0,o=Yt)}if(o!==0){if(o===2&&(E=_p(i),E!==0&&(h=E,o=jm(i,E))),o===1)throw l=Cu,Ns(i,0),Wi(i,h),Ln(i,Ft()),l;if(o===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!R9(E)&&(o=rd(i,h),o===2&&(y=_p(i),y!==0&&(h=y,o=jm(i,y))),o===1))throw l=Cu,Ns(i,0),Wi(i,h),Ln(i,Ft()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Os(i,Rn,pi);break;case 3:if(Wi(i,h),(h&130023424)===h&&(o=Um+500-Ft(),10<o)){if(dc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){_n(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Gp(Os.bind(null,i,Rn,pi),o);break}Os(i,Rn,pi);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-br(h);y=1<<x,x=o[x],x>E&&(E=x),h&=~y}if(h=E,h=Ft()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*I9(h/1960))-h,10<h){i.timeoutHandle=Gp(Os.bind(null,i,Rn,pi),h);break}Os(i,Rn,pi);break;case 5:Os(i,Rn,pi);break;default:throw Error(n(329))}}}return Ln(i,Ft()),i.callbackNode===l?FS.bind(null,i):null}function jm(i,o){var l=Au;return i.current.memoizedState.isDehydrated&&(Ns(i,o).flags|=256),i=rd(i,o),i!==2&&(o=Rn,Rn=l,o!==null&&$m(o)),i}function $m(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function R9(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],y=E.getSnapshot;E=E.value;try{if(!_r(y(),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 Wi(i,o){for(o&=~Bm,o&=~Qc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-br(o),h=1<<l;i[l]=-1,o&=~h}}function BS(i){if((rt&6)!==0)throw Error(n(327));Vo();var o=dc(i,0);if((o&1)===0)return Ln(i,Ft()),null;var l=rd(i,o);if(i.tag!==0&&l===2){var h=_p(i);h!==0&&(o=h,l=jm(i,h))}if(l===1)throw l=Cu,Ns(i,0),Wi(i,o),Ln(i,Ft()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Os(i,Rn,pi),Ln(i,Ft()),null}function Vm(i,o){var l=rt;rt|=1;try{return i(o)}finally{rt=l,rt===0&&($o=Ft()+500,Oc&&Hi())}}function ks(i){qi!==null&&qi.tag===0&&(rt&6)===0&&Vo();var o=rt;rt|=1;var l=ar.transition,h=lt;try{if(ar.transition=null,lt=1,i)return i()}finally{lt=h,ar.transition=l,rt=o,(rt&6)===0&&Hi()}}function qm(){qn=jo.current,xt(jo)}function Ns(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,l9(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(em(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&kc();break;case 3:Uo(),xt(On),xt(fn),hm();break;case 5:dm(h);break;case 4:Uo();break;case 13:xt(Ot);break;case 19:xt(Ot);break;case 10:om(h.type._context);break;case 22:case 23:qm()}l=l.return}if(Zt=i,$t=i=Gi(i.current,null),sn=qn=o,Yt=0,Cu=null,Bm=Qc=vs=0,Rn=Au=null,ws!==null){for(o=0;o<ws.length;o++)if(l=ws[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,y=l.pending;if(y!==null){var x=y.next;y.next=E,h.next=x}l.pending=h}ws=null}return i}function US(i,o){do{var l=$t;try{if(sm(),Hc.current=Vc,zc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}zc=!1}if(As=0,Jt=qt=Pt=null,Tu=!1,bu=0,Fm.current=null,l===null||l.return===null){Yt=1,Cu=o,$t=null;break}e:{var y=i,x=l.return,I=l,B=o;if(o=sn,I.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var Q=B,ue=I,he=ue.tag;if((ue.mode&1)===0&&(he===0||he===11||he===15)){var oe=ue.alternate;oe?(ue.updateQueue=oe.updateQueue,ue.memoizedState=oe.memoizedState,ue.lanes=oe.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var xe=cS(x);if(xe!==null){xe.flags&=-257,dS(xe,x,I,y,o),xe.mode&1&&lS(y,Q,o),o=xe,B=Q;var ke=o.updateQueue;if(ke===null){var Oe=new Set;Oe.add(B),o.updateQueue=Oe}else ke.add(B);break e}else{if((o&1)===0){lS(y,Q,o),Ym();break e}B=Error(n(426))}}else if(kt&&I.mode&1){var Bt=cS(x);if(Bt!==null){(Bt.flags&65536)===0&&(Bt.flags|=256),dS(Bt,x,I,y,o),rm(Ho(B,I));break e}}y=B=Ho(B,I),Yt!==4&&(Yt=2),Au===null?Au=[y]:Au.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,o&=-o,y.lanes|=o;var q=aS(y,B,o);L2(y,q);break e;case 1:I=B;var H=y.type,G=y.stateNode;if((y.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(Vi===null||!Vi.has(G)))){y.flags|=65536,o&=-o,y.lanes|=o;var Ee=uS(y,I,o);L2(y,Ee);break e}}y=y.return}while(y!==null)}jS(l)}catch(Re){o=Re,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function HS(){var i=Kc.current;return Kc.current=Vc,i===null?Vc:i}function Ym(){(Yt===0||Yt===3||Yt===2)&&(Yt=4),Zt===null||(vs&268435455)===0&&(Qc&268435455)===0||Wi(Zt,sn)}function rd(i,o){var l=rt;rt|=2;var h=HS();(Zt!==i||sn!==o)&&(pi=null,Ns(i,o));do try{L9();break}catch(E){US(i,E)}while(!0);if(sm(),rt=l,Kc.current=h,$t!==null)throw Error(n(261));return Zt=null,sn=0,Yt}function L9(){for(;$t!==null;)zS($t)}function D9(){for(;$t!==null&&!oF();)zS($t)}function zS(i){var o=qS(i.alternate,i,qn);i.memoizedProps=i.pendingProps,o===null?jS(i):$t=o,Fm.current=null}function jS(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=v9(l,o,qn),l!==null){$t=l;return}}else{if(l=k9(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 Os(i,o,l){var h=lt,E=ar.transition;try{ar.transition=null,lt=1,M9(i,o,l,h)}finally{ar.transition=E,lt=h}return null}function M9(i,o,l,h){do Vo();while(qi!==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 y=l.lanes|l.childLanes;if(gF(i,y),i===Zt&&($t=Zt=null,sn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Zc||(Zc=!0,YS(ac,function(){return Vo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=ar.transition,ar.transition=null;var x=lt;lt=1;var I=rt;rt|=4,Fm.current=null,O9(i,l),IS(l,i),n9(Yp),pc=!!qp,Yp=qp=null,i.current=l,P9(l),aF(),rt=I,lt=x,ar.transition=y}else i.current=l;if(Zc&&(Zc=!1,qi=i,ed=E),y=i.pendingLanes,y===0&&(Vi=null),cF(l.stateNode),Ln(i,Ft()),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(Jc)throw Jc=!1,i=Hm,Hm=null,i;return(ed&1)!==0&&i.tag!==0&&Vo(),y=i.pendingLanes,(y&1)!==0?i===zm?vu++:(vu=0,zm=i):vu=0,Hi(),null}function Vo(){if(qi!==null){var i=O_(ed),o=ar.transition,l=lt;try{if(ar.transition=null,lt=16>i?16:i,qi===null)var h=!1;else{if(i=qi,qi=null,ed=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Ae=i.current;Ae!==null;){var y=Ae,x=y.child;if((Ae.flags&16)!==0){var I=y.deletions;if(I!==null){for(var B=0;B<I.length;B++){var Q=I[B];for(Ae=Q;Ae!==null;){var ue=Ae;switch(ue.tag){case 0:case 11:case 15:wu(8,ue,y)}var he=ue.child;if(he!==null)he.return=ue,Ae=he;else for(;Ae!==null;){ue=Ae;var oe=ue.sibling,xe=ue.return;if(vS(ue),ue===Q){Ae=null;break}if(oe!==null){oe.return=xe,Ae=oe;break}Ae=xe}}}var ke=y.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Bt=Oe.sibling;Oe.sibling=null,Oe=Bt}while(Oe!==null)}}Ae=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Ae=x;else e:for(;Ae!==null;){if(y=Ae,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:wu(9,y,y.return)}var q=y.sibling;if(q!==null){q.return=y.return,Ae=q;break e}Ae=y.return}}var H=i.current;for(Ae=H;Ae!==null;){x=Ae;var G=x.child;if((x.subtreeFlags&2064)!==0&&G!==null)G.return=x,Ae=G;else e:for(x=H;Ae!==null;){if(I=Ae,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Xc(9,I)}}catch(Re){Rt(I,I.return,Re)}if(I===x){Ae=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Ae=Ee;break e}Ae=I.return}}if(rt=E,Hi(),$r&&typeof $r.onPostCommitFiberRoot=="function")try{$r.onPostCommitFiberRoot(uc,i)}catch(Re){}h=!0}return h}finally{lt=l,ar.transition=o}}return!1}function $S(i,o,l){o=Ho(l,o),o=aS(i,o,1),i=ji(i,o,1),o=_n(),i!==null&&(Qa(i,1,o),Ln(i,o))}function Rt(i,o,l){if(i.tag===3)$S(i,i,l);else for(;o!==null;){if(o.tag===3){$S(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))){i=Ho(l,i),i=uS(o,i,1),o=ji(o,i,1),i=_n(),o!==null&&(Qa(o,1,i),Ln(o,i));break}}o=o.return}}function F9(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=_n(),i.pingedLanes|=i.suspendedLanes&l,Zt===i&&(sn&l)===l&&(Yt===4||Yt===3&&(sn&130023424)===sn&&500>Ft()-Um?Ns(i,0):Bm|=l),Ln(i,o)}function VS(i,o){o===0&&((i.mode&1)===0?o=1:(o=cc,cc<<=1,(cc&130023424)===0&&(cc=4194304)));var l=_n();i=di(i,o),i!==null&&(Qa(i,o,l),Ln(i,l))}function B9(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),VS(i,l)}function U9(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),VS(i,l)}var qS;qS=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||On.current)In=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return In=!1,A9(i,o,l);In=(i.flags&131072)!==0}else In=!1,kt&&(o.flags&1048576)!==0&&w2(o,Ic,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Wc(i,o),i=o.pendingProps;var E=Io(o,fn.current);Bo(o,l),E=gm(null,o,h,i,E,l);var y=Em();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,Pn(h)?(y=!0,Nc(o)):y=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,lm(o),E.updater=qc,o.stateNode=E,E._reactInternals=o,xm(o,h,i,l),o=vm(null,o,h,!0,y,l)):(o.tag=0,kt&&y&&Zp(o),bn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(Wc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=z9(h),i=xr(h,i),E){case 0:o=Am(null,o,h,i,l);break e;case 1:o=ES(null,o,h,i,l);break e;case 11:o=fS(null,o,h,i,l);break e;case 14:o=hS(null,o,h,xr(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:xr(h,E),Am(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),ES(i,o,h,E,l);case 3:e:{if(yS(o),i===null)throw Error(n(387));h=o.pendingProps,y=o.memoizedState,E=y.element,R2(i,o),Bc(o,h,null,l);var x=o.memoizedState;if(h=x.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=y,o.memoizedState=y,o.flags&256){E=Ho(Error(n(423)),o),o=TS(i,o,h,l,E);break e}else if(h!==E){E=Ho(Error(n(424)),o),o=TS(i,o,h,l,E);break e}else for(Vn=Fi(o.stateNode.containerInfo.firstChild),$n=o,kt=!0,Sr=null,l=P2(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Do(),h===E){o=hi(i,o,l);break e}bn(i,o,h,l)}o=o.child}return o;case 5:return M2(o),i===null&&nm(o),h=o.type,E=o.pendingProps,y=i!==null?i.memoizedProps:null,x=E.children,Wp(h,E)?x=null:y!==null&&Wp(h,y)&&(o.flags|=32),gS(i,o),bn(i,o,x,l),o.child;case 6:return i===null&&nm(o),null;case 13:return bS(i,o,l);case 4:return cm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Mo(o,null,h,l):bn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),fS(i,o,h,E,l);case 7:return bn(i,o,o.pendingProps,l),o.child;case 8:return bn(i,o,o.pendingProps.children,l),o.child;case 12:return bn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,y=o.memoizedProps,x=E.value,bt(Dc,h._currentValue),h._currentValue=x,y!==null)if(_r(y.value,x)){if(y.children===E.children&&!On.current){o=hi(i,o,l);break e}}else for(y=o.child,y!==null&&(y.return=o);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var B=I.firstContext;B!==null;){if(B.context===h){if(y.tag===1){B=fi(-1,l&-l),B.tag=2;var Q=y.updateQueue;if(Q!==null){Q=Q.shared;var ue=Q.pending;ue===null?B.next=B:(B.next=ue.next,ue.next=B),Q.pending=B}}y.lanes|=l,B=y.alternate,B!==null&&(B.lanes|=l),am(y.return,l,o),I.lanes|=l;break}B=B.next}}else if(y.tag===10)x=y.type===o.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),am(x,l,o),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===o){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}bn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Bo(o,l),E=sr(E),h=h(E),o.flags|=1,bn(i,o,h,l),o.child;case 14:return h=o.type,E=xr(h,o.pendingProps),E=xr(h.type,E),hS(i,o,h,E,l);case 15:return pS(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Wc(i,o),o.tag=1,Pn(h)?(i=!0,Nc(o)):i=!1,Bo(o,l),sS(o,h,E),xm(o,h,E,l),vm(null,o,h,!0,i,l);case 19:return SS(i,o,l);case 22:return mS(i,o,l)}throw Error(n(156,o.tag))};function YS(i,o){return C_(i,o)}function H9(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 ur(i,o,l,h){return new H9(i,o,l,h)}function Wm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function z9(i){if(typeof i=="function")return Wm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===ye)return 14}return 2}function Gi(i,o){var l=i.alternate;return l===null?(l=ur(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 id(i,o,l,h,E,y){var x=2;if(h=i,typeof i=="function")Wm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case ne:return Ps(l.children,E,y,o);case le:x=8,E|=8;break;case Te:return i=ur(12,l,o,E|2),i.elementType=Te,i.lanes=y,i;case pe:return i=ur(13,l,o,E),i.elementType=pe,i.lanes=y,i;case ce:return i=ur(19,l,o,E),i.elementType=ce,i.lanes=y,i;case de:return sd(l,E,y,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case j:x=10;break e;case se:x=9;break e;case te:x=11;break e;case ye:x=14;break e;case De:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ur(x,l,o,E),o.elementType=i,o.type=h,o.lanes=y,o}function Ps(i,o,l,h){return i=ur(7,i,h,o),i.lanes=l,i}function sd(i,o,l,h){return i=ur(22,i,h,o),i.elementType=de,i.lanes=l,i.stateNode={isHidden:!1},i}function Gm(i,o,l){return i=ur(6,i,null,o),i.lanes=l,i}function Xm(i,o,l){return o=ur(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function j9(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=Sp(0),this.expirationTimes=Sp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Km(i,o,l,h,E,y,x,I,B){return i=new j9(i,o,l,I,B),o===1?(o=1,y===!0&&(o|=8)):o=0,y=ur(3,null,null,o),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},lm(y),i}function $9(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 WS(i){if(!i)return Ui;i=i._reactInternals;e:{if(Ts(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(Pn(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(Pn(l))return _2(i,l,o)}return o}function GS(i,o,l,h,E,y,x,I,B){return i=Km(l,h,!0,i,E,y,x,I,B),i.context=WS(null),l=i.current,h=_n(),E=Yi(l),y=fi(h,E),y.callback=o!=null?o:null,ji(l,y,E),i.current.lanes=E,Qa(i,E,h),Ln(i,h),i}function od(i,o,l,h){var E=o.current,y=_n(),x=Yi(E);return l=WS(l),o.context===null?o.context=l:o.pendingContext=l,o=fi(y,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ji(E,o,x),i!==null&&(Ar(i,E,x,y),Fc(i,E,x)),x}function ad(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function XS(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function Qm(i,o){XS(i,o),(i=i.alternate)&&XS(i,o)}function V9(){return null}var KS=typeof reportError=="function"?reportError:function(i){console.error(i)};function Jm(i){this._internalRoot=i}ud.prototype.render=Jm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));od(i,o,null,null)},ud.prototype.unmount=Jm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ks(function(){od(null,i,null,null)}),o[ai]=null}};function ud(i){this._internalRoot=i}ud.prototype.unstable_scheduleHydration=function(i){if(i){var o=R_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Li.length&&o!==0&&o<Li[l].priority;l++);Li.splice(l,0,i),l===0&&M_(i)}};function Zm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ld(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function QS(){}function q9(i,o,l,h,E){if(E){if(typeof h=="function"){var y=h;h=function(){var Q=ad(x);y.call(Q)}}var x=GS(o,h,i,0,null,!1,!1,"",QS);return i._reactRootContainer=x,i[ai]=x.current,du(i.nodeType===8?i.parentNode:i),ks(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var I=h;h=function(){var Q=ad(B);I.call(Q)}}var B=Km(i,0,!1,null,null,!1,!1,"",QS);return i._reactRootContainer=B,i[ai]=B.current,du(i.nodeType===8?i.parentNode:i),ks(function(){od(o,B,l,h)}),B}function cd(i,o,l,h,E){var y=l._reactRootContainer;if(y){var x=y;if(typeof E=="function"){var I=E;E=function(){var B=ad(x);I.call(B)}}od(o,x,i,E)}else x=q9(l,o,i,E,h);return ad(x)}P_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=Ka(o.pendingLanes);l!==0&&(xp(o,l|1),Ln(o,Ft()),(rt&6)===0&&($o=Ft()+500,Hi()))}break;case 13:ks(function(){var h=di(i,1);if(h!==null){var E=_n();Ar(h,i,1,E)}}),Qm(i,1)}},wp=function(i){if(i.tag===13){var o=di(i,134217728);if(o!==null){var l=_n();Ar(o,i,134217728,l)}Qm(i,134217728)}},I_=function(i){if(i.tag===13){var o=Yi(i),l=di(i,o);if(l!==null){var h=_n();Ar(l,i,o,h)}Qm(i,o)}},R_=function(){return lt},L_=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},gp=function(i,o,l){switch(o){case"input":if(oi(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=vc(h);if(!E)throw Error(n(90));zr(h),oi(h,E)}}}break;case"textarea":Tn(i,l);break;case"select":o=l.value,o!=null&&Qe(i,!!l.multiple,o,!1)}},y_=Vm,T_=ks;var Y9={usingClientEntryPoint:!1,Events:[pu,Oo,vc,g_,E_,Vm]},ku={findFiberByHostInstance:bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},W9={bundleType:ku.bundleType,version:ku.version,rendererPackageName:ku.rendererPackageName,rendererConfig:ku.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=x_(i),i===null?null:i.stateNode},findFiberByHostInstance:ku.findFiberByHostInstance||V9,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 dd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dd.isDisabled&&dd.supportsFiber)try{uc=dd.inject(W9),$r=dd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y9,kn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zm(o))throw Error(n(200));return $9(i,o,null,l)},kn.createRoot=function(i,o){if(!Zm(i))throw Error(n(299));var l=!1,h="",E=KS;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Km(i,1,!1,null,null,l,!1,h,E),i[ai]=o.current,du(i.nodeType===8?i.parentNode:i),new Jm(o)},kn.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=x_(o),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return ks(i)},kn.hydrate=function(i,o,l){if(!ld(o))throw Error(n(200));return cd(null,i,o,!0,l)},kn.hydrateRoot=function(i,o,l){if(!Zm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,y="",x=KS;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=GS(o,null,i,1,l!=null?l:null,E,!1,y,x),i[ai]=o.current,du(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 ud(o)},kn.render=function(i,o,l){if(!ld(o))throw Error(n(200));return cd(null,i,o,!1,l)},kn.unmountComponentAtNode=function(i){if(!ld(i))throw Error(n(40));return i._reactRootContainer?(ks(function(){cd(null,null,i,!1,function(){i._reactRootContainer=null,i[ai]=null})}),!0):!1},kn.unstable_batchedUpdates=Vm,kn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!ld(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return cd(i,o,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var gT;function ET(){if(gT)return Ah.exports;gT=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(),Ah.exports=P6(),Ah.exports}var uo=ET();function I6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Nh=()=>e=>Array.from(new Set(e)),yT=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);yT(()=>{d.current=c.current},[s,e().value]);const f=T=>{var v,A;const _=d.current,S=io(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(A=(v=e()).onChange)==null||A.call(v,S,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(T){(e().sync?uo.flushSync:NL)(()=>f(T))},invoke(T,_){var S,v;(v=(S=e()).onChange)==null||v.call(S,T,_)},hash(T){var _,S,v;return(v=(S=(_=e()).hash)==null?void 0:S.call(_,T))!=null?v:String(T)}}}Hl.cleanup=e=>{z.useEffect(()=>e,[])},Hl.ref=e=>{const t=z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function R6(e){const t=z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var L6=(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 Oh(e,t={}){var se,te,pe,ce,ye,De;const n=z.useMemo(()=>{const{id:de,ids:K,getRootNode:re}=t;return k6({id:de,ids:K,getRootNode:re})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(te=(se=e.props)==null?void 0:se.call(e,{props:mh(t),scope:n}))!=null?te:t,a=D6(s),u=(pe=e.context)==null?void 0:pe.call(e,{prop:a,bindable:Hl,scope:n,flush:bT,getContext(){return d},getComputed(){return W},getRefs(){return S},getEvent(){return T()}}),c=TT(u),d={get(de){var K;return(K=c.current)==null?void 0:K[de].ref.current},set(de,K){var re;(re=c.current)==null||re[de].set(K)},initial(de){var K;return(K=c.current)==null?void 0:K[de].initial},hash(de){var re,C;const K=(re=c.current)==null?void 0:re[de].get();return(C=c.current)==null?void 0:C[de].hash(K)}},f=z.useRef(new Map),p=z.useRef(null),g=z.useRef(null),b=z.useRef({type:""}),T=()=>_e(U({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>_e(U({},F),{matches(...de){return de.includes(F.ref.current)},hasTag(de){var K,re;return!!((re=(K=e.states[F.ref.current])==null?void 0:K.tags)!=null&&re.includes(de))}}),S=R6((ye=(ce=e.refs)==null?void 0:ce.call(e,{prop:a,context:d}))!=null?ye:{}),v=()=>({state:_(),context:d,event:T(),prop:a,send:j,action:A,guard:R,track:L6,refs:S,computed:W,flush:bT,scope:n,choose:L}),A=de=>{const K=io(de)?de(v()):de;if(!K)return;const re=K.map(C=>{var Z,O;const M=(O=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:O[C];return M||gh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),M});for(const C of re)C==null||C(v())},R=de=>{var K,re;return io(de)?de(v()):(re=(K=e.implementations)==null?void 0:K.guards)==null?void 0:re[de](v())},N=de=>{const K=io(de)?de(v()):de;if(!K)return;const re=K.map(M=>{var O,be;const Z=(be=(O=e.implementations)==null?void 0:O.effects)==null?void 0:be[M];return Z||gh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),Z}),C=[];for(const M of re){const Z=M==null?void 0:M(v());Z&&C.push(Z)}return()=>C.forEach(M=>M==null?void 0:M())},L=de=>TL(de).find(K=>{let re=!K.guard;return Rl(K.guard)?re=!!R(K.guard):io(K.guard)&&(re=K.guard(v())),re}),W=de=>{PL(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[de];return K({context:d,event:T(),prop:a,refs:S,scope:n,computed:W})},F=Hl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,K){var C,M,Z,O;if(K){const be=f.current.get(K);be==null||be(),f.current.delete(K)}K&&A((C=e.states[K])==null?void 0:C.exit),A((M=p.current)==null?void 0:M.actions);const re=N((Z=e.states[de])==null?void 0:Z.effects);if(re&&f.current.set(de,re),K===Ch){A(e.entry);const be=N(e.effects);be&&f.current.set(Ch,be)}A((O=e.states[de])==null?void 0:O.entry)}})),ne=z.useRef(void 0),le=z.useRef(ao.NotStarted);yT(()=>{queueMicrotask(()=>{var M;const re=le.current===ao.Started;le.current=ao.Started,r(re?"rehydrating...":"initializing...");const C=(M=ne.current)!=null?M:F.initial;F.invoke(C,re?F.get():Ch)});const de=f.current,K=F.ref.current;return()=>{r("unmounting..."),ne.current=K,le.current=ao.Stopped,de.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const Te=()=>"ref"in F?F.ref.current:F.get(),j=de=>{queueMicrotask(()=>{var O,be,Pe,Ce,$e;if(le.current!==ao.Started)return;g.current=b.current,b.current=de;let K=Te();const re=(Pe=(O=e.states[K].on)==null?void 0:O[de.type])!=null?Pe:(be=e.on)==null?void 0:be[de.type],C=L(re);if(!C)return;p.current=C;const M=(Ce=C.target)!=null?Ce:K;r("transition",de.type,C.target||K,`(${C.actions})`);const Z=M!==K;Z?uo.flushSync(()=>F.set(M)):C.reenter&&!Z?F.invoke(K,K):A(($e=C.actions)!=null?$e:[])})};return(De=e.watch)==null||De.call(e,v()),{state:_(),send:j,context:d,prop:a,scope:n,refs:S,computed:W,event:T(),getStatus:()=>le.current}}function TT(e){const t=z.useRef(e);return t.current=e,t}function D6(e){const t=TT(e);return function(r){return t.current[r]}}function bT(e){queueMicrotask(()=>{uo.flushSync(()=>e())})}var _T=I6(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 M6(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 Ph=e=>{const t=z.memo(z.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=on(f,["asChild","children"]);if(!s)return z.createElement(e,_e(U({},u),{ref:r}),a);if(!z.isValidElement(a))return null;const c=z.Children.only(a),d=M6(c);return z.cloneElement(c,_e(U({},gr(u,c.props)),{ref:r?zl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Ai=(()=>{const e=new Map;return new Proxy(Ph,{apply(t,n,r){return Ph(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Ph(r)),e.get(r)}})})();function F6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function lo(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:F6(r,s));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[B6,Ih]=lo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ST,Fa]=lo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),xT=z.forwardRef((e,t)=>{const n=Ih(),r=Fa(),s=gr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Ai.div,_e(U({},s),{ref:zl(r.ref,t)}))});xT.displayName="PopoverContent";const wT=z.forwardRef((e,t)=>{const n=Ih(),r=Fa(),s=gr(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(Ai.div,_e(U({},s),{ref:t}))});wT.displayName="PopoverPositioner";const CT=()=>(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]},[{},U({},e)]),AT=e=>CT()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function U6(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 H6={props({props:e}){return _e(U({},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"});vn(()=>{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})=>{vn(()=>{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"));ei(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),g6(()=>c())}}}}};function jl(e){return(e==null?void 0:e.animationName)||"none"}Nh()(["onExitComplete","present","immediate"]);function z6(e,t={}){const{sync:n=!1}=t,r=j6(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 j6(e){const t=z.useRef(e);return t.current=e,t}const Rh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=on(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=z.useRef(!1),c=_e(U({},a),{present:r,onExitComplete:z6(e.onExitComplete)}),d=Oh(H6,c),f=U6(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 co=(e,t=[])=>({parts:(...n)=>{if($6(t))return co(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>co(e,[...t,...n]),omit:(...n)=>co(e,t.filter(r=>!n.includes(r))),rename:n=>co(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${fo(e)}"][data-part="${fo(r)}"]`,`& [data-scope="${fo(e)}"][data-part="${fo(r)}"]`].join(", "),attrs:{"data-scope":fo(e),"data-part":fo(r)}}}),{})}),fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),$6=e=>e.length===0;const V6=["top","right","bottom","left"],vi=Math.min,Un=Math.max,$l=Math.round,Vl=Math.floor,Dr=e=>({x:e,y:e}),q6={left:"right",right:"left",bottom:"top",top:"bottom"},Y6={start:"end",end:"start"};function Lh(e,t,n){return Un(e,vi(t,n))}function ni(e,t){return typeof e=="function"?e(t):e}function ri(e){return e.split("-")[0]}function ho(e){return e.split("-")[1]}function Dh(e){return e==="x"?"y":"x"}function Mh(e){return e==="y"?"height":"width"}const W6=new Set(["top","bottom"]);function Mr(e){return W6.has(ri(e))?"y":"x"}function Fh(e){return Dh(Mr(e))}function G6(e,t,n){n===void 0&&(n=!1);const r=ho(e),s=Fh(e),a=Mh(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 X6(e){const t=ql(e);return[Bh(e),t,Bh(t)]}function Bh(e){return e.replace(/start|end/g,t=>Y6[t])}const vT=["left","right"],kT=["right","left"],K6=["top","bottom"],Q6=["bottom","top"];function J6(e,t,n){switch(e){case"top":case"bottom":return n?t?kT:vT:t?vT:kT;case"left":case"right":return t?K6:Q6;default:return[]}}function Z6(e,t,n,r){const s=ho(e);let a=J6(ri(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Bh)))),a}function ql(e){return e.replace(/left|right|bottom|top/g,t=>q6[t])}function e4(e){return U({top:0,right:0,bottom:0,left:0},e)}function NT(e){return typeof e!="number"?e4(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 OT(e,t,n){let{reference:r,floating:s}=e;const a=Mr(t),u=Fh(t),c=Mh(u),d=ri(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 T;switch(d){case"top":T={x:p,y:r.y-s.height};break;case"bottom":T={x:p,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:g};break;case"left":T={x:r.x-s.width,y:g};break;default:T={x:r.x,y:r.y}}switch(ho(t)){case"start":T[u]-=b*(n&&f?-1:1);break;case"end":T[u]+=b*(n&&f?-1:1);break}return T}const t4=(e,t,n)=>et(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}=OT(f,r,d),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:v,fn:A}=c[S],{x:R,y:N,data:L,reset:W}=yield A({x:p,y:g,initialPlacement:r,placement:b,strategy:s,middlewareData:T,rects:f,platform:u,elements:{reference:e,floating:t}});p=R!=null?R:p,g=N!=null?N:g,T=_e(U({},T),{[v]:U(U({},T[v]),L)}),W&&_<=50&&(_++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(f=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):W.rects),{x:p,y:g}=OT(f,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:s,middlewareData:T}});function Ba(e,t){return et(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:T=0}=ni(t,e),_=NT(T),v=c[b?g==="floating"?"reference":"floating":g],A=Yl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),R=g==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,N=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),L=(yield a.isElement==null?void 0:a.isElement(N))?(yield a.getScale==null?void 0:a.getScale(N))||{x:1,y:1}:{x:1,y:1},W=Yl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:N,strategy:d}):R);return{top:(A.top-W.top+_.top)/L.y,bottom:(W.bottom-A.bottom+_.bottom)/L.y,left:(A.left-W.left+_.left)/L.x,right:(W.right-A.right+_.right)/L.x}})}const n4=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=ni(e,n)||{};if(p==null)return{};const b=NT(g),T={x:r,y:s},_=Fh(a),S=Mh(_),v=yield c.getDimensions(p),A=_==="y",R=A?"top":"left",N=A?"bottom":"right",L=A?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[_]-T[_]-u.floating[S],F=T[_]-u.reference[_],ne=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let le=ne?ne[L]:0;(!le||!(yield c.isElement==null?void 0:c.isElement(ne)))&&(le=d.floating[L]||u.floating[S]);const Te=W/2-F/2,j=le/2-v[S]/2-1,se=vi(b[R],j),te=vi(b[N],j),pe=se,ce=le-v[S]-te,ye=le/2-v[S]/2+Te,De=Lh(pe,ye,ce),de=!f.arrow&&ho(a)!=null&&ye!==De&&u.reference[S]/2-(ye<pe?se:te)-v[S]/2<0,K=de?ye<pe?ye-pe:ye-ce:0;return{[_]:T[_]+K,data:U({[_]:De,centerOffset:ye-De-K},de&&{alignmentOffset:K}),reset:de}})}}),r4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ye=ni(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:v=!0}=ye,A=on(ye,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const R=ri(a),N=Mr(d),L=ri(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(p.floating),F=T||(L||!v?[ql(d)]:X6(d)),ne=S!=="none";!T&&ne&&F.push(...Z6(d,v,S,W));const le=[d,...F],Te=yield Ba(n,A),j=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(g&&j.push(Te[R]),b){const De=G6(a,c,W);j.push(Te[De[0]],Te[De[1]])}if(se=[...se,{placement:a,overflows:j}],!j.every(De=>De<=0)){var te,pe;const De=(((te=u.flip)==null?void 0:te.index)||0)+1,de=le[De];if(de&&(!(b==="alignment"?N!==Mr(de):!1)||se.every(C=>Mr(C.placement)===N?C.overflows[0]>0:!0)))return{data:{index:De,overflows:se},reset:{placement:de}};let K=(pe=se.filter(re=>re.overflows[0]<=0).sort((re,C)=>re.overflows[1]-C.overflows[1])[0])==null?void 0:pe.placement;if(!K)switch(_){case"bestFit":{var ce;const re=(ce=se.filter(C=>{if(ne){const M=Mr(C.placement);return M===N||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,Z)=>M+Z,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:ce[0];re&&(K=re);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function PT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IT(e){return V6.some(t=>e[t]>=0)}const i4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=ni(e,n),{strategy:s="referenceHidden"}=u,a=on(u,["strategy"]);switch(s){case"referenceHidden":{const c=yield Ba(n,_e(U({},a),{elementContext:"reference"})),d=PT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:IT(d)}}}case"escaped":{const c=yield Ba(n,_e(U({},a),{altBoundary:!0})),d=PT(c,r.floating);return{data:{escapedOffsets:d,escaped:IT(d)}}}default:return{}}})}}},RT=new Set(["left","top"]);function s4(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ri(n),c=ho(n),d=Mr(n)==="y",f=RT.has(u)?-1:1,p=a&&d?-1:1,g=ni(t,e);let{mainAxis:b,crossAxis:T,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"&&(T=c==="end"?_*-1:_),d?{x:T*p,y:b*f}:{x:b*f,y:T*p}})}const o4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield s4(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:_e(U({},f),{placement:c})}})}}},a4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a}=n,A=ni(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:R=>{let{x:N,y:L}=R;return{x:N,y:L}}}}=A,f=on(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},g=yield Ba(n,f),b=Mr(ri(a)),T=Dh(b);let _=p[T],S=p[b];if(u){const R=T==="y"?"top":"left",N=T==="y"?"bottom":"right",L=_+g[R],W=_-g[N];_=Lh(L,_,W)}if(c){const R=b==="y"?"top":"left",N=b==="y"?"bottom":"right",L=S+g[R],W=S-g[N];S=Lh(L,S,W)}const v=d.fn(_e(U({},n),{[T]:_,[b]:S}));return _e(U({},v),{data:{x:v.x-r,y:v.y-s,enabled:{[T]:u,[b]:c}}})})}}},u4=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}=ni(e,t),p={x:n,y:r},g=Mr(s),b=Dh(g);let T=p[b],_=p[g];const S=ni(c,t),v=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(d){const N=b==="y"?"height":"width",L=a.reference[b]-a.floating[N]+v.mainAxis,W=a.reference[b]+a.reference[N]-v.mainAxis;T<L?T=L:T>W&&(T=W)}if(f){var A,R;const N=b==="y"?"width":"height",L=RT.has(ri(s)),W=a.reference[g]-a.floating[N]+(L&&((A=u.offset)==null?void 0:A[g])||0)+(L?0:v.crossAxis),F=a.reference[g]+a.reference[N]+(L?0:((R=u.offset)==null?void 0:R[g])||0)-(L?v.crossAxis:0);_<W?_=W:_>F&&(_=F)}return{[b]:T,[g]:_}}}},l4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,s;const{placement:a,rects:u,platform:c,elements:d}=n,se=ni(e,n),{apply:f=()=>{}}=se,p=on(se,["apply"]),g=yield Ba(n,p),b=ri(a),T=ho(a),_=Mr(a)==="y",{width:S,height:v}=u.floating;let A,R;b==="top"||b==="bottom"?(A=b,R=T===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(R=b,A=T==="end"?"top":"bottom");const N=v-g.top-g.bottom,L=S-g.left-g.right,W=vi(v-g[A],N),F=vi(S-g[R],L),ne=!n.middlewareData.shift;let le=W,Te=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Te=L),(s=n.middlewareData.shift)!=null&&s.enabled.y&&(le=N),ne&&!T){const te=Un(g.left,0),pe=Un(g.right,0),ce=Un(g.top,0),ye=Un(g.bottom,0);_?Te=S-2*(te!==0||pe!==0?te+pe:Un(g.left,g.right)):le=v-2*(ce!==0||ye!==0?ce+ye:Un(g.top,g.bottom))}yield f(_e(U({},n),{availableWidth:Te,availableHeight:le}));const j=yield c.getDimensions(d.floating);return S!==j.width||v!==j.height?{reset:{rects:!0}}:{}})}}};function Wl(){return typeof window!="undefined"}function po(e){return LT(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fr(e){var t;return(t=(LT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LT(e){return Wl()?e instanceof Node||e instanceof Hn(e).Node:!1}function Er(e){return Wl()?e instanceof Element||e instanceof Hn(e).Element:!1}function Br(e){return Wl()?e instanceof HTMLElement||e instanceof Hn(e).HTMLElement:!1}function DT(e){return!Wl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}const c4=new Set(["inline","contents"]);function Ua(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!c4.has(s)}const d4=new Set(["table","td","th"]);function f4(e){return d4.has(po(e))}const h4=[":popover-open",":modal"];function Gl(e){return h4.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const p4=["transform","translate","scale","rotate","perspective"],m4=["transform","translate","scale","rotate","perspective","filter"],g4=["paint","layout","strict","content"];function Uh(e){const t=Hh(),n=Er(e)?yr(e):e;return p4.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)||m4.some(r=>(n.willChange||"").includes(r))||g4.some(r=>(n.contain||"").includes(r))}function E4(e){let t=ki(e);for(;Br(t)&&!mo(t);){if(Uh(t))return t;if(Gl(t))return null;t=ki(t)}return null}function Hh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y4=new Set(["html","body","#document"]);function mo(e){return y4.has(po(e))}function yr(e){return Hn(e).getComputedStyle(e)}function Xl(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ki(e){if(po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||DT(e)&&e.host||Fr(e);return DT(t)?t.host:t}function MT(e){const t=ki(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Br(t)&&Ua(t)?t:MT(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=MT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Hn(s);if(a){const c=zh(u);return t.concat(u,u.visualViewport||[],Ua(s)?s:[],c&&n?Ha(c):[])}return t.concat(s,Ha(s,[],n))}function zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FT(e){const t=yr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Br(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 jh(e){return Er(e)?e:e.contextElement}function go(e){const t=jh(e);if(!Br(t))return Dr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=FT(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 T4=Dr(0);function BT(e){const t=Hn(e);return!Hh()||!t.visualViewport?T4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function b4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=jh(e);let u=Dr(1);t&&(r?Er(r)&&(u=go(r)):u=go(e));const c=b4(a,n,r)?BT(a):Dr(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=Hn(a),T=r&&Er(r)?Hn(r):r;let _=b,S=zh(_);for(;S&&r&&T!==_;){const v=go(S),A=S.getBoundingClientRect(),R=yr(S),N=A.left+(S.clientLeft+parseFloat(R.paddingLeft))*v.x,L=A.top+(S.clientTop+parseFloat(R.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,g*=v.y,d+=N,f+=L,_=Hn(S),S=zh(_)}}return Yl({width:p,height:g,x:d,y:f})}function Kl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:ps(Fr(e)).left+n}function UT(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 _4(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Fr(r),c=t?Gl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Dr(1);const p=Dr(0),g=Br(r);if((g||!g&&!a)&&((po(r)!=="body"||Ua(u))&&(d=Xl(r)),Br(r))){const T=ps(r);f=go(r),p.x=T.x+r.clientLeft,p.y=T.y+r.clientTop}const b=u&&!g&&!a?UT(u,d):Dr(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 S4(e){return Array.from(e.getClientRects())}function x4(e){const t=Fr(e),n=Xl(e),r=e.ownerDocument.body,s=Un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Kl(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=Un(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const HT=25;function w4(e,t){const n=Hn(e),r=Fr(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=Hh();(!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),T=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-T);_<=HT&&(a-=_)}else f<=HT&&(a+=f);return{width:a,height:u,x:c,y:d}}const C4=new Set(["absolute","fixed"]);function A4(e,t){const n=ps(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Br(e)?go(e):Dr(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 zT(e,t,n){let r;if(t==="viewport")r=w4(e,n);else if(t==="document")r=x4(Fr(e));else if(Er(t))r=A4(t,n);else{const s=BT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Yl(r)}function jT(e,t){const n=ki(e);return n===t||!Er(n)||mo(n)?!1:yr(n).position==="fixed"||jT(n,t)}function v4(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(c=>Er(c)&&po(c)!=="body"),s=null;const a=yr(e).position==="fixed";let u=a?ki(e):e;for(;Er(u)&&!mo(u);){const c=yr(u),d=Uh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&C4.has(s.position)||Ua(u)&&!d&&jT(e,u))?r=r.filter(p=>p!==u):s=c,u=ki(u)}return t.set(e,r),r}function k4(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Gl(t)?[]:v4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=zT(t,p,s);return f.top=Un(g.top,f.top),f.right=vi(g.right,f.right),f.bottom=vi(g.bottom,f.bottom),f.left=Un(g.left,f.left),f},zT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function N4(e){const{width:t,height:n}=FT(e);return{width:t,height:n}}function O4(e,t,n){const r=Br(t),s=Fr(t),a=n==="fixed",u=ps(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Dr(0);function f(){d.x=Kl(s)}if(r||!r&&!a)if((po(t)!=="body"||Ua(s))&&(c=Xl(t)),r){const T=ps(t,!0,a,t);d.x=T.x+t.clientLeft,d.y=T.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?UT(s,c):Dr(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 $h(e){return yr(e).position==="static"}function $T(e,t){if(!Br(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fr(e)===n&&(n=n.ownerDocument.body),n}function VT(e,t){const n=Hn(e);if(Gl(e))return n;if(!Br(e)){let s=ki(e);for(;s&&!mo(s);){if(Er(s)&&!$h(s))return s;s=ki(s)}return n}let r=$T(e,t);for(;r&&f4(r)&&$h(r);)r=$T(r,t);return r&&mo(r)&&$h(r)&&!Uh(r)?n:r||E4(e)||n}const P4=function(e){return et(this,null,function*(){const t=this.getOffsetParent||VT,n=this.getDimensions,r=yield n(e.floating);return{reference:O4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function I4(e){return yr(e).direction==="rtl"}const R4={convertOffsetParentRelativeRectToViewportRelativeRect:_4,getDocumentElement:Fr,getClippingRect:k4,getOffsetParent:VT,getElementRects:P4,getClientRects:S4,getDimensions:N4,getScale:go,isElement:Er,isRTL:I4};function qT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L4(e,t){let n=null,r;const s=Fr(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:T}=f;if(c||t(),!b||!T)return;const _=Vl(g),S=Vl(s.clientWidth-(p+b)),v=Vl(s.clientHeight-(g+T)),A=Vl(p),N={rootMargin:-_+"px "+-S+"px "+-v+"px "+-A+"px",threshold:Un(0,vi(1,d))||1};let L=!0;function W(F){const ne=F[0].intersectionRatio;if(ne!==d){if(!L)return u();ne?u(!1,ne):r=setTimeout(()=>{u(!1,1e-7)},1e3)}ne===1&&!qT(f,e.getBoundingClientRect())&&u(),L=!1}try{n=new IntersectionObserver(W,_e(U({},N),{root:s.ownerDocument}))}catch(F){n=new IntersectionObserver(W,N)}n.observe(e)}return u(!0),a}function D4(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=jh(e),p=s||a?[...f?Ha(f):[],...Ha(t)]:[];p.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const g=f&&c?L4(f,n):null;let b=-1,T=null;u&&(T=new ResizeObserver(A=>{let[R]=A;R&&R.target===f&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=T)==null||N.observe(t)})),n()}),f&&!d&&T.observe(f),T.observe(t));let _,S=d?ps(e):null;d&&v();function v(){const A=ps(e);S&&!qT(S,A)&&n(),S=A,_=requestAnimationFrame(v)}return n(),()=>{var A;p.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),g==null||g(),(A=T)==null||A.disconnect(),T=null,d&&cancelAnimationFrame(_)}}const M4=o4,F4=a4,B4=r4,U4=l4,H4=i4,z4=n4,j4=u4,$4=(e,t,n)=>{const r=new Map,s=U({platform:R4},n),a=_e(U({},s.platform),{_c:r});return t4(e,t,_e(U({},s),{platform:a}))};function YT(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 _e(U({},s),{toJSON:()=>s})}function V4(e){if(!e)return YT();const{x:t,y:n,width:r,height:s}=e;return YT(t,n,r,s)}function q4(e,t){return{contextElement:Qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?V4(r):n.getBoundingClientRect()}}}var za=e=>({variable:e,reference:`var(${e})`}),ii={arrowSize:za("--arrow-size"),arrowSizeHalf:za("--arrow-size-half"),arrowBg:za("--arrow-background"),transformOrigin:za("--transform-origin"),arrowOffset:za("--arrow-offset")},Y4=e=>e==="top"||e==="bottom"?"y":"x";function W4(e,t){return{name:"transformOrigin",fn(n){var Te,j,se,te,pe;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=Y4(d),p=((Te=s.arrow)==null?void 0:Te.x)||0,g=((j=s.arrow)==null?void 0:j.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=p+b/2,S=g+T/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),A=u.reference.height/2,R=T/2,N=(pe=(te=e.offset)==null?void 0:te.mainAxis)!=null?pe:e.gutter,L=typeof N=="number"?N+R:N!=null?N:R,W=v>L,F={top:`${_}px calc(100% + ${L}px)`,bottom:`${_}px ${-L}px`,left:`calc(100% + ${L}px) ${S}px`,right:`${-L}px ${S}px`}[d],ne=`${_}px ${u.reference.y+A-c}px`,le=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(ii.transformOrigin.variable,le?ne:F),{data:{transformOrigin:le?ne:F}}}}}var G4={name:"rects",fn({rects:e}){return{data:e}}},X4=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% + ${ii.arrowOffset.reference})`}),{}}}};function K4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var Q4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function WT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Vh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function J4(e,t,n){const r=e||t.createElement("div");return z4({element:r,padding:n.arrowPadding})}function Z4(e,t){var n;if(!_L((n=t.offset)!=null?n:t.gutter))return M4(({placement:r})=>{var p,g,b,T;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}=K4(r),d=c?void 0:t.shift,f=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:d;return mh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function eD(e){if(!e.flip)return;const t=Vh(e.boundary);return B4(_e(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function tD(e){if(!e.slide&&!e.overlap)return;const t=Vh(e.boundary);return F4(_e(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:j4()}))}function nD(e){return U4({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 rD(e){var t;if(e.hideWhenDetached)return H4({strategy:"referenceHidden",boundary:(t=Vh(e.boundary))!=null?t:"clippingAncestors"})}function iD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function sD(e,t,n={}){const r=q4(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},Q4,n),a=t.querySelector("[data-part=arrow]"),u=[Z4(a,s),eD(s),tD(s),J4(a,t.ownerDocument,s),X4(a),W4({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),nD(s),rD(s),G4],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,g=()=>et(null,null,function*(){var L;if(!r||!t)return;const S=yield $4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const v=so(t),A=WT(v,S.x),R=WT(v,S.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${R}px`),s.hideWhenDetached&&(((L=S.middlewareData.hide)==null?void 0:L.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const N=t.firstElementChild;if(N){const W=Fl(N);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),T=iD(s.listeners),_=s.listeners?D4(r,t,b,T):OL;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function GT(e,t,n={}){const c=n,{defer:r}=c,s=on(c,["defer"]),a=r?vn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(sD(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var oD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function aD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ii.arrowSize.reference,height:ii.arrowSize.reference,[ii.arrowSizeHalf.variable]:`calc(${ii.arrowSize.reference} / 2)`,[ii.arrowOffset.variable]:`calc(${ii.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?oD[t.split("-")[0]]:void 0,background:ii.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 Eo=new WeakMap,Ql=new WeakMap,Jl={},qh=0,XT=e=>e&&(e.host||XT(e.parentNode)),uD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=XT(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),lD=new Set(["script","output","status","next-route-announcer"]),cD=e=>lD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),dD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=uD(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=T=>{!T||f.has(T)||(f.add(T),g(T.parentNode))};u.forEach(T=>{g(T),a&&Qt(T)&&iT(T,_=>{g(_)})});const b=T=>{!T||p.has(T)||Array.prototype.forEach.call(T.children,_=>{if(f.has(_))b(_);else try{if(cD(_))return;const v=_.getAttribute(s)==="true",A=(Eo.get(_)||0)+1,R=(c.get(_)||0)+1;Eo.set(_,A),c.set(_,R),d.push(_),A===1&&v&&Ql.set(_,!0),R===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),f.clear(),qh++,()=>{d.forEach(T=>{const _=Eo.get(T)-1,S=c.get(T)-1;Eo.set(T,_),c.set(T,S),_||(Ql.has(T)||T.removeAttribute(s),Ql.delete(T)),S||T.removeAttribute(r)}),qh--,qh||(Eo=new WeakMap,Eo=new WeakMap,Ql=new WeakMap,Jl={})}},fD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,hD=(e,t=fD(e),n="data-aria-hidden",r=!0)=>{if(t)return dD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},pD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function KT(e,t={}){const{defer:n=!0}=t,r=n?pD:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(hD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function mD(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 gD(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 QT="pointerdown.outside",JT="focus.outside";function ED(e){for(const t of e)if(Qt(t)&&ti(t))return!0;return!1}var ZT=e=>"clientY"in e;function yD(e,t){if(!ZT(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 TD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function eb(e,t){if(!t||!ZT(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 TD(u,c)?r||a:!1}function bD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Lr(e),f=so(e),p=mD(f),g=gD(f);function b(N,L){if(!Qt(L)||!L.isConnected||Ml(e,L)||yD(e,N)||c&&rT(e,L))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const ne=wh(W);if(eb(N,ne))return!1}const F=wh(e);return eb(N,F)?!1:!(n!=null&&n(L))}const T=new Set,_=fs(e==null?void 0:e.getRootNode());function S(N){function L(W){var Te,j;const F=u&&!sT()?vn:se=>se(),ne=W!=null?W:N,le=(j=(Te=ne==null?void 0:ne.composedPath)==null?void 0:Te.call(ne))!=null?j:[ne==null?void 0:ne.target];F(()=>{const se=_?le[0]:ei(N);if(!(!e||!b(N,se))){if(s||a){const te=ph(s,a);e.addEventListener(QT,te,{once:!0})}tb(e,QT,{bubbles:!1,cancelable:!0,detail:{originalEvent:ne,contextmenu:u6(ne),focusable:ED(le),target:se}})}})}N.pointerType==="touch"?(T.forEach(W=>W()),T.add(mr(d,"click",L,{once:!0})),T.add(g.addEventListener("click",L,{once:!0})),T.add(p.addEventListener("click",L,{once:!0}))):L()}const v=new Set,A=setTimeout(()=>{v.add(mr(d,"pointerdown",S,!0)),v.add(g.addEventListener("pointerdown",S,!0)),v.add(p.addEventListener("pointerdown",S,!0))},0);function R(N){(u?vn:W=>W())(()=>{var ne,le;const W=(le=(ne=N==null?void 0:N.composedPath)==null?void 0:ne.call(N))!=null?le:[N==null?void 0:N.target],F=_?W[0]:ei(N);if(!(!e||!b(N,F))){if(r||a){const Te=ph(r,a);e.addEventListener(JT,Te,{once:!0})}tb(e,JT,{bubbles:!1,cancelable:!0,detail:{originalEvent:N,contextmenu:!1,focusable:ti(F),target:F}})}})}return sT()||(v.add(mr(d,"focusin",R,!0)),v.add(g.addEventListener("focusin",R,!0)),v.add(p.addEventListener("focusin",R,!0))),()=>{clearTimeout(A),T.forEach(N=>N()),v.forEach(N=>N())}}function _D(e,t){const{defer:n}=t,r=n?vn:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(bD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function tb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function SD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return mr(Lr(e),"keydown",n,{capture:!0})}var nb="layer:request-dismiss",er={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=>er.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];wD(e,nb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),xD(e,nb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function xD(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 wD(e,t,n){e.addEventListener(t,n,{once:!0})}var rb;function ib(){er.layers.forEach(({node:e})=>{e.style.pointerEvents=er.isBelowPointerBlockingLayer(e)?"none":"auto"})}function CD(e){e.style.pointerEvents=""}function AD(e,t){const n=Lr(e),r=[];return er.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(rb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=w6(()=>{const c=s();return Qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ul(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{er.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=rb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function vD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){gh("[@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};er.add(f),ib();function p(S){var A,R;const v=ei(S.detail.originalEvent);er.isBelowPointerBlockingLayer(e)||er.isInBranch(v)||((A=t.onPointerDownOutside)==null||A.call(t,S),(R=t.onInteractOutside)==null||R.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var A,R;const v=ei(S.detail.originalEvent);er.isInBranch(v)||((A=t.onFocusOutside)==null||A.call(t,S),(R=t.onInteractOutside)==null||R.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var v;er.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var N;if(!e)return!1;const v=typeof u=="function"?u():u,A=Array.isArray(v)?v:[v],R=(N=t.persistentElements)==null?void 0:N.map(L=>L()).filter(Qt);return R&&A.push(...R),A.some(L=>Ml(L,S))||er.isInNestedLayer(e,S)}const _=[a?AD(e,t.persistentElements):void 0,SD(e,b),_D(e,{exclude:T,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{er.remove(e),ib(),CD(e),_.forEach(S=>S==null?void 0:S())}}function sb(e,t){const{defer:n}=t,r=n?vn:a=>a(),s=[];return s.push(r(()=>{const a=io(e)?e():e;s.push(vD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var kD=Object.defineProperty,ND=(e,t,n)=>t in e?kD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>ND(e,typeof t!="symbol"?t+"":t,n),ob={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()}},OD=[],PD=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const s=ei(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(Ma(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=>Ma(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}),At(this,"handlePointerDown",r=>{const s=ei(r);if(!(this.findContainerIndex(s,r)>=0)){if($a(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$a(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=ei(r);this.findContainerIndex(s,r)>=0||$a(this.config.clickOutsideDeactivates,r)||$a(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(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;ja(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{ID(r)&&$a(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(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 JL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?ZL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(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)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!ti(r)){const s=oo(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}),At(this,"tryFocus",r=>{if(r!==!1&&r!==oo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,RD(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const s=U({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(),ob.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=()=>{ab(()=>{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}),At(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}),At(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}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),At(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),At(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}),At(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ei(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||ti(u)&&!hs(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=Ma(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else ja(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||ti(u)&&!hs(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=Ma(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else ja(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||OD;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ja(r)&&!r.shiftKey},isKeyBackward(r){return ja(r)&&r.shiftKey}},t);this.doc=n.document||Lr(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=>{XL(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?rT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Da(e,{getShadowRoot:this.config.getShadowRoot}),n=cT(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(Ma(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 T=b+1;T<n.length;T++)if(hs(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(hs(n[T]))return n[T]}}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 ob.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ab(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(mr(this.doc,"focusin",this.handleFocus,!0),mr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),mr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),mr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),mr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),mr(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=oo(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)}},ja=e=>e.key==="Tab",$a=(e,...t)=>typeof e=="function"?e(...t):e,ID=e=>!e.isComposing&&e.key==="Escape",ab=e=>setTimeout(e,0),RD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function ub(e,t={}){let n;const r=vn(()=>{const s=typeof e=="function"?e():e;if(s){n=new PD(s,_e(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Lr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Yh="data-scroll-lock";function LD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function lb(e){const t=Fl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function cb(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Yh))return;const u=lb(r)||lb(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Yh,"");const d=()=>S6(r,"--scrollbar-width",`${c}px`),f=LD(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ul(s,_)},g=()=>{var W,F;const{scrollX:_,scrollY:S,visualViewport:v}=n,A=(W=v==null?void 0:v.offsetLeft)!=null?W:0,R=(F=v==null?void 0:v.offsetTop)!=null?F:0,N={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(R))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(N[f]=`${c}px`);const L=Ul(s,N);return()=>{L==null||L(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),oT()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(Yh)}}var DD=co("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Ur=DD.build(),db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},fb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Wh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},MD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Gh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},FD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},pb=e=>e.getById(db(e)),yo=e=>e.getById(fb(e)),To=e=>e.getById(Wh(e)),mb=e=>e.getById(hb(e)),BD=e=>e.getById(Gh(e)),UD=e=>e.getById(Xh(e));function HD(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=aD(_e(U({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(T){n.matches("open")!==T&&s({type:T?"OPEN":"CLOSE"})},reposition(T={}){s({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(_e(U({id:MD(c)},Ur.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(_e(U({},Ur.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(_e(U({},Ur.anchor.attrs),{dir:u("dir"),id:db(c)}))},getTriggerProps(){return t.button(_e(U({},Ur.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:fb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Wh(c),onPointerDown(T){a6(T)&&s6()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||s({type:"TOGGLE"})},onBlur(T){s({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(_e(U({},Ur.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(_e(U({id:hb(c)},Ur.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(_e(U({},Ur.content.attrs),{dir:u("dir"),id:Wh(c),tabIndex:-1,role:"dialog","aria-modal":DL(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":LL(d),"aria-labelledby":g.title?Gh(c):void 0,"aria-describedby":g.description?Xh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(_e(U({},Ur.title.attrs),{id:Gh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(_e(U({},Ur.description.attrs),{id:Xh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(_e(U({},Ur.closeTrigger.attrs),{dir:u("dir"),id:FD(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),s({type:"CLOSE"}))}}))}}}var zD={props({props:e}){return _e(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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=pb(n))!=null?a:yo(n);return GT(r,()=>mb(n),_e(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>To(n);let s=!0;return sb(r,{type:"popover",pointerBlocking:t("modal"),exclude:yo(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:_6(()=>To(t),{triggerElement:yo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?KT(()=>[To(t),yo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return cb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?ub(()=>To(t),{initialFocus:()=>dT({root:To(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=pb(n))!=null?u:yo(n);GT(s,()=>mb(n),_e(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){vn(()=>{Object.assign(e.get("renderedElements"),{title:!!BD(t),description:!!UD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||vn(()=>{const n=dT({root:To(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||vn(()=>{const a=yo(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})}}}};Nh()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[zB,Kh]=lo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[jB,gb]=lo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),jD=e=>{const t=z.useId(),{getRootNode:n}=Kh(),{dir:r}=gb(),s=U({id:t,dir:r,getRootNode:n},e),a=Oh(zD,s);return HD(a,_T)},$D=e=>{const[t,u]=AT(e),c=u,{children:n}=c,r=on(c,["children"]),s=jD(r),a=Rh(gr({present:s.open},t));return w.jsx(B6,{value:s,children:w.jsx(ST,{value:a,children:n})})},Eb=z.forwardRef((e,t)=>{const n=Ih(),r=Fa(),s=gr(_e(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(Ai.button,_e(U({},s),{ref:t}))});Eb.displayName="PopoverTrigger";function VD(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 qD(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 YD(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 WD(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 yb(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 GD=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=Kn(),r=()=>{n(),e()};return w.jsxs("button",{className:X(`${$}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[w.jsx(yb,{}),"Clear chat"]})},XD=({className:e,componentType:t,children:n})=>{const[r,s]=z.useState(!1),{globalClassName:a}=ht(),u=()=>{s(!1)},c=d=>{s(d.open)};return w.jsxs($D,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[w.jsx(Eb,{"aria-label":`Overflow menu for ${t}`,className:X(`${$}-overflow-menu-button-trigger`,`${$}-icon-button`,a,e,t),children:w.jsx(WD,{})}),w.jsx(wT,{children:w.jsxs(xT,{className:X(`${$}-overflow-menu-list`,a,t),children:[n,w.jsx(GD,{componentType:t,onClearChat:u})]})})]})};function Tb(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 bb(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 _b=r=>{var s=r,{onClearChat:e,componentType:t}=s,n=on(s,["onClearChat","componentType"]);const{globalClassName:a}=ht(),{resetConversation:u}=Kn(),c=()=>{u(),e==null||e()};return w.jsx(Or,U({icon:w.jsx(yb,{size:"16px"}),ariaLabel:"Clear Chat",className:X(a,`${$}-clear-chat-icon-button`,t),onClick:c},n))},Sb=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ht();if(!r)return null;const s=()=>{yi(!1),nl(!0)};return t?w.jsx(Or,{className:X(n,`${$}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(c1,{})}):w.jsxs("button",{className:X(n,`${$}-overflow-menu-button`,`${$}-toggle-minimize-button`,e),onClick:s,children:[w.jsx(c1,{}),"Minimize"]})},xb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ht(),r=()=>{rl("modal")};return t?w.jsx(Or,{className:X(n,`${$}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:w.jsx(bb,{})}):w.jsxs("button",{className:X(n,`${$}-overflow-menu-button`,`${$}-toggle-modal-button`,e),onClick:r,children:[w.jsx(bb,{}),"Show modal"]})},KD=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=ht(),{askCimPrompts:s,messages:a}=Xn(),{isLoading:u,handleSuggestion:c}=Kn(),d=z.useMemo(()=>{const b=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return a.some(_=>_.name==="conversation_reset")&&r||b},[a,n,r]),f=((g=s.message)==null?void 0:g.suggestions)||[],p=(b,T)=>()=>{c(b,T)};return w.jsxs("div",{className:X(t,`${$}-ask-cim-entry-message`,`${$}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:X(t,`${$}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:X(t,`${$}-ask-cim-suggestions-container`,`${$}-suggestion-container`,e?"standalone":"embedded"),children:f.map(b=>{var T;return w.jsx(ul,{disabled:u,className:X(t,`${$}-ask-cim-suggestion-button`,`${$}-suggestion-button`,e?"standalone":"embedded"),onClick:p(b,((T=s.message)==null?void 0:T.eventSourceId)||""),children:b.displayText},b.displayText)})})]})},QD=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=ht();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:X(r,`${$}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:X(r,`${$}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:X(r,`${$}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:X(r,`${$}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:X(r,`${$}-product-tile-content`),children:[u&&w.jsx("p",{className:`${$}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:X(r,`${$}-product-tile-pdp`),href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:X(r,`${$}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:X(r,`${$}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:X(r,`${$}-product-tile-footer`),children:w.jsx("p",{className:X(r,`${$}-product-tile-price`),children:c})})]})]})},JD=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ht(),s=t;return n?w.jsxs("div",{className:X(r,`${$}-display-products widget-message`),children:[w.jsx("p",{children:s.message}),s.products&&s.products.length>0&&w.jsx("div",{className:X(r,`${$}-product-list`,{embedded:!e,standalone:e}),children:s.products.map(a=>{const u=n.getPid(a);return w.jsx(QD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},ZD=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:X(e,`${$}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:X(e,`${$}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(Ov,{})," ",t.message||"An error occurred while processing your request."]})});function e5(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 t5=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:s,handleSuggestionClick:a})=>w.jsx("div",{className:X(e,`${$}-suggestion-container standalone`),children:s.map(u=>w.jsxs(ul,{disabled:r,className:X(e,`${$}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[w.jsx(e5,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),n5=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var b;const{isLoading:a}=Kn(),{messages:u}=Xn(),c=u.find(T=>T.id===n.eventSourceId),d=!!c,f=((b=c==null?void 0:c.name)==null?void 0:b.replace("_suggestions",""))||"",p=d?Nw(f):null,g=d&&(p===t||t==="ask_cim");return w.jsxs("div",{className:X(e,`${$}-follow-up`),children:[w.jsx("p",{className:X(e,`${$}-text`),children:n.message}),r&&w.jsx(t5,{globalClassName:e,isLoading:a||!d||!g,messageId:n.id,messageEventSourceId:n.eventSourceId,suggestions:n.suggestions,handleSuggestionClick:s}),!r&&w.jsx("div",{className:X(e,`${$}-suggestion-container embedded`),children:n.suggestions.map(T=>w.jsx("button",{disabled:a||!d||!g,className:X(e,`${$}-suggestion-button embedded`),onClick:()=>s(T,n.eventSourceId||n.id),children:T.displayText},T.displayText))})]})};function wb(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 r5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i5(e,t,n){const s=Tl((n||{}).ignore||[]),a=s5(t);let u=-1;for(;++u<a.length;)SE(e,"text",c);function c(f,p){let g=-1,b;for(;++g<p.length;){const T=p[g],_=b?b.children:void 0;if(s(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return d(f,p)}function d(f,p){const g=p[p.length-1],b=a[u][0],T=a[u][1];let _=0;const v=g.children.indexOf(f);let A=!1,R=[];b.lastIndex=0;let N=b.exec(f.value);for(;N;){const L=N.index,W={index:N.index,input:N.input,stack:[...p,f]};let F=T(...N,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=L+1:(_!==L&&R.push({type:"text",value:f.value.slice(_,L)}),Array.isArray(F)?R.push(...F):F&&R.push(F),_=L+N[0].length,A=!0),!b.global)break;N=b.exec(f.value)}return A?(_<f.value.length&&R.push({type:"text",value:f.value.slice(_)}),g.children.splice(v,1,...R)):R=[f],v+R.length}}function s5(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([o5(s[0]),a5(s[1])])}return t}function o5(e){return typeof e=="string"?new RegExp(r5(e),"g"):e}function a5(e){return typeof e=="function"?e:function(){return e}}const Qh="phrasing",Jh=["autolink","link","image","label"];function u5(){return{transforms:[m5],enter:{literalAutolink:c5,literalAutolinkEmail:Zh,literalAutolinkHttp:Zh,literalAutolinkWww:Zh},exit:{literalAutolink:p5,literalAutolinkEmail:h5,literalAutolinkHttp:d5,literalAutolinkWww:f5}}}function l5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qh,notInConstruct:Jh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qh,notInConstruct:Jh},{character:":",before:"[ps]",after:"\\/",inConstruct:Qh,notInConstruct:Jh}]}}function c5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zh(e){this.config.enter.autolinkProtocol.call(this,e)}function d5(e){this.config.exit.autolinkProtocol.call(this,e)}function f5(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 h5(e){this.config.exit.autolinkEmail.call(this,e)}function p5(e){this.exit(e)}function m5(e){i5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,g5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),E5]],{ignore:["link","linkReference"]})}function g5(e,t,n,r,s){let a="";if(!Cb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!y5(n)))return!1;const u=T5(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 E5(e,t,n,r){return!Cb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function y5(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 T5(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=wb(e,"(");let a=wb(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 Cb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ss(n)||fl(n))&&(!t||n!==47)}Ab.peek=k5;function b5(){this.buffer()}function _5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function S5(){this.buffer()}function x5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function w5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function C5(e){this.exit(e)}function A5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function v5(e){this.exit(e)}function k5(){return"["}function Ab(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 N5(){return{enter:{gfmFootnoteCallString:b5,gfmFootnoteCall:_5,gfmFootnoteDefinitionLabelString:S5,gfmFootnoteDefinition:x5},exit:{gfmFootnoteCallString:w5,gfmFootnoteCall:C5,gfmFootnoteDefinitionLabelString:A5,gfmFootnoteDefinition:v5}}}function O5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ab},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?vb:P5))),f(),d}}function P5(e,t,n){return t===0?e:vb(e,t,n)}function vb(e,t,n){return(n?"":" ")+e}const I5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kb.peek=F5;function R5(){return{canContainEols:["delete"],enter:{strikethrough:D5},exit:{strikethrough:M5}}}function L5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:I5}],handlers:{delete:kb}}}function D5(e){this.enter({type:"delete",children:[]},e)}function M5(e){this.exit(e)}function kb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,_e(U({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function F5(){return"~"}function B5(e){return e.length}function U5(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||B5,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],v=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const R=H5(e[p][A]);if(n.alignDelimiters!==!1){const N=s(R);v[A]=N,(d[A]===void 0||N>d[A])&&(d[A]=N)}S.push(R)}u[p]=S,c[p]=v}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)a[g]=Nb(r[g]);else{const S=Nb(r);for(;++g<f;)a[g]=S}g=-1;const b=[],T=[];for(;++g<f;){const S=a[g];let v="",A="";S===99?(v=":",A=":"):S===108?v=":":S===114&&(A=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[g]-v.length-A.length);const N=v+"-".repeat(R)+A;n.alignDelimiters!==!1&&(R=v.length+R+A.length,R>d[g]&&(d[g]=R),T[g]=R),b[g]=N}u.splice(1,0,b),c.splice(1,0,T),p=-1;const _=[];for(;++p<u.length;){const S=u[p],v=c[p];g=-1;const A=[];for(;++g<f;){const R=S[g]||"";let N="",L="";if(n.alignDelimiters!==!1){const W=d[g]-(v[g]||0),F=a[g];F===114?N=" ".repeat(W):F===99?W%2?(N=" ".repeat(W/2+.5),L=" ".repeat(W/2-.5)):(N=" ".repeat(W/2),L=N):L=" ".repeat(W)}n.delimiterStart!==!1&&!g&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||g)&&A.push(" "),n.alignDelimiters!==!1&&A.push(N),A.push(R),n.alignDelimiters!==!1&&A.push(L),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
|
|
33
|
-
`)}function H5(e){return e==null?"":String(e)}function Nb(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 z5(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()),j5);return s(),u}function j5(e,t,n){return">"+(n?"":" ")+e}function $5(e,t){return Ob(e,t.inConstruct,!0)&&!Ob(e,t.notInConstruct,!1)}function Ob(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 Pb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
34
|
-
`&&$5(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
-
`}function V5(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 q5(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 Y5(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 W5(e,t,n,r){const s=Y5(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(q5(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,G5);return g(),b}const c=n.createTracker(r),d=s.repeat(Math.max(V5(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,U({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,U({before:p,after:`
|
|
29
|
+
`}),n}function zE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jE(e,t){const n=XO(e,t),r=n.one(e,void 0),s=UO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
30
|
+
`},s),a}function eI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const s=jE(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return jE(n,F({file:r},e||t))}}function $E(e){if(e)throw e}var eh,VE;function tI(){if(VE)return eh;VE=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 eh=function d(){var f,p,g,b,y,_,S=arguments[0],A=1,v=arguments.length,P=!1;for(typeof S=="boolean"&&(P=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<v;++A)if(f=arguments[A],f!=null)for(p in f)g=c(S,p),b=c(f,p),S!==b&&(P&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=g&&s(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(P,_,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},eh}var nI=tI();const th=ze(nI);function nh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function rI(){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?iI(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 iI(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 Mr={basename:sI,dirname:oI,extname:aI,join:uI,sep:"/"};function sI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pa(e);let n=0,r=-1,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 oI(e){if(Pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function aI(e){Pa(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 uI(...e){let t=-1,n;for(;++t<e.length;)Pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":lI(n)}function lI(e){Pa(e);const t=e.codePointAt(0)===47;let n=cI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function cI(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 Pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dI={cwd:fI};function fI(){return"/"}function rh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hI(e){if(typeof e=="string")e=new URL(e);else if(!rh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return pI(e)}function pI(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 ih=["history","path","basename","stem","extname","dirname"];class qE{constructor(t){let n;t?rh(t)?n={path:t}:typeof t=="string"||mI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":dI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ih.length;){const a=ih[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ih.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Mr.basename(this.path):void 0}set basename(t){oh(t,"basename"),sh(t,"basename"),this.path=Mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mr.dirname(this.path):void 0}set dirname(t){YE(this.basename,"dirname"),this.path=Mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),YE(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=Mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rh(t)&&(t=hI(t)),oh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mr.basename(this.path,this.extname):void 0}set stem(t){oh(t,"stem"),sh(t,"stem"),this.path=Mr.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 fn(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 sh(e,t){if(e&&e.includes(Mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mr.sep+"`")}function oh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function YE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),EI={}.hasOwnProperty;class ah extends gI{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=rI()}copy(){const t=new ah;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(th(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ch("data",this.frozen),this.namespace[t]=n,this):EI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const 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=Rl(t),r=this.parser||this.Parser;return uh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),uh("process",this.parser||this.Parser),lh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=Rl(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);bI(_)?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(),uh("processSync",this.parser||this.Parser),lh("processSync",this.compiler||this.Compiler),this.process(t,s),WE("processSync","process",n),r;function s(a,u){n=!0,$E(a),r=u}}run(t,n,r){GE(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=Rl(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),WE("runSync","run",r),s;function a(u,c){$E(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Rl(n),s=this.compiler||this.Compiler;return lh("stringify",s),GE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...g]=f;d(p,g)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=th(!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];nh(S)&&nh(y)&&(y=th(!0,S,y)),r[b]=[f,y,..._]}}}}const yI=new ah().freeze();function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ch(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GE(e){if(!nh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function WE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rl(e){return TI(e)?e:new qE(e)}function TI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bI(e){return typeof e=="string"||_I(e)}function _I(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",XE=[],KE={allowDangerousHtml:!0},xI=/^(https?|ircs?|mailto|xmpp)$/i,wI=[{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 QE(e){const t=CI(e),n=AI(e);return vI(t.runSync(t.parse(n),n),e)}function CI(e){const t=e.rehypePlugins||XE,n=e.remarkPlugins||XE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),KE):KE;return yI().use(oO).use(n).use(eI,r).use(t)}function AI(e){const t=e.children||"",n=new qE;return typeof t=="string"&&(n.value=t),n}function vI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||kI;for(const p of wI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+SI+p.id,void 0);return Il(e,f),Jk(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 Hf)if(Object.hasOwn(Hf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=Hf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function kI(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||xI.test(e.slice(0,t))?e:""}const JE=/[#.]/g;function NI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){JE.lastIndex=s;const c=JE.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 ZE(e,t,n){const r=n?RI(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=NI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,PI(u))c.unshift(u);else for(const[g,b]of Object.entries(u))OI(e,d.properties,g,b)}for(const f of c)dh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function PI(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 OI(e,t,n,r){const s=Lf(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=$1(r):s.commaSeparated?a=P1(r):s.commaOrSpaceSeparated?a=$1(P1(r).join(" ")):a=ey(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?II(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ey(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function dh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)dh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?dh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ey(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ba(n)===ba(t)))return!0}return n}function II(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function RI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const LI=["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"],DI=ZE(bl,"div"),MI=ZE(Qs,"g",LI);function FI(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=ty(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=ty(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 ty(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const us={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/"},ny={}.hasOwnProperty,BI=Object.prototype;function UI(e,t){const n=t||{};return fh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Qs:bl,verbose:n.verbose||!1},e)}function fh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ll(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:ry(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=FI(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"},Ll(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ll(e,r,n),n}default:return n=HI(e,t),n}}function ry(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=fh(e,t[n]);r.push(s)}return r}function HI(e,t){const n=e.schema;e.schema=t.namespaceURI===us.svg?Qs:bl;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ny.call(BI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?MI:DI)(t.tagName,s,ry(e,t.childNodes));if(Ll(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&no(d.startTag),p=d&&d.endTag&&no(d.endTag),g=fh(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function Ll(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=zI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function zI(e,t,n){const r=no(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)ny.call(n.attrs,u)&&(a[Lf(e.schema,u).property]=no(n.attrs[u]));n.startTag;const c=no(n.startTag),d=n.endTag?no(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function no(e){const t=iy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=iy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function iy(e){return e.line&&e.column?e:void 0}class Oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oa.prototype.property={},Oa.prototype.normal={},Oa.prototype.space=null;function sy(e,t){const n={},r={};let s=-1;for(;++s<e.length;)Object.assign(n,e[s].property),Object.assign(r,e[s].normal);return new Oa(n,r,t)}function hh(e){return e.toLowerCase()}class tr{constructor(t,n){this.property=t,this.attribute=n}}tr.prototype.space=null,tr.prototype.boolean=!1,tr.prototype.booleanish=!1,tr.prototype.overloadedBoolean=!1,tr.prototype.number=!1,tr.prototype.commaSeparated=!1,tr.prototype.spaceSeparated=!1,tr.prototype.commaOrSpaceSeparated=!1,tr.prototype.mustUseProperty=!1,tr.prototype.defined=!1;let jI=0;const Ye=ls(),jt=ls(),oy=ls(),Ee=ls(),yt=ls(),ro=ls(),jn=ls();function ls(){return ea(2,++jI)}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:jt,commaOrSpaceSeparated:jn,commaSeparated:ro,number:Ee,overloadedBoolean:oy,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(ph);class gh extends tr{constructor(t,n,r,s){let a=-1;if(super(t,n),ay(this,"space",s),typeof r=="number")for(;++a<mh.length;){const u=mh[a];ay(this,mh[a],(r&ph[u])===ph[u])}}}gh.prototype.defined=!0;function ay(e,t,n){n&&(e[t]=n)}const $I={}.hasOwnProperty;function io(e){const t={},n={};let r;for(r in e.properties)if($I.call(e.properties,r)){const s=e.properties[r],a=new gh(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hh(r)]=r,n[hh(a.attribute)]=r}return new Oa(t,n,e.space)}const uy=io({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}}),ly=io({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function cy(e,t){return t in e?e[t]:t}function dy(e,t){return cy(e,t.toLowerCase())}const fy=io({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:dy,properties:{xmlns:null,xmlnsXLink:null}}),hy=io({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:yt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:yt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),VI=io({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:dy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ro,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:yt,autoFocus:Ye,autoPlay:Ye,blocking:yt,capture:null,charSet:null,checked:Ye,cite:null,className:yt,cols:Ee,colSpan:null,content:null,contentEditable:jt,controls:Ye,controlsList:yt,coords:Ee|ro,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:oy,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:yt,height:Ee,hidden:Ye,high:Ee,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ye,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:Ee,pattern:null,ping:yt,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:yt,required:Ye,reversed:Ye,rows:Ee,rowSpan:Ee,sandbox:yt,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),qI=io({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:cy,properties:{about:jn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ro,g2:ro,glyphName:ro,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),YI=/^data[-\w.:]+$/i,py=/-[a-z]/g,GI=/[A-Z]/g;function WI(e,t){const n=hh(t);let r=t,s=tr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&YI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(py,KI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!py.test(a)){let u=a.replace(GI,XI);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=gh}return new s(r,t)}function XI(e){return"-"+e.toLowerCase()}function KI(e){return e.charAt(1).toUpperCase()}const QI=sy([ly,uy,fy,hy,VI],"html"),my=sy([ly,uy,fy,hy,qI],"svg"),gy={}.hasOwnProperty;function Ey(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&gy.call(s,e)){const d=String(s[e]);u=gy.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 JI={},ZI={}.hasOwnProperty,yy=Ey("type",{handlers:{root:t3,element:o3,text:i3,comment:s3,doctype:r3}});function e3(e,t){const r=(t||JI).space;return yy(e,r==="svg"?my:QI)}function t3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Eh(e.children,n,t),so(e,n),n}function n3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Eh(e.children,n,t),so(e,n),n}function r3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return so(e,t),t}function i3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return so(e,t),t}function s3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return so(e,t),t}function o3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=my);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&ZI.call(e.properties,a)){const d=a3(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:us[u],childNodes:[],parentNode:null};return c.childNodes=Eh(e.children,c,r),so(e,c),e.tagName==="template"&&e.content&&(c.content=n3(e.content,r)),c}function a3(e,t,n){const r=WI(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?O1(n):V1(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=us[r.space]}return s}function Eh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=yy(e[r],n);a.parentNode=t,s.push(a)}return s}function so(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 u3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],l3=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]),wt="�";var N;(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"})(N||(N={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ty(e){return e>=55296&&e<=57343}function c3(e){return e>=56320&&e<=57343}function d3(e,t){return(e-55296)*1024+9216+t}function by(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _y(e){return e>=64976&&e<=65007||l3.has(e)}var Z;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Z||(Z={}));const f3=65536;class h3{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=f3,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(c3(n))return this.pos++,this._addGap(),d3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(Z.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ty(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){by(t)?this._err(Z.controlCharacterInInputStream):_y(t)&&this._err(Z.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function Sy(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 p3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),m3=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 g3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=m3.get(e))!==null&&t!==void 0?t:e}var Kt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Kt||(Kt={}));const E3=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function yh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function y3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function T3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||yh(e)}function b3(e){return e===Kt.EQUALS||T3(e)}var Qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Qt||(Qt={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class _3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|E3)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,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(yh(s)||y3(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(yh(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(g3(this.result),this.consumed),this.errors&&(t!==Kt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=S3(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||b3(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.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]&wi.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]&~wi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function S3(e,t,n,r){const s=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.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 ae;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ae||(ae={}));var cs;(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"})(cs||(cs={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var G;(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"})(G||(G={}));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 x3=new Map([[G.A,m.A],[G.ADDRESS,m.ADDRESS],[G.ANNOTATION_XML,m.ANNOTATION_XML],[G.APPLET,m.APPLET],[G.AREA,m.AREA],[G.ARTICLE,m.ARTICLE],[G.ASIDE,m.ASIDE],[G.B,m.B],[G.BASE,m.BASE],[G.BASEFONT,m.BASEFONT],[G.BGSOUND,m.BGSOUND],[G.BIG,m.BIG],[G.BLOCKQUOTE,m.BLOCKQUOTE],[G.BODY,m.BODY],[G.BR,m.BR],[G.BUTTON,m.BUTTON],[G.CAPTION,m.CAPTION],[G.CENTER,m.CENTER],[G.CODE,m.CODE],[G.COL,m.COL],[G.COLGROUP,m.COLGROUP],[G.DD,m.DD],[G.DESC,m.DESC],[G.DETAILS,m.DETAILS],[G.DIALOG,m.DIALOG],[G.DIR,m.DIR],[G.DIV,m.DIV],[G.DL,m.DL],[G.DT,m.DT],[G.EM,m.EM],[G.EMBED,m.EMBED],[G.FIELDSET,m.FIELDSET],[G.FIGCAPTION,m.FIGCAPTION],[G.FIGURE,m.FIGURE],[G.FONT,m.FONT],[G.FOOTER,m.FOOTER],[G.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[G.FORM,m.FORM],[G.FRAME,m.FRAME],[G.FRAMESET,m.FRAMESET],[G.H1,m.H1],[G.H2,m.H2],[G.H3,m.H3],[G.H4,m.H4],[G.H5,m.H5],[G.H6,m.H6],[G.HEAD,m.HEAD],[G.HEADER,m.HEADER],[G.HGROUP,m.HGROUP],[G.HR,m.HR],[G.HTML,m.HTML],[G.I,m.I],[G.IMG,m.IMG],[G.IMAGE,m.IMAGE],[G.INPUT,m.INPUT],[G.IFRAME,m.IFRAME],[G.KEYGEN,m.KEYGEN],[G.LABEL,m.LABEL],[G.LI,m.LI],[G.LINK,m.LINK],[G.LISTING,m.LISTING],[G.MAIN,m.MAIN],[G.MALIGNMARK,m.MALIGNMARK],[G.MARQUEE,m.MARQUEE],[G.MATH,m.MATH],[G.MENU,m.MENU],[G.META,m.META],[G.MGLYPH,m.MGLYPH],[G.MI,m.MI],[G.MO,m.MO],[G.MN,m.MN],[G.MS,m.MS],[G.MTEXT,m.MTEXT],[G.NAV,m.NAV],[G.NOBR,m.NOBR],[G.NOFRAMES,m.NOFRAMES],[G.NOEMBED,m.NOEMBED],[G.NOSCRIPT,m.NOSCRIPT],[G.OBJECT,m.OBJECT],[G.OL,m.OL],[G.OPTGROUP,m.OPTGROUP],[G.OPTION,m.OPTION],[G.P,m.P],[G.PARAM,m.PARAM],[G.PLAINTEXT,m.PLAINTEXT],[G.PRE,m.PRE],[G.RB,m.RB],[G.RP,m.RP],[G.RT,m.RT],[G.RTC,m.RTC],[G.RUBY,m.RUBY],[G.S,m.S],[G.SCRIPT,m.SCRIPT],[G.SEARCH,m.SEARCH],[G.SECTION,m.SECTION],[G.SELECT,m.SELECT],[G.SOURCE,m.SOURCE],[G.SMALL,m.SMALL],[G.SPAN,m.SPAN],[G.STRIKE,m.STRIKE],[G.STRONG,m.STRONG],[G.STYLE,m.STYLE],[G.SUB,m.SUB],[G.SUMMARY,m.SUMMARY],[G.SUP,m.SUP],[G.TABLE,m.TABLE],[G.TBODY,m.TBODY],[G.TEMPLATE,m.TEMPLATE],[G.TEXTAREA,m.TEXTAREA],[G.TFOOT,m.TFOOT],[G.TD,m.TD],[G.TH,m.TH],[G.THEAD,m.THEAD],[G.TITLE,m.TITLE],[G.TR,m.TR],[G.TRACK,m.TRACK],[G.TT,m.TT],[G.U,m.U],[G.UL,m.UL],[G.SVG,m.SVG],[G.VAR,m.VAR],[G.WBR,m.WBR],[G.XMP,m.XMP]]);function oo(e){var t;return(t=x3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,w3={[ae.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},Th=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const Dt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function C3(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ia(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function A3(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Ci(e){return A3(e)||Ia(e)}function xy(e){return Ci(e)||C3(e)}function Dl(e){return e+32}function wy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function Cy(e){return wy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function v3(e){return e===N.NULL?Z.nullCharacterReference:e>1114111?Z.characterReferenceOutsideUnicodeRange:Ty(e)?Z.surrogateCharacterReference:_y(e)?Z.noncharacterCharacterReference:by(e)||e===N.CARRIAGE_RETURN?Z.controlCharacterReference:null}class k3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _3(p3,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=v3(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:Ke.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Sy(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(Z.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=oo(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Z.endTagWithAttributes),t.selfClosing&&this._err(Z.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=wy(t)?Ke.WHITESPACE_CHARACTER:t===N.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ci(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(Z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ci(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(Z.missingEndTagName),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.tagName+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Dl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ci(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ci(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ci(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ci(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ci(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Cy(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Cy(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(Z.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(Z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Dl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(Z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(Z.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=wt;break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(Z.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Z.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(Z.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Dl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(Z.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.name+=wt;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Dl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Z.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.NULL:{this._err(Z.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(Z.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&xy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){xy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(Z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ay=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),vy=new Set([...Ay,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Ml=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),N3=new Set([...Ml,m.OL,m.UL]),P3=new Set([...Ml,m.BUTTON]),ky=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Ny=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),O3=new Set([m.TR,m.TEMPLATE,m.HTML]),I3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),R3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),L3=new Set([m.TD,m.TH]);class D3{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ae.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==ae.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Th,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(L3,ae.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(R3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(I3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(O3,ae.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ae.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ae.SVG:{if(Ny.has(s))return!1;break}case ae.MATHML:{if(ky.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ml)}hasInListItemScope(t){return this.hasInDynamicScope(t,N3)}hasInButtonScope(t){return this.hasInDynamicScope(t,P3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(Th.has(n))return!0;if(Ml.has(n))return!1;break}case ae.SVG:{if(Ny.has(n))return!1;break}case ae.MATHML:{if(ky.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ae.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ay.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&vy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&vy.has(this.currentTagId);)this.pop()}}const bh=3;var Fr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Fr||(Fr={}));const Py={type:Fr.Marker};class M3{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===Fr.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<bh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<bh)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>=bh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Py)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Fr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Fr.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(Py);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Fr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Fr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Fr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.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)}},Oy="html",F3="about:legacy-compat",B3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Iy=["+//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//"],U3=[...Iy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],H3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ry=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],z3=[...Ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ly(e,t){return t.some(n=>e.startsWith(n))}function j3(e){return e.name===Oy&&e.publicId===null&&(e.systemId===null||e.systemId===F3)}function $3(e){if(e.name!==Oy)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===B3)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),H3.has(n))return nr.QUIRKS;let r=t===null?U3:Iy;if(Ly(n,r))return nr.QUIRKS;if(r=t===null?Ry:z3,Ly(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const Dy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},V3="definitionurl",q3="definitionURL",Y3=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])),G3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),W3=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])),X3=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 K3(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===cs.COLOR||r===cs.SIZE||r===cs.FACE)||X3.has(t)}function My(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===V3){e.attrs[t].name=q3;break}}function Fy(e){for(let t=0;t<e.attrs.length;t++){const n=Y3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function _h(e){for(let t=0;t<e.attrs.length;t++){const n=G3.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 Q3(e){const t=W3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=oo(e.tagName))}function J3(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function Z3(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===cs.ENCODING){const s=n[r].value.toLowerCase();return s===Dy.TEXT_HTML||s===Dy.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function eR(e,t,n,r){return(!r||r===ae.HTML)&&Z3(e,t,n)||(!r||r===ae.MATHML)&&J3(e,t)}const tR="hidden",nR=8,rR=3;var L;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(L||(L={}));const iR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},By=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),Uy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class Hy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},Uy),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new k3(this.options,this),this.activeFormattingElements=new M3(this.treeAdapter),this.fragmentContextID=r?oo(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new D3(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({},Uy),n);t!=null||(t=r.treeAdapter.createElement(G.TEMPLATE,ae.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:iR,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=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)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=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&&me(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,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(G.HTML,ae.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const 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===Ke.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)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return eR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Fr.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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return By.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ae.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return w3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){LL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{jy(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Ky(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){RL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_COLUMN_GROUP:{Ul(this,t);break}case L.AFTER_BODY:{jl(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{xh(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.AFTER_BODY:{dR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{fR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{hR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,Z.misplacedDoctype);break}case L.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?DL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{pR(this,t);break}case L.BEFORE_HEAD:{gR(this,t);break}case L.IN_HEAD:{yr(this,t);break}case L.IN_HEAD_NO_SCRIPT:{TR(this,t);break}case L.AFTER_HEAD:{_R(this,t);break}case L.IN_BODY:{pn(this,t);break}case L.IN_TABLE:{ao(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{EL(this,t);break}case L.IN_COLUMN_GROUP:{Ah(this,t);break}case L.IN_TABLE_BODY:{Hl(this,t);break}case L.IN_ROW:{zl(this,t);break}case L.IN_CELL:{bL(this,t);break}case L.IN_SELECT:{Zy(this,t);break}case L.IN_SELECT_IN_TABLE:{SL(this,t);break}case L.IN_TEMPLATE:{wL(this,t);break}case L.AFTER_BODY:{AL(this,t);break}case L.IN_FRAMESET:{vL(this,t);break}case L.AFTER_FRAMESET:{NL(this,t);break}case L.AFTER_AFTER_BODY:{OL(this,t);break}case L.AFTER_AFTER_FRAMESET:{IL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?ML(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{mR(this,t);break}case L.BEFORE_HEAD:{ER(this,t);break}case L.IN_HEAD:{yR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{bR(this,t);break}case L.AFTER_HEAD:{SR(this,t);break}case L.IN_BODY:{Bl(this,t);break}case L.TEXT:{aL(this,t);break}case L.IN_TABLE:{Ua(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{yL(this,t);break}case L.IN_COLUMN_GROUP:{TL(this,t);break}case L.IN_TABLE_BODY:{vh(this,t);break}case L.IN_ROW:{Jy(this,t);break}case L.IN_CELL:{_L(this,t);break}case L.IN_SELECT:{eT(this,t);break}case L.IN_SELECT_IN_TABLE:{xL(this,t);break}case L.IN_TEMPLATE:{CL(this,t);break}case L.AFTER_BODY:{nT(this,t);break}case L.IN_FRAMESET:{kL(this,t);break}case L.AFTER_FRAMESET:{PL(this,t);break}case L.AFTER_AFTER_BODY:{$l(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Wy(this,t);break}case L.TEXT:{uL(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_TEMPLATE:{tT(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{wh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{zy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Xy(this,t);break}}}}function sR(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Gy(e,t),n}function oR(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 aR(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>=rR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=uR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function uR(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 lR(e,t,n){const r=e.treeAdapter.getTagName(t),s=oo(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function cR(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 Sh(e,t){for(let n=0;n<nR;n++){const r=sR(e,t);if(!r)break;const s=oR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=aR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&lR(e,u,a),cR(e,s,r)}}function xh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function dR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function fR(e,t){e._appendCommentNode(t,e.document)}function wh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],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 hR(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:$3(t);j3(t)||e._err(t,Z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Ra(e,t){e._err(t,Z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function pR(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):La(e,t)}function mR(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function gR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Da(e,t)}}function ER(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Da(e,t):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(G.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function yr(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Dt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Dt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=L.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=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function yR(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ma(e,t);break}case m.TEMPLATE:{ds(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function ds(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function TR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{yr(e,t);break}case m.NOSCRIPT:{e._err(t,Z.nestedNoscriptInHead);break}default:Fa(e,t)}}function bR(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Fa(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Ke.EOF?Z.openElementsLeftAfterEof:Z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function _R(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,Z.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),yr(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function SR(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ba(e,t);break}case m.TEMPLATE:{ds(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(G.BODY,m.BODY),e.insertionMode=L.IN_BODY,Fl(e,t)}function Fl(e,t){switch(t.type){case Ke.CHARACTER:{jy(e,t);break}case Ke.WHITESPACE_CHARACTER:{zy(e,t);break}case Ke.COMMENT:{xh(e,t);break}case Ke.START_TAG:{pn(e,t);break}case Ke.END_TAG:{Bl(e,t);break}case Ke.EOF:{Wy(e,t);break}}}function zy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function xR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function CR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function AR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function vR(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,ae.HTML)}function kR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function NR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function PR(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,ae.HTML)}function OR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Dt.PLAINTEXT}function IR(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function RR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(Sh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function LR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function DR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Sh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function MR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function FR(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function $y(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Vy(e){const t=Sy(e,cs.TYPE);return t!=null&&t.toLowerCase()===tR}function BR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),Vy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function UR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function HR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function zR(e,t){t.tagName=G.IMG,t.tagID=m.IMG,$y(e,t)}function jR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function $R(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function VR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function qy(e,t){e._switchToTextParsing(t,Dt.RAWTEXT)}function qR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function YR(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function GR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function WR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function XR(e,t){e._reconstructActiveFormattingElements(),My(t),_h(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function KR(e,t){e._reconstructActiveFormattingElements(),Fy(t),_h(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Yy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function pn(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:{LR(e,t);break}case m.A:{RR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{vR(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:{AR(e,t);break}case m.LI:case m.DD:case m.DT:{PR(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{$y(e,t);break}case m.HR:{HR(e,t);break}case m.RB:case m.RTC:{GR(e,t);break}case m.RT:case m.RP:{WR(e,t);break}case m.PRE:case m.LISTING:{kR(e,t);break}case m.XMP:{$R(e,t);break}case m.SVG:{KR(e,t);break}case m.HTML:{xR(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:{yr(e,t);break}case m.BODY:{wR(e,t);break}case m.FORM:{NR(e,t);break}case m.NOBR:{DR(e,t);break}case m.MATH:{XR(e,t);break}case m.TABLE:{FR(e,t);break}case m.INPUT:{BR(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{UR(e,t);break}case m.IMAGE:{zR(e,t);break}case m.BUTTON:{IR(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{MR(e,t);break}case m.IFRAME:{VR(e,t);break}case m.SELECT:{qR(e,t);break}case m.OPTION:case m.OPTGROUP:{YR(e,t);break}case m.NOEMBED:case m.NOFRAMES:{qy(e,t);break}case m.FRAMESET:{CR(e,t);break}case m.TEXTAREA:{jR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?qy(e,t):Yy(e,t);break}case m.PLAINTEXT:{OR(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:Yy(e,t)}}function QR(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function JR(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,nT(e,t))}function ZR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function eL(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 tL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(G.P,m.P),e._closePElement()}function nL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function rL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function iL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function sL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function oL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Gy(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 Bl(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Sh(e,t);break}case m.P:{tL(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:{ZR(e,t);break}case m.LI:{nL(e);break}case m.DD:case m.DT:{rL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{iL(e);break}case m.BR:{oL(e);break}case m.BODY:{QR(e,t);break}case m.HTML:{JR(e,t);break}case m.FORM:{eL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{sL(e,t);break}case m.TEMPLATE:{ds(e,t);break}default:Gy(e,t)}}function Wy(e,t){e.tmplInsertionModeStack.length>0?tT(e,t):wh(e,t)}function aL(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 uL(e,t){e._err(t,Z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&By.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Ky(e,t);break}case Ke.WHITESPACE_CHARACTER:{Xy(e,t);break}}else Ha(e,t)}function lL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function cL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function dL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t)}function fL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function hL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,Hl(e,t)}function pL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function mL(e,t){Vy(t)?e._appendElement(t,ae.HTML):Ha(e,t),t.ackSelfClosing=!0}function gL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ao(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{hL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{yr(e,t);break}case m.COL:{dL(e,t);break}case m.FORM:{gL(e,t);break}case m.TABLE:{pL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{fL(e,t);break}case m.INPUT:{mL(e,t);break}case m.CAPTION:{lL(e,t);break}case m.COLGROUP:{cL(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{ds(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fl(e,t),e.fosterParentingEnabled=n}function Xy(e,t){e.pendingCharacterTokens.push(t)}function Ky(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Qy=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function EL(e,t){const n=t.tagID;Qy.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,ao(e,t)):pn(e,t)}function yL(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===m.TABLE&&Ua(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Bl(e,t)}}function Ah(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{yr(e,t);break}default:Ul(e,t)}}function TL(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{ds(e,t);break}case m.COL:break;default:Ul(e,t)}}function Ul(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function Hl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,m.TR),e.insertionMode=L.IN_ROW,zl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,ao(e,t));break}default:ao(e,t)}}function vh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ua(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Ua(e,t)}}function zl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Hl(e,t));break}default:ao(e,t)}}function Jy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,vh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Ua(e,t)}}function bL(e,t){const n=t.tagID;Qy.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),zl(e,t)):pn(e,t)}function _L(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Jy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Bl(e,t)}}function Zy(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{yr(e,t);break}}}function eT(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:{ds(e,t);break}}}function SL(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)):Zy(e,t)}function xL(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)):eT(e,t)}function wL(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:{yr(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,ao(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,Ah(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,Hl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,zl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,pn(e,t)}}function CL(e,t){t.tagID===m.TEMPLATE&&ds(e,t)}function tT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function AL(e,t){t.tagID===m.HTML?pn(e,t):jl(e,t)}function nT(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else jl(e,t)}function jl(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function vL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{yr(e,t);break}}}function kL(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function NL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{yr(e,t);break}}}function PL(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function OL(e,t){t.tagID===m.HTML?pn(e,t):$l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Fl(e,t)}function IL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{yr(e,t);break}}}function RL(e,t){t.chars=wt,e._insertCharacters(t)}function LL(e,t){e._insertCharacters(t),e.framesetOk=!1}function rT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function DL(e,t){if(K3(t))rT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?My(t):r===ae.SVG&&(Q3(t),Fy(t)),_h(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ML(e,t){if(t.tagID===m.P||t.tagID===m.BR){rT(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ae.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const FL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,BL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),iT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sT(e,t){const n=WL(e),r=Ey("type",{handlers:{root:UL,element:HL,text:zL,comment:aT,doctype:jL,raw:VL},unknown:qL}),s={parser:n?new Hy(iT):Hy.getFragmentParser(void 0,iT),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),uo(s,Dr());const a=n?s.parser.document:s.parser.getFragment(),u=UI(a,{file:s.options.file});return s.stitches&&Il(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 oT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function UL(e,t){oT(e.children,t)}function HL(e,t){YL(e,t),oT(e.children,t),GL(e,t)}function zL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:ja(e)};uo(t,Dr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};uo(t,Dr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function $L(e,t){t.stitches=!0;const n=XL(e);if("children"in e&&"children"in n){const r=sT({type:"root",children:e.children},t.options);n.children=r.children}aT({type:"comment",value:{stitch:n}},t)}function aT(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:ja(e)};uo(t,Dr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function VL(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,uT(t,Dr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(FL,"<$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 qL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))$L(n,t);else{let r="";throw BL.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 uo(e,t){uT(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 uT(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 YL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Dt.PLAINTEXT)return;uo(t,Dr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:us.html;s===us.html&&n==="svg"&&(s=us.svg);const a=e3(me(F({},e),{children:[]}),{space:s===us.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:oo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function GL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&u3.includes(n)||t.parser.tokenizer.state===Dt.PLAINTEXT)return;uo(t,_l(e));const r={type:Ke.END_TAG,tagName:n,tagID:oo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dt.RCDATA||t.parser.tokenizer.state===Dt.RAWTEXT||t.parser.tokenizer.state===Dt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dt.DATA)}function WL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Dr(e)||{line:void 0,column:void 0,offset:void 0},n=_l(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 XL(e){return"children"in e?as(me(F({},e),{children:[]})):as(e)}function lT(e){return function(t,n){return sT(t,me(F({},e),{file:n}))}}const fs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],cT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...fs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...fs],h2:[["className","sr-only"]],img:[...fs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...fs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...fs],table:[...fs],ul:[...fs,["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"]},vi={}.hasOwnProperty;function KL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},cT),t):cT,stack:[]},s=dT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function dT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return QL(e,n);case"doctype":return JL(e,n);case"element":return ZL(e,n);case"root":return e6(e,n);case"text":return t6(e,n)}}}function QL(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return $a(a,t),a}}function JL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function ZL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=fT(e,t.children),s=n6(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&&vi.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 $a(u,t),u}function e6(e,t){const r={type:"root",children:fT(e,t.children)};return $a(r,t),r}function t6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function fT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=dT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function n6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let g=hT(e,mT(a,f),f,p);g==null&&(g=hT(e,mT(u,f),f,p)),g!=null&&(d[f]=g)}if(s&&vi.call(s,n)){const p=s[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function hT(e,t,n,r){return t?Array.isArray(r)?r6(e,t,n,r):pT(e,t,n,r):void 0}function r6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=pT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function pT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&i6(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 i6(e,t,n){const r=e.schema.protocols&&vi.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 $a(e,t){const n=K1(t);t.data&&(e.data=as(t.data)),n&&(e.position=n)}function mT(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 s6(e){return function(t){return KL(t,e)}}const gT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",me(F(F({className:W(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},o6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ft();return!e&&!t?null:w.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?w.jsx(QE,{rehypePlugins:[lT,s6],components:{ul:({children:r})=>w.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(gT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},kh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Zn(),{setImageFile:u}=Ys(),{logger:c,globalClassName:d,searchConfig:f,features:p}=ft(),g=H.useRef(null),b=H.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!s||!1,A=S?"connected":"disconnected",v=t||!S,P=()=>a?new Promise((D,J)=>{const ie=new FileReader;ie.readAsDataURL(a),ie.onload=()=>D(ie.result),ie.onerror=Te=>J(Te)}):Promise.resolve(""),C=D=>et(null,null,function*(){var Te;if(v)return;const J=10*1024*1024,ie=(Te=D.target.files)==null?void 0:Te[0];if(ie){if(ie.size>J){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ie)}}),B=()=>{u(null),b.current&&(b.current.value="")},q=D=>et(null,null,function*(){var Te;D.preventDefault();const J=(((Te=g.current)==null?void 0:Te.value)||"").trim();let ie="";try{ie=yield P()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}J&&(B(),g.current.value="",r(J,ie))});return w.jsxs("div",{className:W(d,e,n,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:W(d,n,`${j}-image-file-preview`),children:[w.jsx("img",{className:W(d,n,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:W(d,n,`${j}-image-file-name`),title:_,children:_}),w.jsx(Nf,{className:W(n,"clear-attachment"),label:"Remove image",onClick:B})]}),w.jsxs("form",{className:W(d,e,n,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:q,children:[w.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,A)}),y&&w.jsxs("div",{role:"button",className:W(d,e,n,v&&"disabled",`${j}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[w.jsx("label",{className:W(d,e,n,v&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(xk,{})}),w.jsx("input",{className:W(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:v,onInput:C})]}),w.jsx("input",{className:W(d,e,n,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(kk,{isLoading:v}),w.jsx(Ck,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),w.jsx(o6,{})]})};function a6(e){return e==null?[]:Array.isArray(e)?e:[e]}var u6=(e,...t)=>e.concat(t),l6=(e,...t)=>e.filter(n=>!t.includes(n)),c6=e=>Array.from(new Set(e));function ET(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function d6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return ET(e,t,{step:-r,loop:s})}var f6=e=>Array.isArray(e),yT=e=>e!=null&&typeof e=="object",h6=e=>yT(e)&&!f6(e),Vl=e=>typeof e=="string",lo=e=>typeof e=="function",p6=e=>e==null,m6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g6=e=>Object.prototype.toString.call(e),TT=Function.prototype.toString,E6=TT.call(Object),y6=e=>{if(!yT(e)||g6(e)!="[object Object]"||_6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=m6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&TT.call(n)==E6},T6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,b6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,_6=e=>T6(e)||b6(e),S6=e=>e(),x6=()=>{},Nh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function w6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:C6,max:A6}=Math,v6=e=>Number.isNaN(e),k6=e=>v6(e)?0:e,bT=(e,t,n)=>C6(A6(k6(e),t),n);function Ph(e){if(!y6(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]=Ph(s))}return n}function Oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function N6(e,t){if(e==null)throw new Error(t())}function P6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var O6=Object.defineProperty,I6=(e,t,n)=>t in e?O6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ih=(e,t,n)=>I6(e,typeof t!="symbol"?t+"":t,n),_T=()=>{},ql=e=>typeof e=="object"&&e!==null,co=e=>e?"":void 0,ST=e=>e?"true":void 0,R6=1,L6=9,D6=11,Jt=e=>ql(e)&&e.nodeType===R6&&typeof e.nodeName=="string",Yl=e=>ql(e)&&e.nodeType===L6,M6=e=>ql(e)&&e===e.window,xT=e=>Jt(e)?e.localName||"":"#document";function F6(e){return["html","body","#document"].includes(xT(e))}var B6=e=>ql(e)&&e.nodeType!==void 0,hs=e=>B6(e)&&e.nodeType===D6&&"host"in e,U6=e=>Jt(e)&&e.localName==="input",H6=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Va(e){if(!e)return!1;const t=e.getRootNode();return po(t)===e}var z6=/(textarea|select)/;function j6(e){if(e==null||!Jt(e))return!1;try{return U6(e)&&e.selectionStart!=null||z6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function fo(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&hs(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Br(e){var t;return Yl(e)?e:M6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $6(e){return Br(e).documentElement}function ho(e){var t,n,r;return hs(e)?ho(e.host):Yl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function po(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 V6(e){if(xT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hs(e)&&e.host||$6(e);return hs(t)?t.host:t}function Rh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yl(t)||hs(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Lh=new WeakMap;function mo(e){return Lh.has(e)||Lh.set(e,ho(e).getComputedStyle(e)),Lh.get(e)}var Dh=new Set(["menu","listbox","dialog","grid","tree","region"]),q6=e=>Dh.has(e),wT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function CT(e,t){const n=new Set,r=Rh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=wT(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&&q6(g)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function AT(e,t){const n=Rh(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=wT(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&&Dh.has(g)&&!b&&(t(p),s(p))}}}};s(e)}function Y6(e){const t=new Set;return AT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function G6(e){const t=e.getAttribute("role");return!!(t&&Dh.has(t))}function W6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function X6(e){var t;return W6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function K6(e){if(!e.id)return!1;const t=Rh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&G6(e))}var Mh=()=>typeof document!="undefined";function Q6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Fh=e=>Mh()&&e.test(Q6()),J6=e=>Mh()&&e.test(navigator.vendor),vT=()=>Mh()&&!!navigator.maxTouchPoints,Z6=()=>Fh(/^iPhone/i),e4=()=>Fh(/^iPad/i)||Bh()&&navigator.maxTouchPoints>1,Gl=()=>Z6()||e4(),t4=()=>Bh()||Gl(),Bh=()=>Fh(/^Mac/i),n4=()=>t4()&&J6(/apple/i);function r4(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 Tr(e){var n;const t=r4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var kT=e=>e.button===0,i4=e=>e.button===2||Bh()&&e.ctrlKey&&e.button===0,s4=e=>"touches"in e&&e.touches.length>0,o4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},NT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function a4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=o4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in NT&&(s=NT[s]),s}function PT(e,t="client"){const n=s4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(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)}},OT=e=>Jt(e)&&e.tagName==="IFRAME",u4=/^(audio|video|details)$/;function IT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var l4=e=>!Number.isNaN(IT(e)),c4=e=>IT(e)<0;function d4(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 RT(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=d4(d,t);if(f){const p=Array.from(f.querySelectorAll(Wl)).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 Wl="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",LT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Wl));(n==!0||n=="if-empty"&&s.length===0)&&Jt(e)&&Ur(e)&&s.unshift(e);const u=[];for(const c of s)if(Ur(c)){if(OT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...LT(d,{getShadowRoot:r}));continue}u.push(c)}return r?RT(u,r,Ur):u};function Ur(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Wl)&&H6(e)}function go(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Wl));n&&ps(e)&&s.unshift(e);const a=[];for(const u of s)if(ps(u)){if(OT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...go(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=RT(a,r,ps);return!u.length&&n?s:u}return!a.length&&n?s:a}function ps(e){return Jt(e)&&e.tabIndex>0?!0:Ur(e)&&!c4(e)}function f4(e,t={}){const n=go(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function h4(e,t={}){const{current:n,getShadowRoot:r}=t,s=go(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:po(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function qa(e){return e.tabIndex<0&&(u4.test(e.localName)||j6(e))&&!l4(e)?0:e.tabIndex}function DT(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=go(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var p4=class M2{constructor(){Ih(this,"id",null),Ih(this,"fn_cleanup"),Ih(this,"cleanup",()=>{this.cancel()})}static create(){return new M2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=p4.create();return t.request(e),t.cleanup}function MT(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 Uh(e){const t=V6(e);return F6(t)?Br(t).body:Jt(t)&&E4(t)?t:Uh(t)}var m4=/auto|scroll|overlay|hidden|clip/,g4=new Set(["inline","contents"]);function E4(e){const t=ho(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return m4.test(n+s+r)&&!g4.has(a)}var Eo="default",Hh="",Xl=new WeakMap;function y4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Gl()?(Eo==="default"&&(Hh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Eo="disabled"):t&&(Xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>T4({target:t,doc:r})}function T4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Gl()){if(Eo!=="disabled")return;Eo="restoring",setTimeout(()=>{MT(()=>{Eo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Hh||""),Hh="",Eo="default")})},300)}else if(t&&Xl.has(t)){const a=Xl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xl.delete(t)}}function b4(e={}){const u=e,{defer:t,target:n}=u,r=rn(u,["defer","target"]),s=t?qt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(y4(me(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function _4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=PT(c),f=Math.sqrt(ea(d.x,2)+ea(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=PT(c);r({point:d,event:c})},u=[Zt(e,"pointermove",s,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),b4({doc:e})];return()=>{u.forEach(c=>c())}}function S4(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]=f4(e,{includeContainer:!0,getShadowRoot:a}),y=h4(c,{current:n,getShadowRoot:a}),_=!g&&!b;f.shiftKey&&Va(y)?(s==null||s(),p=b):f.shiftKey&&(Va(g)||_)?p=n:!f.shiftKey&&Va(n)?(s==null||s(),p=g):!f.shiftKey&&(Va(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function x4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=rn(c,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(S4(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function w4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Kl(e,t){if(!e)return _T;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 C4(e,t,n){if(!e)return _T;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 A4(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 v4(e,t){const{timeout:n,rootNode:r}=t,s=ho(r),a=Br(r),u=new s.AbortController;return A4(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 k4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),N4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,FT=e=>{const t={};let n;for(;n=N4.exec(e);)t[n[1]]=n[2];return t},P4=(e,t)=>{if(Vl(e)){if(Vl(t))return`${e};${t}`;e=FT(e)}else Vl(t)&&(t=FT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=Nh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=k4(t[s],n[s]);continue}if(s==="style"){t[s]=P4(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 eU(e){return e}var yo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(yo||{}),zh="__init__";function O4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Br(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>po(t()),a=u=>t().getElementById(u);return me(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Va,getById:a})}function I4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var To=()=>e=>Array.from(new Set(e)),BT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Ql(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,c=H.useRef(s);c.current=u?e().value:s;const d=H.useRef(c.current);BT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var A,v;const _=d.current,S=lo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(v=(A=e()).onChange)==null||v.call(A,S,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Gs.flushSync:S6)(()=>f(y))},invoke(y,_){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,_)},hash(y){var _,S,A;return(A=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?A:String(y)}}}Ql.cleanup=e=>{H.useEffect(()=>e,[])},Ql.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function R4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var L4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Jl(e,t={}){var ee,ce,he,le,be,Me;const n=H.useMemo(()=>{const{id:de,ids:K,getRootNode:re}=t;return O4({id:de,ids:K,getRootNode:re})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(ce=(ee=e.props)==null?void 0:ee.call(e,{props:Ph(t),scope:n}))!=null?ce:t,a=D4(s),u=(he=e.context)==null?void 0:he.call(e,{prop:a,bindable:Ql,scope:n,flush:HT,getContext(){return d},getComputed(){return q},getRefs(){return S},getEvent(){return y()}}),c=UT(u),d={get(de){var K;return(K=c.current)==null?void 0:K[de].ref.current},set(de,K){var re;(re=c.current)==null||re[de].set(K)},initial(de){var K;return(K=c.current)==null?void 0:K[de].initial},hash(de){var re,k;const K=(re=c.current)==null?void 0:re[de].get();return(k=c.current)==null?void 0:k[de].hash(K)}},f=H.useRef(new Map),p=H.useRef(null),g=H.useRef(null),b=H.useRef({type:""}),y=()=>me(F({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>me(F({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var K,re;return!!((re=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&re.includes(de))}}),S=R4((be=(le=e.refs)==null?void 0:le.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:v,guard:P,track:L4,refs:S,computed:q,flush:HT,scope:n,choose:B}),v=de=>{const K=lo(de)?de(A()):de;if(!K)return;const re=K.map(k=>{var te,O;const M=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[k];return M||Oh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of re)k==null||k(A())},P=de=>{var K,re;return lo(de)?de(A()):(re=(K=e.implementations)==null?void 0:K.guards)==null?void 0:re[de](A())},C=de=>{const K=lo(de)?de(A()):de;if(!K)return;const re=K.map(M=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return te||Oh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),te}),k=[];for(const M of re){const te=M==null?void 0:M(A());te&&k.push(te)}return()=>k.forEach(M=>M==null?void 0:M())},B=de=>a6(de).find(K=>{let re=!K.guard;return Vl(K.guard)?re=!!P(K.guard):lo(K.guard)&&(re=K.guard(A())),re}),q=de=>{N6(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[de];return K({context:d,event:y(),prop:a,refs:S,scope:n,computed:q})},D=Ql(()=>({defaultValue:e.initialState({prop:a}),onChange(de,K){var k,M,te,O;if(K){const _e=f.current.get(K);_e==null||_e(),f.current.delete(K)}K&&v((k=e.states[K])==null?void 0:k.exit),v((M=p.current)==null?void 0:M.actions);const re=C((te=e.states[de])==null?void 0:te.effects);if(re&&f.current.set(de,re),K===zh){v(e.entry);const _e=C(e.effects);_e&&f.current.set(zh,_e)}v((O=e.states[de])==null?void 0:O.entry)}})),J=H.useRef(void 0),ie=H.useRef(yo.NotStarted);BT(()=>{queueMicrotask(()=>{var M;const re=ie.current===yo.Started;ie.current=yo.Started,r(re?"rehydrating...":"initializing...");const k=(M=J.current)!=null?M:D.initial;D.invoke(k,re?D.get():zh)});const de=f.current,K=D.ref.current;return()=>{r("unmounting..."),J.current=K,ie.current=yo.Stopped,de.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const Te=()=>"ref"in D?D.ref.current:D.get(),$=de=>{queueMicrotask(()=>{var O,_e,Oe,Ce,$e;if(ie.current!==yo.Started)return;g.current=b.current,b.current=de;let K=Te();const re=(Oe=(O=e.states[K].on)==null?void 0:O[de.type])!=null?Oe:(_e=e.on)==null?void 0:_e[de.type],k=B(re);if(!k)return;p.current=k;const M=(Ce=k.target)!=null?Ce:K;r("transition",de.type,k.target||K,`(${k.actions})`);const te=M!==K;te?Gs.flushSync(()=>D.set(M)):k.reenter&&!te?D.invoke(K,K):v(($e=k.actions)!=null?$e:[])})};return(Me=e.watch)==null||Me.call(e,A()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:q,event:y(),getStatus:()=>ie.current}}function UT(e){const t=H.useRef(e);return t.current=e,t}function D4(e){const t=UT(e);return function(r){return t.current[r]}}function HT(e){queueMicrotask(()=>{Gs.flushSync(()=>e())})}var jh=I4(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 M4(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 $h=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=rn(f,["asChild","children"]);if(!s)return H.createElement(e,me(F({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const c=H.Children.only(a),d=M4(c);return H.cloneElement(c,me(F({},Yt(u,c.props)),{ref:r?Zl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},mn=(()=>{const e=new Map;return new Proxy($h,{apply(t,n,r){return $h(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,$h(r)),e.get(r)}})})();function F4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ms(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=H.createContext(u);c.displayName=t;function d(){var p;const f=H.useContext(c);if(!f&&n){const g=new Error(a!=null?a:F4(r,s));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[B4,Vh]=ms({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[zT,Ya]=ms({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),jT=H.forwardRef((e,t)=>{const n=Vh(),r=Ya(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},s),{ref:Zl(r.ref,t)}))});jT.displayName="PopoverContent";const $T=H.forwardRef((e,t)=>{const n=Vh(),r=Ya(),s=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},s),{ref:t}))});$T.displayName="PopoverPositioner";const Ga=()=>(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)]),VT=e=>Ga()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function U4(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 H4={props({props:e}){return me(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",mo(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"});qt(()=>{var c,d;const u=ec(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})=>{qt(()=>{e.set("prevAnimationName",ec(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",ec(t.get("styles")))},u=d=>{const f=ec(t.get("styles"));Tr(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=Kl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),MT(()=>c())}}}}};function ec(e){return(e==null?void 0:e.animationName)||"none"}To()(["onExitComplete","present","immediate"]);function z4(e,t={}){const{sync:n=!1}=t,r=j4(e);return H.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 j4(e){const t=H.useRef(e);return t.current=e,t}const qh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=rn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),c=me(F({},a),{present:r,onExitComplete:z4(e.onExitComplete)}),d=Jl(H4,c),f=U4(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 gs=(e,t=[])=>({parts:(...n)=>{if($4(t))return gs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>gs(e,[...t,...n]),omit:(...n)=>gs(e,t.filter(r=>!n.includes(r))),rename:n=>gs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bo(e)}"][data-part="${bo(r)}"]`,`& [data-scope="${bo(e)}"][data-part="${bo(r)}"]`].join(", "),attrs:{"data-scope":bo(e),"data-part":bo(r)}}}),{})}),bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),$4=e=>e.length===0;const V4=["top","right","bottom","left"],ki=Math.min,$n=Math.max,tc=Math.round,nc=Math.floor,Hr=e=>({x:e,y:e}),q4={left:"right",right:"left",bottom:"top",top:"bottom"},Y4={start:"end",end:"start"};function Yh(e,t,n){return $n(e,ki(t,n))}function ii(e,t){return typeof e=="function"?e(t):e}function si(e){return e.split("-")[0]}function _o(e){return e.split("-")[1]}function Gh(e){return e==="x"?"y":"x"}function Wh(e){return e==="y"?"height":"width"}const G4=new Set(["top","bottom"]);function zr(e){return G4.has(si(e))?"y":"x"}function Xh(e){return Gh(zr(e))}function W4(e,t,n){n===void 0&&(n=!1);const r=_o(e),s=Xh(e),a=Wh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=rc(u)),[u,rc(u)]}function X4(e){const t=rc(e);return[Kh(e),t,Kh(t)]}function Kh(e){return e.replace(/start|end/g,t=>Y4[t])}const qT=["left","right"],YT=["right","left"],K4=["top","bottom"],Q4=["bottom","top"];function J4(e,t,n){switch(e){case"top":case"bottom":return n?t?YT:qT:t?qT:YT;case"left":case"right":return t?K4:Q4;default:return[]}}function Z4(e,t,n,r){const s=_o(e);let a=J4(si(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Kh)))),a}function rc(e){return e.replace(/left|right|bottom|top/g,t=>q4[t])}function eD(e){return F({top:0,right:0,bottom:0,left:0},e)}function GT(e){return typeof e!="number"?eD(e):{top:e,right:e,bottom:e,left:e}}function ic(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 WT(e,t,n){let{reference:r,floating:s}=e;const a=zr(t),u=Xh(t),c=Wh(u),d=si(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(_o(t)){case"start":y[u]-=b*(n&&f?-1:1);break;case"end":y[u]+=b*(n&&f?-1:1);break}return y}const tD=(e,t,n)=>et(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}=WT(f,r,d),b=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:A,fn:v}=c[S],{x:P,y:C,data:B,reset:q}=yield v({x:p,y:g,initialPlacement:r,placement:b,strategy:s,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,g=C!=null?C:g,y=me(F({},y),{[A]:F(F({},y[A]),B)}),q&&_<=50&&(_++,typeof q=="object"&&(q.placement&&(b=q.placement),q.rects&&(f=q.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):q.rects),{x:p,y:g}=WT(f,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:s,middlewareData:y}});function Wa(e,t){return et(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}=ii(t,e),_=GT(y),A=c[b?g==="floating"?"reference":"floating":g],v=ic(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),P=g==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),B=(yield a.isElement==null?void 0:a.isElement(C))?(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},q=ic(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:C,strategy:d}):P);return{top:(v.top-q.top+_.top)/B.y,bottom:(q.bottom-v.bottom+_.bottom)/B.y,left:(v.left-q.left+_.left)/B.x,right:(q.right-v.right+_.right)/B.x}})}const nD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=ii(e,n)||{};if(p==null)return{};const b=GT(g),y={x:r,y:s},_=Xh(a),S=Wh(_),A=yield c.getDimensions(p),v=_==="y",P=v?"top":"left",C=v?"bottom":"right",B=v?"clientHeight":"clientWidth",q=u.reference[S]+u.reference[_]-y[_]-u.floating[S],D=y[_]-u.reference[_],J=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ie=J?J[B]:0;(!ie||!(yield c.isElement==null?void 0:c.isElement(J)))&&(ie=d.floating[B]||u.floating[S]);const Te=q/2-D/2,$=ie/2-A[S]/2-1,ee=ki(b[P],$),ce=ki(b[C],$),he=ee,le=ie-A[S]-ce,be=ie/2-A[S]/2+Te,Me=Yh(he,be,le),de=!f.arrow&&_o(a)!=null&&be!==Me&&u.reference[S]/2-(be<he?ee:ce)-A[S]/2<0,K=de?be<he?be-he:be-le:0;return{[_]:y[_]+K,data:F({[_]:Me,centerOffset:be-Me-K},de&&{alignmentOffset:K}),reset:de}})}}),rD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=ii(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=be,v=rn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=si(a),C=zr(d),B=si(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(B||!A?[rc(d)]:X4(d)),J=S!=="none";!y&&J&&D.push(...Z4(d,A,S,q));const ie=[d,...D],Te=yield Wa(n,v),$=[];let ee=((s=u.flip)==null?void 0:s.overflows)||[];if(g&&$.push(Te[P]),b){const Me=W4(a,c,q);$.push(Te[Me[0]],Te[Me[1]])}if(ee=[...ee,{placement:a,overflows:$}],!$.every(Me=>Me<=0)){var ce,he;const Me=(((ce=u.flip)==null?void 0:ce.index)||0)+1,de=ie[Me];if(de&&(!(b==="alignment"?C!==zr(de):!1)||ee.every(k=>zr(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Me,overflows:ee},reset:{placement:de}};let K=(he=ee.filter(re=>re.overflows[0]<=0).sort((re,k)=>re.overflows[1]-k.overflows[1])[0])==null?void 0:he.placement;if(!K)switch(_){case"bestFit":{var le;const re=(le=ee.filter(k=>{if(J){const M=zr(k.placement);return M===C||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,te)=>M+te,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:le[0];re&&(K=re);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function XT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function KT(e){return V4.some(t=>e[t]>=0)}const iD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=ii(e,n),{strategy:s="referenceHidden"}=u,a=rn(u,["strategy"]);switch(s){case"referenceHidden":{const c=yield Wa(n,me(F({},a),{elementContext:"reference"})),d=XT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:KT(d)}}}case"escaped":{const c=yield Wa(n,me(F({},a),{altBoundary:!0})),d=XT(c,r.floating);return{data:{escapedOffsets:d,escaped:KT(d)}}}default:return{}}})}}},QT=new Set(["left","top"]);function sD(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=si(n),c=_o(n),d=zr(n)==="y",f=QT.has(u)?-1:1,p=a&&d?-1:1,g=ii(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 oD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield sD(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:me(F({},f),{placement:c})}})}}},aD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a}=n,v=ii(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:C,y:B}=P;return{x:C,y:B}}}}=v,f=rn(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},g=yield Wa(n,f),b=zr(si(a)),y=Gh(b);let _=p[y],S=p[b];if(u){const P=y==="y"?"top":"left",C=y==="y"?"bottom":"right",B=_+g[P],q=_-g[C];_=Yh(B,_,q)}if(c){const P=b==="y"?"top":"left",C=b==="y"?"bottom":"right",B=S+g[P],q=S-g[C];S=Yh(B,S,q)}const A=d.fn(me(F({},n),{[y]:_,[b]:S}));return me(F({},A),{data:{x:A.x-r,y:A.y-s,enabled:{[y]:u,[b]:c}}})})}}},uD=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}=ii(e,t),p={x:n,y:r},g=zr(s),b=Gh(g);let y=p[b],_=p[g];const S=ii(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:F({mainAxis:0,crossAxis:0},S);if(d){const C=b==="y"?"height":"width",B=a.reference[b]-a.floating[C]+A.mainAxis,q=a.reference[b]+a.reference[C]-A.mainAxis;y<B?y=B:y>q&&(y=q)}if(f){var v,P;const C=b==="y"?"width":"height",B=QT.has(si(s)),q=a.reference[g]-a.floating[C]+(B&&((v=u.offset)==null?void 0:v[g])||0)+(B?0:A.crossAxis),D=a.reference[g]+a.reference[C]+(B?0:((P=u.offset)==null?void 0:P[g])||0)-(B?A.crossAxis:0);_<q?_=q:_>D&&(_=D)}return{[b]:y,[g]:_}}}},lD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,s;const{placement:a,rects:u,platform:c,elements:d}=n,ee=ii(e,n),{apply:f=()=>{}}=ee,p=rn(ee,["apply"]),g=yield Wa(n,p),b=si(a),y=_o(a),_=zr(a)==="y",{width:S,height:A}=u.floating;let v,P;b==="top"||b==="bottom"?(v=b,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=b,v=y==="end"?"top":"bottom");const C=A-g.top-g.bottom,B=S-g.left-g.right,q=ki(A-g[v],C),D=ki(S-g[P],B),J=!n.middlewareData.shift;let ie=q,Te=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Te=B),(s=n.middlewareData.shift)!=null&&s.enabled.y&&(ie=C),J&&!y){const ce=$n(g.left,0),he=$n(g.right,0),le=$n(g.top,0),be=$n(g.bottom,0);_?Te=S-2*(ce!==0||he!==0?ce+he:$n(g.left,g.right)):ie=A-2*(le!==0||be!==0?le+be:$n(g.top,g.bottom))}yield f(me(F({},n),{availableWidth:Te,availableHeight:ie}));const $=yield c.getDimensions(d.floating);return S!==$.width||A!==$.height?{reset:{rects:!0}}:{}})}}};function sc(){return typeof window!="undefined"}function So(e){return JT(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jr(e){var t;return(t=(JT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function JT(e){return sc()?e instanceof Node||e instanceof Vn(e).Node:!1}function br(e){return sc()?e instanceof Element||e instanceof Vn(e).Element:!1}function $r(e){return sc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function ZT(e){return!sc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const cD=new Set(["inline","contents"]);function Xa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cD.has(s)}const dD=new Set(["table","td","th"]);function fD(e){return dD.has(So(e))}const hD=[":popover-open",":modal"];function oc(e){return hD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const pD=["transform","translate","scale","rotate","perspective"],mD=["transform","translate","scale","rotate","perspective","filter"],gD=["paint","layout","strict","content"];function Qh(e){const t=Jh(),n=br(e)?_r(e):e;return pD.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)||mD.some(r=>(n.willChange||"").includes(r))||gD.some(r=>(n.contain||"").includes(r))}function ED(e){let t=Ni(e);for(;$r(t)&&!xo(t);){if(Qh(t))return t;if(oc(t))return null;t=Ni(t)}return null}function Jh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yD=new Set(["html","body","#document"]);function xo(e){return yD.has(So(e))}function _r(e){return Vn(e).getComputedStyle(e)}function ac(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(So(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ZT(e)&&e.host||jr(e);return ZT(t)?t.host:t}function eb(e){const t=Ni(e);return xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&Xa(t)?t:eb(t)}function Ka(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=eb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(s);if(a){const c=Zh(u);return t.concat(u,u.visualViewport||[],Xa(s)?s:[],c&&n?Ka(c):[])}return t.concat(s,Ka(s,[],n))}function Zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tb(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=$r(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=tc(n)!==a||tc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function ep(e){return br(e)?e:e.contextElement}function wo(e){const t=ep(e);if(!$r(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=tb(t);let u=(a?tc(n.width):n.width)/r,c=(a?tc(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const TD=Hr(0);function nb(e){const t=Vn(e);return!Jh()||!t.visualViewport?TD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function Es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=ep(e);let u=Hr(1);t&&(r?br(r)&&(u=wo(r)):u=wo(e));const c=bD(a,n,r)?nb(a):Hr(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=Vn(a),y=r&&br(r)?Vn(r):r;let _=b,S=Zh(_);for(;S&&r&&y!==_;){const A=wo(S),v=S.getBoundingClientRect(),P=_r(S),C=v.left+(S.clientLeft+parseFloat(P.paddingLeft))*A.x,B=v.top+(S.clientTop+parseFloat(P.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,g*=A.y,d+=C,f+=B,_=Vn(S),S=Zh(_)}}return ic({width:p,height:g,x:d,y:f})}function uc(e,t){const n=ac(e).scrollLeft;return t?t.left+n:Es(jr(e)).left+n}function rb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-uc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function _D(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=jr(r),c=t?oc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Hr(1);const p=Hr(0),g=$r(r);if((g||!g&&!a)&&((So(r)!=="body"||Xa(u))&&(d=ac(r)),$r(r))){const y=Es(r);f=wo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?rb(u,d):Hr(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 SD(e){return Array.from(e.getClientRects())}function xD(e){const t=jr(e),n=ac(e),r=e.ownerDocument.body,s=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+uc(e);const c=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const ib=25;function wD(e,t){const n=Vn(e),r=jr(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=Jh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=uc(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);_<=ib&&(a-=_)}else f<=ib&&(a+=f);return{width:a,height:u,x:c,y:d}}const CD=new Set(["absolute","fixed"]);function AD(e,t){const n=Es(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=$r(e)?wo(e):Hr(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 sb(e,t,n){let r;if(t==="viewport")r=wD(e,n);else if(t==="document")r=xD(jr(e));else if(br(t))r=AD(t,n);else{const s=nb(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ic(r)}function ob(e,t){const n=Ni(e);return n===t||!br(n)||xo(n)?!1:_r(n).position==="fixed"||ob(n,t)}function vD(e,t){const n=t.get(e);if(n)return n;let r=Ka(e,[],!1).filter(c=>br(c)&&So(c)!=="body"),s=null;const a=_r(e).position==="fixed";let u=a?Ni(e):e;for(;br(u)&&!xo(u);){const c=_r(u),d=Qh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&CD.has(s.position)||Xa(u)&&!d&&ob(e,u))?r=r.filter(p=>p!==u):s=c,u=Ni(u)}return t.set(e,r),r}function kD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?oc(t)?[]:vD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=sb(t,p,s);return f.top=$n(g.top,f.top),f.right=ki(g.right,f.right),f.bottom=ki(g.bottom,f.bottom),f.left=$n(g.left,f.left),f},sb(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ND(e){const{width:t,height:n}=tb(e);return{width:t,height:n}}function PD(e,t,n){const r=$r(t),s=jr(t),a=n==="fixed",u=Es(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Hr(0);function f(){d.x=uc(s)}if(r||!r&&!a)if((So(t)!=="body"||Xa(s))&&(c=ac(t)),r){const y=Es(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?rb(s,c):Hr(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 tp(e){return _r(e).position==="static"}function ab(e,t){if(!$r(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return jr(e)===n&&(n=n.ownerDocument.body),n}function ub(e,t){const n=Vn(e);if(oc(e))return n;if(!$r(e)){let s=Ni(e);for(;s&&!xo(s);){if(br(s)&&!tp(s))return s;s=Ni(s)}return n}let r=ab(e,t);for(;r&&fD(r)&&tp(r);)r=ab(r,t);return r&&xo(r)&&tp(r)&&!Qh(r)?n:r||ED(e)||n}const OD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||ub,n=this.getDimensions,r=yield n(e.floating);return{reference:PD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function ID(e){return _r(e).direction==="rtl"}const RD={convertOffsetParentRelativeRectToViewportRelativeRect:_D,getDocumentElement:jr,getClippingRect:kD,getOffsetParent:ub,getElementRects:OD,getClientRects:SD,getDimensions:ND,getScale:wo,isElement:br,isRTL:ID};function lb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LD(e,t){let n=null,r;const s=jr(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 _=nc(g),S=nc(s.clientWidth-(p+b)),A=nc(s.clientHeight-(g+y)),v=nc(p),C={rootMargin:-_+"px "+-S+"px "+-A+"px "+-v+"px",threshold:$n(0,ki(1,d))||1};let B=!0;function q(D){const J=D[0].intersectionRatio;if(J!==d){if(!B)return u();J?u(!1,J):r=setTimeout(()=>{u(!1,1e-7)},1e3)}J===1&&!lb(f,e.getBoundingClientRect())&&u(),B=!1}try{n=new IntersectionObserver(q,me(F({},C),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(q,C)}n.observe(e)}return u(!0),a}function DD(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=ep(e),p=s||a?[...f?Ka(f):[],...Ka(t)]:[];p.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const g=f&&c?LD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(v=>{let[P]=v;P&&P.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?Es(e):null;d&&A();function A(){const v=Es(e);S&&!lb(S,v)&&n(),S=v,_=requestAnimationFrame(A)}return n(),()=>{var v;p.forEach(P=>{s&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),g==null||g(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const MD=oD,FD=aD,BD=rD,UD=lD,HD=iD,zD=nD,jD=uD,$D=(e,t,n)=>{const r=new Map,s=F({platform:RD},n),a=me(F({},s.platform),{_c:r});return tD(e,t,me(F({},s),{platform:a}))};function cb(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 me(F({},s),{toJSON:()=>s})}function VD(e){if(!e)return cb();const{x:t,y:n,width:r,height:s}=e;return cb(t,n,r,s)}function qD(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?VD(r):n.getBoundingClientRect()}}}var Qa=e=>({variable:e,reference:`var(${e})`}),oi={arrowSize:Qa("--arrow-size"),arrowSizeHalf:Qa("--arrow-size-half"),arrowBg:Qa("--arrow-background"),transformOrigin:Qa("--transform-origin"),arrowOffset:Qa("--arrow-offset")},YD=e=>e==="top"||e==="bottom"?"y":"x";function GD(e,t){return{name:"transformOrigin",fn(n){var Te,$,ee,ce,he;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=YD(d),p=((Te=s.arrow)==null?void 0:Te.x)||0,g=(($=s.arrow)==null?void 0:$.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,A=Math.abs(((ee=s.shift)==null?void 0:ee.y)||0),v=u.reference.height/2,P=y/2,C=(he=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?he:e.gutter,B=typeof C=="number"?C+P:C!=null?C:P,q=A>B,D={top:`${_}px calc(100% + ${B}px)`,bottom:`${_}px ${-B}px`,left:`calc(100% + ${B}px) ${S}px`,right:`${-B}px ${S}px`}[d],J=`${_}px ${u.reference.y+v-c}px`,ie=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(oi.transformOrigin.variable,ie?J:D),{data:{transformOrigin:ie?J:D}}}}}var WD={name:"rects",fn({rects:e}){return{data:e}}},XD=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% + ${oi.arrowOffset.reference})`}),{}}}};function KD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var QD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function db(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function np(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function JD(e,t,n){const r=e||t.createElement("div");return zD({element:r,padding:n.arrowPadding})}function ZD(e,t){var n;if(!p6((n=t.offset)!=null?n:t.gutter))return MD(({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}=KD(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return Ph({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function e5(e){if(!e.flip)return;const t=np(e.boundary);return BD(me(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function t5(e){if(!e.slide&&!e.overlap)return;const t=np(e.boundary);return FD(me(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:jD()}))}function n5(e){return UD({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 r5(e){var t;if(e.hideWhenDetached)return HD({strategy:"referenceHidden",boundary:(t=np(e.boundary))!=null?t:"clippingAncestors"})}function i5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function s5(e,t,n={}){const r=qD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},QD,n),a=t.querySelector("[data-part=arrow]"),u=[ZD(a,s),e5(s),t5(s),JD(a,t.ownerDocument,s),XD(a),GD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),n5(s),r5(s),WD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,g=()=>et(null,null,function*(){var B;if(!r||!t)return;const S=yield $D(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const A=ho(t),v=db(A,S.x),P=db(A,S.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${P}px`),s.hideWhenDetached&&(((B=S.middlewareData.hide)==null?void 0:B.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const q=mo(C);t.style.setProperty("--z-index",q.zIndex)}}),b=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=i5(s.listeners),_=s.listeners?DD(r,t,b,y):x6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function fb(e,t,n={}){const c=n,{defer:r}=c,s=rn(c,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(s5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var o5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function a5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:oi.arrowSize.reference,height:oi.arrowSize.reference,[oi.arrowSizeHalf.variable]:`calc(${oi.arrowSize.reference} / 2)`,[oi.arrowOffset.variable]:`calc(${oi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?o5[t.split("-")[0]]:void 0,background:oi.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 Co=new WeakMap,lc=new WeakMap,cc={},rp=0,hb=e=>e&&(e.host||hb(e.parentNode)),u5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=hb(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),l5=new Set(["script","output","status","next-route-announcer"]),c5=e=>l5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),d5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=u5(n,Array.isArray(e)?e:[e]);cc[r]||(cc[r]=new WeakMap);const c=cc[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Jt(y)&&AT(y,_=>{g(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(c5(_))return;const A=_.getAttribute(s)==="true",v=(Co.get(_)||0)+1,P=(c.get(_)||0)+1;Co.set(_,v),c.set(_,P),d.push(_),v===1&&A&&lc.set(_,!0),P===1&&_.setAttribute(r,""),A||_.setAttribute(s,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),f.clear(),rp++,()=>{d.forEach(y=>{const _=Co.get(y)-1,S=c.get(y)-1;Co.set(y,_),c.set(y,S),_||(lc.has(y)||y.removeAttribute(s),lc.delete(y)),S||y.removeAttribute(r)}),rp--,rp||(Co=new WeakMap,Co=new WeakMap,lc=new WeakMap,cc={})}},f5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,h5=(e,t=f5(e),n="data-aria-hidden",r=!0)=>{if(t)return d5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},p5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function pb(e,t={}){const{defer:n=!0}=t,r=n?p5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(h5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function m5(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 g5(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 mb="pointerdown.outside",gb="focus.outside";function E5(e){for(const t of e)if(Jt(t)&&Ur(t))return!0;return!1}var Eb=e=>"clientY"in e;function y5(e,t){if(!Eb(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 T5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function yb(e,t){if(!t||!Eb(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 T5(u,c)?r||a:!1}function b5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Br(e),f=ho(e),p=m5(f),g=g5(f);function b(C,B){if(!Jt(B)||!B.isConnected||fo(e,B)||y5(e,C)||c&&CT(e,B))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const J=Uh(q);if(yb(C,J))return!1}const D=Uh(e);return yb(C,D)?!1:!(n!=null&&n(B))}const y=new Set,_=hs(e==null?void 0:e.getRootNode());function S(C){function B(q){var Te,$;const D=u&&!vT()?qt:ee=>ee(),J=q!=null?q:C,ie=($=(Te=J==null?void 0:J.composedPath)==null?void 0:Te.call(J))!=null?$:[J==null?void 0:J.target];D(()=>{const ee=_?ie[0]:Tr(C);if(!(!e||!b(C,ee))){if(s||a){const ce=Nh(s,a);e.addEventListener(mb,ce,{once:!0})}Tb(e,mb,{bubbles:!1,cancelable:!0,detail:{originalEvent:J,contextmenu:i4(J),focusable:E5(ie),target:ee}})}})}C.pointerType==="touch"?(y.forEach(q=>q()),y.add(Zt(d,"click",B,{once:!0})),y.add(g.addEventListener("click",B,{once:!0})),y.add(p.addEventListener("click",B,{once:!0}))):B()}const A=new Set,v=setTimeout(()=>{A.add(Zt(d,"pointerdown",S,!0)),A.add(g.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function P(C){(u?qt:q=>q())(()=>{var J,ie;const q=(ie=(J=C==null?void 0:C.composedPath)==null?void 0:J.call(C))!=null?ie:[C==null?void 0:C.target],D=_?q[0]:Tr(C);if(!(!e||!b(C,D))){if(r||a){const Te=Nh(r,a);e.addEventListener(gb,Te,{once:!0})}Tb(e,gb,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Ur(D),target:D}})}})}return vT()||(A.add(Zt(d,"focusin",P,!0)),A.add(g.addEventListener("focusin",P,!0)),A.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(v),y.forEach(C=>C()),A.forEach(C=>C())}}function _5(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(b5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function Tb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function S5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Br(e),"keydown",n,{capture:!0})}var bb="layer:request-dismiss",rr={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=>fo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>fo(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=>rr.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];w5(e,bb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),x5(e,bb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function x5(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 w5(e,t,n){e.addEventListener(t,n,{once:!0})}var _b;function Sb(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function C5(e){e.style.pointerEvents=""}function A5(e,t){const n=Br(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(_b=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=v4(()=>{const c=s();return Jt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=_b,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function v5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Oh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};rr.add(f),Sb();function p(S){var v,P;const A=Tr(S.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(A)||((v=t.onPointerDownOutside)==null||v.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var v,P;const A=Tr(S.detail.originalEvent);rr.isInBranch(A)||((v=t.onFocusOutside)==null||v.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var A;rr.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var C;if(!e)return!1;const A=typeof u=="function"?u():u,v=Array.isArray(A)?A:[A],P=(C=t.persistentElements)==null?void 0:C.map(B=>B()).filter(Jt);return P&&v.push(...P),v.some(B=>fo(B,S))||rr.isInNestedLayer(e,S)}const _=[a?A5(e,t.persistentElements):void 0,S5(e,b),_5(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),Sb(),C5(e),_.forEach(S=>S==null?void 0:S())}}function xb(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=lo(e)?e():e;s.push(v5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var k5=Object.defineProperty,N5=(e,t,n)=>t in e?k5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>N5(e,typeof t!="symbol"?t+"":t,n),wb={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},P5=[],O5=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const s=Tr(r),a=this.findContainerIndex(s,r)>=0;if(a||Yl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(qa(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=>qa(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}),Ct(this,"handlePointerDown",r=>{const s=Tr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Za(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Za(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const s=Tr(r);this.findContainerIndex(s,r)>=0||Za(this.config.clickOutsideDeactivates,r)||Za(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(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;Ja(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{I5(r)&&Za(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(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 X6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?K6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(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)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Ur(r)){const s=po(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}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==po(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,R5(r)&&r.select()}}),Ct(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(),wb.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=()=>{Cb(()=>{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}),Ct(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}),Ct(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}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Ct(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Ct(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}),Ct(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||Tr(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||Ur(u)&&!ps(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=qa(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ja(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||Ur(u)&&!ps(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=qa(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ja(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||P5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ja(r)&&!r.shiftKey},isKeyBackward(r){return Ja(r)&&r.shiftKey}},t);this.doc=n.document||Br(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=>{Y6(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?CT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=go(e,{getShadowRoot:this.config.getShadowRoot}),n=LT(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(qa(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(ps(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ps(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 wb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Cb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=po(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)}},Ja=e=>e.key==="Tab",Za=(e,...t)=>typeof e=="function"?e(...t):e,I5=e=>!e.isComposing&&e.key==="Escape",Cb=e=>setTimeout(e,0),R5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Ab(e,t={}){let n;const r=qt(()=>{const s=typeof e=="function"?e():e;if(s){n=new O5(s,me(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Br(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var ip="data-scroll-lock";function L5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function vb(e){const t=mo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function kb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(ip))return;const u=vb(r)||vb(s),c=n.innerWidth-r.clientWidth;s.setAttribute(ip,"");const d=()=>C4(r,"--scrollbar-width",`${c}px`),f=L5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Kl(s,_)},g=()=>{var q,D;const{scrollX:_,scrollY:S,visualViewport:A}=n,v=(q=A==null?void 0:A.offsetLeft)!=null?q:0,P=(D=A==null?void 0:A.offsetTop)!=null?D:0,C={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(P))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const B=Kl(s,C);return()=>{B==null||B(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),Gl()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(ip)}}var D5=gs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Vr=D5.build(),Nb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},M5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},F5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Ib=e=>e.getById(Nb(e)),Ao=e=>e.getById(Pb(e)),vo=e=>e.getById(sp(e)),Rb=e=>e.getById(Ob(e)),B5=e=>e.getById(op(e)),U5=e=>e.getById(ap(e));function H5(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=a5(me(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(me(F({id:M5(c)},Vr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(me(F({},Vr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(me(F({},Vr.anchor.attrs),{dir:u("dir"),id:Nb(c)}))},getTriggerProps(){return t.button(me(F({},Vr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Pb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":sp(c),onPointerDown(y){kT(y)&&n4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(F({},Vr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({id:Ob(c)},Vr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(me(F({},Vr.content.attrs),{dir:u("dir"),id:sp(c),tabIndex:-1,role:"dialog","aria-modal":ST(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":co(d),"aria-labelledby":g.title?op(c):void 0,"aria-describedby":g.description?ap(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(F({},Vr.title.attrs),{id:op(c),dir:u("dir")}))},getDescriptionProps(){return t.element(me(F({},Vr.description.attrs),{id:ap(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(F({},Vr.closeTrigger.attrs),{dir:u("dir"),id:F5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var z5={props({props:e}){return me(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=Ib(n))!=null?a:Ao(n);return fb(r,()=>Rb(n),me(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>vo(n);let s=!0;return xb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ao(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:x4(()=>vo(t),{triggerElement:Ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?pb(()=>[vo(t),Ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return kb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Ab(()=>vo(t),{initialFocus:()=>DT({root:vo(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=Ib(n))!=null?u:Ao(n);fb(s,()=>Rb(n),me(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!B5(t),description:!!U5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=DT({root:vo(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||qt(()=>{const a=Ao(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})}}}};To()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[nU,dc]=ms({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[rU,up]=ms({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),j5=e=>{const t=H.useId(),{getRootNode:n}=dc(),{dir:r}=up(),s=F({id:t,dir:r,getRootNode:n},e),a=Jl(z5,s);return H5(a,jh)},$5=e=>{const[t,u]=VT(e),c=u,{children:n}=c,r=rn(c,["children"]),s=j5(r),a=qh(Yt({present:s.open},t));return w.jsx(B4,{value:s,children:w.jsx(zT,{value:a,children:n})})},Lb=H.forwardRef((e,t)=>{const n=Vh(),r=Ya(),s=Yt(me(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(mn.button,me(F({},s),{ref:t}))});Lb.displayName="PopoverTrigger";function V5(e){return Lt({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 q5(e){return Lt({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 Y5(e){return Lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function G5(e){return Lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function W5(e){return Lt({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 X5(e){return Lt({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 Db(e){return Lt({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 lp=()=>{const{status:e,entryType:t}=mr(),{messages:n}=Zn(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},K5=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=gr(),r=()=>{n(),e()};return w.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[w.jsx(Db,{}),"Clear chat"]})},Q5=({className:e,componentType:t,children:n})=>{const[r,s]=H.useState(!1),{globalClassName:a}=ft(),u=()=>{s(!1)},c=d=>{s(d.open)};return w.jsxs($5,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[w.jsx(Lb,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,t),children:w.jsx(X5,{})}),w.jsx($T,{children:w.jsxs(jT,{className:W(`${j}-overflow-menu-list`,a,t),children:[n,w.jsx(K5,{componentType:t,onClearChat:u})]})})]})};function Mb(e){return Lt({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 Fb(e){return Lt({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[J5,ys]=ms({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Bb=H.forwardRef((e,t)=>{const n=ys(),r=Yt(n.getControlProps(),e);return w.jsx(mn.div,me(F(F({},r),e),{ref:t}))});Bb.displayName="CarouselControl";const Ub=H.forwardRef((e,t)=>{const[n,r]=Ga()(e,["readOnly","index"]),s=ys(),a=Yt(s.getIndicatorProps(n),r);return w.jsx(mn.button,me(F({},a),{ref:t}))});Ub.displayName="CarouselIndicator";const Hb=H.forwardRef((e,t)=>{const n=ys(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});Hb.displayName="CarouselIndicatorGroup";const zb=H.forwardRef((e,t)=>{const[n,r]=Ga()(e,["index","snapAlign"]),s=ys(),a=Yt(s.getItemProps(n),r);return w.jsx(mn.div,me(F({},a),{ref:t}))});zb.displayName="CarouselItem";const jb=H.forwardRef((e,t)=>{const n=ys(),r=Yt(n.getItemGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});jb.displayName="CarouselItemGroup";const $b=H.forwardRef((e,t)=>{const n=ys(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});$b.displayName="CarouselNextTrigger";const Vb=H.forwardRef((e,t)=>{const n=ys(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});Vb.displayName="CarouselPrevTrigger";function Z5(e){const t=mo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:g}}}function e8(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function qb(e){let t=[];for(const n of e.children)t=t.concat(n,qb(n));return t}function Yb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?qb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const g=p.getBoundingClientRect();if(!e8(n,g,u))continue;const b=mo(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,A=g[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function Gb(e){const t=e.getBoundingClientRect(),n=Z5(e),r=Yb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Wb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Xb(0,s.x))),y:Wb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Xb(0,s.y)))}}function t8(e,t,n){const r=Yb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Wb=e=>[...new Set(e)],Xb=(e,t)=>n=>Math.max(e,Math.min(t,n)),n8=gs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=n8.build(),r8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},i8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},fc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},s8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},o8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},a8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Kb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(fc(e)),Qb=e=>w4(In(e),"[data-part=item]"),u8=(e,t)=>e.getById(Kb(e,t)),Jb=e=>{const t=In(e);if(!t)return;const n=go(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function l8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),g=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),A=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(P,C){a({type:"INDEX.SET",index:P,instant:C})},scrollTo(P,C){a({type:"PAGE.SET",index:P,instant:C})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(F({},ai.root.attrs),{id:r8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(F({},ai.itemGroup.attrs),{id:fc(u),"data-orientation":c("orientation"),"data-dragging":co(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){fo(P.currentTarget,Tr(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){fo(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!kT(P))return;const C=Tr(P);Ur(C)&&C!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:w6(P=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";P[C]<0&&!s("canScrollPrev")||P[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const C=r.get("slidesInView").includes(P.index);return t.element(me(F({},ai.item.attrs),{id:i8(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":co(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(P.index,c("slideCount")),"aria-hidden":ST(!C),style:{scrollSnapAlign:(()=>{var ie;const B=(ie=P.snapAlign)!=null?ie:"start",q=c("slidesPerMove"),D=q==="auto"?Math.floor(c("slidesPerPage")):q;return(P.index+D)%D===0?B:void 0})()}}))},getControlProps(){return t.element(me(F({},ai.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(me(F({},ai.prevTrigger.attrs),{id:o8(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(F({},ai.nextTrigger.attrs),{dir:c("dir"),id:s8(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":fc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(F({},ai.indicatorGroup.attrs),{dir:c("dir"),id:a8(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const C="indicator",B={ArrowDown(J){b||(a({type:"PAGE.NEXT",src:C}),J.preventDefault())},ArrowUp(J){b||(a({type:"PAGE.PREV",src:C}),J.preventDefault())},ArrowRight(J){b&&(a({type:"PAGE.NEXT",src:C}),J.preventDefault())},ArrowLeft(J){b&&(a({type:"PAGE.PREV",src:C}),J.preventDefault())},Home(J){a({type:"PAGE.SET",index:0,src:C}),J.preventDefault()},End(J){a({type:"PAGE.SET",index:y.length-1,src:C}),J.preventDefault()}},q=a4(P,{dir:c("dir"),orientation:c("orientation")}),D=B[q];D==null||D(P)}}))},getIndicatorProps(P){return t.button(me(F({},ai.indicator.attrs),{dir:c("dir"),id:Kb(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":co(P.readOnly),"data-current":co(P.index===_),"aria-label":v.indicator(P.index),onClick(C){C.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":co(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var c8={props({props:e}){return P6(e,["slideCount"],"carousel"),me(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:d8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return h6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=In(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Jb(e)});return Jb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{s(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,g=Number((b=p.dataset.index)!=null?b:"-1");return g==null||Number.isNaN(g)||g===-1?d:f.isIntersecting?u6(d,g):l6(d,g)},n.get("slidesInView"));n.set("slidesInView",c6(c))},{root:r,threshold:t("inViewThreshold")});return Qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return _4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=bT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=ET(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=d6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=In(r);if(!s)return;const a=t8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=bT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const s=Gb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=In(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Gb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=u8(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function d8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}To()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),To()(["index","readOnly"]),To()(["index","snapAlign"]);const f8=e=>{const t=H.useId(),{getRootNode:n}=dc(),{dir:r}=up(),s=F({id:t,dir:r,getRootNode:n},e),a=Jl(c8,s);return l8(a,jh)},Zb=H.forwardRef((e,t)=>{const[n,r]=Ga()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=f8(n),a=Yt(s.getRootProps(),r);return w.jsx(J5,{value:s,children:w.jsx(mn.div,me(F({},a),{ref:t}))})});Zb.displayName="CarouselRoot";const h8=180,p8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},m8=({globalClassName:e,itemMinWidth:t=h8,spacing:n="0.5rem",loop:r=!1,allowMouseDrag:s=!0,showIndicators:a=!0,showNavigation:u=!0,onPageChange:c,ariaLabel:d="Product carousel",children:f})=>{const p=Array.from(f),g=p.length,b=H.useRef(null),[y,_]=H.useState(0),{width:S}=hv();H.useLayoutEffect(()=>{b.current&&_(b.current.getBoundingClientRect().width)},[S,g]);const A=p8(n),v=t+A,P=y>0?(y+A)/v:1,C=Math.max(1,Math.floor(P));if(g===0)return null;const B=g>C,q=Math.ceil(g/C),D=B?Math.max(1,P):C;return w.jsxs(Zb,{ref:b,className:W(e,`${j}-carousel`),slidesPerPage:D,slidesPerMove:C,spacing:n,loop:r,allowMouseDrag:s,slideCount:g,onPageChange:c,"aria-label":d,children:[w.jsx(jb,{className:W(e,`${j}-carousel__item-group`),children:p.map((J,ie)=>w.jsx(zb,{index:ie,className:W(e,`${j}-carousel__item`),children:J},ie))}),u&&B&&w.jsxs(Bb,{className:W(e,`${j}-carousel__control`),children:[w.jsx(Vb,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(Y5,{})}),w.jsx($b,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(G5,{})})]}),a&&B&&w.jsx(Hb,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:q},(J,ie)=>w.jsx(Ub,{index:ie,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},e_=r=>{var s=r,{onReset:e,componentType:t}=s,n=rn(s,["onReset","componentType"]);const{globalClassName:a}=ft();return w.jsx(Lr,F({icon:w.jsx(Db,{size:"16px"}),ariaLabel:"Clear Chat",className:W(a,`${j}-clear-chat-icon-button`,`cim-${t}-component`),onClick:e},n))};function g8(e){return Lt({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 E8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{const u=s?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:W(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>s?w.jsxs(Tl,{disabled:r,className:W(t,`${j}-suggestion-button standalone`),onClick:c(d),children:[w.jsx(g8,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",d]},d):w.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},t_=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ft();if(!r)return null;const s=()=>{bi(!1),pl(!0)};return t?w.jsx(Lr,{className:W(n,`${j}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(k1,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,e),onClick:s,children:[w.jsx(k1,{}),"Minimize"]})},n_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=()=>{ml("modal")};return t?w.jsx(Lr,{className:W(n,`${j}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:w.jsx(Fb,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,e),onClick:r,children:[w.jsx(Fb,{}),"Show modal"]})},y8=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=ft(),{askCimPrompts:s,messages:a}=Zn(),{isLoading:u,handleSuggestion:c}=gr(),d=H.useMemo(()=>{const b=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return a.some(_=>_.name==="conversation_reset")&&r||b},[a,n,r]),f=((g=s.message)==null?void 0:g.suggestions)||[],p=(b,y)=>()=>{c(b,y)};return w.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(b=>{var y;return w.jsx(Tl,{disabled:u,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(b,((y=s.message)==null?void 0:y.eventSourceId)||""),children:b.displayText},b.displayText)})})]})},T8=({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:W(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:W(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:W(r,`${j}-product-tile-pdp`),href:`${g}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:W(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:W(r,`${j}-product-tile-price`),children:c})})]})]})},b8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=ft(),s=t;return n?w.jsxs("div",{className:W(r,`${j}-display-products widget-message`),children:[w.jsx("p",{children:s.message}),s.products&&s.products.length>0&&w.jsx(m8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return w.jsx(T8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},_8=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(yk,{})," ",t.message||"An error occurred while processing your request."]})}),S8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=gr(),{messages:u}=Zn(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?aC(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const A=n.suggestions.find(v=>v.displayText===S);A&&s(A,n.eventSourceId||n.id)};return w.jsxs("div",{className:W(e,`${j}-follow-up`),children:[w.jsx("p",{className:W(e,`${j}-text`),children:n.message}),w.jsx(E8,{suggestions:n.suggestions.map(S=>S.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function r_(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 x8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function w8(e,t,n){const s=Pl((n||{}).ignore||[]),a=C8(t);let u=-1;for(;++u<a.length;)HE(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 A=g.children.indexOf(f);let v=!1,P=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const B=C.index,q={index:C.index,input:C.input,stack:[...p,f]};let D=y(...C,q);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=B+1:(_!==B&&P.push({type:"text",value:f.value.slice(_,B)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=B+C[0].length,v=!0),!b.global)break;C=b.exec(f.value)}return v?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),g.children.splice(A,1,...P)):P=[f],A+P.length}}function C8(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([A8(s[0]),v8(s[1])])}return t}function A8(e){return typeof e=="string"?new RegExp(x8(e),"g"):e}function v8(e){return typeof e=="function"?e:function(){return e}}const cp="phrasing",dp=["autolink","link","image","label"];function k8(){return{transforms:[D8],enter:{literalAutolink:P8,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:L8,literalAutolinkEmail:R8,literalAutolinkHttp:O8,literalAutolinkWww:I8}}}function N8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:cp,notInConstruct:dp}]}}function P8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function O8(e){this.config.exit.autolinkProtocol.call(this,e)}function I8(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 R8(e){this.config.exit.autolinkEmail.call(this,e)}function L8(e){this.exit(e)}function D8(e){w8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,M8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),F8]],{ignore:["link","linkReference"]})}function M8(e,t,n,r,s){let a="";if(!i_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!B8(n)))return!1;const u=U8(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 F8(e,t,n,r){return!i_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function B8(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 U8(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=r_(e,"(");let a=r_(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 i_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||xl(n))&&(!t||n!==47)}s_.peek=W8;function H8(){this.buffer()}function z8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j8(){this.buffer()}function $8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function V8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q8(e){this.exit(e)}function Y8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G8(e){this.exit(e)}function W8(){return"["}function s_(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 X8(){return{enter:{gfmFootnoteCallString:H8,gfmFootnoteCall:z8,gfmFootnoteDefinitionLabelString:j8,gfmFootnoteDefinition:$8},exit:{gfmFootnoteCallString:V8,gfmFootnoteCall:q8,gfmFootnoteDefinitionLabelString:Y8,gfmFootnoteDefinition:G8}}}function K8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:s_},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?o_:Q8))),f(),d}}function Q8(e,t,n){return t===0?e:o_(e,t,n)}function o_(e,t,n){return(n?"":" ")+e}const J8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a_.peek=rM;function Z8(){return{canContainEols:["delete"],enter:{strikethrough:tM},exit:{strikethrough:nM}}}function eM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:J8}],handlers:{delete:a_}}}function tM(e){this.enter({type:"delete",children:[]},e)}function nM(e){this.exit(e)}function a_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,me(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function rM(){return"~"}function iM(e){return e.length}function sM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||iM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],A=[];let v=-1;for(e[p].length>f&&(f=e[p].length);++v<e[p].length;){const P=oM(e[p][v]);if(n.alignDelimiters!==!1){const C=s(P);A[v]=C,(d[v]===void 0||C>d[v])&&(d[v]=C)}S.push(P)}u[p]=S,c[p]=A}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)a[g]=u_(r[g]);else{const S=u_(r);for(;++g<f;)a[g]=S}g=-1;const b=[],y=[];for(;++g<f;){const S=a[g];let A="",v="";S===99?(A=":",v=":"):S===108?A=":":S===114&&(v=":");let P=n.alignDelimiters===!1?1:Math.max(1,d[g]-A.length-v.length);const C=A+"-".repeat(P)+v;n.alignDelimiters!==!1&&(P=A.length+P+v.length,P>d[g]&&(d[g]=P),y[g]=P),b[g]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],A=c[p];g=-1;const v=[];for(;++g<f;){const P=S[g]||"";let C="",B="";if(n.alignDelimiters!==!1){const q=d[g]-(A[g]||0),D=a[g];D===114?C=" ".repeat(q):D===99?q%2?(C=" ".repeat(q/2+.5),B=" ".repeat(q/2-.5)):(C=" ".repeat(q/2),B=C):B=" ".repeat(q)}n.delimiterStart!==!1&&!g&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||g)&&v.push(" "),n.alignDelimiters!==!1&&v.push(C),v.push(P),n.alignDelimiters!==!1&&v.push(B),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&v.push("|")}_.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return _.join(`
|
|
33
|
+
`)}function oM(e){return e==null?"":String(e)}function u_(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 aM(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()),uM);return s(),u}function uM(e,t,n){return">"+(n?"":" ")+e}function lM(e,t){return l_(e,t.inConstruct,!0)&&!l_(e,t.notInConstruct,!1)}function l_(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 c_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
34
|
+
`&&lM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
+
`}function cM(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 dM(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 fM(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 hM(e,t,n,r){const s=fM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(dM(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,pM);return g(),b}const c=n.createTracker(r),d=s.repeat(Math.max(cM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
|
|
36
36
|
`,encode:["`"]},c.current()))),g()}return p+=c.move(`
|
|
37
37
|
`),a&&(p+=c.move(a+`
|
|
38
|
-
`)),p+=c.move(d),f(),p}function
|
|
39
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,
|
|
38
|
+
`)),p+=c.move(d),f(),p}function pM(e,t,n){return(n?"":" ")+e}function hp(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 mM(e,t,n,r){const s=hp(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 gM(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 eu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hc(e,t,n){const r=eo(e),s=eo(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}}d_.peek=EM;function d_(e,t,n,r){const s=gM(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=hc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=eu(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=hc(r.after.charCodeAt(0),g,s);b.inside&&(d=d.slice(0,-1)+eu(g));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function EM(e,t,n){return n.options.emphasis||"*"}function yM(e,t){let n=!1;return Il(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Jf}),!!((!e.depth||e.depth<3)&&zf(e)&&(t.options.setext||n))}function TM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yM(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,me(F({},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,
|
|
44
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=
|
|
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(
|
|
46
|
-
`))}function d(T,_,S,v){const A=S.enter("tableCell"),R=S.enter("phrasing"),N=S.containerPhrasing(T,_e(U({},v),{before:a,after:a}));return R(),A(),N}function f(T,_){return U5(T,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(T,_,S){const v=T.children;let A=-1;const R=[],N=_.enter("table");for(;++A<v.length;)R[A]=g(v[A],_,S);return N(),R}function g(T,_,S){const v=T.children;let A=-1;const R=[],N=_.enter("tableRow");for(;++A<v.length;)R[A]=d(v[A],T,_,S);return N(),R}function b(T,_,S){let v=jb.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function A8(){return{exit:{taskListCheckValueChecked:Vb,taskListCheckValueUnchecked:Vb,paragraph:k8}}}function v8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:N8}}}function Vb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function k8(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 N8(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=jb.listItem(e,t,n,U(U({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function O8(){return[u5(),N5(),R5(),T8(),A8()]}function P8(e){return{extensions:[l5(),O5(e),L5(),C8(e),v8()]}}const I8={tokenize:B8,partial:!0},qb={tokenize:U8,partial:!0},Yb={tokenize:H8,partial:!0},Wb={tokenize:z8,partial:!0},R8={tokenize:j8,partial:!0},Gb={name:"wwwAutolink",tokenize:M8,previous:Kb},Xb={name:"protocolAutolink",tokenize:F8,previous:Qb},si={name:"emailAutolink",tokenize:D8,previous:Jb},Hr={};function L8(){return{text:Hr}}let ms=48;for(;ms<123;)Hr[ms]=si,ms++,ms===58?ms=65:ms===91&&(ms=97);Hr[43]=si,Hr[45]=si,Hr[46]=si,Hr[95]=si,Hr[72]=[si,Xb],Hr[104]=[si,Xb],Hr[87]=[si,Gb],Hr[119]=[si,Gb];function D8(e,t,n){const r=this;let s,a;return u;function u(g){return!rp(g)||!Jb.call(r,r.previous)||ip(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return rp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(R8,p,f)(g):g===45||g===95||cn(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&&yn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function M8(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Kb.call(r,r.previous)||ip(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I8,e.attempt(qb,e.attempt(Yb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function F8(e,t,n){const r=this;let s="",a=!1;return u;function u(g){return(g===72||g===104)&&Qb.call(r,r.previous)&&!ip(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(yn(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)||pt(g)||ss(g)||fl(g)?n(g):e.attempt(qb,e.attempt(Yb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function B8(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 U8(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Wb,d,c)(f):f===null||pt(f)||ss(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 H8(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(Wb,t,a)(u):u===null||pt(u)||ss(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function z8(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||pt(c)||ss(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||pt(c)||ss(c)?t(c):r(c)}function a(c){return yn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):yn(c)?(e.consume(c),u):n(c)}}function j8(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return cn(a)?n(a):t(a)}}function Kb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function Qb(e){return!yn(e)}function Jb(e){return!(e===47||rp(e))}function rp(e){return e===43||e===45||e===46||e===95||cn(e)}function ip(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 $8={tokenize:Q8,partial:!0};function V8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:G8,continuation:{tokenize:X8},exit:K8}},text:{91:{name:"gfmFootnoteCall",tokenize:W8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:q8,resolveTo:Y8}}}}function q8(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=hr(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 Y8(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 W8(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||pt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(hr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return pt(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 G8(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||pt(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=hr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return pt(_)||(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),nt(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function X8(e,t,n){return e.check(ma,t,e.attempt($8,t,n))}function K8(e){e.exit("gfmFootnoteDefinition")}function Q8(e,t,n){const r=this;return nt(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 J8(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]],T=c.parser.constructs.insideSpan.null;T&&Fn(b,b.length,0,hl(T,u.slice(f+1,d),c)),Fn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Fn(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"),T(_))}function T(_){const S=Xs(f);if(_===126)return g>1?d(_):(u.consume(_),g++,T);if(g<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),A=Xs(_);return v._open=!A||A===2&&!!S,v._close=!S||S===2&&!!A,c(_)}}}class Z8{constructor(){this.map=[]}add(t,n,r){eM(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 eM(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 tM(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 nM(){return{flow:{null:{name:"table",tokenize:rM,resolveAll:iM}}}}function rM(e,t,n){const r=this;let s=0,a=0,u;return c;function c(j){let se=r.events.length-1;for(;se>-1;){const ce=r.events[se][1].type;if(ce==="lineEnding"||ce==="linePrefix")se--;else break}const te=se>-1?r.events[se][1].type:null,pe=te==="tableHead"||te==="tableRow"?F:d;return pe===F&&r.parser.lazy[r.now().line]?n(j):pe(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(u=!0,a+=1),p(j)}function p(j){return j===null?n(j):Ue(j)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),T):n(j):Ze(j)?nt(e,p,"whitespace")(j):(a+=1,u&&(u=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(j)))}function g(j){return j===null||j===124||pt(j)?(e.exit("data"),p(j)):(e.consume(j),j===92?b:g)}function b(j){return j===92||j===124?(e.consume(j),g):g(j)}function T(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),u=!1,Ze(j)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j))}function _(j){return j===45||j===58?v(j):j===124?(u=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),S):W(j)}function S(j){return Ze(j)?nt(e,v,"whitespace")(j):v(j)}function v(j){return j===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),A):j===45?(a+=1,A(j)):j===null||Ue(j)?L(j):W(j)}function A(j){return j===45?(e.enter("tableDelimiterFiller"),R(j)):W(j)}function R(j){return j===45?(e.consume(j),R):j===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(j))}function N(j){return Ze(j)?nt(e,L,"whitespace")(j):L(j)}function L(j){return j===124?_(j):j===null||Ue(j)?!u||s!==a?W(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):W(j)}function W(j){return n(j)}function F(j){return e.enter("tableRow"),ne(j)}function ne(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),ne):j===null||Ue(j)?(e.exit("tableRow"),t(j)):Ze(j)?nt(e,ne,"whitespace")(j):(e.enter("data"),le(j))}function le(j){return j===null||j===124||pt(j)?(e.exit("data"),ne(j)):(e.consume(j),j===92?Te:le)}function Te(j){return j===92||j===124?(e.consume(j),le):le(j)}}function iM(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 Z8;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(Zb(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&&Zb(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=tM(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({},bo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=bo(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=bo(t.events,n[2]),p=bo(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]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[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({},bo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Zb(e,t,n,r,s){const a=[],u=bo(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 bo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const sM={name:"tasklistCheck",tokenize:aM};function oM(){return{text:{91:sM}}}function aM(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 pt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ue(d)?t(d):Ze(d)?e.check({tokenize:uM},t,n)(d):n(d)}}function uM(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function lM(e){return $1([L8(),V8(),J8(e),nM(),oM()])}const cM={};function dM(e){const t=this,n=e||cM,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(lM(n)),a.push(O8()),u.push(P8(n))}const tc=()=>w.jsx("span",{className:`${$}-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"})})}),sp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,message:r})=>w.jsx(RE,{remarkPlugins:[dM],rehypePlugins:[qy],components:{h1:({children:s})=>w.jsx("h1",{className:X(e,`${$}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:X(e,`${$}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:X(e,`${$}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:X(e,`${$}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:X(e,`${$}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:X(e,`${$}-li`),children:s}),a:({href:s,children:a})=>w.jsx(Jy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:X(e,`${$}-table-container`),children:w.jsx("table",{className:X(e,`${$}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:X(e,`${$}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:X(e,`${$}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:X(e,`${$}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:X(e,`${$}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:X(e,`${$}-td`),children:s}),span:({className:s,children:a})=>s===`${$}-blinking-cursor`?w.jsx(tc,{}):w.jsx("span",{children:a})},children:r.message+(n?`<span className='${$}-blinking-cursor'></span>`:"")}),fM=({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:X(e,`${$}-progress-message`,"standalone"),children:[w.jsx("span",{className:X(e,`${$}-message-icon`,"progress-icon","standalone"),children:w.jsx(l1,{})}),w.jsx("p",{className:X(e,`${$}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(ul,{className:X(e,`${$}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(Pv,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(Iv,{})]})}),n&&w.jsx("div",{className:X(e,`${$}-thought-container`),children:a&&w.jsx("p",{className:X(e,`${$}-progress-thought`),children:t.thought})})]})]})},hM=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(fM,{globalClassName:e,message:t}):w.jsxs("div",{className:X(e,`${$}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:X(e,`${$}-message-icon`,"progress-icon","embedded"),children:w.jsx(l1,{})}),w.jsx("i",{className:X(e,`${$}-progress-text`,"embedded"),children:t.message})]}),pM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return w.jsxs("div",{className:X(e,`${$}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:X(e,`${$}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:X(e,`${$}-message-icon`,`${$}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx($s,{role:"img"})}),w.jsx("p",{className:X(e,`${$}-text`,`${$}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(sp,{message:t})]})},e_=e=>{var d,f;const{configModule:t}=ht(),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}},nc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:X(t,`${$}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),t_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),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:X(e,`${$}-facets`),children:[w.jsx("p",{className:X(e,`${$}-facet-category`),children:c}),w.jsx("p",{className:X(e,`${$}-facet-values`),children:d})]},c)})},qa=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:X(e,`${$}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),mM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=e_(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:X(e,`${$}-user-message standalone`),children:[w.jsxs("div",{className:X(e,`${$}-user-message-row standalone`),children:[d?w.jsx("img",{className:X(e,`${$}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:X(e,`${$}-message-icon user-message-icon standalone`),children:w.jsx(d1,{})}),w.jsx("p",{className:X(e,`${$}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(nc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(t_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(qa,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:X(e,`${$}-user-message embedded`),children:[w.jsxs("div",{className:X(e,`${$}-user-message-row embedded`),children:[d?w.jsx("img",{className:X(e,`${$}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:X(e,`${$}-message-icon user-message-icon embedded`),children:w.jsx(d1,{})}),w.jsx("p",{className:X(e,`${$}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(nc,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(qa,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},gM=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:X(e,`${$}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:X(e,`${$}-user-search-query standalone`),children:[d?w.jsx("img",{className:X(e,`${$}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):w.jsx("span",{className:X(e,`${$}-message-icon user-search-icon standalone`),children:w.jsx($s,{})}),w.jsx("p",{className:X(e,`${$}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&w.jsx(nc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(t_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(qa,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),EM=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var T;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=e_(t),d=new Date(a).toLocaleString(),f=(T=r==null?void 0:r.attachments)==null?void 0:T.image,{actionLabel:p,query:g,queryLabel:b}=z.useMemo(()=>{var S,v,A;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel: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(gM,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:X(e,`${$}-user-search embedded`),children:[w.jsxs("div",{className:X(e,`${$}-user-search-query embedded`),children:[f?w.jsx("img",{className:X(e,`${$}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):w.jsx("span",{className:X(e,`${$}-message-icon user-search-icon embedded`),children:w.jsx($s,{})}),w.jsx("p",{className:X(e,`${$}-text bold embedded`),children:b||g}),u.length>0&&w.jsx(nc,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(qa,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},n_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Kn(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,g=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return g?w.jsx(mM,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(EM,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(pM,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(n5,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(sp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,message:e});case"error":return w.jsx(ZD,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(JD,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(hM,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:X(t,`${$}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:X(t,`${$}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},yM=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=ht(),{groupedMessages:a,entryType:u}=Xn();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(KD,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:X(n,`${$}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${$}-message-group-child`,children:w.jsx(n_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(qa,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:X(n,`${$}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(n_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},TM=({isOpen:e}={})=>{const{messages:t}=Kn(),n=z.useRef(null);return z.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"end"})},[t]),z.useEffect(()=>{e&&n.current&&n.current.scrollIntoView(!0)},[e]),n},bM={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},op=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=TM({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(yM,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:U(U({},bM),s),children:w.jsx(tc,{})}),w.jsx("div",{ref:a})]})},r_=()=>{const{globalClassName:e,themeVariables:t}=ht(),{copilot:n,isLoading:r,handleUserInput:s,handleSuggestion:a}=Kn();return hf()?n?w.jsxs("div",{className:X(e,`${$}-container`,`${$}-embedded-chat`),style:t,children:[w.jsx("div",{className:X(e,`${$}-message-container`,"embedded"),children:w.jsx(op,{isWidgetStandalone:!1,isLoading:r,handleSuggestionClick:a})}),w.jsx(hh,{componentType:"chat",className:"embedded-chat",isLoading:r,onSubmit:s}),w.jsx("div",{className:X(`${$}-embedded-chat-menu`),children:w.jsx(XD,{componentType:"chat",children:w.jsx(xb,{componentType:"chat"})})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},[_M,SM]=lo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),xM=e=>CT()(e,["lazyMount","unmountOnExit"]),[wM,Ya]=lo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),i_=z.forwardRef((e,t)=>{const n=Ya(),r=SM(),s=Rh(_e(U({},r),{present:n.open})),a=gr(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(Ai.div,_e(U({},a),{ref:zl(s.ref,t)}))});i_.displayName="DialogBackdrop";const ap=z.forwardRef((e,t)=>{const n=Ya(),r=Fa(),s=gr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Ai.div,_e(U({},s),{ref:zl(r.ref,t)}))});ap.displayName="DialogContent";const up=z.forwardRef((e,t)=>{const n=Ya(),r=gr(n.getDescriptionProps(),e);return w.jsx(Ai.div,_e(U({},r),{ref:t}))});up.displayName="DialogDescription";const lp=z.forwardRef((e,t)=>{const n=Ya(),r=gr(n.getPositionerProps(),e);return Fa().unmounted?null:w.jsx(Ai.div,_e(U({},r),{ref:t}))});lp.displayName="DialogPositioner";var CM=co("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),gs=CM.build(),s_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},a_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},u_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},rc=e=>e.getById(cp(e)),AM=e=>e.getById(s_(e)),vM=e=>e.getById(o_(e)),kM=e=>e.getById(a_(e)),NM=e=>e.getById(dp(e)),OM=e=>e.getById(fp(e)),PM=e=>e.getById(u_(e));function IM(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(_e(U({},gs.trigger.attrs),{dir:a("dir"),id:a_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":cp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(_e(U({},gs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:o_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(_e(U({},gs.positioner.attrs),{dir:a("dir"),id:s_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(_e(U({},gs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:cp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:dp(u),"aria-describedby":f.description?fp(u):void 0}))},getTitleProps(){return t.element(_e(U({},gs.title.attrs),{dir:a("dir"),id:dp(u)}))},getDescriptionProps(){return t.element(_e(U({},gs.description.attrs),{dir:a("dir"),id:fp(u)}))},getCloseTriggerProps(){return t.button(_e(U({},gs.closeTrigger.attrs),{dir:a("dir"),id:u_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var RM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>PM(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return U({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 sb(()=>rc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[kM(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 cb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?ub(()=>rc(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")?KT(()=>[rc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){vn(()=>{e.set("rendered",{title:!!NM(t),description:!!OM(t)})})},syncZIndex({scope:e}){vn(()=>{const t=rc(e);if(!t)return;const n=Fl(t);[AM(e),vM(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})}}}};Nh()(["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 LM=e=>{const t=z.useId(),{getRootNode:n}=Kh(),{dir:r}=gb(),s=U({id:t,getRootNode:n,dir:r},e),a=Oh(RM,s);return IM(a,_T)},l_=e=>{const[t,c]=AT(e),d=c,{children:n}=d,r=on(d,["children"]),[s]=xM(t),a=LM(r),u=Rh(gr({present:a.open},t));return w.jsx(wM,{value:a,children:w.jsx(_M,{value:s,children:w.jsx(ST,{value:u,children:n})})})},hp=z.forwardRef((e,t)=>{const n=Ya(),r=gr(n.getTitleProps(),e);return w.jsx(Ai.h2,_e(U({},r),{ref:t}))});hp.displayName="DialogTitle";const c_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=z.useState((d=e.container)==null?void 0:d.current),a=z.useSyncExternalStore(MM,()=>!1,()=>!0),{getRootNode:u}=Kh();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:DM(u);return w.jsx(w.Fragment,{children:z.Children.map(t,f=>uo.createPortal(f,c))})},DM=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return fs(n)?n:Lr(t).body},MM=()=>()=>{},FM=()=>{const{globalClassName:e}=ht(),{dialogPosition:t}=Jr(),n=t==="bottom-left",r=()=>{ff(n?"bottom-right":"bottom-left")},s=n?qD:VD,a=n?"Move right":"Move left";return w.jsx(Or,{className:X(e,`${$}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:w.jsx(s,{})})},d_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ht(),{mode:s,status:a,dialogPosition:u}=Jr(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p}=Kn(),g=hf(),{isOpen:b}=a||{},T=s==="standalone",_=()=>{yi(!1)};return g?c?w.jsx(l_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:b,children:w.jsx(c_,{children:w.jsx(lp,{className:X(n,`${$}-container`,`${$}-dialog`,u),style:r,children:w.jsxs(ap,{className:X(n,`${$}-dialog-content`,{standalone:T,embedded:!T}),children:[w.jsxs("div",{className:X(n,`${$}-dialog-header`,{standalone:T,embedded:!T}),children:[e&&w.jsx("img",{alt:"",role:"img",className:X(n,`${$}-dialog-logo`,{standalone:T,embedded:!T}),src:e}),w.jsx(hp,{className:X(n,`${$}-dialog-title`,{standalone:T,embedded:!T}),children:t}),w.jsxs("div",{className:X(n,`${$}-dialog-controls`),children:[w.jsx(xb,{componentType:"dialog",isIcon:!0}),w.jsx(FM,{}),w.jsx(Sb,{componentType:"dialog",isIcon:!0}),w.jsx(_b,{componentType:"dialog"}),w.jsx(pf,{className:`dialog ${n}`,onClick:_})]})]}),w.jsx(up,{className:X(n,`${$}-message-container`,{standalone:T,embedded:!T}),children:w.jsx(op,{isWidgetStandalone:T,isLoading:d,isOpen:b,handleSuggestionClick:p})}),w.jsx(hh,{componentType:"dialog",isLoading:d,onSubmit:f})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},BM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ht(),{previousComponentType:r}=Jr(),s=()=>{rl(r||"dialog")};return t?w.jsx(Or,{className:X(n,`${$}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:s,icon:w.jsx(Tb,{})}):w.jsxs("button",{className:X(n,`${$}-overflow-menu-button`,`${$}-toggle-dialog-button`,e),onClick:s,children:[w.jsx(Tb,{}),"Show ",r||"dialog"]})},UM=()=>{const{globalClassName:e}=ht(),{isModalFullscreen:t}=Jr(),n=()=>{df(!t)},r=t?Rv:Lv,s=`${t?"Exit":"Enter"} Fullscreen`;return w.jsx(Or,{ariaLabel:s,title:s,className:X(e,`${$}-modal-fullscreen-button`),icon:w.jsx(r,{}),onClick:n})},f_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ht(),{mode:s,status:a,isModalFullscreen:u}=Jr(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p}=Kn(),{isOpen:g}=a||{},b=s==="standalone",T=hf(),_=({open:v})=>{yi(v)},S=()=>{yi(!1)};return T?c?w.jsx(l_,{lazyMount:!0,open:g,onOpenChange:_,children:w.jsx(c_,{children:w.jsxs("div",{className:X(n,`${$}-modal-container`),style:r,children:[w.jsx(i_,{className:X(n,`${$}-modal-backdrop`)}),w.jsx(lp,{className:X(n,`${$}-container`,`${$}-modal`,{fullscreen:u,standalone:b,embedded:!b}),children:w.jsxs(ap,{className:X(n,`${$}-modal-content`,{standalone:b,embedded:!b}),children:[w.jsxs("div",{className:X(n,`${$}-modal-header`,{standalone:b,embedded:!b}),children:[e&&w.jsx("img",{alt:"",role:"img",className:X(n,`${$}-modal-logo`,{standalone:b,embedded:!b}),src:e}),w.jsx(hp,{className:X(n,`${$}-modal-title`,{standalone:b,embedded:!b}),children:t}),w.jsxs("div",{className:X(n,`${$}-modal-controls`),children:[w.jsx(UM,{}),w.jsx(BM,{componentType:"modal",isIcon:!0}),w.jsx(Sb,{componentType:"modal",isIcon:!0}),w.jsx(_b,{componentType:"modal"}),w.jsx(pf,{className:`modal ${n}`,onClick:S})]})]}),w.jsx(up,{className:X(n,`${$}-message-container`,{standalone:b,embedded:!b}),children:w.jsx(op,{isWidgetStandalone:b,isLoading:d,isOpen:g,handleSuggestionClick:p,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(hh,{componentType:"modal",isLoading:d,onSubmit:f})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},HM="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",zM=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=ht(),r=()=>{nl(!1),yi(!0)};return uo.createPortal(w.jsx("div",{className:X(e,`${$}-minimized-container`),style:n,children:w.jsx(Or,{className:X(e,`${$}-minimized-button`),ariaLabel:"Open Copilot",icon:w.jsx("img",{src:t||HM,alt:"Copilot",className:X(e,`${$}-minimized-icon-img`)}),onClick:r})}),document.body)},jM=()=>{const e=Jr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(zM,{}):t==="dialog"?w.jsx(d_,{}):t==="modal"?w.jsx(f_,{}):w.jsx(r_,{})},$M=()=>{const{copilot:e}=Xn(),{entryType:t,activePromptsId:n,params:r}=Ti(),{setIsInitialized:s,setIsOpen:a,setIsInline:u,setElementId:c,setEntryType:d,setActivePromptsId:f,setParams:p,setPromptsMessage:g,setResponseMessage:b,setIsResponseLoading:T}=e1(),{getCopilotSuggestions:_}=n1();z.useEffect(()=>{const N=L=>{const{property:W,value:F}=L.detail||{};!W||F===void 0||(W==="isOpen"&&a(F),W==="isInline"&&u(F),W==="elementId"&&c(F),W==="entryType"&&d(F),W==="params"&&p(F))};return YA(N),()=>{WA(N)}},[a,u,c,d,p]);const S=z.useCallback(N=>{if(!t||!N)return;_(N,t,W=>{f(W.id)})},[t,_,f]);z.useEffect(()=>{!e||!t||!r||S(r)},[e,t,r,S]);const v=z.useCallback(N=>{N.eventSourceId===n&&(g(N),f(N.id),s(!0))},[n,g,f,s]),A=z.useCallback(N=>{(N==null?void 0:N.eventSourceId)===n&&(b(N),T(!1))},[n,b,T]),R=z.useCallback(()=>{s(!0),T(!1)},[s,T]);return z.useEffect(()=>{if(e)return e.on("follow_up",v),e.on("inquiry",A),e.on("error",R),()=>{e.off("follow_up",v),e.off("inquiry",A),e.off("error",R)}},[e,v,A,R]),null},VM=({sendCopilotPrompt:e})=>{const{globalClassName:t}=ht(),{placeholder:n,isResponseLoading:r}=Ti(),[s,a]=z.useState(""),u=c=>{const d=s.trim();d&&(c.preventDefault(),e(d),a(""))};return w.jsxs("form",{className:X(t,`${$}-prompts-input-container`),name:`${$}-prompts-form`,onSubmit:u,children:[w.jsx("label",{htmlFor:`${$}-prompts-input`,"aria-label":n||"Ask Copilot",children:w.jsx(YD,{className:X(t,`${$}-prompts-input-icon`)})}),w.jsx("input",{id:`${$}-prompts-input`,className:X(t,`${$}-prompts-input`),name:`${$}-prompts-input`,placeholder:n||"Ask Copilot",type:"text",disabled:r,value:s,onChange:c=>a(c.target.value)}),w.jsx(Or,{className:X(t,`${$}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx($s,{}),disabled:r})]})},qM=({sendCopilotPrompt:e})=>{var c,d;const{globalClassName:t}=ht(),{promptsMessage:n,isResponseLoading:r,isInitialized:s}=Ti(),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:X(t,`${$}-prompts-button-group`),children:[!s&&w.jsx(tc,{}),s&&u&&((d=n==null?void 0:n.suggestions)==null?void 0:d.map(f=>w.jsx("button",{className:X(t,`${$}-prompts-button`),disabled:r,onClick:a(f),children:f.displayText},f.displayText)))]})},YM=()=>{const{globalClassName:e}=ht(),{isInline:t,userPrompt:n}=Ti();return!n||!t?null:w.jsx("div",{className:X(e,`${$}-prompts-user-message-container`),children:w.jsx("p",{className:X(e,`${$}-prompts-user-message`),children:n})})},WM=()=>{const{globalClassName:e,openLinksInNewTab:t}=ht(),{isInline:n,responseMessage:r,isResponseLoading:s}=Ti();return!n||!r&&!s?null:s?w.jsx(tc,{}):r?w.jsx("div",{className:X(e,`${$}-prompts-response-container`,`${$}-message-container`),children:w.jsx(sp,{globalClassName:e,openLinksInNewTab:t,message:r})}):null},GM=()=>{const{globalClassName:e,themeVariables:t}=ht(),{connected:n,copilot:r}=Xn(),{handleCopilotRequestAck:s}=rs(),{status:{isOpen:a}}=Jr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p}=Ti(),{setActivePromptsId:g,setUserPrompt:b,setResponseMessage:T,setIsResponseLoading:_}=e1(),[S,v]=z.useState(null);z.useEffect(()=>{if(!d||S)return;const R=document.getElementById(d);R&&v(R)},[d,S]);const A=z.useCallback(R=>{if(!r||!f||!p)return;const N=W=>{c?(T(null),b(R),g(W.id),_(!0)):(a||yi(!0),s(W))},L={userPrompt:R,clientContext:U({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(L,N);break;case"search":r.search(U({searchParams:p},L),N);break;case"browse":r.browse(U({browseParams:p},L),N);break;case"pdp":r.productView(U(U({},p),L),N);break}},[r,c,f,p,a,g,T,b,_,s]);return!n||!u||!S?null:uo.createPortal(w.jsxs("div",{className:X(e,`${$}-prompts-extension-container`),style:t,children:[w.jsx(VM,{sendCopilotPrompt:A}),w.jsx(qM,{sendCopilotPrompt:A}),w.jsxs("div",{className:X(e,`${$}-prompts-extension-messages-container`),children:[w.jsx(YM,{}),w.jsx(WM,{})]})]}),S)},XM=()=>w.jsxs(w.Fragment,{children:[w.jsx($M,{}),w.jsx(GM,{})]}),pp=e=>w.jsxs(r1,_e(U({},e),{children:[w.jsx(jM,{}),w.jsx(XM,{})]}));var ic={},h_;function KM(){if(h_)return ic;h_=1;var e=ET();return ic.createRoot=e.createRoot,ic.hydrateRoot=e.hydrateRoot,ic}var p_=KM();const QM=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=on(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&&(js(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=p_.createRoot(b))==null||p.render(w.jsx(pp,U({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),js(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},JM=r=>{var s=r,{timeout:e,elementId:t}=s,n=on(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){js(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){js(!0,"warn","Container element not found for id:",t),js(!0,"warn","Beginning observation for element"),QM(U({elementId:t,timeout:e},n));return}p_.createRoot(a).render(w.jsx(pp,U({},n)))},ZM={search:sv,browse:zA,pdp:{setPdpContext:Hg,updatePdpProductId:$A,updatePdpLink:VA},components:{setEntryType:aa,toggleWidgetOpen:yi,toggleWidgetMinimized:nl,toggleModalFullscreen:df,setWidgetType:rl,setWidgetDialogPosition:ff,togglePromptsExtensionOpen:jg,togglePromptsExtensionInline:$g,loadPromptsComponent:JA,getAskCimPrompts:GA,getSearchPrompts:XA,getBrowsePrompts:KA,getProductViewPrompts:QA},session:ZA},eF=()=>Object.freeze({search:Object.freeze(_t.state),browse:Object.freeze(at.state),pdp:Object.freeze(fr.state),isConnected:ot.state.connected,isOpen:ot.isOpen,entryType:ot.entryType});Me.CopilotDialog=d_,Me.CopilotEmbed=r_,Me.CopilotModal=f_,Me.CopilotWidget=pp,Me.WidgetProvider=r1,Me.eventHandlers=ZM,Me.injectCopilotWidget=JM,Me.state=eF,Me.useCopilot=Kn,Object.defineProperty(Me,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,F({before:"# ",after:`
|
|
44
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=eu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}f_.peek=bM;function f_(e){return e.value||""}function bM(){return"<"}h_.peek=_M;function h_(e,t,n,r){const s=hp(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 _M(){return"!"}p_.peek=SM;function p_(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 SM(){return"!"}m_.peek=xM;function m_(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 xM(){return"`"}function g_(e,t){const n=zf(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))}E_.peek=wM;function E_(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(g_(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 wM(e,t,n){return g_(e,n)?"<":"["}y_.peek=CM;function y_(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 CM(){return"["}function pp(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 AM(e){const t=pp(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 vM(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 T_(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 kM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?vM(n):pp(n);const c=e.ordered?u==="."?")":".":AM(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),T_(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 NM(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 PM(e,t,n,r){const s=NM(n);let a=n.bulletCurrent||pp(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 OM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const IM=Pl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function RM(e,t,n,r){return(e.children.some(function(u){return IM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function LM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}b_.peek=DM;function b_(e,t,n,r){const s=LM(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=hc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=eu(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=hc(r.after.charCodeAt(0),g,s);b.inside&&(d=d.slice(0,-1)+eu(g));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function DM(e,t,n){return n.options.strong||"*"}function MM(e,t,n,r){return n.safe(e.value,r)}function FM(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 BM(e,t,n){const r=(T_(n)+(n.options.ruleSpaces?" ":"")).repeat(FM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const __={blockquote:aM,break:c_,code:hM,definition:mM,emphasis:d_,hardBreak:c_,heading:TM,html:f_,image:h_,imageReference:p_,inlineCode:m_,link:E_,linkReference:y_,list:kM,listItem:PM,paragraph:OM,root:RM,strong:b_,text:MM,thematicBreak:BM};function UM(){return{enter:{table:HM,tableData:S_,tableHeader:S_,tableRow:jM},exit:{codeText:$M,table:zM,tableData:mp,tableHeader:mp,tableRow:mp}}}function HM(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 zM(e){this.exit(e),this.data.inTable=void 0}function jM(e){this.enter({type:"tableRow",children:[]},e)}function mp(e){this.exit(e)}function S_(e){this.enter({type:"tableCell",children:[]},e)}function $M(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,VM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function VM(e,t){return t==="|"?t:e}function qM(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,A){return f(p(y,S,A),y.align)}function c(y,_,S,A){const v=g(y,S,A),P=f([v]);return P.slice(0,P.indexOf(`
|
|
46
|
+
`))}function d(y,_,S,A){const v=S.enter("tableCell"),P=S.enter("phrasing"),C=S.containerPhrasing(y,me(F({},A),{before:a,after:a}));return P(),v(),C}function f(y,_){return sM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,S){const A=y.children;let v=-1;const P=[],C=_.enter("table");for(;++v<A.length;)P[v]=g(A[v],_,S);return C(),P}function g(y,_,S){const A=y.children;let v=-1;const P=[],C=_.enter("tableRow");for(;++v<A.length;)P[v]=d(A[v],y,_,S);return C(),P}function b(y,_,S){let A=__.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function YM(){return{exit:{taskListCheckValueChecked:x_,taskListCheckValueUnchecked:x_,paragraph:WM}}}function GM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:XM}}}function x_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function WM(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 XM(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=__.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 KM(){return[k8(),X8(),Z8(),UM(),YM()]}function QM(e){return{extensions:[N8(),K8(e),eM(),qM(e),GM()]}}const JM={tokenize:iF,partial:!0},w_={tokenize:sF,partial:!0},C_={tokenize:oF,partial:!0},A_={tokenize:aF,partial:!0},ZM={tokenize:uF,partial:!0},v_={name:"wwwAutolink",tokenize:nF,previous:N_},k_={name:"protocolAutolink",tokenize:rF,previous:P_},ui={name:"emailAutolink",tokenize:tF,previous:O_},qr={};function eF(){return{text:qr}}let Ts=48;for(;Ts<123;)qr[Ts]=ui,Ts++,Ts===58?Ts=65:Ts===91&&(Ts=97);qr[43]=ui,qr[45]=ui,qr[46]=ui,qr[95]=ui,qr[72]=[ui,k_],qr[104]=[ui,k_],qr[87]=[ui,v_],qr[119]=[ui,v_];function tF(e,t,n){const r=this;let s,a;return u;function u(g){return!gp(g)||!O_.call(r,r.previous)||Ep(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return gp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(ZM,p,f)(g):g===45||g===95||hn(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&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function nF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!N_.call(r,r.previous)||Ep(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JM,e.attempt(w_,e.attempt(C_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function rF(e,t,n){const r=this;let s="",a=!1;return u;function u(g){return(g===72||g===104)&&P_.call(r,r.previous)&&!Ep(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(xn(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||Sl(g)||ht(g)||os(g)||xl(g)?n(g):e.attempt(w_,e.attempt(C_,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function iF(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 sF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(A_,d,c)(f):f===null||ht(f)||os(f)||f!==45&&xl(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 oF(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(A_,t,a)(u):u===null||ht(u)||os(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function aF(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||ht(c)||os(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ht(c)||os(c)?t(c):r(c)}function a(c){return xn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):xn(c)?(e.consume(c),u):n(c)}}function uF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return hn(a)?n(a):t(a)}}function N_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function P_(e){return!xn(e)}function O_(e){return!(e===47||gp(e))}function gp(e){return e===43||e===45||e===46||e===95||hn(e)}function Ep(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 lF={tokenize:EF,partial:!0};function cF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pF,continuation:{tokenize:mF},exit:gF}},text:{91:{name:"gfmFootnoteCall",tokenize:hF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dF,resolveTo:fF}}}}function dF(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=Er(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 fF(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 hF(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||ht(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Er(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return ht(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 pF(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||ht(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Er(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ht(_)||(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),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function mF(e,t,n){return e.check(Ca,t,e.attempt(lF,t,n))}function gF(e){e.exit("gfmFootnoteDefinition")}function EF(e,t,n){const r=this;return nt(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 yF(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&&zn(b,b.length,0,wl(y,u.slice(f+1,d),c)),zn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),zn(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=eo(f);if(_===126)return g>1?d(_):(u.consume(_),g++,y);if(g<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),v=eo(_);return A._open=!v||v===2&&!!S,A._close=!S||S===2&&!!v,c(_)}}}class TF{constructor(){this.map=[]}add(t,n,r){bF(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 bF(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 _F(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 SF(){return{flow:{null:{name:"table",tokenize:xF,resolveAll:wF}}}}function xF(e,t,n){const r=this;let s=0,a=0,u;return c;function c($){let ee=r.events.length-1;for(;ee>-1;){const le=r.events[ee][1].type;if(le==="lineEnding"||le==="linePrefix")ee--;else break}const ce=ee>-1?r.events[ee][1].type:null,he=ce==="tableHead"||ce==="tableRow"?D:d;return he===D&&r.parser.lazy[r.now().line]?n($):he($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Be($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ze($)?nt(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g($)))}function g($){return $===null||$===124||ht($)?(e.exit("data"),p($)):(e.consume($),$===92?b:g)}function b($){return $===92||$===124?(e.consume($),g):g($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Ze($)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):q($)}function S($){return Ze($)?nt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),v):$===45?(a+=1,v($)):$===null||Be($)?B($):q($)}function v($){return $===45?(e.enter("tableDelimiterFiller"),P($)):q($)}function P($){return $===45?(e.consume($),P):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C($))}function C($){return Ze($)?nt(e,B,"whitespace")($):B($)}function B($){return $===124?_($):$===null||Be($)?!u||s!==a?q($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):q($)}function q($){return n($)}function D($){return e.enter("tableRow"),J($)}function J($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),J):$===null||Be($)?(e.exit("tableRow"),t($)):Ze($)?nt(e,J,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||ht($)?(e.exit("data"),J($)):(e.consume($),$===92?Te:ie)}function Te($){return $===92||$===124?(e.consume($),ie):ie($)}}function wF(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 TF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(I_(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=pc(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=pc(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=pc(b,t,a,s,n,g)):u[1]!==0&&(g=pc(b,t,u,s,n,g)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&I_(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=_F(t.events,n))}return e}function pc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ko(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ko(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=ko(t.events,n[2]),p=ko(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({},ko(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function I_(e,t,n,r,s){const a=[],u=ko(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 ko(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const CF={name:"tasklistCheck",tokenize:vF};function AF(){return{text:{91:CF}}}function vF(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 ht(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 Be(d)?t(d):Ze(d)?e.check({tokenize:kF},t,n)(d):n(d)}}function kF(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function NF(e){return aE([eF(),cF(),yF(e),SF(),AF()])}const PF={};function OF(e){const t=this,n=e||PF,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(NF(n)),a.push(KM()),u.push(QM(n))}const mc=()=>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"})})}),yp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(QE,{remarkPlugins:[OF],rehypePlugins:[lT],components:{h1:({children:s})=>w.jsx("h1",{className:W(e,`${j}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:W(e,`${j}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:W(e,`${j}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:W(e,`${j}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:W(e,`${j}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:W(e,`${j}-li`),children:s}),a:({href:s,children:a})=>w.jsx(gT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:W(e,`${j}-table-container`),children:w.jsx("table",{className:W(e,`${j}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:W(e,`${j}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:W(e,`${j}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:W(e,`${j}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:W(e,`${j}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:W(e,`${j}-td`),children:s}),span:({className:s,children:a})=>s===`${j}-blinking-cursor`?w.jsx(mc,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),IF=({globalClassName:e,message:t})=>{const[n,r]=H.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:W(e,`${j}-progress-message`,"standalone"),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:w.jsx(v1,{})}),w.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(Tl,{className:W(e,`${j}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(Tk,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(bk,{})]})}),n&&w.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&w.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},RF=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(IF,{globalClassName:e,message:t}):w.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:w.jsx(v1,{})}),w.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),LF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return w.jsxs("div",{className:W(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(Ws,{role:"img"})}),w.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(yp,{text:t.message})]})},R_=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}},gc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),L_=({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:W(e,`${j}-facets`),children:[w.jsx("p",{className:W(e,`${j}-facet-category`),children:c}),w.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},c)})},tu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),DF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=R_(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:W(e,`${j}-user-message standalone`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:w.jsx(N1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(gc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(L_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:w.jsx(N1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(gc,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},MF=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:w.jsx(Ws,{})}),w.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&w.jsx(gc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(L_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(tu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),FF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=R_(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}=H.useMemo(()=>{var S,A,v;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel: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:(v=r==null?void 0:r.browseParams)==null?void 0:v.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(MF,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?w.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:w.jsx(Ws,{})}),w.jsx("p",{className:W(e,`${j}-text bold embedded`),children:b||g}),u.length>0&&w.jsx(gc,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(tu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},D_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=gr(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,g=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return g?w.jsx(DF,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(FF,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(LF,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(S8,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(yp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return w.jsx(_8,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(b8,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(RF,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:W(t,`${j}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},BF=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=ft(),{groupedMessages:a}=Zn(),{entryType:u}=mr();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(y8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:W(n,`${j}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${j}-message-group-child`,children:w.jsx(D_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(tu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(D_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},UF=({isOpen:e}={})=>{const{messages:t}=gr(),n=H.useRef(null);return H.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"end"})},[t]),H.useEffect(()=>{e&&n.current&&n.current.scrollIntoView(!0)},[e]),n},HF={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Tp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=UF({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(BF,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:F(F({},HF),s),children:w.jsx(mc,{})}),w.jsx("div",{ref:a})]})},M_=()=>{const{globalClassName:e,themeVariables:t}=ft(),{copilot:n,isLoading:r,handleUserInput:s,handleSuggestion:a}=gr();return lp()?n?w.jsxs("div",{className:W(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[w.jsx("div",{className:W(e,`${j}-message-container`,"embedded"),children:w.jsx(Tp,{isWidgetStandalone:!1,isLoading:r,handleSuggestionClick:a})}),w.jsx(kh,{componentType:"chat",className:"embedded-chat",isLoading:r,onSubmit:s}),w.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:w.jsx(Q5,{componentType:"chat",children:w.jsx(n_,{componentType:"chat"})})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},[zF,jF]=ms({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),$F=e=>Ga()(e,["lazyMount","unmountOnExit"]),[VF,nu]=ms({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),F_=H.forwardRef((e,t)=>{const n=nu(),r=jF(),s=qh(me(F({},r),{present:n.open})),a=Yt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(mn.div,me(F({},a),{ref:Zl(s.ref,t)}))});F_.displayName="DialogBackdrop";const bp=H.forwardRef((e,t)=>{const n=nu(),r=Ya(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},s),{ref:Zl(r.ref,t)}))});bp.displayName="DialogContent";const _p=H.forwardRef((e,t)=>{const n=nu(),r=Yt(n.getDescriptionProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});_p.displayName="DialogDescription";const Sp=H.forwardRef((e,t)=>{const n=nu(),r=Yt(n.getPositionerProps(),e);return Ya().unmounted?null:w.jsx(mn.div,me(F({},r),{ref:t}))});Sp.displayName="DialogPositioner";var qF=gs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),bs=qF.build(),B_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},U_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},H_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},wp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},z_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Ec=e=>e.getById(xp(e)),YF=e=>e.getById(B_(e)),GF=e=>e.getById(U_(e)),WF=e=>e.getById(H_(e)),XF=e=>e.getById(wp(e)),KF=e=>e.getById(Cp(e)),QF=e=>e.getById(z_(e));function JF(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(me(F({},bs.trigger.attrs),{dir:a("dir"),id:H_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":xp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(F({},bs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:U_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({},bs.positioner.attrs),{dir:a("dir"),id:B_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(me(F({},bs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:xp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:wp(u),"aria-describedby":f.description?Cp(u):void 0}))},getTitleProps(){return t.element(me(F({},bs.title.attrs),{dir:a("dir"),id:wp(u)}))},getDescriptionProps(){return t.element(me(F({},bs.description.attrs),{dir:a("dir"),id:Cp(u)}))},getCloseTriggerProps(){return t.button(me(F({},bs.closeTrigger.attrs),{dir:a("dir"),id:z_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var ZF={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>QF(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 xb(()=>Ec(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[WF(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 kb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Ab(()=>Ec(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")?pb(()=>[Ec(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!XF(t),description:!!KF(t)})})},syncZIndex({scope:e}){qt(()=>{const t=Ec(e);if(!t)return;const n=mo(t);[YF(e),GF(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})}}}};To()(["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 eB=e=>{const t=H.useId(),{getRootNode:n}=dc(),{dir:r}=up(),s=F({id:t,getRootNode:n,dir:r},e),a=Jl(ZF,s);return JF(a,jh)},j_=e=>{const[t,c]=VT(e),d=c,{children:n}=d,r=rn(d,["children"]),[s]=$F(t),a=eB(r),u=qh(Yt({present:a.open},t));return w.jsx(VF,{value:a,children:w.jsx(zF,{value:s,children:w.jsx(zT,{value:u,children:n})})})},Ap=H.forwardRef((e,t)=>{const n=nu(),r=Yt(n.getTitleProps(),e);return w.jsx(mn.h2,me(F({},r),{ref:t}))});Ap.displayName="DialogTitle";const $_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(nB,()=>!1,()=>!0),{getRootNode:u}=dc();if(H.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:tB(u);return w.jsx(w.Fragment,{children:H.Children.map(t,f=>Gs.createPortal(f,c))})},tB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return hs(n)?n:Br(t).body},nB=()=>()=>{},rB=()=>{const{globalClassName:e}=ft(),{dialogPosition:t}=mr(),n=t==="bottom-left",r=()=>{wf(n?"bottom-right":"bottom-left")},s=n?q5:V5,a=n?"Move right":"Move left";return w.jsx(Lr,{className:W(e,`${j}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:w.jsx(s,{})})},V_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ft(),{mode:s,status:a,dialogPosition:u}=mr(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:g}=gr(),b=lp(),{isOpen:y}=a||{},_=s==="standalone",S=()=>{bi(!1)};return b?c?w.jsx(j_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:w.jsx($_,{children:w.jsx(Sp,{className:W(n,`${j}-container`,`${j}-dialog`,u),style:r,children:w.jsxs(bp,{className:W(n,`${j}-dialog-content`,{standalone:_,embedded:!_}),children:[w.jsxs("div",{className:W(n,`${j}-dialog-header`,{standalone:_,embedded:!_}),children:[e&&w.jsx("img",{alt:"",role:"img",className:W(n,`${j}-dialog-logo`,{standalone:_,embedded:!_}),src:e}),w.jsx(Ap,{className:W(n,`${j}-dialog-title`,{standalone:_,embedded:!_}),children:t}),w.jsxs("div",{className:W(n,`${j}-dialog-controls`),children:[w.jsx(n_,{componentType:"dialog",isIcon:!0}),w.jsx(rB,{}),w.jsx(t_,{componentType:"dialog",isIcon:!0}),w.jsx(e_,{componentType:"dialog",onReset:g}),w.jsx(Nf,{className:`dialog ${n}`,onClick:S})]})]}),w.jsx(_p,{className:W(n,`${j}-message-container`,{standalone:_,embedded:!_}),children:w.jsx(Tp,{isWidgetStandalone:_,isLoading:d,isOpen:y,handleSuggestionClick:p})}),w.jsx(kh,{componentType:"dialog",isLoading:d,onSubmit:f})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},iB=()=>{const{globalClassName:e}=ft(),{isModalFullscreen:t}=mr(),n=()=>{xf(!t)},r=t?_k:Sk,s=`${t?"Exit":"Enter"} Fullscreen`;return w.jsx(Lr,{ariaLabel:s,title:s,className:W(e,`${j}-modal-fullscreen-button`),icon:w.jsx(r,{}),onClick:n})},sB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=mr(),s=()=>{ml(r||"dialog")};return t?w.jsx(Lr,{className:W(n,`${j}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:s,icon:w.jsx(Mb,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,e),onClick:s,children:[w.jsx(Mb,{}),"Show ",r||"dialog"]})},q_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=ft(),{mode:s,status:a,isModalFullscreen:u}=mr(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:g}=gr(),{isOpen:b}=a||{},y=s==="standalone",_=lp(),S=({open:v})=>{bi(v)},A=()=>{bi(!1)};return _?c?w.jsx(j_,{lazyMount:!0,open:b,onOpenChange:S,children:w.jsx($_,{children:w.jsxs("div",{className:W(n,`${j}-modal-container`),style:r,children:[w.jsx(F_,{className:W(n,`${j}-modal-backdrop`)}),w.jsx(Sp,{className:W(n,`${j}-container`,`${j}-modal`,{fullscreen:u,standalone:y,embedded:!y}),children:w.jsxs(bp,{className:W(n,`${j}-modal-content`,{standalone:y,embedded:!y}),children:[w.jsxs("div",{className:W(n,`${j}-modal-header`,{standalone:y,embedded:!y}),children:[e&&w.jsx("img",{alt:"",role:"img",className:W(n,`${j}-modal-logo`,{standalone:y,embedded:!y}),src:e}),w.jsx(Ap,{className:W(n,`${j}-modal-title`,{standalone:y,embedded:!y}),children:t}),w.jsxs("div",{className:W(n,`${j}-modal-controls`),children:[w.jsx(iB,{}),w.jsx(sB,{componentType:"modal",isIcon:!0}),w.jsx(t_,{componentType:"modal",isIcon:!0}),w.jsx(e_,{componentType:"modal",onReset:g}),w.jsx(Nf,{className:`modal ${n}`,onClick:A})]})]}),w.jsx(_p,{className:W(n,`${j}-message-container`,{standalone:y,embedded:!y}),children:w.jsx(Tp,{isWidgetStandalone:y,isLoading:d,isOpen:b,handleSuggestionClick:p,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(kh,{componentType:"modal",isLoading:d,onSubmit:f})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},oB=()=>{const e=mr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(ck,{}):t==="dialog"?w.jsx(V_,{}):t==="modal"?w.jsx(q_,{}):w.jsx(M_,{})},aB=()=>{const{copilot:e}=Zn(),{entryType:t,activePromptsId:n,params:r}=_i(),{setIsInitialized:s,setIsOpen:a,setIsInline:u,setElementId:c,setEntryType:d,setActivePromptsId:f,setParams:p,setPromptsMessage:g,setResponseMessage:b,setIsResponseLoading:y}=h1(),{getCopilotSuggestions:_}=m1();H.useEffect(()=>{const C=B=>{const{property:q,value:D}=B.detail||{};!q||D===void 0||(q==="isOpen"&&a(D),q==="isInline"&&u(D),q==="elementId"&&c(D),q==="entryType"&&d(D),q==="params"&&p(D))};return Nv(C),()=>{Pv(C)}},[a,u,c,d,p]);const S=H.useCallback(C=>{if(!t||!C)return;_(C,t,q=>{f(q.id)})},[t,_,f]);H.useEffect(()=>{!e||!t||!r||S(r)},[e,t,r,S]);const A=H.useCallback(C=>{C.eventSourceId===n&&(g(C),f(C.id),s(!0))},[n,g,f,s]),v=H.useCallback(C=>{(C==null?void 0:C.eventSourceId)===n&&(b(C),y(!1))},[n,b,y]),P=H.useCallback(()=>{s(!0),y(!1)},[s,y]);return H.useEffect(()=>{if(e)return e.on("follow_up",A),e.on("inquiry",v),e.on("error",P),()=>{e.off("follow_up",A),e.off("inquiry",v),e.off("error",P)}},[e,A,v,P]),null},uB=({sendCopilotPrompt:e})=>{const{globalClassName:t}=ft(),{placeholder:n,isResponseLoading:r}=_i(),[s,a]=H.useState(""),u=c=>{const d=s.trim();d&&(c.preventDefault(),e(d),a(""))};return w.jsxs("form",{className:W(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(W5,{className:W(t,`${j}-prompts-input-icon`)})}),w.jsx("input",{id:`${j}-prompts-input`,className:W(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(Lr,{className:W(t,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Ws,{}),disabled:r})]})},lB=({sendCopilotPrompt:e})=>{var c,d;const{globalClassName:t}=ft(),{promptsMessage:n,isResponseLoading:r,isInitialized:s}=_i(),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:W(t,`${j}-prompts-button-group`),children:[!s&&w.jsx(mc,{}),s&&u&&((d=n==null?void 0:n.suggestions)==null?void 0:d.map(f=>w.jsx("button",{className:W(t,`${j}-prompts-button`),disabled:r,onClick:a(f),children:f.displayText},f.displayText)))]})},cB=()=>{const{globalClassName:e}=ft(),{isInline:t,userPrompt:n}=_i();return!n||!t?null:w.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:w.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},dB=()=>{const{globalClassName:e,openLinksInNewTab:t}=ft(),{isInline:n,responseMessage:r,isResponseLoading:s}=_i();return!n||!r&&!s?null:s?w.jsx(mc,{}):r?w.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:w.jsx(yp,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},fB=()=>{const{globalClassName:e,themeVariables:t}=ft(),{connected:n,copilot:r}=Zn(),{handleCopilotRequestAck:s}=Ys(),{status:{isOpen:a}}=mr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p}=_i(),{setActivePromptsId:g,setUserPrompt:b,setResponseMessage:y,setIsResponseLoading:_}=h1(),[S,A]=H.useState(null);H.useEffect(()=>{if(!d||S)return;const P=document.getElementById(d);P&&A(P)},[d,S]);const v=H.useCallback(P=>{if(!r||!f||!p)return;const C=q=>{c?(y(null),b(P),g(q.id),_(!0)):(a||bi(!0),s(q))},B={userPrompt:P,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(B,C);break;case"search":r.search(F({searchParams:p},B),C);break;case"browse":r.browse(F({browseParams:p},B),C);break;case"pdp":r.productView(F(F({},p),B),C);break}},[r,c,f,p,a,g,y,b,_,s]);return!n||!u||!S?null:Gs.createPortal(w.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[w.jsx(uB,{sendCopilotPrompt:v}),w.jsx(lB,{sendCopilotPrompt:v}),w.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[w.jsx(cB,{}),w.jsx(dB,{})]})]}),S)},hB=()=>w.jsxs(w.Fragment,{children:[w.jsx(aB,{}),w.jsx(fB,{})]}),vp=e=>w.jsxs(g1,me(F({},e),{children:[w.jsx(oB,{}),w.jsx(hB,{})]}));var yc={},Y_;function pB(){if(Y_)return yc;Y_=1;var e=_1();return yc.createRoot=e.createRoot,yc.hydrateRoot=e.hydrateRoot,yc}var G_=pB();const mB=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=rn(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&&(qs(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=G_.createRoot(b))==null||p.render(w.jsx(vp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),qs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:V_,CopilotEmbed:M_,CopilotModal:q_,CopilotWidget:vp,CopilotWidgetProvider:g1,eventHandlers:{search:jv,browse:wv,pdp:{setPdpContext:Zg,updatePdpProductId:Av,updatePdpLink:vv},components:{setEntryType:ga,toggleWidgetOpen:bi,toggleWidgetMinimized:pl,toggleModalFullscreen:xf,setWidgetType:ml,setWidgetDialogPosition:wf,togglePromptsExtensionOpen:t1,togglePromptsExtensionInline:n1,loadPromptsComponent:Dv,getAskCimPrompts:Ov,getSearchPrompts:Iv,getBrowsePrompts:Rv,getProductViewPrompts:Lv},session:Mv},injectCopilotWidget:r=>{var s=r,{timeout:e,elementId:t}=s,n=rn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){qs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){qs(!0,"warn","Container element not found for id:",t),qs(!0,"warn","Beginning observation for element"),mB(F({elementId:t,timeout:e},n));return}G_.createRoot(a).render(w.jsx(vp,F({},n)))},state:()=>Object.freeze({search:Object.freeze(_t.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:st.state.connected,isOpen:st.isOpen,entryType:st.entryType}),useCopilot:gr},Symbol.toStringTag,{value:"Module"}))}));
|