@cimulate/copilot-widget 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
(function(Oe,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Me(Oe["cimulate-copilot-widget"]={}))})(this,function(Oe){"use strict";var qM=Object.defineProperty,YM=Object.defineProperties;var WM=Object.getOwnPropertyDescriptors;var Gc=Object.getOwnPropertySymbols;var ux=Object.prototype.hasOwnProperty,ax=Object.prototype.propertyIsEnumerable;var vo=(Oe,Me)=>(Me=Symbol[Oe])?Me:Symbol.for("Symbol."+Oe),GM=Oe=>{throw TypeError(Oe)},Kc=Math.pow,Om=(Oe,Me,Ge)=>Me in Oe?qM(Oe,Me,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Oe[Me]=Ge,U=(Oe,Me)=>{for(var Ge in Me||(Me={}))ux.call(Me,Ge)&&Om(Oe,Ge,Me[Ge]);if(Gc)for(var Ge of Gc(Me))ax.call(Me,Ge)&&Om(Oe,Ge,Me[Ge]);return Oe},be=(Oe,Me)=>YM(Oe,WM(Me));var Gt=(Oe,Me)=>{var Ge={};for(var st in Oe)ux.call(Oe,st)&&Me.indexOf(st)<0&&(Ge[st]=Oe[st]);if(Oe!=null&&Gc)for(var st of Gc(Oe))Me.indexOf(st)<0&&ax.call(Oe,st)&&(Ge[st]=Oe[st]);return Ge};var Fe=(Oe,Me,Ge)=>Om(Oe,typeof Me!="symbol"?Me+"":Me,Ge);var rt=(Oe,Me,Ge)=>new Promise((st,_t)=>{var dt=wt=>{try{Ut(Ge.next(wt))}catch(mn){_t(mn)}},Ie=wt=>{try{Ut(Ge.throw(wt))}catch(mn){_t(mn)}},Ut=wt=>wt.done?st(wt.value):Promise.resolve(wt.value).then(dt,Ie);Ut((Ge=Ge.apply(Oe,Me)).next())}),Mr=function(Oe,Me){this[0]=Oe,this[1]=Me},Qc=(Oe,Me,Ge)=>{var st=(Ie,Ut,wt,mn)=>{try{var hs=Ge[Ie](Ut),ko=(Ut=hs.value)instanceof Mr,Xc=hs.done;Promise.resolve(ko?Ut[0]:Ut).then(er=>ko?st(Ie==="return"?Ie:"next",Ut[1]?{done:er.done,value:er.value}:er,wt,mn):wt({value:er,done:Xc})).catch(er=>st("throw",er,wt,mn))}catch(er){mn(er)}},_t=Ie=>dt[Ie]=Ut=>new Promise((wt,mn)=>st(Ie,Ut,wt,mn)),dt={};return Ge=Ge.apply(Oe,Me),dt[vo("asyncIterator")]=()=>dt,_t("next"),_t("throw"),_t("return"),dt},Im=Oe=>{var Me=Oe[vo("asyncIterator")],Ge=!1,st,_t={};return Me==null?(Me=Oe[vo("iterator")](),st=dt=>_t[dt]=Ie=>Me[dt](Ie)):(Me=Me.call(Oe),st=dt=>_t[dt]=Ie=>{if(Ge){if(Ge=!1,dt==="throw")throw Ie;return Ie}return Ge=!0,{done:!1,value:new Mr(new Promise(Ut=>{var wt=Me[dt](Ie);wt instanceof Object||GM("Object expected"),Ut(wt)}),1)}}),_t[vo("iterator")]=()=>_t,st("next"),"throw"in Me?st("throw"):_t.throw=dt=>{throw dt},"return"in Me&&st("return"),_t},lx=(Oe,Me,Ge)=>(Me=Oe[vo("asyncIterator")])?Me.call(Oe):(Oe=Oe[vo("iterator")](),Me={},Ge=(st,_t)=>(_t=Oe[st])&&(Me[st]=dt=>new Promise((Ie,Ut,wt)=>(dt=_t.call(Oe,dt),wt=dt.done,Promise.resolve(dt.value).then(mn=>Ie({value:mn,done:wt}),Ut)))),Ge("next"),Ge("return"),Me);var Me=document.createElement("style");Me.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.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-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;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.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-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;color:var(--cim-widget-secondary-color)}.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-user-message{display:flex;align-items:center}.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:30%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.cim-widget-message-icon.user-message-icon{margin-right:.5rem}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex}.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:30%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;padding-top:.5rem;padding-bottom:.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;padding:1rem;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;width:100%;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%;border-radius:0}}@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}.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;padding:1rem;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;width:100%;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}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}.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:2rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1.5rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1.2rem}.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 0}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Me);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}},_t={},dt={exports:{}},Ie={};var Ut;function wt(){if(Ut)return Ie;Ut=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function C(R,K,N){this.props=R,this.context=K,this.refs=S,this.updater=N||T}C.prototype.isReactComponent={},C.prototype.setState=function(R,K){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,K,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function k(){}k.prototype=C.prototype;function F(R,K,N){this.props=R,this.context=K,this.refs=S,this.updater=N||T}var D=F.prototype=new k;D.constructor=F,_(D,C.prototype),D.isPureReactComponent=!0;var z=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function Te(R,K,N){var _e,Be={},Pe=null,Ye=null;if(K!=null)for(_e in K.ref!==void 0&&(Ye=K.ref),K.key!==void 0&&(Pe=""+K.key),K)X.call(K,_e)&&!te.hasOwnProperty(_e)&&(Be[_e]=K[_e]);var Ve=arguments.length-2;if(Ve===1)Be.children=N;else if(1<Ve){for(var me=Array(Ve),Ne=0;Ne<Ve;Ne++)me[Ne]=arguments[Ne+2];Be.children=me}if(R&&R.defaultProps)for(_e in Ve=R.defaultProps,Ve)Be[_e]===void 0&&(Be[_e]=Ve[_e]);return{$$typeof:e,type:R,key:Pe,ref:Ye,props:Be,_owner:B.current}}function Se(R,K){return{$$typeof:e,type:R.type,key:K,ref:R.ref,props:R.props,_owner:R._owner}}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function fe(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(N){return K[N]})}var ae=/\/+/g;function le(R,K){return typeof R=="object"&&R!==null&&R.key!=null?fe(""+R.key):K.toString(36)}function de(R,K,N,_e,Be){var Pe=typeof R;(Pe==="undefined"||Pe==="boolean")&&(R=null);var Ye=!1;if(R===null)Ye=!0;else switch(Pe){case"string":case"number":Ye=!0;break;case"object":switch(R.$$typeof){case e:case t:Ye=!0}}if(Ye)return Ye=R,Be=Be(Ye),R=_e===""?"."+le(Ye,0):_e,z(Be)?(N="",R!=null&&(N=R.replace(ae,"$&/")+"/"),de(Be,K,N,"",function(Ne){return Ne})):Be!=null&&(H(Be)&&(Be=Se(Be,N+(!Be.key||Ye&&Ye.key===Be.key?"":(""+Be.key).replace(ae,"$&/")+"/")+R)),K.push(Be)),1;if(Ye=0,_e=_e===""?".":_e+":",z(R))for(var Ve=0;Ve<R.length;Ve++){Pe=R[Ve];var me=_e+le(Pe,Ve);Ye+=de(Pe,K,N,me,Be)}else if(me=b(R),typeof me=="function")for(R=me.call(R),Ve=0;!(Pe=R.next()).done;)Pe=Pe.value,me=_e+le(Pe,Ve++),Ye+=de(Pe,K,N,me,Be);else if(Pe==="object")throw K=String(R),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return Ye}function ye(R,K,N){if(R==null)return R;var _e=[],Be=0;return de(R,_e,"","",function(Pe){return K.call(N,Pe,Be++)}),_e}function Ae(R){if(R._status===-1){var K=R._result;K=K(),K.then(function(N){(R._status===0||R._status===-1)&&(R._status=1,R._result=N)},function(N){(R._status===0||R._status===-1)&&(R._status=2,R._result=N)}),R._status===-1&&(R._status=0,R._result=K)}if(R._status===1)return R._result.default;throw R._result}var oe={current:null},q={transition:null},Z={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:ye,forEach:function(R,K,N){ye(R,function(){K.apply(this,arguments)},N)},count:function(R){var K=0;return ye(R,function(){K++}),K},toArray:function(R){return ye(R,function(K){return K})||[]},only:function(R){if(!H(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Ie.Component=C,Ie.Fragment=n,Ie.Profiler=o,Ie.PureComponent=F,Ie.StrictMode=r,Ie.Suspense=f,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ie.act=w,Ie.cloneElement=function(R,K,N){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Be=R.key,Pe=R.ref,Ye=R._owner;if(K!=null){if(K.ref!==void 0&&(Pe=K.ref,Ye=B.current),K.key!==void 0&&(Be=""+K.key),R.type&&R.type.defaultProps)var Ve=R.type.defaultProps;for(me in K)X.call(K,me)&&!te.hasOwnProperty(me)&&(_e[me]=K[me]===void 0&&Ve!==void 0?Ve[me]:K[me])}var me=arguments.length-2;if(me===1)_e.children=N;else if(1<me){Ve=Array(me);for(var Ne=0;Ne<me;Ne++)Ve[Ne]=arguments[Ne+2];_e.children=Ve}return{$$typeof:e,type:R.type,key:Be,ref:Pe,props:_e,_owner:Ye}},Ie.createContext=function(R){return R={$$typeof:a,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:u,_context:R},R.Consumer=R},Ie.createElement=Te,Ie.createFactory=function(R){var K=Te.bind(null,R);return K.type=R,K},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(R){return{$$typeof:c,render:R}},Ie.isValidElement=H,Ie.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:Ae}},Ie.memo=function(R,K){return{$$typeof:h,type:R,compare:K===void 0?null:K}},Ie.startTransition=function(R){var K=q.transition;q.transition={};try{R()}finally{q.transition=K}},Ie.unstable_act=w,Ie.useCallback=function(R,K){return oe.current.useCallback(R,K)},Ie.useContext=function(R){return oe.current.useContext(R)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(R){return oe.current.useDeferredValue(R)},Ie.useEffect=function(R,K){return oe.current.useEffect(R,K)},Ie.useId=function(){return oe.current.useId()},Ie.useImperativeHandle=function(R,K,N){return oe.current.useImperativeHandle(R,K,N)},Ie.useInsertionEffect=function(R,K){return oe.current.useInsertionEffect(R,K)},Ie.useLayoutEffect=function(R,K){return oe.current.useLayoutEffect(R,K)},Ie.useMemo=function(R,K){return oe.current.useMemo(R,K)},Ie.useReducer=function(R,K,N){return oe.current.useReducer(R,K,N)},Ie.useRef=function(R){return oe.current.useRef(R)},Ie.useState=function(R){return oe.current.useState(R)},Ie.useSyncExternalStore=function(R,K,N){return oe.current.useSyncExternalStore(R,K,N)},Ie.useTransition=function(){return oe.current.useTransition()},Ie.version="18.3.1",Ie}var mn;function hs(){return mn||(mn=1,dt.exports=wt()),dt.exports}var ko;function Xc(){if(ko)return _t;ko=1;var e=hs(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var m,E={},b=null,T=null;h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),f.ref!==void 0&&(T=f.ref);for(m in f)r.call(f,m)&&!u.hasOwnProperty(m)&&(E[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)E[m]===void 0&&(E[m]=f[m]);return{$$typeof:t,type:c,key:b,ref:T,props:E,_owner:o.current}}return _t.Fragment=n,_t.jsx=a,_t.jsxs=a,_t}var er;function dx(){return er||(er=1,st.exports=Xc()),st.exports}var I=dx();const Er=Object.create(null);Er.open="0",Er.close="1",Er.ping="2",Er.pong="3",Er.message="4",Er.upgrade="5",Er.noop="6";const aa=Object.create(null);Object.keys(Er).forEach(e=>{aa[Er[e]]=e});const Jc={type:"error",data:"parser error"},Pm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Rm=typeof ArrayBuffer=="function",Lm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Zc=({type:e,data:t},n,r)=>Pm&&t instanceof Blob?n?r(t):Dm(t,r):Rm&&(t instanceof ArrayBuffer||Lm(t))?n?r(t):Dm(new Blob([t]),r):r(Er[e]+(t||"")),Dm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Mm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ef;function hx(e,t){if(Pm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Mm).then(t);if(Rm&&(e.data instanceof ArrayBuffer||Lm(e.data)))return t(Mm(e.data));Zc(e,!1,n=>{ef||(ef=new TextEncoder),t(ef.encode(n))})}const Fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",No=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Fm.length;e++)No[Fm.charCodeAt(e)]=e;const px=e=>{let t=e.length*.75,n=e.length,r,o=0,u,a,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)u=No[e.charCodeAt(r)],a=No[e.charCodeAt(r+1)],c=No[e.charCodeAt(r+2)],f=No[e.charCodeAt(r+3)],m[o++]=u<<2|a>>4,m[o++]=(a&15)<<4|c>>2,m[o++]=(c&3)<<6|f&63;return h},mx=typeof ArrayBuffer=="function",tf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Bm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:gx(e.substring(1),t)}:aa[n]?e.length>1?{type:aa[n],data:e.substring(1)}:{type:aa[n]}:Jc},gx=(e,t)=>{if(mx){const n=px(e);return Bm(n,t)}else return{base64:!0,data:e}},Bm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Um="",Ex=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,a)=>{Zc(u,!1,c=>{r[a]=c,++o===n&&t(r.join(Um))})})},yx=(e,t)=>{const n=e.split(Um),r=[];for(let o=0;o<n.length;o++){const u=tf(n[o],t);if(r.push(u),u.type==="error")break}return r};function Tx(){return new TransformStream({transform(e,t){hx(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let nf;function la(e){return e.reduce((t,n)=>t+n.length,0)}function ca(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function bx(e,t){nf||(nf=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(a,c){for(n.push(a);;){if(r===0){if(la(n)<1)break;const f=ca(n,1);u=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(la(n)<2)break;const f=ca(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(la(n)<8)break;const f=ca(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(Jc);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(la(n)<o)break;const f=ca(n,o);c.enqueue(tf(u?f:nf.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(Jc);break}}}})}const Hm=4;function Pt(e){if(e)return _x(e)}function _x(e){for(var t in Pt.prototype)e[t]=Pt.prototype[t];return e}Pt.prototype.on=Pt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Pt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Pt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Pt.prototype.emitReserved=Pt.prototype.emit,Pt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Pt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const fa=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),zn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),xx="arraybuffer";function KM(){}function zm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Sx=zn.setTimeout,wx=zn.clearTimeout;function da(e,t){t.useNativeTimers?(e.setTimeoutFn=Sx.bind(zn),e.clearTimeoutFn=wx.bind(zn)):(e.setTimeoutFn=zn.setTimeout.bind(zn),e.clearTimeoutFn=zn.clearTimeout.bind(zn))}const Cx=1.33;function Ax(e){return typeof e=="string"?vx(e):Math.ceil((e.byteLength||e.size)*Cx)}function vx(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function jm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kx(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Nx(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class Ox extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class rf extends Pt{constructor(t){super(),this.writable=!1,da(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 Ox(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=tf(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=kx(t);return n.length?"?"+n:""}}class Ix extends rf{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)};yx(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,Ex(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]=jm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let $m=!1;try{$m=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Px=$m;function Rx(){}class Lx extends Ix{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}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 yr extends Pt{constructor(t,n,r){super(),this.createRequest=t,da(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=zm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=yr.requestsCount++,yr.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=Rx,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete yr.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(yr.requestsCount=0,yr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Vm);else if(typeof addEventListener=="function"){const e="onpagehide"in zn?"pagehide":"unload";addEventListener(e,Vm,!1)}}function Vm(){for(let e in yr.requests)yr.requests.hasOwnProperty(e)&&yr.requests[e].abort()}const Dx=function(){const e=qm({xdomain:!1});return e&&e.responseType!==null}();class Mx extends Lx{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Dx&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new yr(qm,this.uri(),t)}}function qm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Px))return new XMLHttpRequest}catch(n){}if(!t)try{return new zn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Ym=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Fx extends rf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Ym?{}:zm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Zc(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(a){}o&&fa(()=>{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]=jm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const sf=zn.WebSocket||zn.MozWebSocket;class Bx extends Fx{createSocket(t,n,r){return Ym?new sf(t,n,r):n?new sf(t,n):new sf(t)}doWrite(t,n){this.ws.send(n)}}class Ux extends rf{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=bx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Tx();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),u())}).catch(c=>{})};u();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&fa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Hx={websocket:Bx,webtransport:Ux,polling:Mx},zx=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function of(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=zx.exec(e||""),u={},a=14;for(;a--;)u[jx[a]]=o[a]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=$x(u,u.path),u.queryKey=Vx(u,u.query),u}function $x(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 Vx(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const uf=typeof addEventListener=="function"&&typeof removeEventListener=="function",ha=[];uf&&addEventListener("offline",()=>{ha.forEach(e=>e())},!1);class ri extends Pt{constructor(t,n){if(super(),this.binaryType=xx,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=of(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=of(n.host).host);da(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Nx(this.opts.query)),uf&&(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"})},ha.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Hm,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&&ri.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",ri.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=Ax(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,fa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ri.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(),uf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ha.indexOf(this._offlineEventListener);r!==-1&&ha.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ri.protocol=Hm;class qx extends ri{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;ri.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ri.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),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 u(){r||(r=!0,m(),n.close(),n=null)}const a=E=>{const b=new Error("probe error: "+E);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){a("transport closed")}function f(){a("socket closed")}function h(E){n&&E.name!==n.name&&u()}const m=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",a),n.once("close",c),this.once("close",f),this.once("upgrading",h),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 Yx=class extends qx{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Hx[o]).filter(o=>!!o)),super(t,r)}};function Wx(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=of(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 u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const Gx=typeof ArrayBuffer=="function",Kx=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Wm=Object.prototype.toString,Qx=typeof Blob=="function"||typeof Blob!="undefined"&&Wm.call(Blob)==="[object BlobConstructor]",Xx=typeof File=="function"||typeof File!="undefined"&&Wm.call(File)==="[object FileConstructor]";function af(e){return Gx&&(e instanceof ArrayBuffer||Kx(e))||Qx&&e instanceof Blob||Xx&&e instanceof File}function pa(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(pa(e[n]))return!0;return!1}if(af(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return pa(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&pa(e[n]))return!0;return!1}function Jx(e){const t=[],n=e.data,r=e;return r.data=lf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lf(e,t){if(!e)return e;if(af(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]=lf(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]=lf(e[r],t));return n}return e}function Zx(e,t){return e.data=cf(e.data,t),delete e.attachments,e}function cf(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]=cf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=cf(e[n],t));return e}const eS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],tS=5;var Qe;(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"})(Qe||(Qe={}));class nS{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&pa(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.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=Jx(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Gm(e){return Object.prototype.toString.call(e)==="[object Object]"}class ff extends Pt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new rS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(af(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(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(ff.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Gm(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Gm(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&eS.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rS{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=Zx(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const iS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ff,Encoder:nS,get PacketType(){return Qe},protocol:tS},Symbol.toStringTag,{value:"Module"}));function tr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Km extends Pt{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=[tr(t,"open",this.onopen.bind(this)),tr(t,"packet",this.onpacket.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,u;if(sS.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 a={type:Qe.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),a.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),a=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(a,c)=>a?o(a):r(c);u.withError=!0,n.push(u),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...u)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...u)),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:Qe.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 Qe.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 Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Qe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Qe.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 ps(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}ps.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},ps.prototype.reset=function(){this.attempts=0},ps.prototype.setMin=function(e){this.ms=e},ps.prototype.setMax=function(e){this.max=e},ps.prototype.setJitter=function(e){this.jitter=e};class df extends Pt{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,da(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 ps({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||iS;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Yx(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=tr(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},a=tr(n,"error",u);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(tr(t,"ping",this.onping.bind(this)),tr(t,"data",this.ondata.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(t,"close",this.onclose.bind(this)),tr(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){fa(()=>{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 Km(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Oo={};function ma(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Wx(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,a=Oo[o]&&u in Oo[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let f;return c?f=new df(r,t):(Oo[o]||(Oo[o]=new df(r,t)),f=Oo[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(ma,{Manager:df,Socket:Km,io:ma,connect:ma});var oS=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===uS}(t)}(e)},uS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Io(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ms((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function aS(e,t,n){return e.concat(t).map(function(r){return Io(r,n)})}function Qm(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 Xm(e,t){try{return t in e}catch(n){return!1}}function lS(e,t,n){var r={};return n.isMergeableObject(e)&&Qm(e).forEach(function(o){r[o]=Io(e[o],n)}),Qm(t).forEach(function(o){(function(u,a){return Xm(u,a)&&!(Object.hasOwnProperty.call(u,a)&&Object.propertyIsEnumerable.call(u,a))})(e,o)||(Xm(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,a){if(!a.customMerge)return ms;var c=a.customMerge(u);return typeof c=="function"?c:ms}(o,n)(e[o],t[o],n):r[o]=Io(t[o],n))}),r}function ms(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||aS,n.isMergeableObject=n.isMergeableObject||oS,n.cloneUnlessOtherwiseSpecified=Io;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):lS(e,t,n):Io(t,n)}ms.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return ms(n,r,t)},{})};var cS=ms;class fS{constructor(t){Object.assign(this,t)}}function cn(e){if(e)return function(t){for(var n in cn.prototype)t[n]=cn.prototype[n];return t}(e)}cn.prototype.on=cn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},cn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},cn.prototype.off=cn.prototype.removeListener=cn.prototype.removeAllListeners=cn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},cn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},cn.prototype.emitReserved=cn.prototype.emit,cn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},cn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const dS=typeof ArrayBuffer=="function",Jm=Object.prototype.toString,hS=typeof Blob=="function"||typeof Blob!="undefined"&&Jm.call(Blob)==="[object BlobConstructor]",pS=typeof File=="function"||typeof File!="undefined"&&Jm.call(File)==="[object FileConstructor]";function hf(e){return dS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||hS&&e instanceof Blob||pS&&e instanceof File}function ga(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ga(e[n]))return!0;return!1}if(hf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ga(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ga(e[n]))return!0;return!1}function mS(e){const t=[],n=e.data,r=e;return r.data=pf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function pf(e,t){if(!e)return e;if(hf(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]=pf(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]=pf(e[r],t));return n}return e}function gS(e,t){return e.data=mf(e.data,t),delete e.attachments,e}function mf(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]=mf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=mf(e[n],t));return e}const ES=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Et||(Et={}));class yS{constructor(t){this.replacer=t}encode(t){return t.type!==Et.EVENT&&t.type!==Et.ACK||!ga(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Et.EVENT?Et.BINARY_EVENT:Et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Et.BINARY_EVENT&&t.type!==Et.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=mS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Zm(e){return Object.prototype.toString.call(e)==="[object Object]"}class gf extends cn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Et.BINARY_EVENT;r||n.type===Et.BINARY_ACK?(n.type=r?Et.EVENT:Et.ACK,this.reconstructor=new TS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!hf(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(Et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Et.BINARY_EVENT||r.type===Et.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!gf.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Et.CONNECT:return Zm(n);case Et.DISCONNECT:return n===void 0;case Et.CONNECT_ERROR:return typeof n=="string"||Zm(n);case Et.EVENT:case Et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ES.indexOf(n[0])===-1);case Et.ACK:case Et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class TS{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=gS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e0=["searchParams.facetFilters","hits","products"],t0=(e,t,n)=>function r(o,u=[]){const a=Object.entries(o).map(([c,f])=>{const h=[...u,t(c)];return[e(c),f instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(f,h):f]});return Array.isArray(o)?a.map(c=>c[1]):Object.fromEntries(a)},n0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),bS=t0(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,e0),_S=t0(n0,n0,e0),xS={Encoder:class extends yS{encode(e){var t,n;return super.encode(be(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],bS(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 gf{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?_S(n):n):t)}}},SS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class wS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const m=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=m==null?void 0:m[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const a=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const f=[SS,u,{parser:xS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=ma(a,cS.all(f))}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*Kc(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout(()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())},t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return rt(this,null,function*(){return new Promise(r=>{this.socket.emit("conversation_events",t,o=>{n&&n(o),r(o)})})})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(a){return Qc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new Mr(a({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new Mr(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Mr(m==null?void 0:m())}})}(({emit:a,cancel:c})=>{const f=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&a(m)};return this.socket.onAny(f),()=>rt(this,null,function*(){this.socket.offAny(f)})});return{result:yield new Promise((a,c)=>this.socket.emit(t,n,f=>{f.name==="error"?c(new fS(f)):(o=f==null?void 0:f.id,a(f))})),events:u}})}}var W=hs();const Mi=Ge(W);function r0(e,t){return function(){return e.apply(t,arguments)}}const{toString:CS}=Object.prototype,{getPrototypeOf:Ef}=Object,{iterator:Ea,toStringTag:i0}=Symbol,ya=(e=>t=>{const n=CS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nr=e=>(e=e.toLowerCase(),t=>ya(t)===e),Ta=e=>t=>typeof t===e,{isArray:gs}=Array,Es=Ta("undefined");function Po(e){return e!==null&&!Es(e)&&e.constructor!==null&&!Es(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const s0=nr("ArrayBuffer");function AS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&s0(e.buffer),t}const vS=Ta("string"),gn=Ta("function"),o0=Ta("number"),Ro=e=>e!==null&&typeof e=="object",kS=e=>e===!0||e===!1,ba=e=>{if(ya(e)!=="object")return!1;const t=Ef(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(i0 in e)&&!(Ea in e)},NS=e=>{if(!Ro(e)||Po(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},OS=nr("Date"),IS=nr("File"),PS=nr("Blob"),RS=nr("FileList"),LS=e=>Ro(e)&&gn(e.pipe),DS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||gn(e.append)&&((t=ya(e))==="formdata"||t==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"))},MS=nr("URLSearchParams"),[FS,BS,US,HS]=["ReadableStream","Request","Response","Headers"].map(nr),zS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),gs(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Po(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),a=u.length;let c;for(r=0;r<a;r++)c=u[r],t.call(null,e[c],c,e)}}function u0(e,t){if(Po(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Fi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,a0=e=>!Es(e)&&e!==Fi;function yf(){const{caseless:e,skipUndefined:t}=a0(this)&&this||{},n={},r=(o,u)=>{const a=e&&u0(n,u)||u;ba(n[a])&&ba(o)?n[a]=yf(n[a],o):ba(o)?n[a]=yf({},o):gs(o)?n[a]=o.slice():(!t||!Es(o))&&(n[a]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&Lo(arguments[o],r);return n}const jS=(e,t,n,{allOwnKeys:r}={})=>(Lo(t,(o,u)=>{n&&gn(o)?e[u]=r0(o,n):e[u]=o},{allOwnKeys:r}),e),$S=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qS=(e,t,n,r)=>{let o,u,a;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)a=o[u],(!r||r(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Ef(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},YS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},WS=e=>{if(!e)return null;if(gs(e))return e;let t=e.length;if(!o0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ef(Uint8Array)),KS=(e,t)=>{const r=(e&&e[Ea]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},QS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},XS=nr("HTMLFormElement"),JS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),l0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ZS=nr("RegExp"),c0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lo(n,(o,u)=>{let a;(a=t(o,u,e))!==!1&&(r[u]=a||o)}),Object.defineProperties(e,r)},ew=e=>{c0(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(gn(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+"'")})}})},tw=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return gs(e)?r(e):r(String(e).split(t)),n},nw=()=>{},rw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function iw(e){return!!(e&&gn(e.append)&&e[i0]==="FormData"&&e[Ea])}const sw=e=>{const t=new Array(10),n=(r,o)=>{if(Ro(r)){if(t.indexOf(r)>=0)return;if(Po(r))return r;if(!("toJSON"in r)){t[o]=r;const u=gs(r)?[]:{};return Lo(r,(a,c)=>{const f=n(a,o+1);!Es(f)&&(u[c]=f)}),t[o]=void 0,u}}return r};return n(e,0)},ow=nr("AsyncFunction"),uw=e=>e&&(Ro(e)||gn(e))&&gn(e.then)&&gn(e.catch),f0=((e,t)=>e?setImmediate:t?((n,r)=>(Fi.addEventListener("message",({source:o,data:u})=>{o===Fi&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Fi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(Fi.postMessage)),aw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Fi):typeof process!="undefined"&&process.nextTick||f0,G={isArray:gs,isArrayBuffer:s0,isBuffer:Po,isFormData:DS,isArrayBufferView:AS,isString:vS,isNumber:o0,isBoolean:kS,isObject:Ro,isPlainObject:ba,isEmptyObject:NS,isReadableStream:FS,isRequest:BS,isResponse:US,isHeaders:HS,isUndefined:Es,isDate:OS,isFile:IS,isBlob:PS,isRegExp:ZS,isFunction:gn,isStream:LS,isURLSearchParams:MS,isTypedArray:GS,isFileList:RS,forEach:Lo,merge:yf,extend:jS,trim:zS,stripBOM:$S,inherits:VS,toFlatObject:qS,kindOf:ya,kindOfTest:nr,endsWith:YS,toArray:WS,forEachEntry:KS,matchAll:QS,isHTMLForm:XS,hasOwnProperty:l0,hasOwnProp:l0,reduceDescriptors:c0,freezeMethods:ew,toObjectSet:tw,toCamelCase:JS,noop:nw,toFiniteNumber:rw,findKey:u0,global:Fi,isContextDefined:a0,isSpecCompliantForm:iw,toJSONObject:sw,isAsyncFn:ow,isThenable:uw,setImmediate:f0,asap:aw,isIterable:e=>e!=null&&gn(e[Ea])};function ze(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}G.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const d0=ze.prototype,h0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{h0[e]={value:e}}),Object.defineProperties(ze,h0),Object.defineProperty(d0,"isAxiosError",{value:!0}),ze.from=(e,t,n,r,o,u)=>{const a=Object.create(d0);G.toFlatObject(e,a,function(m){return m!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return ze.call(a,c,f,n,r,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",u&&Object.assign(a,u),a};const lw=null;function Tf(e){return G.isPlainObject(e)||G.isArray(e)}function p0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function m0(e,t,n){return e?e.concat(t).map(function(o,u){return o=p0(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function cw(e){return G.isArray(e)&&!e.some(Tf)}const fw=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function _a(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!G.isUndefined(C[S])});const r=n.metaTokens,o=n.visitor||m,u=n.dots,a=n.indexes,f=(n.Blob||typeof Blob!="undefined"&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(G.isDate(_))return _.toISOString();if(G.isBoolean(_))return _.toString();if(!f&&G.isBlob(_))throw new ze("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(_)||G.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,C){let k=_;if(_&&!C&&typeof _=="object"){if(G.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(G.isArray(_)&&cw(_)||(G.isFileList(_)||G.endsWith(S,"[]"))&&(k=G.toArray(_)))return S=p0(S),k.forEach(function(D,z){!(G.isUndefined(D)||D===null)&&t.append(a===!0?m0([S],z,u):a===null?S:S+"[]",h(D))}),!1}return Tf(_)?!0:(t.append(m0(C,S,u),h(_)),!1)}const E=[],b=Object.assign(fw,{defaultVisitor:m,convertValue:h,isVisitable:Tf});function T(_,S){if(!G.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));E.push(_),G.forEach(_,function(k,F){(!(G.isUndefined(k)||k===null)&&o.call(t,k,G.isString(F)?F.trim():F,S,b))===!0&&T(k,S?S.concat(F):[F])}),E.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return T(e),t}function g0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function bf(e,t){this._pairs=[],e&&_a(e,this,t)}const E0=bf.prototype;E0.append=function(t,n){this._pairs.push([t,n])},E0.toString=function(t){const n=t?function(r){return t.call(this,r,g0)}:g0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function dw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function y0(e,t,n){if(!t)return e;const r=n&&n.encode||dw;G.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=G.isURLSearchParams(t)?t.toString():new bf(t,n).toString(r),u){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class T0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const b0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:bf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},_f=typeof window!="undefined"&&typeof document!="undefined",xf=typeof navigator=="object"&&navigator||void 0,pw=_f&&(!xf||["ReactNative","NativeScript","NS"].indexOf(xf.product)<0),mw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gw=_f&&window.location.href||"http://localhost",en=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_f,hasStandardBrowserEnv:pw,hasStandardBrowserWebWorkerEnv:mw,navigator:xf,origin:gw},Symbol.toStringTag,{value:"Module"}))),hw);function Ew(e,t){return _a(e,new en.classes.URLSearchParams,U({visitor:function(n,r,o,u){return en.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function yw(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Tw(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function _0(e){function t(n,r,o,u){let a=n[u++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),f=u>=n.length;return a=!a&&G.isArray(o)?o.length:a,f?(G.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!c):((!o[a]||!G.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],u)&&G.isArray(o[a])&&(o[a]=Tw(o[a])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,o)=>{t(yw(r),o,n,0)}),n}return null}function bw(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Do={transitional:b0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=G.isObject(t);if(u&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return o?JSON.stringify(_0(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ew(t,this.formSerializer).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return _a(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),bw(t)):t}],transformResponse:[function(t){const n=this.transitional||Do.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(a)throw c.name==="SyntaxError"?ze.from(c,ze.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:en.classes.FormData,Blob:en.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{Do.headers[e]={}});const _w=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xw=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
-
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+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(o=>r.set(o)),r}static accessor(t){const r=(this[x0]=this[x0]={accessors:{}}).accessors,o=this.prototype;function u(a){const c=Mo(a);r[c]||(Aw(o,a),r[c]=!0)}return G.isArray(t)?t.forEach(u):u(t),this}};En.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(En.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(En);function wf(e,t){const n=this||Do,r=t||n,o=En.from(r.headers);let u=r.data;return G.forEach(e,function(c){u=c.call(n,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function S0(e){return!!(e&&e.__CANCEL__)}function ys(e,t,n){ze.call(this,e==null?"canceled":e,ze.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(ys,ze,{__CANCEL__:!0});function w0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ze("Request failed with status code "+n.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kw(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,u=0,a;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=r[u];a||(a=h),n[o]=f,r[o]=h;let E=u,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),h-a<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function Nw(e,t){let n=0,r=1e3/t,o,u;const a=(h,m=Date.now())=>{n=m,o=null,u&&(clearTimeout(u),u=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?a(h,m):(o=h,u||(u=setTimeout(()=>{u=null,a(o)},r-E)))},()=>o&&a(o)]}const Sa=(e,t,n=3)=>{let r=0;const o=kw(50,250);return Nw(u=>{const a=u.loaded,c=u.lengthComputable?u.total:void 0,f=a-r,h=o(f),m=a<=c;r=a;const E={loaded:a,total:c,progress:c?a/c:void 0,bytes:f,rate:h||void 0,estimated:h&&c&&m?(c-a)/h:void 0,event:u,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},C0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},A0=e=>(...t)=>G.asap(()=>e(...t)),Ow=en.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,en.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,Iw=en.hasStandardBrowserEnv?{write(e,t,n,r,o,u){const a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),u===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Pw(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Rw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function v0(e,t,n){let r=!Pw(t);return e&&(r||n==!1)?Rw(e,t):t}const k0=e=>e instanceof En?U({},e):e;function Bi(e,t){t=t||{};const n={};function r(h,m,E,b){return G.isPlainObject(h)&&G.isPlainObject(m)?G.merge.call({caseless:b},h,m):G.isPlainObject(m)?G.merge({},m):G.isArray(m)?m.slice():m}function o(h,m,E,b){if(G.isUndefined(m)){if(!G.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function u(h,m){if(!G.isUndefined(m))return r(void 0,m)}function a(h,m){if(G.isUndefined(m)){if(!G.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function c(h,m,E){if(E in t)return r(h,m);if(E in e)return r(void 0,h)}const f={url:u,method:u,data:u,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(h,m,E)=>o(k0(h),k0(m),E,!0)};return G.forEach(Object.keys(U(U({},e),t)),function(m){const E=f[m]||o,b=E(e[m],t[m],m);G.isUndefined(b)&&E!==c||(n[m]=b)}),n}const N0=e=>{const t=Bi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:a,auth:c}=t;if(t.headers=a=En.from(a),t.url=y0(v0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),G.isFormData(n)){if(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(G.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,E])=>{h.includes(m.toLowerCase())&&a.set(m,E)})}}if(en.hasStandardBrowserEnv&&(r&&G.isFunction(r)&&(r=r(t)),r||r!==!1&&Ow(t.url))){const f=o&&u&&Iw.read(u);f&&a.set(o,f)}return t},Lw=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=N0(e);let u=o.data;const a=En.from(o.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:h}=o,m,E,b,T,_;function S(){T&&T(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function k(){if(!C)return;const D=En.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:D,config:e,request:C};w0(function(te){n(te),S()},function(te){r(te),S()},X),C=null}"onloadend"in C?C.onloadend=k:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(k)},C.onabort=function(){C&&(r(new ze("Request aborted",ze.ECONNABORTED,e,C)),C=null)},C.onerror=function(z){const X=z&&z.message?z.message:"Network Error",B=new ze(X,ze.ERR_NETWORK,e,C);B.event=z||null,r(B),C=null},C.ontimeout=function(){let z=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||b0;o.timeoutErrorMessage&&(z=o.timeoutErrorMessage),r(new ze(z,X.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,e,C)),C=null},u===void 0&&a.setContentType(null),"setRequestHeader"in C&&G.forEach(a.toJSON(),function(z,X){C.setRequestHeader(X,z)}),G.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),h&&([b,_]=Sa(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=Sa(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{C&&(r(!D||D.type?new ys(null,e,C):D),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const F=vw(o.url);if(F&&en.protocols.indexOf(F)===-1){r(new ze("Unsupported protocol "+F+":",ze.ERR_BAD_REQUEST,e));return}C.send(u||null)})},Dw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const u=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof ze?m:new ys(m instanceof Error?m.message:m))}};let a=t&&setTimeout(()=>{a=null,u(new ze(`timeout ${t} of ms exceeded`,ze.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(u):h.removeEventListener("abort",u)}),e=null)};e.forEach(h=>h.addEventListener("abort",u));const{signal:f}=r;return f.unsubscribe=()=>G.asap(c),f}},Mw=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Fw=function(e,t){return Qc(this,null,function*(){try{for(var n=lx(Bw(e)),r,o,u;r=!(o=yield new Mr(n.next())).done;r=!1){const a=o.value;yield*Im(Mw(a,t))}}catch(o){u=[o]}finally{try{r&&(o=n.return)&&(yield new Mr(o.call(n)))}finally{if(u)throw u[0]}}})},Bw=function(e){return Qc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Im(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Mr(t.read());if(n)break;yield r}}finally{yield new Mr(t.cancel())}})},O0=(e,t,n,r)=>{const o=Fw(e,t);let u=0,a,c=h=>{a||(a=!0,r&&r(h))};return new ReadableStream({pull(h){return rt(this,null,function*(){try{const{done:m,value:E}=yield o.next();if(m){c(),h.close();return}let b=E.byteLength;if(n){let T=u+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},I0=64*1024,{isFunction:wa}=G,Uw=(({Request:e,Response:t})=>({Request:e,Response:t}))(G.global),{ReadableStream:P0,TextEncoder:R0}=G.global,L0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Hw=e=>{e=G.merge.call({skipUndefined:!0},Uw,e);const{fetch:t,Request:n,Response:r}=e,o=t?wa(t):typeof fetch=="function",u=wa(n),a=wa(r);if(!o)return!1;const c=o&&wa(P0),f=o&&(typeof R0=="function"?(_=>S=>_.encode(S))(new R0):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=u&&c&&L0(()=>{let _=!1;const S=new n(en.origin,{body:new P0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=a&&c&&L0(()=>G.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(S,C)=>{let k=S&&S[_];if(k)return k.call(S);throw new ze(`Response type '${_}' is not supported`,ze.ERR_NOT_SUPPORT,C)})});const b=_=>rt(null,null,function*(){if(_==null)return 0;if(G.isBlob(_))return _.size;if(G.isSpecCompliantForm(_))return(yield new n(en.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(G.isArrayBufferView(_)||G.isArrayBuffer(_))return _.byteLength;if(G.isURLSearchParams(_)&&(_=_+""),G.isString(_))return(yield f(_)).byteLength}),T=(_,S)=>rt(null,null,function*(){const C=G.toFiniteNumber(_.getContentLength());return C==null?b(S):C});return _=>rt(null,null,function*(){let{url:S,method:C,data:k,signal:F,cancelToken:D,timeout:z,onDownloadProgress:X,onUploadProgress:B,responseType:te,headers:Te,withCredentials:Se="same-origin",fetchOptions:H}=N0(_),fe=t||fetch;te=te?(te+"").toLowerCase():"text";let ae=Dw([F,D&&D.toAbortSignal()],z),le=null;const de=ae&&ae.unsubscribe&&(()=>{ae.unsubscribe()});let ye;try{if(B&&h&&C!=="get"&&C!=="head"&&(ye=yield T(Te,k))!==0){let R=new n(S,{method:"POST",body:k,duplex:"half"}),K;if(G.isFormData(k)&&(K=R.headers.get("content-type"))&&Te.setContentType(K),R.body){const[N,_e]=C0(ye,Sa(A0(B)));k=O0(R.body,I0,N,_e)}}G.isString(Se)||(Se=Se?"include":"omit");const Ae=u&&"credentials"in n.prototype,oe=be(U({},H),{signal:ae,method:C.toUpperCase(),headers:Te.normalize().toJSON(),body:k,duplex:"half",credentials:Ae?Se:void 0});le=u&&new n(S,oe);let q=yield u?fe(le,H):fe(S,oe);const Z=m&&(te==="stream"||te==="response");if(m&&(X||Z&&de)){const R={};["status","statusText","headers"].forEach(Be=>{R[Be]=q[Be]});const K=G.toFiniteNumber(q.headers.get("content-length")),[N,_e]=X&&C0(K,Sa(A0(X),!0))||[];q=new r(O0(q.body,I0,N,()=>{_e&&_e(),de&&de()}),R)}te=te||"text";let w=yield E[G.findKey(E,te)||"text"](q,_);return!Z&&de&&de(),yield new Promise((R,K)=>{w0(R,K,{data:w,headers:En.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:le})})}catch(Ae){throw de&&de(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,_,le),{cause:Ae.cause||Ae}):ze.from(Ae,Ae&&Ae.code,_,le)}})},zw=new Map,D0=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,u=[r,o,n];let a=u.length,c=a,f,h,m=zw;for(;c--;)f=u[c],h=m.get(f),h===void 0&&m.set(f,h=c?new Map:Hw(t)),m=h;return h};D0();const Cf={http:lw,xhr:Lw,fetch:{get:D0}};G.forEach(Cf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const M0=e=>`- ${e}`,jw=e=>G.isFunction(e)||e===null||e===!1,F0={getAdapter:(e,t)=>{e=G.isArray(e)?e:[e];const{length:n}=e;let r,o;const u={};for(let a=0;a<n;a++){r=e[a];let c;if(o=r,!jw(r)&&(o=Cf[(c=String(r)).toLowerCase()],o===void 0))throw new ze(`Unknown adapter '${c}'`);if(o&&(G.isFunction(o)||(o=o.get(t))))break;u[c||"#"+a]=o}if(!o){const a=Object.entries(u).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?a.length>1?`since :
|
|
5
|
-
`+a.map(
|
|
6
|
-
`):" "+
|
|
7
|
-
`+u):r.stack=u}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:u}=n;r!==void 0&&Aa.assertOptions(r,{silentJSONParsing:Tr.transitional(Tr.boolean),forcedJSONParsing:Tr.transitional(Tr.boolean),clarifyTimeoutError:Tr.transitional(Tr.boolean)},!1),o!=null&&(G.isFunction(o)?n.paramsSerializer={serialize:o}:Aa.assertOptions(o,{encode:Tr.function,serialize:Tr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Aa.assertOptions(n,{baseUrl:Tr.spelling("baseURL"),withXsrfToken:Tr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=u&&G.merge(u.common,u[n.method]);u&&G.forEach(["delete","get","head","post","put","patch","common"],_=>{delete u[_]}),n.headers=En.concat(a,u);const c=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(f=f&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,E=0,b;if(!f){const _=[B0.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,m=Promise.resolve(n);E<b;)m=m.then(_[E++],_[E++]);return m}b=c.length;let T=n;for(;E<b;){const _=c[E++],S=c[E++];try{T=_(T)}catch(C){S.call(this,C);break}}try{m=B0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=h.length;E<b;)m=m.then(h[E++],h[E++]);return m}getUri(t){t=Bi(this.defaults,t);const n=v0(t.baseURL,t.url,t.allowAbsoluteUrls);return y0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Ui.prototype[t]=function(n,r){return this.request(Bi(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(u,a,c){return this.request(Bi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:a}))}}Ui.prototype[t]=n(),Ui.prototype[t+"Form"]=n(!0)});let Vw=class cx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const a=new Promise(c=>{r.subscribe(c),u=c}).then(o);return a.cancel=function(){r.unsubscribe(u)},a},t(function(u,a,c){r.reason||(r.reason=new ys(u,a,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 cx(function(o){t=o}),cancel:t}}};function qw(e){return function(n){return e.apply(null,n)}}function Yw(e){return G.isObject(e)&&e.isAxiosError===!0}const vf={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};Object.entries(vf).forEach(([e,t])=>{vf[t]=e});function z0(e){const t=new Ui(e),n=r0(Ui.prototype.request,t);return G.extend(n,Ui.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return z0(Bi(e,o))},n}const Ct=z0(Do);Ct.Axios=Ui,Ct.CanceledError=ys,Ct.CancelToken=Vw,Ct.isCancel=S0,Ct.VERSION=U0,Ct.toFormData=_a,Ct.AxiosError=ze,Ct.Cancel=Ct.CanceledError,Ct.all=function(t){return Promise.all(t)},Ct.spread=qw,Ct.isAxiosError=Yw,Ct.mergeConfig=Bi,Ct.AxiosHeaders=En,Ct.formToJSON=e=>_0(G.isHTMLForm(e)?new FormData(e):e),Ct.getAdapter=F0.getAdapter,Ct.HttpStatusCode=vf,Ct.default=Ct;const{Axios:nF,AxiosError:rF,CanceledError:iF,isCancel:sF,CancelToken:oF,VERSION:uF,all:aF,Cancel:lF,isAxiosError:cF,spread:fF,toFormData:dF,AxiosHeaders:hF,HttpStatusCode:pF,formToJSON:mF,getAdapter:gF,mergeConfig:EF}=Ct;class j0{constructor(t,n,r=!1){Fe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Fe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Fe(this,"baseApiUrl");Fe(this,"headers",{});Fe(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Ct.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const Ww=W.createContext(void 0),Gw=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=W.useMemo(()=>new j0(e,t,n),[e,t,n]);return I.jsx(Ww.Provider,{value:o,children:r})};var $0=Symbol.for("immer-nothing"),V0=Symbol.for("immer-draftable"),nt=Symbol.for("immer-state");function jn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ts=Object.getPrototypeOf;function bs(e){return!!e&&!!e[nt]}function Fr(e){var t;return e?q0(e)||Array.isArray(e)||!!e[V0]||!!((t=e.constructor)!=null&&t[V0])||ka(e)||Na(e):!1}var Kw=Object.prototype.constructor.toString();function q0(e){if(!e||typeof e!="object")return!1;const t=Ts(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)===Kw}function Fo(e,t){va(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function va(e){const t=e[nt];return t?t.type_:Array.isArray(e)?1:ka(e)?2:Na(e)?3:0}function kf(e,t){return va(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Y0(e,t,n){const r=va(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Qw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ka(e){return e instanceof Map}function Na(e){return e instanceof Set}function Ht(e){return e.copy_||e.base_}function Nf(e,t){if(ka(e))return new Map(e);if(Na(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[nt];let o=Reflect.ownKeys(r);for(let u=0;u<o.length;u++){const a=o[u],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Ts(e),r)}else{const r=Ts(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Of(e,t=!1){return Oa(e)||bs(e)||!Fr(e)||(va(e)>1&&(e.set=e.add=e.clear=e.delete=Xw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Of(r,!0))),e}function Xw(){jn(2)}function Oa(e){return Object.isFrozen(e)}var If={};function Hi(e){const t=If[e];return t||jn(0,e),t}function Jw(e,t){If[e]||(If[e]=t)}var Bo;function Ia(){return Bo}function Zw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(Hi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pf(e){Rf(e),e.drafts_.forEach(eC),e.drafts_=null}function Rf(e){e===Bo&&(Bo=e.parent_)}function G0(e){return Bo=Zw(Bo,e)}function eC(e){const t=e[nt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[nt].modified_&&(Pf(t),jn(4)),Fr(e)&&(e=Pa(t,e),t.parent_||Ra(t,e)),t.patches_&&Hi("Patches").generateReplacementPatches_(n[nt].base_,e,t.patches_,t.inversePatches_)):e=Pa(t,n,[]),Pf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$0?e:void 0}function Pa(e,t,n){if(Oa(t))return t;const r=t[nt];if(!r)return Fo(t,(o,u)=>Q0(e,r,t,o,u,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ra(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let u=o,a=!1;r.type_===3&&(u=new Set(o),o.clear(),a=!0),Fo(u,(c,f)=>Q0(e,r,o,c,f,n,a)),Ra(e,o,!1),n&&e.patches_&&Hi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,u,a){if(bs(o)){const c=u&&t&&t.type_!==3&&!kf(t.assigned_,r)?u.concat(r):void 0,f=Pa(e,o,c);if(Y0(n,r,f),bs(f))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Fr(o)&&!Oa(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Pa(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ra(e,o)}}function Ra(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Of(t,n)}function tC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ia(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,u=Lf;n&&(o=[r],u=Uo);const{revoke:a,proxy:c}=Proxy.revocable(o,u);return r.draft_=c,r.revoke_=a,c}var Lf={get(e,t){if(t===nt)return e;const n=Ht(e);if(!kf(n,t))return nC(e,n,t);const r=n[t];return e.finalized_||!Fr(r)?r:r===Df(e.base_,t)?(Mf(e),e.copy_[t]=Ho(r,e)):r},has(e,t){return t in Ht(e)},ownKeys(e){return Reflect.ownKeys(Ht(e))},set(e,t,n){const r=X0(Ht(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Df(Ht(e),t),u=o==null?void 0:o[nt];if(u&&u.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Qw(n,o)&&(n!==void 0||kf(e.base_,t)))return!0;Mf(e),Br(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 Df(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Mf(e),Br(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ht(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){jn(11)},getPrototypeOf(e){return Ts(e.base_)},setPrototypeOf(){jn(12)}},Uo={};Fo(Lf,(e,t)=>{Uo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Uo.deleteProperty=function(e,t){return Uo.set.call(this,e,t,void 0)},Uo.set=function(e,t,n){return Lf.set.call(this,e[0],t,n,e[0])};function Df(e,t){const n=e[nt];return(n?Ht(n):e)[t]}function nC(e,t,n){var o;const r=X0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function X0(e,t){if(!(t in e))return;let n=Ts(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ts(n)}}function Br(e){e.modified_||(e.modified_=!0,e.parent_&&Br(e.parent_))}function Mf(e){e.copy_||(e.copy_=Nf(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 u=n;n=t;const a=this;return function(f=u,...h){return a.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&jn(6),r!==void 0&&typeof r!="function"&&jn(7);let o;if(Fr(t)){const u=G0(this),a=Ho(t,void 0);let c=!0;try{o=n(a),c=!1}finally{c?Pf(u):Rf(u)}return W0(u,r),K0(o,u)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===$0&&(o=void 0),this.autoFreeze_&&Of(o,!0),r){const u=[],a=[];Hi("Patches").generateReplacementPatches_(t,o,u,a),r(u,a)}return o}else jn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,f=>t(f,...c));let r,o;return[this.produce(t,n,(a,c)=>{r=a,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Fr(e)||jn(8),bs(e)&&(e=iC(e));const t=G0(this),n=Ho(e,void 0);return n[nt].isManual_=!0,Rf(t),n}finishDraft(e,t){const n=e&&e[nt];(!n||!n.isManual_)&&jn(9);const{scope_:r}=n;return W0(r,t),K0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Hi("Patches").applyPatches_;return bs(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ho(e,t){const n=ka(e)?Hi("MapSet").proxyMap_(e,t):Na(e)?Hi("MapSet").proxySet_(e,t):tC(e,t);return(t?t.scope_:Ia()).drafts_.push(n),n}function iC(e){return bs(e)||jn(10,e),J0(e)}function J0(e){if(!Fr(e)||Oa(e))return e;const t=e[nt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Nf(e,!0);return Fo(n,(r,o)=>{Y0(n,r,J0(o))}),t&&(t.finalized_=!1),n}function sC(){class e extends Map{constructor(f,h){super(),this[nt]={type_:2,parent_:h,scope_:h?h.scope_:Ia(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Ht(this[nt]).size}has(f){return Ht(this[nt]).has(f)}set(f,h){const m=this[nt];return a(m),(!Ht(m).has(f)||Ht(m).get(f)!==h)&&(n(m),Br(m),m.assigned_.set(f,!0),m.copy_.set(f,h),m.assigned_.set(f,!0)),this}delete(f){if(!this.has(f))return!1;const h=this[nt];return a(h),n(h),Br(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[nt];a(f),Ht(f).size&&(n(f),Br(f),f.assigned_=new Map,Fo(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[nt];Ht(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[nt];a(h);const m=Ht(h).get(f);if(h.finalized_||!Fr(m)||m!==h.base_.get(f))return m;const E=Ho(m,h);return n(h),h.copy_.set(f,E),E}keys(){return Ht(this[nt]).keys()}values(){const f=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=f.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const f=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=f.next();if(h.done)return h;const m=this.get(h.value);return{done:!1,value:[h.value,m]}}}}[Symbol.iterator](){return this.entries()}}function t(c,f){return new e(c,f)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(f,h){super(),this[nt]={type_:3,parent_:h,scope_:h?h.scope_:Ia(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Ht(this[nt]).size}has(f){const h=this[nt];return a(h),h.copy_?!!(h.copy_.has(f)||h.drafts_.has(f)&&h.copy_.has(h.drafts_.get(f))):h.base_.has(f)}add(f){const h=this[nt];return a(h),this.has(f)||(u(h),Br(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[nt];return a(h),u(h),Br(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[nt];a(f),Ht(f).size&&(u(f),Br(f),f.copy_.clear())}values(){const f=this[nt];return a(f),u(f),f.copy_.values()}entries(){const f=this[nt];return a(f),u(f),f.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(f,h){const m=this.values();let E=m.next();for(;!E.done;)f.call(h,E.value,E.value,this),E=m.next()}}function o(c,f){return new r(c,f)}function u(c){c.copy_||(c.copy_=new Set,c.base_.forEach(f=>{if(Fr(f)){const h=Ho(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function a(c){c.revoked_&&jn(3,JSON.stringify(Ht(c)))}Jw("MapSet",{proxyMap_:t,proxySet_:o})}var Nn=new rC,oC=Nn.produce;Nn.produceWithPatches.bind(Nn),Nn.setAutoFreeze.bind(Nn),Nn.setUseStrictShallowCopy.bind(Nn),Nn.applyPatches.bind(Nn),Nn.createDraft.bind(Nn),Nn.finishDraft.bind(Nn);function uC(e,t,n){var r=W.useMemo(function(){return oC(e)},[e]);return W.useReducer(r,t,n)}const Z0={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"},yn={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"},La={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},zo="cimulate",Ff=`${zo}:pdp-update`,Bf=`${zo}:browse-update`,Uf=`${zo}:search-update`,Hf=`${zo}:ui-state-update`,zf=`${zo}:session-state`,Ur=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed"},Z0),aC={"browse-context":Ur.CONTEXT_UPDATED,categoryId:Ur.CATEGORY_ID_CHANGED,page:Ur.PAGE_CHANGED,pageSize:Ur.PAGE_SIZE_CHANGED,includeFacets:Ur.FACET_FILTERS_CHANGED,facetFilters:Ur.FACET_FILTERS_CHANGED,rangeFilters:Ur.RANGE_FILTERS_CHANGED,catalogSegment:Ur.CATALOG_SEGMENT_CHANGED,pricebooks:Ur.PRICEBOOKS_CHANGED},Hr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},Z0),lC={"search-context":Hr.SEARCH_CONTEXT_UPDATED,query:Hr.QUERY_CHANGED,page:Hr.PAGE_CHANGED,pageSize:Hr.PAGE_SIZE_CHANGED,includeFacets:Hr.FACET_FILTERS_CHANGED,facetFilters:Hr.FACET_FILTERS_CHANGED,rangeFilters:Hr.RANGE_FILTERS_CHANGED,catalogSegment:Hr.CATALOG_SEGMENT_CHANGED,pricebooks:Hr.PRICEBOOKS_CHANGED},ee="cim-widget",_s=`--${ee}`,zi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},cC=(e=zi)=>({[`${_s}-primary-color`]:e.primaryColor||zi.primaryColor,[`${_s}-secondary-color`]:e.secondaryColor||zi.secondaryColor,[`${_s}-font-color`]:e.fontColor||zi.fontColor,[`${_s}-font-family`]:e.fontFamily||zi.fontFamily,[`${_s}-background-color`]:e.backgroundColor||zi.backgroundColor,[`${_s}-border-color`]:e.borderColor||zi.borderColor}),ii={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},eg=W.createContext(null),tg=W.createContext(null);class fC{constructor(t,n,r=!1){Fe(this,"apiService");Fe(this,"config",null);Fe(this,"getConfig",()=>rt(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Fe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Fe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Fe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Fe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Fe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Fe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Fe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Fe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Fe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Fe(this,"getProductField",t=>this.config?this.config[t]:"");Fe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new j0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const xs=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class dC{constructor(t=!1){Fe(this,"isDevelopment");Fe(this,"_log",(t,n,...r)=>{xs(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 ng=W.createContext(null),hC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u="What products would you like to explore today?",apiKey:a,apiToken:c,theme:f,isDevelopment:h,children:m})=>{const E=W.useMemo(()=>new fC(a,c,h),[a,c,h]),b=W.useMemo(()=>new dC(h),[h]);W.useEffect(()=>{E.config||E.getConfig()},[E]);const T=W.useMemo(()=>cC(f),[f]),_=W.useMemo(()=>({configModule:E,logoUrl:e,headerText:t,globalClassName:n,themeVariables:T,logger:b,searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u}),[E,e,t,n,r,o,u,b,T]);return I.jsx(ng.Provider,{value:_,children:m})},rr=()=>{const e=W.useContext(ng);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},pC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=rr(),o=W.useCallback(b=>{n({type:yn.SET_COPILOT,payload:b})},[n]),u=W.useCallback(b=>{n({type:yn.SET_CONNECTED,payload:b})},[n]),a=W.useCallback(()=>{n({type:yn.RESET_COPILOT,payload:{}})},[n]),c=W.useCallback(()=>{n({type:yn.RESET_STATE,payload:{}})},[n]),f=W.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:yn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=W.useCallback(b=>{n({type:yn.ADD_LOADING_MESSAGE,payload:b})},[n]),m=W.useCallback(b=>{n({type:yn.REMOVE_LOADING_MESSAGE,payload:b})},[n]),E=W.useMemo(()=>({setCopilot:o,setConnected:u,resetCopilot:a,resetCopilotState:c,addCopilotEvent:f,addLoadingMessage:h,removeLoadingMessage:m}),[o,u,a,c,f,h,m]);return I.jsx(tg.Provider,{value:E,children:t})};sC();const mC=(e,t)=>{const{type:n,payload:r}=t;if(n===yn.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const u=e.groupedMessages.findIndex(a=>a.eventSourceId===o.eventSourceId);if(u!==-1){let a=e.groupedMessages[u].messages;a||(a=[]);const c=a.findIndex(f=>f.id===o.id);if(c!==-1){a[c]=o;return}a.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case yn.RESET_STATE:e.messages=La.messages,e.groupedMessages=La.groupedMessages,e.loadingMessages=La.loadingMessages;break;case yn.RESET_COPILOT:e.copilot=null;break;case yn.SET_COPILOT:e.copilot=r;break;case yn.SET_CONNECTED:e.connected=r;break;case yn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case yn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},gC=({onCopilotEvent:e,children:t})=>{const[n,r]=uC(mC,La);return I.jsx(eg.Provider,{value:n,children:I.jsx(pC,{onCopilotEvent:e,dispatch:r,children:t})})};function EC(){var e=W.useRef(!0);return e.current?(e.current=!1,!0):e.current}var yC=function(e){W.useEffect(e,[])},TC=function(e,t){return e===t};function bC(e,t){t===void 0&&(t=TC);var n=W.useRef(),r=W.useRef(e),o=EC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}const rg=e=>{window.addEventListener(Uf,e)},ig=e=>{window.removeEventListener(Uf,e)},_C=(e,t,n)=>{const r=new CustomEvent(Uf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},sg=e=>{window.addEventListener(Bf,e)},og=e=>{window.removeEventListener(Bf,e)},xC=(e,t,n)=>{const r=new CustomEvent(Bf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},ug=e=>{window.addEventListener(Ff,e)},ag=e=>{window.removeEventListener(Ff,e)},lg=(e,t,n)=>{const r=new CustomEvent(Ff,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},SC=e=>{window.addEventListener(zf,e)},wC=e=>{window.removeEventListener(zf,e)},Da=(e,t,n)=>{const r=new CustomEvent(zf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class CC{constructor(){Fe(this,"initialParams",{categoryId:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Fe(this,"categoryIdProxy");Fe(this,"facetFiltersProxy");Fe(this,"rangeFiltersProxy");Fe(this,"catalogSegmentProxy");Fe(this,"pricebooksProxy");Fe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Fe(this,"_fullSet",(t,n,r)=>{const o=aC[n];return xC(o,n,r),Reflect.set(t,n,r)});this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const At=new CC,Ss={categoryId:At.categoryId,facetFilters:At.facetFilters,rangeFilters:At.rangeFilters,catalogSegment:At.catalogSegment,pricebooks:At.pricebooks},cg=W.createContext(Ss),AC=({children:e})=>{const[t,n]=W.useState(Ss.categoryId),[r,o]=W.useState(Ss.facetFilters),[u,a]=W.useState(Ss.rangeFilters),[c,f]=W.useState(Ss.catalogSegment),[h,m]=W.useState(Ss.pricebooks);W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return sg(b),()=>{og(b)}},[]);const E=W.useMemo(()=>({categoryId:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(cg.Provider,{value:E,children:e})},vC=()=>{const e=W.useContext(cg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},fg=(e,t)=>{t.facetFiltersProxy.facetFilters=e},dg=(e,t,n)=>{var u;const r=U({},n.facetFiltersProxy.facetFilters||{});if(!!((u=r[e])!=null&&u.includes(t))){const a=r[e].filter(c=>c!==t);a.length>0?r[e]=a:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];n.facetFiltersProxy.facetFilters=r},hg=(e,t)=>{t.rangeFiltersProxy.rangeFilters=[...e]},pg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const u=[...n.rangeFiltersProxy.rangeFilters||[]],a=u.findIndex(c=>c.field===e);if(a!==-1){u[a]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=u;return}u.push({field:e,min:r,max:o}),n.rangeFiltersProxy.rangeFilters=u},mg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},gg=(e,t)=>{t.pricebooksProxy.pricebooks=e},kC=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:e=>{if(!e||!e.query)throw new Error("Search context must include a query");"facetFilters"in e&&(vt.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(vt.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(vt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(vt.pricebooksProxy.pricebooks=e.pricebooks||null),vt.queryProxy.query=e.query},updateCatalogSegment:e=>{mg(e,vt)},updateFacetFilter:(e,t)=>{dg(e,t,vt)},updateFacetFilters:e=>{fg(e,vt)},updatePricebooks:e=>{gg(e,vt)},updateRangeFilter:({field:e,value:t})=>{pg({field:e,value:t},vt)},updateRangeFilters:e=>{hg(e,vt)},updateSearchQuery:e=>{vt.queryProxy.query=e}},Symbol.toStringTag,{value:"Module"})),NC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:e=>{if(!e||!e.categoryId)throw new Error("Browse context must include a categoryId");"facetFilters"in e&&(At.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(At.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(At.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(At.pricebooksProxy.pricebooks=e.pricebooks||null),At.categoryIdProxy.categoryId=e.categoryId},updateBrowseCategoryId:e=>{At.categoryIdProxy.categoryId=e},updateCatalogSegment:e=>{mg(e,At)},updateFacetFilter:(e,t)=>{dg(e,t,At)},updateFacetFilters:e=>{fg(e,At)},updatePricebooks:e=>{gg(e,At)},updateRangeFilter:({field:e,value:t})=>{pg({field:e,value:t},At)},updateRangeFilters:e=>{hg(e,At)}},Symbol.toStringTag,{value:"Module"}));class OC{constructor(){Fe(this,"initialParams",{productId:"",pdpLink:""});Fe(this,"proxy");Fe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Fe(this,"_fullSet",(t,n,r)=>(lg(n,r),Reflect.set(t,n,r)));Fe(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}}const ws=new OC,IC=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");ws.updateProxy(e),lg("pdp-context",e)},PC=e=>{ws.proxy.productId=e},RC=e=>{ws.proxy.pdpLink=e},LC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Da("getConversationMessages",{payload:e,callback:t},ii.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Da("getSessionInformation",{callback:e},ii.GET_SESSION_INFORMATION)},loadConversation:e=>{Da("loadConversation",e,ii.LOAD_CONVERSATION)},resetConversation:()=>{Da("resetConversation",!0,ii.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class DC{constructor(){Fe(this,"initialState",{mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});Fe(this,"modeProxy");Fe(this,"statusProxy");Fe(this,"dialogProxy");Fe(this,"modalProxy",{isFullscreen:!1});Fe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Fe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return BC(n,r),Reflect.set(t,n,r)});this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen},{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 mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}}const zt=new DC,MC=e=>{window.addEventListener(Hf,e)},FC=e=>{window.removeEventListener(Hf,e)},BC=(e,t)=>{const n=new CustomEvent(Hf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Ma=e=>{if(typeof e!="boolean"){zt.statusProxy.isOpen=!zt.statusProxy.isOpen;return}zt.statusProxy.isOpen=e},Eg=e=>{zt.modalProxy.isFullscreen=e},jf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);zt.statusProxy.type=e,e==="dialog"||e==="chat"?zt.modeProxy.mode="embedded":zt.modeProxy.mode="standalone"},yg=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(", ")}.`);zt.dialogProxy.position=e};class UC{constructor(){Fe(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Fe(this,"queryProxy");Fe(this,"facetFiltersProxy");Fe(this,"rangeFiltersProxy");Fe(this,"catalogSegmentProxy");Fe(this,"pricebooksProxy");Fe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Fe(this,"_fullSet",(t,n,r)=>{const o=lC[n];return _C(o,n,r),Reflect.set(t,n,r)});this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const vt=new UC,Cs={searchQuery:vt.query,facetFilters:vt.facetFilters,rangeFilters:vt.rangeFilters,catalogSegment:vt.catalogSegment,pricebooks:vt.pricebooks},Tg=W.createContext(Cs),HC=({children:e})=>{const[t,n]=W.useState(Cs.searchQuery),[r,o]=W.useState(Cs.facetFilters),[u,a]=W.useState(Cs.rangeFilters),[c,f]=W.useState(Cs.catalogSegment),[h,m]=W.useState(Cs.pricebooks);W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return rg(b),()=>{ig(b)}},[]);const E=W.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(Tg.Provider,{value:E,children:e})},zC=()=>{const e=W.useContext(Tg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},bg=()=>{const e=W.useContext(tg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},_g=()=>{const e=W.useContext(eg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},xg=W.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),jC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:a,children:c})=>{const{logger:f}=rr(),Ye=zC(),{searchQuery:h}=Ye,m=Gt(Ye,["searchQuery"]),Ve=vC(),{categoryId:E}=Ve,b=Gt(Ve,["categoryId"]),{setCopilot:T,setConnected:_,resetCopilot:S,resetCopilotState:C,addCopilotEvent:k,addLoadingMessage:F,removeLoadingMessage:D}=bg(),{copilot:z,messages:X,groupedMessages:B,loadingMessages:te}=_g(),Te=W.useRef(!1),Se=W.useRef(!1),H=W.useMemo(()=>te.size>0,[te]),fe=W.useCallback(me=>te.has(me),[te]),ae=W.useCallback(me=>{k(me),F(me.id)},[k,F]),le=W.useCallback(me=>{const Ne=be(U({},me),{id:me.inquiryLinkId||me.id});k(Ne)},[k]),de=W.useCallback(me=>{k(me),u==null||u(me)},[k,u]),ye=W.useCallback(me=>{k(me),a==null||a(me)},[k,a]),Ae=W.useCallback(me=>{z&&z.requestSessionInformation(Ne=>{f==null||f.log("Retrieved session information: ",Ne),me==null||me(Ne)})},[z,f]),oe=W.useCallback((me,Ne)=>{z&&me.conversationId&&z.getConversationEvents(me,Xe=>{f==null||f.log("Retrieved conversation messages: ",Xe),Ne(Xe)})},[z,f]),q=W.useCallback(me=>{me.on("connect_ack",Ne=>{o==null||o(Ne),_(!0)}),me.on("follow_up",k),me.on("inquiry",le),me.on("partial_inquiry",le),me.on("display_products",k),me.on("progress",k),me.on("refined_search",de),me.on("refined_browse",ye),me.on("done",Ne=>{D(Ne.eventSourceId)}),me.on("error",Ne=>{k(Ne),D(Ne.eventSourceId)}),me.onDisconnect(Ne=>{const Xe=["io server disconnect","transport error","server shutting down"];if(f==null||f.log("Connection disconnected with reason: ",Ne),!Xe.includes(Ne)){_(!1);return}f==null||f.log("De-registering event listeners");const yt=new Date().toISOString();k({name:"error",message:"Connection was lost. Please try again.",createdAt:yt,id:`error-${yt}`,sessionId:"session"}),me.off()})},[f,_,D,le,de,ye,k,o]);yC(()=>{let me;n?me=n:me=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ne={baseUrl:me};e?Ne.apiKey=e:t&&(Ne.apiToken=t);const Xe=new wS(Ne);return Xe.connect(),q(Xe),T(Xe),Xe.requestSessionInformation(yt=>{f==null||f.log("Session Information: ",yt)}),()=>{Xe.disconnect(),Xe.off(),S()}});const Z=W.useCallback(({query:me,facetFilters:Ne,rangeFilters:Xe,catalogSegment:yt,pricebooks:mt,userPrompt:sn,isUserAction:Kt})=>{if(!z){f==null||f.error("Copilot is not initialized");return}if(!me)return;const xt={searchParams:{query:me}};sn&&(xt.userPrompt=sn),Ne&&Object.keys(Ne).length>0&&(xt.searchParams.facetFilters=Ne),Xe&&Xe.length>0&&(xt.searchParams.rangeFilters=Xe),yt&&(xt.searchParams.catalogSegment=yt),mt&&(xt.searchParams.pricebooks=mt);const Dn=!Te.current;z.search(xt,Nt=>{const Dt=U({},Nt);Dn&&(Dt.isInitial=!0,Dt.isUserAction=!0),Kt&&(Dt.isUserAction=Kt),Te.current=!0,ae(Dt)})},[f,ae,z]),w=W.useCallback(({categoryId:me,facetFilters:Ne,rangeFilters:Xe,catalogSegment:yt,pricebooks:mt,userPrompt:sn,isUserAction:Kt})=>{if(!z){f==null||f.error("Copilot is not initialized");return}if(!me)return;const xt={browseParams:{categoryId:me}};sn&&(xt.userPrompt=sn),Ne&&Object.keys(Ne).length>0&&(xt.browseParams.facetFilters=Ne),Xe&&Xe.length>0&&(xt.browseParams.rangeFilters=Xe),yt&&(xt.browseParams.catalogSegment=yt),mt&&(xt.browseParams.pricebooks=mt);const Dn=!Se.current;z.browse(xt,Nt=>{const Dt=U({},Nt);Dn&&(Dt.isInitial=!0,Dt.isUserAction=!0),Kt&&(Dt.isUserAction=Kt),Se.current=!0,ae(Dt)})},[f,ae,z]),R=W.useCallback(({productId:me,pdpLink:Ne,userPrompt:Xe,isUserAction:yt})=>{if(!z){f==null||f.error("Copilot is not initialized");return}if(!me)return;const mt={productId:me};Xe&&(mt.userPrompt=Xe),Ne&&(mt.pdpLink=Ne),z.productView(mt,sn=>{const Kt=U({},sn);yt&&(Kt.isUserAction=yt),ae(Kt)})},[f,z,ae]),K=W.useCallback(me=>{if(!z)return;const Ne={eventId:me,reason:"User cancelled the request"};z.cancelRequest(Ne,Xe=>{k(Xe),D(me)})},[k,D,z]),N=W.useCallback(()=>{z&&z.conversationReset({},me=>{C(),k(me),z.requestSessionInformation(Ne=>{f==null||f.log("Session Information: ",Ne)})})},[z,f,k,C]),_e=W.useCallback(me=>{!me||!h||Z(be(U({query:h},m),{userPrompt:me}))},[h,m,Z]),Be=W.useCallback((me,Ne)=>{var sn,xt;const yt=me.params.userPrompt||"";if(!yt)return;const mt=X.find(Nt=>Nt.id===Ne);if(mt){if(mt.name==="copilot_search"){const Kt=((sn=mt.request)==null?void 0:sn.searchParams)||{},{query:Nt}=Kt,Dt=Gt(Kt,["query"]);Nt&&Z(be(U(U({query:Nt||h},m),Dt),{userPrompt:yt}));return}if(mt.name==="copilot_browse"){const Dn=((xt=mt.request)==null?void 0:xt.browseParams)||{},{categoryId:Nt}=Dn,Dt=Gt(Dn,["categoryId"]);if(Nt){w(be(U(U({categoryId:Nt||E},b),Dt),{userPrompt:yt}));return}}if(mt.name==="product_view"){const Nt=mt.request;Nt!=null&&Nt.productId&&R(be(U({},Nt),{userPrompt:yt}))}}},[h,m,E,b,X,Z,w,R]),Pe=W.useMemo(()=>({copilot:z,messages:X,groupedMessages:B,isLoading:H,isResponseLoading:fe,handleSearch:Z,handleBrowse:w,handlePdp:R,handleUserInput:_e,handleSuggestion:Be,handleCancel:K,resetConversation:N,getSessionInformation:Ae,getConversationMessages:oe}),[z,X,B,H,fe,Z,w,R,_e,Be,K,N,Ae,oe]);return I.jsx(xg.Provider,{value:Pe,children:c})},si=()=>{const e=W.useContext(xg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},$C=()=>{const{resetCopilotState:e,addCopilotEvent:t}=bg(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:u,resetConversation:a,getSessionInformation:c,getConversationMessages:f}=si(),h=W.useCallback(({query:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=vt.facetFiltersProxy,{rangeFilters:S}=vt.rangeFiltersProxy,{catalogSegment:C}=vt.catalogSegmentProxy,{pricebooks:k}=vt.pricebooksProxy,F={query:b};_&&Object.keys(_).length>0&&(F.facetFilters=_),S&&S.length>0&&(F.rangeFilters=S),C&&(F.catalogSegment=C),k&&(F.pricebooks=k),r(be(U({},F),{isUserAction:T}))},[n,r]),m=W.useCallback(({categoryId:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=At.facetFiltersProxy,{rangeFilters:S}=At.rangeFiltersProxy,{catalogSegment:C}=At.catalogSegmentProxy,{pricebooks:k}=At.pricebooksProxy,F={categoryId:b};_&&Object.keys(_).length>0&&(F.facetFilters=_),S&&S.length>0&&(F.rangeFilters=S),C&&(F.catalogSegment=C),k&&(F.pricebooks=k),o(be(U({},F),{isUserAction:T}))},[n,o]),E=W.useCallback(({productId:b,isUserAction:T})=>{if(!n||!b)return;const _={productId:b,pdpLink:ws.pdpLink,isUserAction:T};u(U({},_))},[n,u]);return W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&h({query:T.value,isUserAction:!0})};return rg(b),()=>{ig(b)}},[h]),W.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId,isUserAction:!0});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value,isUserAction:!0})};return ug(b),()=>{ag(b)}},[E]),W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value,isUserAction:!0})};return sg(b),()=>{og(b)}},[m]),W.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==ii.RESET_CONVERSATION&&a(),(T==null?void 0:T.event)==ii.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==ii.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=T.value;if(!_.conversationId||typeof S!="function")return;f(_,S)}if((T==null?void 0:T.event)==ii.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;f(_,C=>{e(),C.forEach(k=>{t(k)})})}};return SC(b),()=>{wC(b)}},[a,c,f,e,t]),null},VC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:u,onRefinedSearch:a,onRefinedBrowse:c,children:f})=>I.jsx(gC,{onCopilotEvent:u,children:I.jsxs(jC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:c,children:[I.jsx($C,{}),f]})}),$f={productId:ws.proxy.productId,pdpLink:ws.proxy.pdpLink},qC=W.createContext($f),YC=({children:e})=>{const[t,n]=W.useState($f.productId),[r,o]=W.useState($f.pdpLink);W.useEffect(()=>{const a=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const f=c.value;n(f.productId),o(f.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return ug(a),()=>{ag(a)}},[]);const u=W.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return I.jsx(qC.Provider,{value:u,children:e})},Sg=W.createContext({mode:zt.modeProxy.mode,status:zt.statusProxy,dialogPosition:zt.dialogProxy.position,isModalFullscreen:zt.modalProxy.isFullscreen,previousComponentType:zt.statusProxy.type}),WC=({componentType:e,children:t})=>{const[n,r]=W.useState(zt.modeProxy.mode),[o,u]=W.useState({type:e||zt.statusProxy.type,isOpen:zt.statusProxy.isOpen}),[a,c]=W.useState(zt.dialogProxy.position),[f,h]=W.useState(zt.modalProxy.isFullscreen),m=bC(o.type);W.useEffect(()=>{const b=T=>{const{property:_,value:S}=T.detail||{};if(!(!_||S===void 0)){if(_==="mode"){r(S);return}if(_==="isOpen"){u(C=>be(U({},C),{isOpen:S}));return}if(_==="type"){u(C=>be(U({},C),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return MC(b),()=>{FC(b)}},[]);const E=W.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:a,isModalFullscreen:f}),[n,o,m,a,f]);return I.jsx(Sg.Provider,{value:E,children:t})},wg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:u,globalClassName:a,isDevelopment:c=!1,componentType:f,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})=>I.jsx(hC,{apiKey:e,logoUrl:r,headerText:o,theme:u,globalClassName:a,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,isDevelopment:c,children:I.jsx(Gw,{apiKey:e,apiToken:t,isDevelopment:c,children:I.jsx(YC,{children:I.jsx(AC,{children:I.jsx(HC,{children:I.jsx(WC,{componentType:f,children:I.jsx(VC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})})})})})})}),jo=()=>{const e=W.useContext(Sg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function Cg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Cg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function se(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Cg(e))&&(r&&(r+=" "),r+=t);return r}var Ag={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vg=Mi.createContext&&Mi.createContext(Ag),GC=["attr","size","title"];function KC(e,t){if(e==null)return{};var n=QC(e,t),r,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++)r=u[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QC(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 Fa(){return Fa=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},Fa.apply(this,arguments)}function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(n),!0).forEach(function(r){XC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XC(e,t,n){return t=JC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JC(e){var t=ZC(e,"string");return typeof t=="symbol"?t:t+""}function ZC(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 Ng(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,Ba({key:n},t.attr),Ng(t.child)))}function fn(e){return t=>Mi.createElement(eA,Fa({attr:Ba({},e.attr)},t),Ng(e.child))}function eA(e){var t=n=>{var{attr:r,size:o,title:u}=e,a=KC(e,GC),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Mi.createElement("svg",Fa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:f,style:Ba(Ba({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&Mi.createElement("title",null,u),e.children)};return vg!==void 0?Mi.createElement(vg.Consumer,null,n=>t(n)):t(Ag)}function Og(e){return fn({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 Ua(e){return fn({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 tA(e){return fn({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 Ig(e){return fn({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 nA(e){return fn({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 rA(e){return fn({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 iA(e){return fn({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 sA(e){return fn({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)}const Vf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>I.jsx("button",{className:se(`${ee}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Ha=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:u})=>I.jsx("button",{className:se(e,`${ee}-icon-button`),type:n,"aria-label":r,onClick:u,disabled:o,children:t}),oA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?I.jsx(Vf,{className:se(n,r,e),type:"submit",disabled:o,children:t}):I.jsx(Ha,{className:se(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:I.jsx(Ua,{})}),qf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=_g(),{globalClassName:u,searchPlaceholder:a,searchButtonLabel:c}=rr(),f=W.useRef(null),h=b=>{var _;b.preventDefault();const T=(((_=f.current)==null?void 0:_.value)||"").trim();T&&(r(T),f.current.value="")},m=!!o||!1,E=m?"connected":"disconnected";return I.jsxs("form",{className:se(u,e,n,`${ee}-search-bar`),name:`${ee}-search-form`,onSubmit:h,children:[I.jsx("span",{role:"status",className:se(`${ee}-connection-status-icon`,E)}),I.jsx("input",{className:se(u,e,n,`${ee}-search-input`),type:"text",ref:f,placeholder:a,name:`${ee}-user-input`}),I.jsx(oA,{searchButtonLabel:c,globalClassName:u,componentType:n,isLoading:t||!m})]})};function uA(e){return e==null?[]:Array.isArray(e)?e:[e]}var aA=e=>e!=null&&typeof e=="object",za=e=>typeof e=="string",As=e=>typeof e=="function",lA=e=>e==null,cA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fA=e=>Object.prototype.toString.call(e),Pg=Function.prototype.toString,dA=Pg.call(Object),hA=e=>{if(!aA(e)||fA(e)!="[object Object]"||gA(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=cA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pg.call(n)==dA},pA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,mA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,gA=e=>pA(e)||mA(e),EA=e=>e(),yA=()=>{},Yf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Wf(e){if(!hA(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Wf(o))}return n}function Gf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function TA(e,t){if(e==null)throw new Error(t())}var bA=Object.defineProperty,_A=(e,t,n)=>t in e?bA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kf=(e,t,n)=>_A(e,typeof t!="symbol"?t+"":t,n),Rg=()=>{},ja=e=>typeof e=="object"&&e!==null,xA=e=>e?"":void 0,SA=e=>e?"true":void 0,wA=1,CA=9,AA=11,jt=e=>ja(e)&&e.nodeType===wA&&typeof e.nodeName=="string",$a=e=>ja(e)&&e.nodeType===CA,vA=e=>ja(e)&&e===e.window,Lg=e=>jt(e)?e.localName||"":"#document";function kA(e){return["html","body","#document"].includes(Lg(e))}var NA=e=>ja(e)&&e.nodeType!==void 0,ji=e=>NA(e)&&e.nodeType===AA&&"host"in e,OA=e=>jt(e)&&e.localName==="input",IA=e=>jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function $o(e){if(!e)return!1;const t=e.getRootNode();return ks(t)===e}var PA=/(textarea|select)/;function RA(e){if(e==null||!jt(e))return!1;try{return OA(e)&&e.selectionStart!=null||PA.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Va(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&&ji(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function br(e){var t;return $a(e)?e:vA(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function LA(e){return br(e).documentElement}function vs(e){var t,n,r;return ji(e)?vs(e.host):$a(e)?(t=e.defaultView)!=null?t:window:jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ks(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 DA(e){if(Lg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ji(e)&&e.host||LA(e);return ji(t)?t.host:t}function Qf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),$a(t)||ji(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Xf=new WeakMap;function qa(e){return Xf.has(e)||Xf.set(e,vs(e).getComputedStyle(e)),Xf.get(e)}var Jf=new Set(["menu","listbox","dialog","grid","tree","region"]),MA=e=>Jf.has(e),Dg=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Mg(e,t){const n=new Set,r=Qf(e),o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Dg(c);for(const h of f){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(E&&MA(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Fg(e,t){const n=Qf(e),r=new Set,o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Dg(c);for(const h of f){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";E&&Jf.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function FA(e){const t=new Set;return Fg(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function BA(e){const t=e.getAttribute("role");return!!(t&&Jf.has(t))}function UA(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function HA(e){var t;return UA(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function zA(e){if(!e.id)return!1;const t=Qf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&BA(e))}var Zf=()=>typeof document!="undefined";function jA(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var ed=e=>Zf()&&e.test(jA()),$A=e=>Zf()&&e.test(navigator.vendor),Bg=()=>Zf()&&!!navigator.maxTouchPoints,VA=()=>ed(/^iPhone/i),qA=()=>ed(/^iPad/i)||td()&&navigator.maxTouchPoints>1,Ug=()=>VA()||qA(),YA=()=>td()||Ug(),td=()=>ed(/^Mac/i),WA=()=>YA()&&$A(/apple/i);function GA(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function zr(e){var n;const t=GA(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var KA=e=>e.button===0,QA=e=>e.button===2||td()&&e.ctrlKey&&e.button===0,ir=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Hg=e=>jt(e)&&e.tagName==="IFRAME",XA=/^(audio|video|details)$/;function zg(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var JA=e=>!Number.isNaN(zg(e)),ZA=e=>zg(e)<0;function ev(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 jg(e,t,n){const r=[...e],o=[...e],u=new Set,a=new Map;e.forEach((f,h)=>a.set(f,h));let c=0;for(;c<o.length;){const f=o[c++];if(!f||u.has(f))continue;u.add(f);const h=ev(f,t);if(h){const m=Array.from(h.querySelectorAll(Ya)).filter(n),E=a.get(f);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{a.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)a.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{a.set(T,b+_)})}o.push(...m)}}return r}var Ya="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",$g=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ya));(n==!0||n=="if-empty"&&o.length===0)&&jt(e)&&jr(e)&&o.unshift(e);const a=[];for(const c of o)if(jr(c)){if(Hg(c)&&c.contentDocument){const f=c.contentDocument.body;a.push(...$g(f,{getShadowRoot:r}));continue}a.push(c)}return r?jg(a,r,jr):a};function jr(e){return!jt(e)||e.closest("[inert]")?!1:e.matches(Ya)&&IA(e)}function Vo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ya));n&&$i(e)&&o.unshift(e);const u=[];for(const a of o)if($i(a)){if(Hg(a)&&a.contentDocument){const c=a.contentDocument.body;u.push(...Vo(c,{getShadowRoot:r}));continue}u.push(a)}if(r){const a=jg(u,r,$i);return!a.length&&n?o:a}return!u.length&&n?o:u}function $i(e){return jt(e)&&e.tabIndex>0?!0:jr(e)&&!ZA(e)}function tv(e,t={}){const n=Vo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function nv(e,t={}){const{current:n,getShadowRoot:r}=t,o=Vo(e,{getShadowRoot:r}),u=(e==null?void 0:e.ownerDocument)||document,a=n!=null?n:ks(u);if(!a)return null;const c=o.indexOf(a);return o[c+1]||null}function qo(e){return e.tabIndex<0&&(XA.test(e.localName)||RA(e))&&!JA(e)?0:e.tabIndex}function Vg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let u=null;if(u||(u=typeof n=="function"?n():n),u||(u=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!u){const a=Vo(t);u=r?a.filter(r)[0]:a[0]}return u||t||void 0}var rv=class fx{constructor(){Kf(this,"id",null),Kf(this,"fn_cleanup"),Kf(this,"cleanup",()=>{this.cancel()})}static create(){return new fx}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 Tn(e){const t=rv.create();return t.request(e),t.cleanup}function iv(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function nd(e){const t=DA(e);return kA(t)?br(t).body:jt(t)&&uv(t)?t:nd(t)}var sv=/auto|scroll|overlay|hidden|clip/,ov=new Set(["inline","contents"]);function uv(e){const t=vs(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return sv.test(n+o+r)&&!ov.has(u)}function av(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:u}=t,a=(e==null?void 0:e.ownerDocument)||document,c=a.body;function f(h){if(h.key!=="Tab")return;let m=null;const[E,b]=tv(e,{includeContainer:!0,getShadowRoot:u}),T=nv(c,{current:n,getShadowRoot:u}),_=!E&&!b;h.shiftKey&&$o(T)?(o==null||o(),m=b):h.shiftKey&&($o(E)||_)?m=n:!h.shiftKey&&$o(n)?(o==null||o(),m=E):!h.shiftKey&&($o(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return ir(a,"keydown",f,!0)}function lv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=Gt(c,["defer","triggerElement"]),u=n?Tn:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;a.push(av(f,U({triggerElement:h},o)))})),()=>{a.forEach(f=>f==null?void 0:f())}}function Wa(e,t){if(!e)return Rg;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function cv(e,t,n){if(!e)return Rg;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 fv(e,t,n){const{signal:r}=t;return[new Promise((a,c)=>{const f=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(f),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(f),a(h))}).catch(h=>{r.aborted||(clearTimeout(f),c(h))})}),()=>t.abort()]}function dv(e,t){const{timeout:n,rootNode:r}=t,o=vs(r),u=br(r),a=new o.AbortController;return fv(new Promise(c=>{const f=e();if(f){c(f);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(u.body,{childList:!0,subtree:!0})}),a,n)}var hv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),pv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,qg=e=>{const t={};let n;for(;n=pv.exec(e);)t[n[1]]=n[2];return t},mv=(e,t)=>{if(za(e)){if(za(t))return`${e};${t}`;e=qg(e)}else za(t)&&(t=qg(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function sr(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Yf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=hv(t[o],n[o]);continue}if(o==="style"){t[o]=mv(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function BF(e){return e}var Ns=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ns||{}),rd="__init__";function gv(e){const t=()=>{var a,c;return(c=(a=e.getRootNode)==null?void 0:a.call(e))!=null?c:document},n=()=>br(t()),r=()=>{var a;return(a=n().defaultView)!=null?a:window},o=()=>ks(t()),u=a=>t().getElementById(a);return be(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:$o,getById:u})}var id={exports:{}},bn={},sd={exports:{}},od={};var Yg;function Ev(){return Yg||(Yg=1,function(e){function t(q,Z){var w=q.length;q.push(Z);e:for(;0<w;){var R=w-1>>>1,K=q[R];if(0<o(K,Z))q[R]=Z,q[w]=K,w=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var Z=q[0],w=q.pop();if(w!==Z){q[0]=w;e:for(var R=0,K=q.length,N=K>>>1;R<N;){var _e=2*(R+1)-1,Be=q[_e],Pe=_e+1,Ye=q[Pe];if(0>o(Be,w))Pe<K&&0>o(Ye,Be)?(q[R]=Ye,q[Pe]=w,R=Pe):(q[R]=Be,q[_e]=w,R=_e);else if(Pe<K&&0>o(Ye,w))q[R]=Ye,q[Pe]=w,R=Pe;else break e}}return Z}function o(q,Z){var w=q.sortIndex-Z.sortIndex;return w!==0?w:q.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],m=1,E=null,b=3,T=!1,_=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(q){for(var Z=n(h);Z!==null;){if(Z.callback===null)r(h);else if(Z.startTime<=q)r(h),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=n(h)}}function z(q){if(S=!1,D(q),!_)if(n(f)!==null)_=!0,Ae(X);else{var Z=n(h);Z!==null&&oe(z,Z.startTime-q)}}function X(q,Z){_=!1,S&&(S=!1,k(Te),Te=-1),T=!0;var w=b;try{for(D(Z),E=n(f);E!==null&&(!(E.expirationTime>Z)||q&&!fe());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var K=R(E.expirationTime<=Z);Z=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(f)&&r(f),D(Z)}else r(f);E=n(f)}if(E!==null)var N=!0;else{var _e=n(h);_e!==null&&oe(z,_e.startTime-Z),N=!1}return N}finally{E=null,b=w,T=!1}}var B=!1,te=null,Te=-1,Se=5,H=-1;function fe(){return!(e.unstable_now()-H<Se)}function ae(){if(te!==null){var q=e.unstable_now();H=q;var Z=!0;try{Z=te(!0,q)}finally{Z?le():(B=!1,te=null)}}else B=!1}var le;if(typeof F=="function")le=function(){F(ae)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,ye=de.port2;de.port1.onmessage=ae,le=function(){ye.postMessage(null)}}else le=function(){C(ae,0)};function Ae(q){te=q,B||(B=!0,le())}function oe(q,Z){Te=C(function(){q(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,Ae(X))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Se=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var w=b;b=Z;try{return q()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,Z){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var w=b;b=q;try{return Z()}finally{b=w}},e.unstable_scheduleCallback=function(q,Z,w){var R=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?R+w:R):w=R,q){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=w+K,q={id:m++,callback:Z,priorityLevel:q,startTime:w,expirationTime:K,sortIndex:-1},w>R?(q.sortIndex=w,t(h,q),n(f)===null&&q===n(h)&&(S?(k(Te),Te=-1):S=!0,oe(z,w-R))):(q.sortIndex=K,t(f,q),_||T||(_=!0,Ae(X))),q},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(q){var Z=b;return function(){var w=b;b=Z;try{return q.apply(this,arguments)}finally{b=w}}}}(od)),od}var Wg;function yv(){return Wg||(Wg=1,sd.exports=Ev()),sd.exports}var Gg;function Tv(){if(Gg)return bn;Gg=1;var e=hs(),t=yv();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function u(i,s){a(i,s),a(i+"Capture",s)}function a(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},E={};function b(i){return f.call(E,i)?!0:f.call(m,i)?!1:h.test(i)?E[i]=!0:(m[i]=!0,!1)}function T(i,s,l,d){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,d){if(s===null||typeof s=="undefined"||T(i,s,l,d))return!0;if(d)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];C[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){C[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function F(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(k,F);C[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(k,F);C[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(k,F);C[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function D(i,s,l,d){var g=C.hasOwnProperty(s)?C[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,d)&&(l=null),d||g===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,d=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,d?i.setAttributeNS(d,s,l):i.setAttribute(s,l))))}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),Te=Symbol.for("react.strict_mode"),Se=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),fe=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),q=Symbol.iterator;function Z(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,R;function K(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
|
|
1
|
+
(function(Oe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Fe(Oe["cimulate-copilot-widget"]={}))})(this,function(Oe){"use strict";var QF=Object.defineProperty,XF=Object.defineProperties;var JF=Object.getOwnPropertyDescriptors;var Qc=Object.getOwnPropertySymbols;var lx=Object.prototype.hasOwnProperty,cx=Object.prototype.propertyIsEnumerable;var No=(Oe,Fe)=>(Fe=Symbol[Oe])?Fe:Symbol.for("Symbol."+Oe),ZF=Oe=>{throw TypeError(Oe)},Xc=Math.pow,Pm=(Oe,Fe,Ge)=>Fe in Oe?QF(Oe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Oe[Fe]=Ge,U=(Oe,Fe)=>{for(var Ge in Fe||(Fe={}))lx.call(Fe,Ge)&&Pm(Oe,Ge,Fe[Ge]);if(Qc)for(var Ge of Qc(Fe))cx.call(Fe,Ge)&&Pm(Oe,Ge,Fe[Ge]);return Oe},ye=(Oe,Fe)=>XF(Oe,JF(Fe));var Xt=(Oe,Fe)=>{var Ge={};for(var ot in Oe)lx.call(Oe,ot)&&Fe.indexOf(ot)<0&&(Ge[ot]=Oe[ot]);if(Oe!=null&&Qc)for(var ot of Qc(Oe))Fe.indexOf(ot)<0&&cx.call(Oe,ot)&&(Ge[ot]=Oe[ot]);return Ge};var ke=(Oe,Fe,Ge)=>Pm(Oe,typeof Fe!="symbol"?Fe+"":Fe,Ge);var it=(Oe,Fe,Ge)=>new Promise((ot,At)=>{var pt=Nt=>{try{jt(Ge.next(Nt))}catch(En){At(En)}},Pe=Nt=>{try{jt(Ge.throw(Nt))}catch(En){At(En)}},jt=Nt=>Nt.done?ot(Nt.value):Promise.resolve(Nt.value).then(pt,Pe);jt((Ge=Ge.apply(Oe,Fe)).next())}),Ur=function(Oe,Fe){this[0]=Oe,this[1]=Fe},Jc=(Oe,Fe,Ge)=>{var ot=(Pe,jt,Nt,En)=>{try{var ms=Ge[Pe](jt),Oo=(jt=ms.value)instanceof Ur,Zc=ms.done;Promise.resolve(Oo?jt[0]:jt).then(nr=>Oo?ot(Pe==="return"?Pe:"next",jt[1]?{done:nr.done,value:nr.value}:nr,Nt,En):Nt({value:nr,done:Zc})).catch(nr=>ot("throw",nr,Nt,En))}catch(nr){En(nr)}},At=Pe=>pt[Pe]=jt=>new Promise((Nt,En)=>ot(Pe,jt,Nt,En)),pt={};return Ge=Ge.apply(Oe,Fe),pt[No("asyncIterator")]=()=>pt,At("next"),At("throw"),At("return"),pt},Rm=Oe=>{var Fe=Oe[No("asyncIterator")],Ge=!1,ot,At={};return Fe==null?(Fe=Oe[No("iterator")](),ot=pt=>At[pt]=Pe=>Fe[pt](Pe)):(Fe=Fe.call(Oe),ot=pt=>At[pt]=Pe=>{if(Ge){if(Ge=!1,pt==="throw")throw Pe;return Pe}return Ge=!0,{done:!1,value:new Ur(new Promise(jt=>{var Nt=Fe[pt](Pe);Nt instanceof Object||ZF("Object expected"),jt(Nt)}),1)}}),At[No("iterator")]=()=>At,ot("next"),"throw"in Fe?ot("throw"):At.throw=pt=>{throw pt},"return"in Fe&&ot("return"),At},fx=(Oe,Fe,Ge)=>(Fe=Oe[No("asyncIterator")])?Fe.call(Oe):(Oe=Oe[No("iterator")](),Fe={},Ge=(ot,At)=>(At=Oe[ot])&&(Fe[ot]=pt=>new Promise((Pe,jt,Nt)=>(pt=At.call(Oe,pt),Nt=pt.done,Promise.resolve(pt.value).then(En=>Pe({value:En,done:Nt}),jt)))),Ge("next"),Ge("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.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-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;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.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-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;color:var(--cim-widget-secondary-color)}.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-user-message{display:flex;align-items:center}.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:30%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.cim-widget-message-icon.user-message-icon{margin-right:.5rem}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex}.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:30%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;padding-top:.5rem;padding-bottom:.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;padding:1rem;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;width:100%;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%;border-radius:0}}@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}.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;padding:1rem;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;width:100%;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}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}.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:2rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1.5rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1.2rem}.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 0}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Fe);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ot={exports:{}},At={},pt={exports:{}},Pe={};var jt;function Nt(){if(jt)return Pe;jt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function C(R,Q,N){this.props=R,this.context=Q,this.refs=S,this.updater=N||T}C.prototype.isReactComponent={},C.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Q,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function k(){}k.prototype=C.prototype;function M(R,Q,N){this.props=R,this.context=Q,this.refs=S,this.updater=N||T}var D=M.prototype=new k;D.constructor=M,_(D,C.prototype),D.isPureReactComponent=!0;var G=Array.isArray,q=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function Te(R,Q,N){var _e,Me={},Ie=null,Ye=null;if(Q!=null)for(_e in Q.ref!==void 0&&(Ye=Q.ref),Q.key!==void 0&&(Ie=""+Q.key),Q)q.call(Q,_e)&&!te.hasOwnProperty(_e)&&(Me[_e]=Q[_e]);var Ve=arguments.length-2;if(Ve===1)Me.children=N;else if(1<Ve){for(var Je=Array(Ve),xt=0;xt<Ve;xt++)Je[xt]=arguments[xt+2];Me.children=Je}if(R&&R.defaultProps)for(_e in Ve=R.defaultProps,Ve)Me[_e]===void 0&&(Me[_e]=Ve[_e]);return{$$typeof:e,type:R,key:Ie,ref:Ye,props:Me,_owner:B.current}}function Se(R,Q){return{$$typeof:e,type:R.type,key:Q,ref:R.ref,props:R.props,_owner:R._owner}}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function fe(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(N){return Q[N]})}var de=/\/+/g;function ue(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?fe(""+R.key):Q.toString(36)}function ie(R,Q,N,_e,Me){var Ie=typeof R;(Ie==="undefined"||Ie==="boolean")&&(R=null);var Ye=!1;if(R===null)Ye=!0;else switch(Ie){case"string":case"number":Ye=!0;break;case"object":switch(R.$$typeof){case e:case t:Ye=!0}}if(Ye)return Ye=R,Me=Me(Ye),R=_e===""?"."+ue(Ye,0):_e,G(Me)?(N="",R!=null&&(N=R.replace(de,"$&/")+"/"),ie(Me,Q,N,"",function(xt){return xt})):Me!=null&&(H(Me)&&(Me=Se(Me,N+(!Me.key||Ye&&Ye.key===Me.key?"":(""+Me.key).replace(de,"$&/")+"/")+R)),Q.push(Me)),1;if(Ye=0,_e=_e===""?".":_e+":",G(R))for(var Ve=0;Ve<R.length;Ve++){Ie=R[Ve];var Je=_e+ue(Ie,Ve);Ye+=ie(Ie,Q,N,Je,Me)}else if(Je=b(R),typeof Je=="function")for(R=Je.call(R),Ve=0;!(Ie=R.next()).done;)Ie=Ie.value,Je=_e+ue(Ie,Ve++),Ye+=ie(Ie,Q,N,Je,Me);else if(Ie==="object")throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ye}function ge(R,Q,N){if(R==null)return R;var _e=[],Me=0;return ie(R,_e,"","",function(Ie){return Q.call(N,Ie,Me++)}),_e}function we(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(N){(R._status===0||R._status===-1)&&(R._status=1,R._result=N)},function(N){(R._status===0||R._status===-1)&&(R._status=2,R._result=N)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var ae={current:null},V={transition:null},ee={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:V,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:ge,forEach:function(R,Q,N){ge(R,function(){Q.apply(this,arguments)},N)},count:function(R){var Q=0;return ge(R,function(){Q++}),Q},toArray:function(R){return ge(R,function(Q){return Q})||[]},only:function(R){if(!H(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Pe.Component=C,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=M,Pe.StrictMode=r,Pe.Suspense=f,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Pe.act=w,Pe.cloneElement=function(R,Q,N){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Me=R.key,Ie=R.ref,Ye=R._owner;if(Q!=null){if(Q.ref!==void 0&&(Ie=Q.ref,Ye=B.current),Q.key!==void 0&&(Me=""+Q.key),R.type&&R.type.defaultProps)var Ve=R.type.defaultProps;for(Je in Q)q.call(Q,Je)&&!te.hasOwnProperty(Je)&&(_e[Je]=Q[Je]===void 0&&Ve!==void 0?Ve[Je]:Q[Je])}var Je=arguments.length-2;if(Je===1)_e.children=N;else if(1<Je){Ve=Array(Je);for(var xt=0;xt<Je;xt++)Ve[xt]=arguments[xt+2];_e.children=Ve}return{$$typeof:e,type:R.type,key:Me,ref:Ie,props:_e,_owner:Ye}},Pe.createContext=function(R){return R={$$typeof:a,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:u,_context:R},R.Consumer=R},Pe.createElement=Te,Pe.createFactory=function(R){var Q=Te.bind(null,R);return Q.type=R,Q},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=H,Pe.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:we}},Pe.memo=function(R,Q){return{$$typeof:h,type:R,compare:Q===void 0?null:Q}},Pe.startTransition=function(R){var Q=V.transition;V.transition={};try{R()}finally{V.transition=Q}},Pe.unstable_act=w,Pe.useCallback=function(R,Q){return ae.current.useCallback(R,Q)},Pe.useContext=function(R){return ae.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return ae.current.useDeferredValue(R)},Pe.useEffect=function(R,Q){return ae.current.useEffect(R,Q)},Pe.useId=function(){return ae.current.useId()},Pe.useImperativeHandle=function(R,Q,N){return ae.current.useImperativeHandle(R,Q,N)},Pe.useInsertionEffect=function(R,Q){return ae.current.useInsertionEffect(R,Q)},Pe.useLayoutEffect=function(R,Q){return ae.current.useLayoutEffect(R,Q)},Pe.useMemo=function(R,Q){return ae.current.useMemo(R,Q)},Pe.useReducer=function(R,Q,N){return ae.current.useReducer(R,Q,N)},Pe.useRef=function(R){return ae.current.useRef(R)},Pe.useState=function(R){return ae.current.useState(R)},Pe.useSyncExternalStore=function(R,Q,N){return ae.current.useSyncExternalStore(R,Q,N)},Pe.useTransition=function(){return ae.current.useTransition()},Pe.version="18.3.1",Pe}var En;function ms(){return En||(En=1,pt.exports=Nt()),pt.exports}var Oo;function Zc(){if(Oo)return At;Oo=1;var e=ms(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var m,E={},b=null,T=null;h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),f.ref!==void 0&&(T=f.ref);for(m in f)r.call(f,m)&&!u.hasOwnProperty(m)&&(E[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)E[m]===void 0&&(E[m]=f[m]);return{$$typeof:t,type:c,key:b,ref:T,props:E,_owner:o.current}}return At.Fragment=n,At.jsx=a,At.jsxs=a,At}var nr;function px(){return nr||(nr=1,ot.exports=Zc()),ot.exports}var I=px();const br=Object.create(null);br.open="0",br.close="1",br.ping="2",br.pong="3",br.message="4",br.upgrade="5",br.noop="6";const ca=Object.create(null);Object.keys(br).forEach(e=>{ca[br[e]]=e});const ef={type:"error",data:"parser error"},Lm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Dm=typeof ArrayBuffer=="function",Fm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,tf=({type:e,data:t},n,r)=>Lm&&t instanceof Blob?n?r(t):Mm(t,r):Dm&&(t instanceof ArrayBuffer||Fm(t))?n?r(t):Mm(new Blob([t]),r):r(br[e]+(t||"")),Mm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Bm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let nf;function mx(e,t){if(Lm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Bm).then(t);if(Dm&&(e.data instanceof ArrayBuffer||Fm(e.data)))return t(Bm(e.data));tf(e,!1,n=>{nf||(nf=new TextEncoder),t(nf.encode(n))})}const Um="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Io=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Um.length;e++)Io[Um.charCodeAt(e)]=e;const gx=e=>{let t=e.length*.75,n=e.length,r,o=0,u,a,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)u=Io[e.charCodeAt(r)],a=Io[e.charCodeAt(r+1)],c=Io[e.charCodeAt(r+2)],f=Io[e.charCodeAt(r+3)],m[o++]=u<<2|a>>4,m[o++]=(a&15)<<4|c>>2,m[o++]=(c&3)<<6|f&63;return h},Ex=typeof ArrayBuffer=="function",rf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Hm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:yx(e.substring(1),t)}:ca[n]?e.length>1?{type:ca[n],data:e.substring(1)}:{type:ca[n]}:ef},yx=(e,t)=>{if(Ex){const n=gx(e);return Hm(n,t)}else return{base64:!0,data:e}},Hm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},zm="",Tx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,a)=>{tf(u,!1,c=>{r[a]=c,++o===n&&t(r.join(zm))})})},bx=(e,t)=>{const n=e.split(zm),r=[];for(let o=0;o<n.length;o++){const u=rf(n[o],t);if(r.push(u),u.type==="error")break}return r};function _x(){return new TransformStream({transform(e,t){mx(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let sf;function fa(e){return e.reduce((t,n)=>t+n.length,0)}function da(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function xx(e,t){sf||(sf=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(a,c){for(n.push(a);;){if(r===0){if(fa(n)<1)break;const f=da(n,1);u=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(fa(n)<2)break;const f=da(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(fa(n)<8)break;const f=da(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(ef);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(fa(n)<o)break;const f=da(n,o);c.enqueue(rf(u?f:sf.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(ef);break}}}})}const jm=4;function Ft(e){if(e)return Sx(e)}function Sx(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ha=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$n=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),wx="arraybuffer";function eM(){}function $m(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Cx=$n.setTimeout,Ax=$n.clearTimeout;function pa(e,t){t.useNativeTimers?(e.setTimeoutFn=Cx.bind($n),e.clearTimeoutFn=Ax.bind($n)):(e.setTimeoutFn=$n.setTimeout.bind($n),e.clearTimeoutFn=$n.clearTimeout.bind($n))}const vx=1.33;function kx(e){return typeof e=="string"?Nx(e):Math.ceil((e.byteLength||e.size)*vx)}function Nx(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Vm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ox(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Ix(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class Px extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class of extends Ft{constructor(t){super(),this.writable=!1,pa(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 Px(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=rf(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Ox(t);return n.length?"?"+n:""}}class Rx extends of{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)};bx(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,Tx(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]=Vm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let qm=!1;try{qm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Lx=qm;function Dx(){}class Fx extends Rx{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class _r extends Ft{constructor(t,n,r){super(),this.createRequest=t,pa(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=$m(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=Dx,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ym);else if(typeof addEventListener=="function"){const e="onpagehide"in $n?"pagehide":"unload";addEventListener(e,Ym,!1)}}function Ym(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const Mx=function(){const e=Wm({xdomain:!1});return e&&e.responseType!==null}();class Bx extends Fx{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Mx&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(Wm,this.uri(),t)}}function Wm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Lx))return new XMLHttpRequest}catch(n){}if(!t)try{return new $n[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Gm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ux extends of{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Gm?{}:$m(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;tf(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(a){}o&&ha(()=>{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]=Vm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const uf=$n.WebSocket||$n.MozWebSocket;class Hx extends Ux{createSocket(t,n,r){return Gm?new uf(t,n,r):n?new uf(t,n):new uf(t)}doWrite(t,n){this.ws.send(n)}}class zx extends of{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=xx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=_x();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),u())}).catch(c=>{})};u();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&ha(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const jx={websocket:Hx,webtransport:zx,polling:Bx},$x=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Vx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function af(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=$x.exec(e||""),u={},a=14;for(;a--;)u[Vx[a]]=o[a]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=qx(u,u.path),u.queryKey=Yx(u,u.query),u}function qx(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 Yx(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const lf=typeof addEventListener=="function"&&typeof removeEventListener=="function",ma=[];lf&&addEventListener("offline",()=>{ma.forEach(e=>e())},!1);class ui extends Ft{constructor(t,n){if(super(),this.binaryType=wx,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=af(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=af(n.host).host);pa(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ix(this.opts.query)),lf&&(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"})},ma.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=jm,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&&ui.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",ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=kx(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ha(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.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(),lf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ma.indexOf(this._offlineEventListener);r!==-1&&ma.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=jm;class Wx extends ui{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;ui.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),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 u(){r||(r=!0,m(),n.close(),n=null)}const a=E=>{const b=new Error("probe error: "+E);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){a("transport closed")}function f(){a("socket closed")}function h(E){n&&E.name!==n.name&&u()}const m=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",a),n.once("close",c),this.once("close",f),this.once("upgrading",h),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 Gx=class extends Wx{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>jx[o]).filter(o=>!!o)),super(t,r)}};function Kx(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=af(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 u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const Qx=typeof ArrayBuffer=="function",Xx=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Km=Object.prototype.toString,Jx=typeof Blob=="function"||typeof Blob!="undefined"&&Km.call(Blob)==="[object BlobConstructor]",Zx=typeof File=="function"||typeof File!="undefined"&&Km.call(File)==="[object FileConstructor]";function cf(e){return Qx&&(e instanceof ArrayBuffer||Xx(e))||Jx&&e instanceof Blob||Zx&&e instanceof File}function ga(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ga(e[n]))return!0;return!1}if(cf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ga(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ga(e[n]))return!0;return!1}function eS(e){const t=[],n=e.data,r=e;return r.data=ff(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ff(e,t){if(!e)return e;if(cf(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]=ff(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]=ff(e[r],t));return n}return e}function tS(e,t){return e.data=df(e.data,t),delete e.attachments,e}function df(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]=df(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=df(e[n],t));return e}const nS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],rS=5;var Qe;(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"})(Qe||(Qe={}));class iS{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&ga(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.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=eS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Qm(e){return Object.prototype.toString.call(e)==="[object Object]"}class hf extends Ft{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new sS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(cf(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(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(hf.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Qm(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Qm(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&nS.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class sS{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=tS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const oS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hf,Encoder:iS,get PacketType(){return Qe},protocol:rS},Symbol.toStringTag,{value:"Module"}));function rr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const uS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xm extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[rr(t,"open",this.onopen.bind(this)),rr(t,"packet",this.onpacket.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,u;if(uS.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 a={type:Qe.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),a.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),a=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(a,c)=>a?o(a):r(c);u.withError=!0,n.push(u),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...u)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...u)),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:Qe.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 Qe.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 Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Qe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Qe.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 gs(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}gs.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},gs.prototype.reset=function(){this.attempts=0},gs.prototype.setMin=function(e){this.ms=e},gs.prototype.setMax=function(e){this.max=e},gs.prototype.setJitter=function(e){this.jitter=e};class pf extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,pa(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 gs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||oS;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Gx(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=rr(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},a=rr(n,"error",u);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(rr(t,"ping",this.onping.bind(this)),rr(t,"data",this.ondata.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(t,"close",this.onclose.bind(this)),rr(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){ha(()=>{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 Xm(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Po={};function Ea(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Kx(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,a=Po[o]&&u in Po[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let f;return c?f=new pf(r,t):(Po[o]||(Po[o]=new pf(r,t)),f=Po[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(Ea,{Manager:pf,Socket:Xm,io:Ea,connect:Ea});var aS=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===lS}(t)}(e)},lS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Ro(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Es((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function cS(e,t,n){return e.concat(t).map(function(r){return Ro(r,n)})}function Jm(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 Zm(e,t){try{return t in e}catch(n){return!1}}function fS(e,t,n){var r={};return n.isMergeableObject(e)&&Jm(e).forEach(function(o){r[o]=Ro(e[o],n)}),Jm(t).forEach(function(o){(function(u,a){return Zm(u,a)&&!(Object.hasOwnProperty.call(u,a)&&Object.propertyIsEnumerable.call(u,a))})(e,o)||(Zm(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,a){if(!a.customMerge)return Es;var c=a.customMerge(u);return typeof c=="function"?c:Es}(o,n)(e[o],t[o],n):r[o]=Ro(t[o],n))}),r}function Es(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||cS,n.isMergeableObject=n.isMergeableObject||aS,n.cloneUnlessOtherwiseSpecified=Ro;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):fS(e,t,n):Ro(t,n)}Es.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return Es(n,r,t)},{})};var dS=Es;class hS{constructor(t){Object.assign(this,t)}}function dn(e){if(e)return function(t){for(var n in dn.prototype)t[n]=dn.prototype[n];return t}(e)}dn.prototype.on=dn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},dn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},dn.prototype.off=dn.prototype.removeListener=dn.prototype.removeAllListeners=dn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},dn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},dn.prototype.emitReserved=dn.prototype.emit,dn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},dn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const pS=typeof ArrayBuffer=="function",e0=Object.prototype.toString,mS=typeof Blob=="function"||typeof Blob!="undefined"&&e0.call(Blob)==="[object BlobConstructor]",gS=typeof File=="function"||typeof File!="undefined"&&e0.call(File)==="[object FileConstructor]";function mf(e){return pS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||mS&&e instanceof Blob||gS&&e instanceof File}function ya(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ya(e[n]))return!0;return!1}if(mf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ya(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ya(e[n]))return!0;return!1}function ES(e){const t=[],n=e.data,r=e;return r.data=gf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function gf(e,t){if(!e)return e;if(mf(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]=gf(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]=gf(e[r],t));return n}return e}function yS(e,t){return e.data=Ef(e.data,t),delete e.attachments,e}function Ef(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]=Ef(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ef(e[n],t));return e}const TS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var _t;(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"})(_t||(_t={}));class bS{constructor(t){this.replacer=t}encode(t){return t.type!==_t.EVENT&&t.type!==_t.ACK||!ya(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===_t.EVENT?_t.BINARY_EVENT:_t.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==_t.BINARY_EVENT&&t.type!==_t.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=ES(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function t0(e){return Object.prototype.toString.call(e)==="[object Object]"}class yf extends dn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===_t.BINARY_EVENT;r||n.type===_t.BINARY_ACK?(n.type=r?_t.EVENT:_t.ACK,this.reconstructor=new _S(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!mf(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(_t[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===_t.BINARY_EVENT||r.type===_t.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!yf.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case _t.CONNECT:return t0(n);case _t.DISCONNECT:return n===void 0;case _t.CONNECT_ERROR:return typeof n=="string"||t0(n);case _t.EVENT:case _t.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&TS.indexOf(n[0])===-1);case _t.ACK:case _t.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _S{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=yS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const n0=["searchParams.facetFilters","hits","products"],r0=(e,t,n)=>function r(o,u=[]){const a=Object.entries(o).map(([c,f])=>{const h=[...u,t(c)];return[e(c),f instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(f,h):f]});return Array.isArray(o)?a.map(c=>c[1]):Object.fromEntries(a)},i0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),xS=r0(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,n0),SS=r0(i0,i0,n0),wS={Encoder:class extends bS{encode(e){var t,n;return super.encode(ye(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],xS(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 yf{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?SS(n):n):t)}}},CS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class AS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const m=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=m==null?void 0:m[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const a=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const f=[CS,u,{parser:wS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Ea(a,dS.all(f))}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*Xc(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 it(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return it(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return it(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 it(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return it(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return it(this,null,function*(){return new Promise(r=>{this.socket.emit("conversation_events",t,o=>{n&&n(o),r(o)})})})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return it(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(a){return Jc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new Ur(a({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new Ur(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Ur(m==null?void 0:m())}})}(({emit:a,cancel:c})=>{const f=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&a(m)};return this.socket.onAny(f),()=>it(this,null,function*(){this.socket.offAny(f)})});return{result:yield new Promise((a,c)=>this.socket.emit(t,n,f=>{f.name==="error"?c(new hS(f)):(o=f==null?void 0:f.id,a(f))})),events:u}})}}var W=ms();const Bi=Ge(W);function s0(e,t){return function(){return e.apply(t,arguments)}}const{toString:vS}=Object.prototype,{getPrototypeOf:Tf}=Object,{iterator:Ta,toStringTag:o0}=Symbol,ba=(e=>t=>{const n=vS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ir=e=>(e=e.toLowerCase(),t=>ba(t)===e),_a=e=>t=>typeof t===e,{isArray:ys}=Array,Ts=_a("undefined");function Lo(e){return e!==null&&!Ts(e)&&e.constructor!==null&&!Ts(e.constructor)&&yn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const u0=ir("ArrayBuffer");function kS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&u0(e.buffer),t}const NS=_a("string"),yn=_a("function"),a0=_a("number"),Do=e=>e!==null&&typeof e=="object",OS=e=>e===!0||e===!1,xa=e=>{if(ba(e)!=="object")return!1;const t=Tf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(o0 in e)&&!(Ta in e)},IS=e=>{if(!Do(e)||Lo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},PS=ir("Date"),RS=ir("File"),LS=ir("Blob"),DS=ir("FileList"),FS=e=>Do(e)&&yn(e.pipe),MS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||yn(e.append)&&((t=ba(e))==="formdata"||t==="object"&&yn(e.toString)&&e.toString()==="[object FormData]"))},BS=ir("URLSearchParams"),[US,HS,zS,jS]=["ReadableStream","Request","Response","Headers"].map(ir),$S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),ys(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Lo(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),a=u.length;let c;for(r=0;r<a;r++)c=u[r],t.call(null,e[c],c,e)}}function l0(e,t){if(Lo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Ui=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,c0=e=>!Ts(e)&&e!==Ui;function bf(){const{caseless:e,skipUndefined:t}=c0(this)&&this||{},n={},r=(o,u)=>{const a=e&&l0(n,u)||u;xa(n[a])&&xa(o)?n[a]=bf(n[a],o):xa(o)?n[a]=bf({},o):ys(o)?n[a]=o.slice():(!t||!Ts(o))&&(n[a]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&Fo(arguments[o],r);return n}const VS=(e,t,n,{allOwnKeys:r}={})=>(Fo(t,(o,u)=>{n&&yn(o)?e[u]=s0(o,n):e[u]=o},{allOwnKeys:r}),e),qS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),YS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WS=(e,t,n,r)=>{let o,u,a;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)a=o[u],(!r||r(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Tf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},GS=(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},KS=e=>{if(!e)return null;if(ys(e))return e;let t=e.length;if(!a0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},QS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Tf(Uint8Array)),XS=(e,t)=>{const r=(e&&e[Ta]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},JS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ZS=ir("HTMLFormElement"),ew=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),f0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tw=ir("RegExp"),d0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fo(n,(o,u)=>{let a;(a=t(o,u,e))!==!1&&(r[u]=a||o)}),Object.defineProperties(e,r)},nw=e=>{d0(e,(t,n)=>{if(yn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(yn(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+"'")})}})},rw=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return ys(e)?r(e):r(String(e).split(t)),n},iw=()=>{},sw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ow(e){return!!(e&&yn(e.append)&&e[o0]==="FormData"&&e[Ta])}const uw=e=>{const t=new Array(10),n=(r,o)=>{if(Do(r)){if(t.indexOf(r)>=0)return;if(Lo(r))return r;if(!("toJSON"in r)){t[o]=r;const u=ys(r)?[]:{};return Fo(r,(a,c)=>{const f=n(a,o+1);!Ts(f)&&(u[c]=f)}),t[o]=void 0,u}}return r};return n(e,0)},aw=ir("AsyncFunction"),lw=e=>e&&(Do(e)||yn(e))&&yn(e.then)&&yn(e.catch),h0=((e,t)=>e?setImmediate:t?((n,r)=>(Ui.addEventListener("message",({source:o,data:u})=>{o===Ui&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ui.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",yn(Ui.postMessage)),cw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Ui):typeof process!="undefined"&&process.nextTick||h0,K={isArray:ys,isArrayBuffer:u0,isBuffer:Lo,isFormData:MS,isArrayBufferView:kS,isString:NS,isNumber:a0,isBoolean:OS,isObject:Do,isPlainObject:xa,isEmptyObject:IS,isReadableStream:US,isRequest:HS,isResponse:zS,isHeaders:jS,isUndefined:Ts,isDate:PS,isFile:RS,isBlob:LS,isRegExp:tw,isFunction:yn,isStream:FS,isURLSearchParams:BS,isTypedArray:QS,isFileList:DS,forEach:Fo,merge:bf,extend:VS,trim:$S,stripBOM:qS,inherits:YS,toFlatObject:WS,kindOf:ba,kindOfTest:ir,endsWith:GS,toArray:KS,forEachEntry:XS,matchAll:JS,isHTMLForm:ZS,hasOwnProperty:f0,hasOwnProp:f0,reduceDescriptors:d0,freezeMethods:nw,toObjectSet:rw,toCamelCase:ew,noop:iw,toFiniteNumber:sw,findKey:l0,global:Ui,isContextDefined:c0,isSpecCompliantForm:ow,toJSONObject:uw,isAsyncFn:aw,isThenable:lw,setImmediate:h0,asap:cw,isIterable:e=>e!=null&&yn(e[Ta])};function ze(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const p0=ze.prototype,m0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{m0[e]={value:e}}),Object.defineProperties(ze,m0),Object.defineProperty(p0,"isAxiosError",{value:!0}),ze.from=(e,t,n,r,o,u)=>{const a=Object.create(p0);K.toFlatObject(e,a,function(m){return m!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return ze.call(a,c,f,n,r,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",u&&Object.assign(a,u),a};const fw=null;function _f(e){return K.isPlainObject(e)||K.isArray(e)}function g0(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function E0(e,t,n){return e?e.concat(t).map(function(o,u){return o=g0(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function dw(e){return K.isArray(e)&&!e.some(_f)}const hw=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Sa(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!K.isUndefined(C[S])});const r=n.metaTokens,o=n.visitor||m,u=n.dots,a=n.indexes,f=(n.Blob||typeof Blob!="undefined"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(K.isBoolean(_))return _.toString();if(!f&&K.isBlob(_))throw new ze("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,C){let k=_;if(_&&!C&&typeof _=="object"){if(K.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&dw(_)||(K.isFileList(_)||K.endsWith(S,"[]"))&&(k=K.toArray(_)))return S=g0(S),k.forEach(function(D,G){!(K.isUndefined(D)||D===null)&&t.append(a===!0?E0([S],G,u):a===null?S:S+"[]",h(D))}),!1}return _f(_)?!0:(t.append(E0(C,S,u),h(_)),!1)}const E=[],b=Object.assign(hw,{defaultVisitor:m,convertValue:h,isVisitable:_f});function T(_,S){if(!K.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));E.push(_),K.forEach(_,function(k,M){(!(K.isUndefined(k)||k===null)&&o.call(t,k,K.isString(M)?M.trim():M,S,b))===!0&&T(k,S?S.concat(M):[M])}),E.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return T(e),t}function y0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xf(e,t){this._pairs=[],e&&Sa(e,this,t)}const T0=xf.prototype;T0.append=function(t,n){this._pairs.push([t,n])},T0.toString=function(t){const n=t?function(r){return t.call(this,r,y0)}:y0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function pw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function b0(e,t,n){if(!t)return e;const r=n&&n.encode||pw;K.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=K.isURLSearchParams(t)?t.toString():new xf(t,n).toString(r),u){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class _0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(r){r!==null&&t(r)})}}const x0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:xf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Sf=typeof window!="undefined"&&typeof document!="undefined",wf=typeof navigator=="object"&&navigator||void 0,gw=Sf&&(!wf||["ReactNative","NativeScript","NS"].indexOf(wf.product)<0),Ew=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yw=Sf&&window.location.href||"http://localhost",nn=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sf,hasStandardBrowserEnv:gw,hasStandardBrowserWebWorkerEnv:Ew,navigator:wf,origin:yw},Symbol.toStringTag,{value:"Module"}))),mw);function Tw(e,t){return Sa(e,new nn.classes.URLSearchParams,U({visitor:function(n,r,o,u){return nn.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function bw(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _w(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function S0(e){function t(n,r,o,u){let a=n[u++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),f=u>=n.length;return a=!a&&K.isArray(o)?o.length:a,f?(K.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!c):((!o[a]||!K.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],u)&&K.isArray(o[a])&&(o[a]=_w(o[a])),!c)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(r,o)=>{t(bw(r),o,n,0)}),n}return null}function xw(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Mo={transitional:x0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=K.isObject(t);if(u&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return o?JSON.stringify(S0(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tw(t,this.formSerializer).toString();if((c=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Sa(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),xw(t)):t}],transformResponse:[function(t){const n=this.transitional||Mo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(a)throw c.name==="SyntaxError"?ze.from(c,ze.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{Mo.headers[e]={}});const Sw=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ww=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
+
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Sw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},w0=Symbol("internals");function Bo(e){return e&&String(e).trim().toLowerCase()}function wa(e){return e===!1||e==null?e:K.isArray(e)?e.map(wa):String(e)}function Cw(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 Aw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cf(e,t,n,r,o){if(K.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function vw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kw(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,u,a){return this[r].call(this,t,o,u,a)},configurable:!0})})}let Tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function u(c,f,h){const m=Bo(f);if(!m)throw new Error("header name must be a non-empty string");const E=K.findKey(o,m);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||f]=wa(c))}const a=(c,f)=>K.forEach(c,(h,m)=>u(h,m,f));if(K.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(K.isString(t)&&(t=t.trim())&&!Aw(t))a(ww(t),n);else if(K.isObject(t)&&K.isIterable(t)){let c={},f,h;for(const m of t){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(f=c[h])?K.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}a(c,n)}else t!=null&&u(n,t,r);return this}get(t,n){if(t=Bo(t),t){const r=K.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Cw(o);if(K.isFunction(n))return n.call(this,o,r);if(K.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Bo(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function u(a){if(a=Bo(a),a){const c=K.findKey(r,a);c&&(!n||Cf(r,r[c],c,n))&&(delete r[c],o=!0)}}return K.isArray(t)?t.forEach(u):u(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const u=n[r];(!t||Cf(this,this[u],u,t,!0))&&(delete this[u],o=!0)}return o}normalize(t){const n=this,r={};return K.forEach(this,(o,u)=>{const a=K.findKey(r,u);if(a){n[a]=wa(o),delete n[u];return}const c=t?vw(u):String(u).trim();c!==u&&delete n[u],n[c]=wa(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[w0]=this[w0]={accessors:{}}).accessors,o=this.prototype;function u(a){const c=Bo(a);r[c]||(kw(o,a),r[c]=!0)}return K.isArray(t)?t.forEach(u):u(t),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),K.freezeMethods(Tn);function Af(e,t){const n=this||Mo,r=t||n,o=Tn.from(r.headers);let u=r.data;return K.forEach(e,function(c){u=c.call(n,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function C0(e){return!!(e&&e.__CANCEL__)}function bs(e,t,n){ze.call(this,e==null?"canceled":e,ze.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(bs,ze,{__CANCEL__:!0});function A0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ze("Request failed with status code "+n.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Nw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ow(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,u=0,a;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=r[u];a||(a=h),n[o]=f,r[o]=h;let E=u,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),h-a<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function Iw(e,t){let n=0,r=1e3/t,o,u;const a=(h,m=Date.now())=>{n=m,o=null,u&&(clearTimeout(u),u=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?a(h,m):(o=h,u||(u=setTimeout(()=>{u=null,a(o)},r-E)))},()=>o&&a(o)]}const Ca=(e,t,n=3)=>{let r=0;const o=Ow(50,250);return Iw(u=>{const a=u.loaded,c=u.lengthComputable?u.total:void 0,f=a-r,h=o(f),m=a<=c;r=a;const E={loaded:a,total:c,progress:c?a/c:void 0,bytes:f,rate:h||void 0,estimated:h&&c&&m?(c-a)/h:void 0,event:u,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},v0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},k0=e=>(...t)=>K.asap(()=>e(...t)),Pw=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,Rw=nn.hasStandardBrowserEnv?{write(e,t,n,r,o,u){const a=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),u===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Lw(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Dw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function N0(e,t,n){let r=!Lw(t);return e&&(r||n==!1)?Dw(e,t):t}const O0=e=>e instanceof Tn?U({},e):e;function Hi(e,t){t=t||{};const n={};function r(h,m,E,b){return K.isPlainObject(h)&&K.isPlainObject(m)?K.merge.call({caseless:b},h,m):K.isPlainObject(m)?K.merge({},m):K.isArray(m)?m.slice():m}function o(h,m,E,b){if(K.isUndefined(m)){if(!K.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function u(h,m){if(!K.isUndefined(m))return r(void 0,m)}function a(h,m){if(K.isUndefined(m)){if(!K.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function c(h,m,E){if(E in t)return r(h,m);if(E in e)return r(void 0,h)}const f={url:u,method:u,data:u,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(h,m,E)=>o(O0(h),O0(m),E,!0)};return K.forEach(Object.keys(U(U({},e),t)),function(m){const E=f[m]||o,b=E(e[m],t[m],m);K.isUndefined(b)&&E!==c||(n[m]=b)}),n}const I0=e=>{const t=Hi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:a,auth:c}=t;if(t.headers=a=Tn.from(a),t.url=b0(N0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(n)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,E])=>{h.includes(m.toLowerCase())&&a.set(m,E)})}}if(nn.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&Pw(t.url))){const f=o&&u&&Rw.read(u);f&&a.set(o,f)}return t},Fw=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=I0(e);let u=o.data;const a=Tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:h}=o,m,E,b,T,_;function S(){T&&T(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function k(){if(!C)return;const D=Tn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:D,config:e,request:C};A0(function(te){n(te),S()},function(te){r(te),S()},q),C=null}"onloadend"in C?C.onloadend=k:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(k)},C.onabort=function(){C&&(r(new ze("Request aborted",ze.ECONNABORTED,e,C)),C=null)},C.onerror=function(G){const q=G&&G.message?G.message:"Network Error",B=new ze(q,ze.ERR_NETWORK,e,C);B.event=G||null,r(B),C=null},C.ontimeout=function(){let G=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const q=o.transitional||x0;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new ze(G,q.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,e,C)),C=null},u===void 0&&a.setContentType(null),"setRequestHeader"in C&&K.forEach(a.toJSON(),function(G,q){C.setRequestHeader(q,G)}),K.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),h&&([b,_]=Ca(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=Ca(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{C&&(r(!D||D.type?new bs(null,e,C):D),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const M=Nw(o.url);if(M&&nn.protocols.indexOf(M)===-1){r(new ze("Unsupported protocol "+M+":",ze.ERR_BAD_REQUEST,e));return}C.send(u||null)})},Mw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const u=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof ze?m:new bs(m instanceof Error?m.message:m))}};let a=t&&setTimeout(()=>{a=null,u(new ze(`timeout ${t} of ms exceeded`,ze.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(u):h.removeEventListener("abort",u)}),e=null)};e.forEach(h=>h.addEventListener("abort",u));const{signal:f}=r;return f.unsubscribe=()=>K.asap(c),f}},Bw=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Uw=function(e,t){return Jc(this,null,function*(){try{for(var n=fx(Hw(e)),r,o,u;r=!(o=yield new Ur(n.next())).done;r=!1){const a=o.value;yield*Rm(Bw(a,t))}}catch(o){u=[o]}finally{try{r&&(o=n.return)&&(yield new Ur(o.call(n)))}finally{if(u)throw u[0]}}})},Hw=function(e){return Jc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Rm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ur(t.read());if(n)break;yield r}}finally{yield new Ur(t.cancel())}})},P0=(e,t,n,r)=>{const o=Uw(e,t);let u=0,a,c=h=>{a||(a=!0,r&&r(h))};return new ReadableStream({pull(h){return it(this,null,function*(){try{const{done:m,value:E}=yield o.next();if(m){c(),h.close();return}let b=E.byteLength;if(n){let T=u+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},R0=64*1024,{isFunction:Aa}=K,zw=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:L0,TextEncoder:D0}=K.global,F0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},jw=e=>{e=K.merge.call({skipUndefined:!0},zw,e);const{fetch:t,Request:n,Response:r}=e,o=t?Aa(t):typeof fetch=="function",u=Aa(n),a=Aa(r);if(!o)return!1;const c=o&&Aa(L0),f=o&&(typeof D0=="function"?(_=>S=>_.encode(S))(new D0):_=>it(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=u&&c&&F0(()=>{let _=!1;const S=new n(nn.origin,{body:new L0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=a&&c&&F0(()=>K.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(S,C)=>{let k=S&&S[_];if(k)return k.call(S);throw new ze(`Response type '${_}' is not supported`,ze.ERR_NOT_SUPPORT,C)})});const b=_=>it(null,null,function*(){if(_==null)return 0;if(K.isBlob(_))return _.size;if(K.isSpecCompliantForm(_))return(yield new n(nn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(K.isArrayBufferView(_)||K.isArrayBuffer(_))return _.byteLength;if(K.isURLSearchParams(_)&&(_=_+""),K.isString(_))return(yield f(_)).byteLength}),T=(_,S)=>it(null,null,function*(){const C=K.toFiniteNumber(_.getContentLength());return C==null?b(S):C});return _=>it(null,null,function*(){let{url:S,method:C,data:k,signal:M,cancelToken:D,timeout:G,onDownloadProgress:q,onUploadProgress:B,responseType:te,headers:Te,withCredentials:Se="same-origin",fetchOptions:H}=I0(_),fe=t||fetch;te=te?(te+"").toLowerCase():"text";let de=Mw([M,D&&D.toAbortSignal()],G),ue=null;const ie=de&&de.unsubscribe&&(()=>{de.unsubscribe()});let ge;try{if(B&&h&&C!=="get"&&C!=="head"&&(ge=yield T(Te,k))!==0){let R=new n(S,{method:"POST",body:k,duplex:"half"}),Q;if(K.isFormData(k)&&(Q=R.headers.get("content-type"))&&Te.setContentType(Q),R.body){const[N,_e]=v0(ge,Ca(k0(B)));k=P0(R.body,R0,N,_e)}}K.isString(Se)||(Se=Se?"include":"omit");const we=u&&"credentials"in n.prototype,ae=ye(U({},H),{signal:de,method:C.toUpperCase(),headers:Te.normalize().toJSON(),body:k,duplex:"half",credentials:we?Se:void 0});ue=u&&new n(S,ae);let V=yield u?fe(ue,H):fe(S,ae);const ee=m&&(te==="stream"||te==="response");if(m&&(q||ee&&ie)){const R={};["status","statusText","headers"].forEach(Me=>{R[Me]=V[Me]});const Q=K.toFiniteNumber(V.headers.get("content-length")),[N,_e]=q&&v0(Q,Ca(k0(q),!0))||[];V=new r(P0(V.body,R0,N,()=>{_e&&_e(),ie&&ie()}),R)}te=te||"text";let w=yield E[K.findKey(E,te)||"text"](V,_);return!ee&&ie&&ie(),yield new Promise((R,Q)=>{A0(R,Q,{data:w,headers:Tn.from(V.headers),status:V.status,statusText:V.statusText,config:_,request:ue})})}catch(we){throw ie&&ie(),we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,_,ue),{cause:we.cause||we}):ze.from(we,we&&we.code,_,ue)}})},$w=new Map,M0=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,u=[r,o,n];let a=u.length,c=a,f,h,m=$w;for(;c--;)f=u[c],h=m.get(f),h===void 0&&m.set(f,h=c?new Map:jw(t)),m=h;return h};M0();const vf={http:fw,xhr:Fw,fetch:{get:M0}};K.forEach(vf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const B0=e=>`- ${e}`,Vw=e=>K.isFunction(e)||e===null||e===!1,U0={getAdapter:(e,t)=>{e=K.isArray(e)?e:[e];const{length:n}=e;let r,o;const u={};for(let a=0;a<n;a++){r=e[a];let c;if(o=r,!Vw(r)&&(o=vf[(c=String(r)).toLowerCase()],o===void 0))throw new ze(`Unknown adapter '${c}'`);if(o&&(K.isFunction(o)||(o=o.get(t))))break;u[c||"#"+a]=o}if(!o){const a=Object.entries(u).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?a.length>1?`since :
|
|
5
|
+
`+a.map(B0).join(`
|
|
6
|
+
`):" "+B0(a[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o},adapters:vf};function kf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bs(null,e)}function H0(e){return kf(e),e.headers=Tn.from(e.headers),e.data=Af.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),U0.getAdapter(e.adapter||Mo.adapter,e)(e).then(function(r){return kf(e),r.data=Af.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return C0(r)||(kf(e),r&&r.response&&(r.response.data=Af.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const z0="1.12.2",va={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{va[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const j0={};va.transitional=function(t,n,r){function o(u,a){return"[Axios v"+z0+"] Transitional option '"+u+"'"+a+(r?". "+r:"")}return(u,a,c)=>{if(t===!1)throw new ze(o(a," has been removed"+(n?" in "+n:"")),ze.ERR_DEPRECATED);return n&&!j0[a]&&(j0[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(u,a,c):!0}},va.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qw(e,t,n){if(typeof e!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const u=r[o],a=t[u];if(a){const c=e[u],f=c===void 0||a(c,u,e);if(f!==!0)throw new ze("option "+u+" must be "+f,ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ze("Unknown option "+u,ze.ERR_BAD_OPTION)}}const ka={assertOptions:qw,validators:va},xr=ka.validators;let zi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new _0,response:new _0}}request(t,n){return it(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?u&&!String(r.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
7
|
+
`+u):r.stack=u}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:u}=n;r!==void 0&&ka.assertOptions(r,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),o!=null&&(K.isFunction(o)?n.paramsSerializer={serialize:o}:ka.assertOptions(o,{encode:xr.function,serialize:xr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ka.assertOptions(n,{baseUrl:xr.spelling("baseURL"),withXsrfToken:xr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=u&&K.merge(u.common,u[n.method]);u&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete u[_]}),n.headers=Tn.concat(a,u);const c=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(f=f&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,E=0,b;if(!f){const _=[H0.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,m=Promise.resolve(n);E<b;)m=m.then(_[E++],_[E++]);return m}b=c.length;let T=n;for(;E<b;){const _=c[E++],S=c[E++];try{T=_(T)}catch(C){S.call(this,C);break}}try{m=H0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=h.length;E<b;)m=m.then(h[E++],h[E++]);return m}getUri(t){t=Hi(this.defaults,t);const n=N0(t.baseURL,t.url,t.allowAbsoluteUrls);return b0(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){zi.prototype[t]=function(n,r){return this.request(Hi(r||{},{method:t,url:n,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(r){return function(u,a,c){return this.request(Hi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:a}))}}zi.prototype[t]=n(),zi.prototype[t+"Form"]=n(!0)});let Yw=class dx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const a=new Promise(c=>{r.subscribe(c),u=c}).then(o);return a.cancel=function(){r.unsubscribe(u)},a},t(function(u,a,c){r.reason||(r.reason=new bs(u,a,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 dx(function(o){t=o}),cancel:t}}};function Ww(e){return function(n){return e.apply(null,n)}}function Gw(e){return K.isObject(e)&&e.isAxiosError===!0}const Nf={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};Object.entries(Nf).forEach(([e,t])=>{Nf[t]=e});function $0(e){const t=new zi(e),n=s0(zi.prototype.request,t);return K.extend(n,zi.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return $0(Hi(e,o))},n}const Ot=$0(Mo);Ot.Axios=zi,Ot.CanceledError=bs,Ot.CancelToken=Yw,Ot.isCancel=C0,Ot.VERSION=z0,Ot.toFormData=Sa,Ot.AxiosError=ze,Ot.Cancel=Ot.CanceledError,Ot.all=function(t){return Promise.all(t)},Ot.spread=Ww,Ot.isAxiosError=Gw,Ot.mergeConfig=Hi,Ot.AxiosHeaders=Tn,Ot.formToJSON=e=>S0(K.isHTMLForm(e)?new FormData(e):e),Ot.getAdapter=U0.getAdapter,Ot.HttpStatusCode=Nf,Ot.default=Ot;const{Axios:uM,AxiosError:aM,CanceledError:lM,isCancel:cM,CancelToken:fM,VERSION:dM,all:hM,Cancel:pM,isAxiosError:mM,spread:gM,toFormData:EM,AxiosHeaders:yM,HttpStatusCode:TM,formToJSON:bM,getAdapter:_M,mergeConfig:xM}=Ot;class V0{constructor(t,n,r=!1){ke(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ke(this,"CIMULATE_SEARCH_API_PATH","api/v1");ke(this,"baseApiUrl");ke(this,"headers",{});ke(this,"fetchConfig",()=>it(this,null,function*(){try{const t=yield Ot.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const Kw=W.createContext(void 0),Qw=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=W.useMemo(()=>new V0(e,t,n),[e,t,n]);return I.jsx(Kw.Provider,{value:o,children:r})};var q0=Symbol.for("immer-nothing"),Y0=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _s=Object.getPrototypeOf;function xs(e){return!!e&&!!e[rt]}function Hr(e){var t;return e?W0(e)||Array.isArray(e)||!!e[Y0]||!!((t=e.constructor)!=null&&t[Y0])||Oa(e)||Ia(e):!1}var Xw=Object.prototype.constructor.toString();function W0(e){if(!e||typeof e!="object")return!1;const t=_s(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 Uo(e,t){Na(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Na(e){const t=e[rt];return t?t.type_:Array.isArray(e)?1:Oa(e)?2:Ia(e)?3:0}function Of(e,t){return Na(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function G0(e,t,n){const r=Na(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Jw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Oa(e){return e instanceof Map}function Ia(e){return e instanceof Set}function $t(e){return e.copy_||e.base_}function If(e,t){if(Oa(e))return new Map(e);if(Ia(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=W0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[rt];let o=Reflect.ownKeys(r);for(let u=0;u<o.length;u++){const a=o[u],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(_s(e),r)}else{const r=_s(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Pf(e,t=!1){return Pa(e)||xs(e)||!Hr(e)||(Na(e)>1&&(e.set=e.add=e.clear=e.delete=Zw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Pf(r,!0))),e}function Zw(){Vn(2)}function Pa(e){return Object.isFrozen(e)}var Rf={};function ji(e){const t=Rf[e];return t||Vn(0,e),t}function eC(e,t){Rf[e]||(Rf[e]=t)}var Ho;function Ra(){return Ho}function tC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function K0(e,t){t&&(ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lf(e){Df(e),e.drafts_.forEach(nC),e.drafts_=null}function Df(e){e===Ho&&(Ho=e.parent_)}function Q0(e){return Ho=tC(Ho,e)}function nC(e){const t=e[rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function X0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[rt].modified_&&(Lf(t),Vn(4)),Hr(e)&&(e=La(t,e),t.parent_||Da(t,e)),t.patches_&&ji("Patches").generateReplacementPatches_(n[rt].base_,e,t.patches_,t.inversePatches_)):e=La(t,n,[]),Lf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==q0?e:void 0}function La(e,t,n){if(Pa(t))return t;const r=t[rt];if(!r)return Uo(t,(o,u)=>J0(e,r,t,o,u,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Da(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let u=o,a=!1;r.type_===3&&(u=new Set(o),o.clear(),a=!0),Uo(u,(c,f)=>J0(e,r,o,c,f,n,a)),Da(e,o,!1),n&&e.patches_&&ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function J0(e,t,n,r,o,u,a){if(xs(o)){const c=u&&t&&t.type_!==3&&!Of(t.assigned_,r)?u.concat(r):void 0,f=La(e,o,c);if(G0(n,r,f),xs(f))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Hr(o)&&!Pa(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;La(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Da(e,o)}}function Da(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pf(t,n)}function rC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ra(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,u=Ff;n&&(o=[r],u=zo);const{revoke:a,proxy:c}=Proxy.revocable(o,u);return r.draft_=c,r.revoke_=a,c}var Ff={get(e,t){if(t===rt)return e;const n=$t(e);if(!Of(n,t))return iC(e,n,t);const r=n[t];return e.finalized_||!Hr(r)?r:r===Mf(e.base_,t)?(Bf(e),e.copy_[t]=jo(r,e)):r},has(e,t){return t in $t(e)},ownKeys(e){return Reflect.ownKeys($t(e))},set(e,t,n){const r=Z0($t(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Mf($t(e),t),u=o==null?void 0:o[rt];if(u&&u.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Jw(n,o)&&(n!==void 0||Of(e.base_,t)))return!0;Bf(e),zr(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 Mf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Bf(e),zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$t(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return _s(e.base_)},setPrototypeOf(){Vn(12)}},zo={};Uo(Ff,(e,t)=>{zo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),zo.deleteProperty=function(e,t){return zo.set.call(this,e,t,void 0)},zo.set=function(e,t,n){return Ff.set.call(this,e[0],t,n,e[0])};function Mf(e,t){const n=e[rt];return(n?$t(n):e)[t]}function iC(e,t,n){var o;const r=Z0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Z0(e,t){if(!(t in e))return;let n=_s(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=_s(n)}}function zr(e){e.modified_||(e.modified_=!0,e.parent_&&zr(e.parent_))}function Bf(e){e.copy_||(e.copy_=If(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const u=n;n=t;const a=this;return function(f=u,...h){return a.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(Hr(t)){const u=Q0(this),a=jo(t,void 0);let c=!0;try{o=n(a),c=!1}finally{c?Lf(u):Df(u)}return K0(u,r),X0(o,u)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===q0&&(o=void 0),this.autoFreeze_&&Pf(o,!0),r){const u=[],a=[];ji("Patches").generateReplacementPatches_(t,o,u,a),r(u,a)}return o}else Vn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,f=>t(f,...c));let r,o;return[this.produce(t,n,(a,c)=>{r=a,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Hr(e)||Vn(8),xs(e)&&(e=oC(e));const t=Q0(this),n=jo(e,void 0);return n[rt].isManual_=!0,Df(t),n}finishDraft(e,t){const n=e&&e[rt];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return K0(r,t),X0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=ji("Patches").applyPatches_;return xs(e)?r(e,t):this.produce(e,o=>r(o,t))}};function jo(e,t){const n=Oa(e)?ji("MapSet").proxyMap_(e,t):Ia(e)?ji("MapSet").proxySet_(e,t):rC(e,t);return(t?t.scope_:Ra()).drafts_.push(n),n}function oC(e){return xs(e)||Vn(10,e),eg(e)}function eg(e){if(!Hr(e)||Pa(e))return e;const t=e[rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=If(e,t.scope_.immer_.useStrictShallowCopy_)}else n=If(e,!0);return Uo(n,(r,o)=>{G0(n,r,eg(o))}),t&&(t.finalized_=!1),n}function uC(){class e extends Map{constructor(f,h){super(),this[rt]={type_:2,parent_:h,scope_:h?h.scope_:Ra(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return $t(this[rt]).size}has(f){return $t(this[rt]).has(f)}set(f,h){const m=this[rt];return a(m),(!$t(m).has(f)||$t(m).get(f)!==h)&&(n(m),zr(m),m.assigned_.set(f,!0),m.copy_.set(f,h),m.assigned_.set(f,!0)),this}delete(f){if(!this.has(f))return!1;const h=this[rt];return a(h),n(h),zr(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[rt];a(f),$t(f).size&&(n(f),zr(f),f.assigned_=new Map,Uo(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[rt];$t(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[rt];a(h);const m=$t(h).get(f);if(h.finalized_||!Hr(m)||m!==h.base_.get(f))return m;const E=jo(m,h);return n(h),h.copy_.set(f,E),E}keys(){return $t(this[rt]).keys()}values(){const f=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=f.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const f=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=f.next();if(h.done)return h;const m=this.get(h.value);return{done:!1,value:[h.value,m]}}}}[Symbol.iterator](){return this.entries()}}function t(c,f){return new e(c,f)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(f,h){super(),this[rt]={type_:3,parent_:h,scope_:h?h.scope_:Ra(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return $t(this[rt]).size}has(f){const h=this[rt];return a(h),h.copy_?!!(h.copy_.has(f)||h.drafts_.has(f)&&h.copy_.has(h.drafts_.get(f))):h.base_.has(f)}add(f){const h=this[rt];return a(h),this.has(f)||(u(h),zr(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[rt];return a(h),u(h),zr(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[rt];a(f),$t(f).size&&(u(f),zr(f),f.copy_.clear())}values(){const f=this[rt];return a(f),u(f),f.copy_.values()}entries(){const f=this[rt];return a(f),u(f),f.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(f,h){const m=this.values();let E=m.next();for(;!E.done;)f.call(h,E.value,E.value,this),E=m.next()}}function o(c,f){return new r(c,f)}function u(c){c.copy_||(c.copy_=new Set,c.base_.forEach(f=>{if(Hr(f)){const h=jo(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function a(c){c.revoked_&&Vn(3,JSON.stringify($t(c)))}eC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new sC,aC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function lC(e,t,n){var r=W.useMemo(function(){return aC(e)},[e]);return W.useReducer(r,t,n)}const tg={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"},bn={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"},Fa={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},$o="cimulate",Uf=`${$o}:pdp-update`,Hf=`${$o}:browse-update`,zf=`${$o}:search-update`,jf=`${$o}:ui-state-update`,$f=`${$o}:session-state`,jr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed"},tg),cC={"browse-context":jr.CONTEXT_UPDATED,categoryId:jr.CATEGORY_ID_CHANGED,page:jr.PAGE_CHANGED,pageSize:jr.PAGE_SIZE_CHANGED,includeFacets:jr.FACET_FILTERS_CHANGED,facetFilters:jr.FACET_FILTERS_CHANGED,rangeFilters:jr.RANGE_FILTERS_CHANGED,catalogSegment:jr.CATALOG_SEGMENT_CHANGED,pricebooks:jr.PRICEBOOKS_CHANGED},$r=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},tg),fC={"search-context":$r.SEARCH_CONTEXT_UPDATED,query:$r.QUERY_CHANGED,page:$r.PAGE_CHANGED,pageSize:$r.PAGE_SIZE_CHANGED,includeFacets:$r.FACET_FILTERS_CHANGED,facetFilters:$r.FACET_FILTERS_CHANGED,rangeFilters:$r.RANGE_FILTERS_CHANGED,catalogSegment:$r.CATALOG_SEGMENT_CHANGED,pricebooks:$r.PRICEBOOKS_CHANGED},Z="cim-widget",Ss=`--${Z}`,$i={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},dC=(e=$i)=>({[`${Ss}-primary-color`]:e.primaryColor||$i.primaryColor,[`${Ss}-secondary-color`]:e.secondaryColor||$i.secondaryColor,[`${Ss}-font-color`]:e.fontColor||$i.fontColor,[`${Ss}-font-family`]:e.fontFamily||$i.fontFamily,[`${Ss}-background-color`]:e.backgroundColor||$i.backgroundColor,[`${Ss}-border-color`]:e.borderColor||$i.borderColor}),ai={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ng=W.createContext(null),rg=W.createContext(null);class hC{constructor(t,n,r=!1){ke(this,"apiService");ke(this,"config",null);ke(this,"getConfig",()=>it(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}}));ke(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ke(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ke(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ke(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ke(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ke(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ke(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ke(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ke(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ke(this,"getProductField",t=>this.config?this.config[t]:"");ke(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new V0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const ws=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class pC{constructor(t=!1){ke(this,"isDevelopment");ke(this,"_log",(t,n,...r)=>{ws(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 ig=W.createContext(null),mC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u="What products would you like to explore today?",apiKey:a,apiToken:c,theme:f,isDevelopment:h,children:m})=>{const E=W.useMemo(()=>new hC(a,c,h),[a,c,h]),b=W.useMemo(()=>new pC(h),[h]);W.useEffect(()=>{E.config||E.getConfig()},[E]);const T=W.useMemo(()=>dC(f),[f]),_=W.useMemo(()=>({configModule:E,logoUrl:e,headerText:t,globalClassName:n,themeVariables:T,logger:b,searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u}),[E,e,t,n,r,o,u,b,T]);return I.jsx(ig.Provider,{value:_,children:m})},sr=()=>{const e=W.useContext(ig);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class gC{constructor(){ke(this,"initialState",{connected:!1,mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ke(this,"connectedProxy");ke(this,"modeProxy");ke(this,"statusProxy");ke(this,"dialogProxy");ke(this,"modalProxy",{isFullscreen:!1});ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return TC(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.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen},{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 type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,status:{type:this.type,isOpen:this.isOpen},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const It=new gC,Cs=()=>It.connected,EC=e=>{window.addEventListener(jf,e)},yC=e=>{window.removeEventListener(jf,e)},TC=(e,t)=>{const n=new CustomEvent(jf,{detail:{property:e,value:t}});window.dispatchEvent(n)},bC=e=>{It.connectedProxy.connected=e},Ma=e=>{if(typeof e!="boolean"){It.statusProxy.isOpen=!It.statusProxy.isOpen;return}It.statusProxy.isOpen=e},sg=e=>{It.modalProxy.isFullscreen=e},Vf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);It.statusProxy.type=e,e==="dialog"||e==="chat"?It.modeProxy.mode="embedded":It.modeProxy.mode="standalone"},og=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(", ")}.`);It.dialogProxy.position=e},_C=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=sr(),o=W.useCallback(b=>{n({type:bn.SET_COPILOT,payload:b})},[n]),u=W.useCallback(b=>{bC(b),n({type:bn.SET_CONNECTED,payload:b})},[n]),a=W.useCallback(()=>{n({type:bn.RESET_COPILOT,payload:{}})},[n]),c=W.useCallback(()=>{n({type:bn.RESET_STATE,payload:{}})},[n]),f=W.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:bn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=W.useCallback(b=>{n({type:bn.ADD_LOADING_MESSAGE,payload:b})},[n]),m=W.useCallback(b=>{n({type:bn.REMOVE_LOADING_MESSAGE,payload:b})},[n]),E=W.useMemo(()=>({setCopilot:o,setConnected:u,resetCopilot:a,resetCopilotState:c,addCopilotEvent:f,addLoadingMessage:h,removeLoadingMessage:m}),[o,u,a,c,f,h,m]);return I.jsx(rg.Provider,{value:E,children:t})};uC();const xC=(e,t)=>{const{type:n,payload:r}=t;if(n===bn.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const u=e.groupedMessages.findIndex(a=>a.eventSourceId===o.eventSourceId);if(u!==-1){let a=e.groupedMessages[u].messages;a||(a=[]);const c=a.findIndex(f=>f.id===o.id);if(c!==-1){a[c]=o;return}a.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case bn.RESET_STATE:e.messages=Fa.messages,e.groupedMessages=Fa.groupedMessages,e.loadingMessages=Fa.loadingMessages;break;case bn.RESET_COPILOT:e.copilot=null;break;case bn.SET_COPILOT:e.copilot=r;break;case bn.SET_CONNECTED:e.connected=r;break;case bn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case bn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},SC=({onCopilotEvent:e,children:t})=>{const[n,r]=lC(xC,Fa);return I.jsx(ng.Provider,{value:n,children:I.jsx(_C,{onCopilotEvent:e,dispatch:r,children:t})})};function wC(){var e=W.useRef(!0);return e.current?(e.current=!1,!0):e.current}var CC=function(e){W.useEffect(e,[])},AC=function(e,t){return e===t};function vC(e,t){t===void 0&&(t=AC);var n=W.useRef(),r=W.useRef(e),o=wC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class kC{constructor(){ke(this,"items",[]);ke(this,"add",t=>{this.items.push(t)});ke(this,"remove",()=>this.items.shift());ke(this,"first",()=>this.items.length>0?this.items[0]:null);ke(this,"processQueue",t=>{new Array(or.size).fill(1).forEach(()=>{const r=or.first();r&&(t(r),or.remove())})})}get size(){return this.items.length}}const or=new kC,ug=e=>{window.addEventListener(zf,e)},ag=e=>{window.removeEventListener(zf,e)},NC=(e,t,n)=>{const r=new CustomEvent(zf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},lg=e=>{window.addEventListener(Hf,e)},cg=e=>{window.removeEventListener(Hf,e)},OC=(e,t,n)=>{const r=new CustomEvent(Hf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},fg=e=>{window.addEventListener(Uf,e)},dg=e=>{window.removeEventListener(Uf,e)},hg=(e,t,n)=>{const r=new CustomEvent(Uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},IC=e=>{window.addEventListener($f,e)},PC=e=>{window.removeEventListener($f,e)},Ba=(e,t,n)=>{const r=new CustomEvent($f,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class RC{constructor(){ke(this,"initialParams",{categoryId:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ke(this,"categoryIdProxy");ke(this,"facetFiltersProxy");ke(this,"rangeFiltersProxy");ke(this,"catalogSegmentProxy");ke(this,"pricebooksProxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{const o=cC[n];return OC(o,n,r),Reflect.set(t,n,r)});ke(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId},{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,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 mt=new RC,As={categoryId:mt.categoryId,facetFilters:mt.facetFilters,rangeFilters:mt.rangeFilters,catalogSegment:mt.catalogSegment,pricebooks:mt.pricebooks},pg=W.createContext(As),LC=({children:e})=>{const[t,n]=W.useState(As.categoryId),[r,o]=W.useState(As.facetFilters),[u,a]=W.useState(As.rangeFilters),[c,f]=W.useState(As.catalogSegment),[h,m]=W.useState(As.pricebooks);W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return lg(b),()=>{cg(b)}},[]);const E=W.useMemo(()=>({categoryId:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(pg.Provider,{value:E,children:e})},DC=()=>{const e=W.useContext(pg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},mg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},gg=(e,t,n)=>{var a,c;const r=U({},((a=n.facetFiltersProxy)==null?void 0:a.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const f=r[e].filter(h=>h!==t);f.length>0?r[e]=f:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const u=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=u.facetFilters},Eg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},yg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const u=[...n.rangeFiltersProxy.rangeFilters||[]],a=u.findIndex(f=>f.field===e);if(a!==-1){u[a]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=u;return}u.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(u);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Tg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},bg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},FC=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:e=>{if(!e||!e.query)throw new Error("Search context must include a query");"facetFilters"in e&&(gt.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(gt.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(gt.pricebooksProxy.pricebooks=e.pricebooks||null),gt.queryProxy.query=e.query,Cs()||or.add({context:"search",payload:U({},gt.state)})},updateCatalogSegment:e=>{Tg(e,gt)},updateFacetFilter:(e,t)=>{gg(e,t,gt)},updateFacetFilters:e=>{mg(e,gt)},updatePricebooks:e=>{bg(e,gt)},updateRangeFilter:({field:e,value:t})=>{yg({field:e,value:t},gt)},updateRangeFilters:e=>{Eg(e,gt)},updateSearchQuery:e=>{gt.queryProxy.query=e,Cs()||or.add({context:"search",payload:U({},gt.state)})}},Symbol.toStringTag,{value:"Module"})),MC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:e=>{if(!e||!e.categoryId)throw new Error("Browse context must include a categoryId");"facetFilters"in e&&(mt.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(mt.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(mt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(mt.pricebooksProxy.pricebooks=e.pricebooks||null),mt.categoryIdProxy.categoryId=e.categoryId,Cs()||or.add({context:"browse",payload:U({},mt.state)})},updateBrowseCategoryId:e=>{mt.categoryIdProxy.categoryId=e,Cs()||or.add({context:"browse",payload:U({},mt.state)})},updateCatalogSegment:e=>{Tg(e,mt)},updateFacetFilter:(e,t)=>{gg(e,t,mt)},updateFacetFilters:e=>{mg(e,mt)},updatePricebooks:e=>{bg(e,mt)},updateRangeFilter:({field:e,value:t})=>{yg({field:e,value:t},mt)},updateRangeFilters:e=>{Eg(e,mt)}},Symbol.toStringTag,{value:"Module"}));class BC{constructor(){ke(this,"initialParams",{productId:"",pdpLink:""});ke(this,"proxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>(hg(n,r),Reflect.set(t,n,r)));ke(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,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,pdpLink:this.pdpLink}}}const Vr=new BC,UC=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");Vr.updateProxy(e),hg("pdp-context",e),Cs()||or.add({context:"pdp",payload:U({},Vr.state)})},HC=e=>{Vr.proxy.productId=e,Cs()||or.add({context:"pdp",payload:U({},Vr.state)})},zC=e=>{Vr.proxy.pdpLink=e},jC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Ba("getConversationMessages",{payload:e,callback:t},ai.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ba("getSessionInformation",{callback:e},ai.GET_SESSION_INFORMATION)},loadConversation:e=>{Ba("loadConversation",e,ai.LOAD_CONVERSATION)},resetConversation:()=>{Ba("resetConversation",!0,ai.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class $C{constructor(){ke(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ke(this,"queryProxy");ke(this,"facetFiltersProxy");ke(this,"rangeFiltersProxy");ke(this,"catalogSegmentProxy");ke(this,"pricebooksProxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{const o=fC[n];return NC(o,n,r),Reflect.set(t,n,r)});ke(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const gt=new $C,vs={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},_g=W.createContext(vs),VC=({children:e})=>{const[t,n]=W.useState(vs.searchQuery),[r,o]=W.useState(vs.facetFilters),[u,a]=W.useState(vs.rangeFilters),[c,f]=W.useState(vs.catalogSegment),[h,m]=W.useState(vs.pricebooks);W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return ug(b),()=>{ag(b)}},[]);const E=W.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(_g.Provider,{value:E,children:e})},qC=()=>{const e=W.useContext(_g);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},xg=()=>{const e=W.useContext(rg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Sg=()=>{const e=W.useContext(ng);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},wg=W.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),YC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:a,children:c})=>{const{logger:f}=sr(),Je=qC(),{searchQuery:h}=Je,m=Xt(Je,["searchQuery"]),xt=DC(),{categoryId:E}=xt,b=Xt(xt,["categoryId"]),{setCopilot:T,setConnected:_,resetCopilot:S,resetCopilotState:C,addCopilotEvent:k,addLoadingMessage:M,removeLoadingMessage:D}=xg(),{connected:G,copilot:q,messages:B,groupedMessages:te,loadingMessages:Te}=Sg(),Se=W.useRef(!1),H=W.useRef(!1),fe=W.useMemo(()=>Te.size>0,[Te]),de=W.useCallback(be=>Te.has(be),[Te]),ue=W.useCallback(be=>{k(be),M(be.id)},[k,M]),ie=W.useCallback(({query:be,facetFilters:He,rangeFilters:tt,catalogSegment:Tt,pricebooks:St,userPrompt:un,isUserAction:Wt})=>{if(!q){f==null||f.error("Copilot is not initialized");return}if(!be)return;const Rt={searchParams:{query:be}};un&&(Rt.userPrompt=un),He&&Object.keys(He).length>0&&(Rt.searchParams.facetFilters=He),tt&&tt.length>0&&(Rt.searchParams.rangeFilters=tt),Tt&&(Rt.searchParams.catalogSegment=Tt),St&&(Rt.searchParams.pricebooks=St);const Mn=!Se.current;q.search(Rt,ft=>{const vt=U({},ft);Mn&&(vt.isInitial=!0,vt.isUserAction=!0),Wt&&(vt.isUserAction=Wt),Se.current=!0,ue(vt)})},[f,ue,q]),ge=W.useCallback(({categoryId:be,facetFilters:He,rangeFilters:tt,catalogSegment:Tt,pricebooks:St,userPrompt:un,isUserAction:Wt})=>{if(!q){f==null||f.error("Copilot is not initialized");return}if(!be)return;const Rt={browseParams:{categoryId:be}};un&&(Rt.userPrompt=un),He&&Object.keys(He).length>0&&(Rt.browseParams.facetFilters=He),tt&&tt.length>0&&(Rt.browseParams.rangeFilters=tt),Tt&&(Rt.browseParams.catalogSegment=Tt),St&&(Rt.browseParams.pricebooks=St);const Mn=!H.current;q.browse(Rt,ft=>{const vt=U({},ft);Mn&&(vt.isInitial=!0,vt.isUserAction=!0),Wt&&(vt.isUserAction=Wt),H.current=!0,ue(vt)})},[f,ue,q]),we=W.useCallback(({productId:be,pdpLink:He,userPrompt:tt,isUserAction:Tt})=>{if(!q){f==null||f.error("Copilot is not initialized");return}if(!be)return;const St={productId:be};tt&&(St.userPrompt=tt),He&&(St.pdpLink=He),q.productView(St,un=>{const Wt=U({},un);Tt&&(Wt.isUserAction=Tt),ue(Wt)})},[f,q,ue]),ae=W.useCallback(be=>{const He=ye(U({},be),{id:be.inquiryLinkId||be.id});k(He)},[k]),V=W.useCallback(be=>{k(be),u==null||u(be)},[k,u]),ee=W.useCallback(be=>{k(be),a==null||a(be)},[k,a]),w=W.useCallback(be=>{o==null||o(be),_(!0)},[o,_]);W.useEffect(()=>{!q||!G||or.size>0&&or.processQueue(be=>{if(be.context==="search"){const He=ye(U({},be.payload),{isUserAction:!0});ie(He)}if(be.context==="browse"){const He=ye(U({},be.payload),{isUserAction:!0});ge(He)}if(be.context==="pdp"){const He=ye(U({},be.payload),{isUserAction:!0});we(He)}})},[q,G,ie,ge,we]);const R=W.useCallback(be=>{q&&q.requestSessionInformation(He=>{f==null||f.log("Retrieved session information: ",He),be==null||be(He)})},[q,f]),Q=W.useCallback((be,He)=>{q&&be.conversationId&&q.getConversationEvents(be,tt=>{f==null||f.log("Retrieved conversation messages: ",tt),He(tt)})},[q,f]),N=W.useCallback(be=>{be.on("connect_ack",w),be.on("follow_up",k),be.on("inquiry",ae),be.on("partial_inquiry",ae),be.on("display_products",k),be.on("progress",k),be.on("refined_search",V),be.on("refined_browse",ee),be.on("done",He=>{D(He.eventSourceId)}),be.on("error",He=>{k(He),D(He.eventSourceId)}),be.onDisconnect(He=>{const tt=["io server disconnect","transport error","server shutting down"];if(f==null||f.log("Connection disconnected with reason: ",He),!tt.includes(He)){_(!1);return}f==null||f.log("De-registering event listeners");const Tt=new Date().toISOString();k({name:"error",message:"Connection was lost. Please try again.",createdAt:Tt,id:`error-${Tt}`,sessionId:"session"}),be.off()})},[f,_,D,ae,V,ee,k,w]);CC(()=>{let be;n?be=n:be=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const He={baseUrl:be};e?He.apiKey=e:t&&(He.apiToken=t);const tt=new AS(He);return T(tt),N(tt),tt.connect(),tt.requestSessionInformation(Tt=>{f==null||f.log("Session Information: ",Tt)}),()=>{tt.disconnect(),tt.off(),S()}});const _e=W.useCallback(be=>{if(!q)return;const He={eventId:be,reason:"User cancelled the request"};q.cancelRequest(He,tt=>{k(tt),D(be)})},[k,D,q]),Me=W.useCallback(()=>{q&&q.conversationReset({},be=>{C(),k(be),q.requestSessionInformation(He=>{f==null||f.log("Session Information: ",He)})})},[q,f,k,C]),Ie=W.useCallback(be=>{!be||!h||ie(ye(U({query:h},m),{userPrompt:be}))},[h,m,ie]),Ye=W.useCallback((be,He)=>{var un,Rt;const Tt=be.params.userPrompt||"";if(!Tt)return;const St=B.find(ft=>ft.id===He);if(St){if(St.name==="copilot_search"){const Wt=((un=St.request)==null?void 0:un.searchParams)||{},{query:ft}=Wt,vt=Xt(Wt,["query"]);ft&&ie(ye(U(U({query:ft||h},m),vt),{userPrompt:Tt}));return}if(St.name==="copilot_browse"){const Mn=((Rt=St.request)==null?void 0:Rt.browseParams)||{},{categoryId:ft}=Mn,vt=Xt(Mn,["categoryId"]);if(ft){ge(ye(U(U({categoryId:ft||E},b),vt),{userPrompt:Tt}));return}}if(St.name==="product_view"){const ft=St.request;ft!=null&&ft.productId&&we(ye(U({},ft),{userPrompt:Tt}))}}},[h,m,E,b,B,ie,ge,we]),Ve=W.useMemo(()=>({copilot:q,messages:B,groupedMessages:te,isLoading:fe,isResponseLoading:de,handleSearch:ie,handleBrowse:ge,handlePdp:we,handleUserInput:Ie,handleSuggestion:Ye,handleCancel:_e,resetConversation:Me,getSessionInformation:R,getConversationMessages:Q}),[q,B,te,fe,de,ie,ge,we,Ie,Ye,_e,Me,R,Q]);return I.jsx(wg.Provider,{value:Ve,children:c})},li=()=>{const e=W.useContext(wg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},WC=()=>{const{resetCopilotState:e,addCopilotEvent:t}=xg(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:u,resetConversation:a,getSessionInformation:c,getConversationMessages:f}=li(),h=W.useCallback(({query:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=gt.facetFiltersProxy,{rangeFilters:S}=gt.rangeFiltersProxy,{catalogSegment:C}=gt.catalogSegmentProxy,{pricebooks:k}=gt.pricebooksProxy,M={query:b};_&&Object.keys(_).length>0&&(M.facetFilters=_),S&&S.length>0&&(M.rangeFilters=S),C&&(M.catalogSegment=C),k&&(M.pricebooks=k),r(ye(U({},M),{isUserAction:T}))},[n,r]),m=W.useCallback(({categoryId:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=mt.facetFiltersProxy,{rangeFilters:S}=mt.rangeFiltersProxy,{catalogSegment:C}=mt.catalogSegmentProxy,{pricebooks:k}=mt.pricebooksProxy,M={categoryId:b};_&&Object.keys(_).length>0&&(M.facetFilters=_),S&&S.length>0&&(M.rangeFilters=S),C&&(M.catalogSegment=C),k&&(M.pricebooks=k),o(ye(U({},M),{isUserAction:T}))},[n,o]),E=W.useCallback(({productId:b,isUserAction:T})=>{if(!n||!b)return;const _={productId:b,pdpLink:Vr.pdpLink,isUserAction:T};u(U({},_))},[n,u]);return W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&h({query:T.value,isUserAction:!0})};return ug(b),()=>{ag(b)}},[h]),W.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId,isUserAction:!0});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value,isUserAction:!0})};return fg(b),()=>{dg(b)}},[E]),W.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value,isUserAction:!0})};return lg(b),()=>{cg(b)}},[m]),W.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==ai.RESET_CONVERSATION&&a(),(T==null?void 0:T.event)==ai.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==ai.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=T.value;if(!_.conversationId||typeof S!="function")return;f(_,S)}if((T==null?void 0:T.event)==ai.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;f(_,C=>{e(),C.forEach(k=>{t(k)})})}};return IC(b),()=>{PC(b)}},[a,c,f,e,t]),null},GC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:u,onRefinedSearch:a,onRefinedBrowse:c,children:f})=>I.jsx(SC,{onCopilotEvent:u,children:I.jsxs(YC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:c,children:[I.jsx(WC,{}),f]})}),qf={productId:Vr.proxy.productId,pdpLink:Vr.proxy.pdpLink},KC=W.createContext(qf),QC=({children:e})=>{const[t,n]=W.useState(qf.productId),[r,o]=W.useState(qf.pdpLink);W.useEffect(()=>{const a=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const f=c.value;n(f.productId),o(f.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return fg(a),()=>{dg(a)}},[]);const u=W.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return I.jsx(KC.Provider,{value:u,children:e})},Cg=W.createContext({mode:It.modeProxy.mode,status:It.statusProxy,dialogPosition:It.dialogProxy.position,isModalFullscreen:It.modalProxy.isFullscreen,previousComponentType:It.statusProxy.type}),XC=({componentType:e,children:t})=>{const[n,r]=W.useState(It.modeProxy.mode),[o,u]=W.useState({type:e||It.statusProxy.type,isOpen:It.statusProxy.isOpen}),[a,c]=W.useState(It.dialogProxy.position),[f,h]=W.useState(It.modalProxy.isFullscreen),m=vC(o.type);W.useEffect(()=>{const b=T=>{const{property:_,value:S}=T.detail||{};if(!(!_||S===void 0)){if(_==="mode"){r(S);return}if(_==="isOpen"){u(C=>ye(U({},C),{isOpen:S}));return}if(_==="type"){u(C=>ye(U({},C),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return EC(b),()=>{yC(b)}},[]);const E=W.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:a,isModalFullscreen:f}),[n,o,m,a,f]);return I.jsx(Cg.Provider,{value:E,children:t})},Ag=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:u,globalClassName:a,isDevelopment:c=!1,componentType:f,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})=>I.jsx(mC,{apiKey:e,logoUrl:r,headerText:o,theme:u,globalClassName:a,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,isDevelopment:c,children:I.jsx(Qw,{apiKey:e,apiToken:t,isDevelopment:c,children:I.jsx(QC,{children:I.jsx(LC,{children:I.jsx(VC,{children:I.jsx(XC,{componentType:f,children:I.jsx(GC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})})})})})})}),Vo=()=>{const e=W.useContext(Cg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function vg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=vg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vg(e))&&(r&&(r+=" "),r+=t);return r}var kg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ng=Bi.createContext&&Bi.createContext(kg),JC=["attr","size","title"];function ZC(e,t){if(e==null)return{};var n=eA(e,t),r,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++)r=u[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eA(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 Ua(){return Ua=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},Ua.apply(this,arguments)}function Og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Og(Object(n),!0).forEach(function(r){tA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tA(e,t,n){return t=nA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=rA(e,"string");return typeof t=="symbol"?t:t+""}function rA(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 Ig(e){return e&&e.map((t,n)=>Bi.createElement(t.tag,Ha({key:n},t.attr),Ig(t.child)))}function hn(e){return t=>Bi.createElement(iA,Ua({attr:Ha({},e.attr)},t),Ig(e.child))}function iA(e){var t=n=>{var{attr:r,size:o,title:u}=e,a=ZC(e,JC),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Bi.createElement("svg",Ua({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:f,style:Ha(Ha({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&Bi.createElement("title",null,u),e.children)};return Ng!==void 0?Bi.createElement(Ng.Consumer,null,n=>t(n)):t(kg)}function Pg(e){return hn({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 za(e){return hn({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 sA(e){return hn({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 Rg(e){return hn({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 oA(e){return hn({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 uA(e){return hn({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 aA(e){return hn({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 lA(e){return hn({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)}const Yf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>I.jsx("button",{className:oe(`${Z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),ja=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:u})=>I.jsx("button",{className:oe(e,`${Z}-icon-button`),type:n,"aria-label":r,onClick:u,disabled:o,children:t}),cA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?I.jsx(Yf,{className:oe(n,r,e),type:"submit",disabled:o,children:t}):I.jsx(ja,{className:oe(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:I.jsx(za,{})}),Wf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=Sg(),{globalClassName:u,searchPlaceholder:a,searchButtonLabel:c}=sr(),f=W.useRef(null),h=b=>{var _;b.preventDefault();const T=(((_=f.current)==null?void 0:_.value)||"").trim();T&&(r(T),f.current.value="")},m=!!o||!1,E=m?"connected":"disconnected";return I.jsxs("form",{className:oe(u,e,n,`${Z}-search-bar`),name:`${Z}-search-form`,onSubmit:h,children:[I.jsx("span",{role:"status",className:oe(`${Z}-connection-status-icon`,E)}),I.jsx("input",{className:oe(u,e,n,`${Z}-search-input`),type:"text",ref:f,placeholder:a,name:`${Z}-user-input`}),I.jsx(cA,{searchButtonLabel:c,globalClassName:u,componentType:n,isLoading:t||!m})]})};function fA(e){return e==null?[]:Array.isArray(e)?e:[e]}var dA=e=>e!=null&&typeof e=="object",$a=e=>typeof e=="string",ks=e=>typeof e=="function",hA=e=>e==null,pA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),mA=e=>Object.prototype.toString.call(e),Lg=Function.prototype.toString,gA=Lg.call(Object),EA=e=>{if(!dA(e)||mA(e)!="[object Object]"||bA(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=pA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lg.call(n)==gA},yA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,TA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,bA=e=>yA(e)||TA(e),_A=e=>e(),xA=()=>{},Gf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Kf(e){if(!EA(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Kf(o))}return n}function Qf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function SA(e,t){if(e==null)throw new Error(t())}var wA=Object.defineProperty,CA=(e,t,n)=>t in e?wA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xf=(e,t,n)=>CA(e,typeof t!="symbol"?t+"":t,n),Dg=()=>{},Va=e=>typeof e=="object"&&e!==null,AA=e=>e?"":void 0,vA=e=>e?"true":void 0,kA=1,NA=9,OA=11,Vt=e=>Va(e)&&e.nodeType===kA&&typeof e.nodeName=="string",qa=e=>Va(e)&&e.nodeType===NA,IA=e=>Va(e)&&e===e.window,Fg=e=>Vt(e)?e.localName||"":"#document";function PA(e){return["html","body","#document"].includes(Fg(e))}var RA=e=>Va(e)&&e.nodeType!==void 0,Vi=e=>RA(e)&&e.nodeType===OA&&"host"in e,LA=e=>Vt(e)&&e.localName==="input",DA=e=>Vt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function qo(e){if(!e)return!1;const t=e.getRootNode();return Os(t)===e}var FA=/(textarea|select)/;function MA(e){if(e==null||!Vt(e))return!1;try{return LA(e)&&e.selectionStart!=null||FA.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ya(e,t){var r;if(!e||!t||!Vt(e)||!Vt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Vi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Sr(e){var t;return qa(e)?e:IA(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function BA(e){return Sr(e).documentElement}function Ns(e){var t,n,r;return Vi(e)?Ns(e.host):qa(e)?(t=e.defaultView)!=null?t:window:Vt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Os(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 UA(e){if(Fg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vi(e)&&e.host||BA(e);return Vi(t)?t.host:t}function Jf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),qa(t)||Vi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Zf=new WeakMap;function Wa(e){return Zf.has(e)||Zf.set(e,Ns(e).getComputedStyle(e)),Zf.get(e)}var ed=new Set(["menu","listbox","dialog","grid","tree","region"]),HA=e=>ed.has(e),Mg=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Bg(e,t){const n=new Set,r=Jf(e),o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Mg(c);for(const h of f){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(E&&HA(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Ug(e,t){const n=Jf(e),r=new Set,o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Mg(c);for(const h of f){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";E&&ed.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function zA(e){const t=new Set;return Ug(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function jA(e){const t=e.getAttribute("role");return!!(t&&ed.has(t))}function $A(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function VA(e){var t;return $A(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function qA(e){if(!e.id)return!1;const t=Jf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&jA(e))}var td=()=>typeof document!="undefined";function YA(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var nd=e=>td()&&e.test(YA()),WA=e=>td()&&e.test(navigator.vendor),Hg=()=>td()&&!!navigator.maxTouchPoints,GA=()=>nd(/^iPhone/i),KA=()=>nd(/^iPad/i)||rd()&&navigator.maxTouchPoints>1,zg=()=>GA()||KA(),QA=()=>rd()||zg(),rd=()=>nd(/^Mac/i),XA=()=>QA()&&WA(/apple/i);function JA(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function qr(e){var n;const t=JA(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ZA=e=>e.button===0,ev=e=>e.button===2||rd()&&e.ctrlKey&&e.button===0,ur=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},jg=e=>Vt(e)&&e.tagName==="IFRAME",tv=/^(audio|video|details)$/;function $g(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var nv=e=>!Number.isNaN($g(e)),rv=e=>$g(e)<0;function iv(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 Vg(e,t,n){const r=[...e],o=[...e],u=new Set,a=new Map;e.forEach((f,h)=>a.set(f,h));let c=0;for(;c<o.length;){const f=o[c++];if(!f||u.has(f))continue;u.add(f);const h=iv(f,t);if(h){const m=Array.from(h.querySelectorAll(Ga)).filter(n),E=a.get(f);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{a.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)a.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{a.set(T,b+_)})}o.push(...m)}}return r}var Ga="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",qg=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ga));(n==!0||n=="if-empty"&&o.length===0)&&Vt(e)&&Yr(e)&&o.unshift(e);const a=[];for(const c of o)if(Yr(c)){if(jg(c)&&c.contentDocument){const f=c.contentDocument.body;a.push(...qg(f,{getShadowRoot:r}));continue}a.push(c)}return r?Vg(a,r,Yr):a};function Yr(e){return!Vt(e)||e.closest("[inert]")?!1:e.matches(Ga)&&DA(e)}function Yo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ga));n&&qi(e)&&o.unshift(e);const u=[];for(const a of o)if(qi(a)){if(jg(a)&&a.contentDocument){const c=a.contentDocument.body;u.push(...Yo(c,{getShadowRoot:r}));continue}u.push(a)}if(r){const a=Vg(u,r,qi);return!a.length&&n?o:a}return!u.length&&n?o:u}function qi(e){return Vt(e)&&e.tabIndex>0?!0:Yr(e)&&!rv(e)}function sv(e,t={}){const n=Yo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function ov(e,t={}){const{current:n,getShadowRoot:r}=t,o=Yo(e,{getShadowRoot:r}),u=(e==null?void 0:e.ownerDocument)||document,a=n!=null?n:Os(u);if(!a)return null;const c=o.indexOf(a);return o[c+1]||null}function Wo(e){return e.tabIndex<0&&(tv.test(e.localName)||MA(e))&&!nv(e)?0:e.tabIndex}function Yg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let u=null;if(u||(u=typeof n=="function"?n():n),u||(u=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!u){const a=Yo(t);u=r?a.filter(r)[0]:a[0]}return u||t||void 0}var uv=class hx{constructor(){Xf(this,"id",null),Xf(this,"fn_cleanup"),Xf(this,"cleanup",()=>{this.cancel()})}static create(){return new hx}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 _n(e){const t=uv.create();return t.request(e),t.cleanup}function av(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function id(e){const t=UA(e);return PA(t)?Sr(t).body:Vt(t)&&fv(t)?t:id(t)}var lv=/auto|scroll|overlay|hidden|clip/,cv=new Set(["inline","contents"]);function fv(e){const t=Ns(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return lv.test(n+o+r)&&!cv.has(u)}function dv(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:u}=t,a=(e==null?void 0:e.ownerDocument)||document,c=a.body;function f(h){if(h.key!=="Tab")return;let m=null;const[E,b]=sv(e,{includeContainer:!0,getShadowRoot:u}),T=ov(c,{current:n,getShadowRoot:u}),_=!E&&!b;h.shiftKey&&qo(T)?(o==null||o(),m=b):h.shiftKey&&(qo(E)||_)?m=n:!h.shiftKey&&qo(n)?(o==null||o(),m=E):!h.shiftKey&&(qo(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return ur(a,"keydown",f,!0)}function hv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=Xt(c,["defer","triggerElement"]),u=n?_n:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;a.push(dv(f,U({triggerElement:h},o)))})),()=>{a.forEach(f=>f==null?void 0:f())}}function Ka(e,t){if(!e)return Dg;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function pv(e,t,n){if(!e)return Dg;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 mv(e,t,n){const{signal:r}=t;return[new Promise((a,c)=>{const f=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(f),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(f),a(h))}).catch(h=>{r.aborted||(clearTimeout(f),c(h))})}),()=>t.abort()]}function gv(e,t){const{timeout:n,rootNode:r}=t,o=Ns(r),u=Sr(r),a=new o.AbortController;return mv(new Promise(c=>{const f=e();if(f){c(f);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(u.body,{childList:!0,subtree:!0})}),a,n)}var Ev=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),yv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Wg=e=>{const t={};let n;for(;n=yv.exec(e);)t[n[1]]=n[2];return t},Tv=(e,t)=>{if($a(e)){if($a(t))return`${e};${t}`;e=Wg(e)}else $a(t)&&(t=Wg(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function ar(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Gf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Ev(t[o],n[o]);continue}if(o==="style"){t[o]=Tv(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function $M(e){return e}var Is=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Is||{}),sd="__init__";function bv(e){const t=()=>{var a,c;return(c=(a=e.getRootNode)==null?void 0:a.call(e))!=null?c:document},n=()=>Sr(t()),r=()=>{var a;return(a=n().defaultView)!=null?a:window},o=()=>Os(t()),u=a=>t().getElementById(a);return ye(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:qo,getById:u})}var od={exports:{}},xn={},ud={exports:{}},ad={};var Gg;function _v(){return Gg||(Gg=1,function(e){function t(V,ee){var w=V.length;V.push(ee);e:for(;0<w;){var R=w-1>>>1,Q=V[R];if(0<o(Q,ee))V[R]=ee,V[w]=Q,w=R;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ee=V[0],w=V.pop();if(w!==ee){V[0]=w;e:for(var R=0,Q=V.length,N=Q>>>1;R<N;){var _e=2*(R+1)-1,Me=V[_e],Ie=_e+1,Ye=V[Ie];if(0>o(Me,w))Ie<Q&&0>o(Ye,Me)?(V[R]=Ye,V[Ie]=w,R=Ie):(V[R]=Me,V[_e]=w,R=_e);else if(Ie<Q&&0>o(Ye,w))V[R]=Ye,V[Ie]=w,R=Ie;else break e}}return ee}function o(V,ee){var w=V.sortIndex-ee.sortIndex;return w!==0?w:V.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],m=1,E=null,b=3,T=!1,_=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(V){for(var ee=n(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=V)r(h),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(h)}}function G(V){if(S=!1,D(V),!_)if(n(f)!==null)_=!0,we(q);else{var ee=n(h);ee!==null&&ae(G,ee.startTime-V)}}function q(V,ee){_=!1,S&&(S=!1,k(Te),Te=-1),T=!0;var w=b;try{for(D(ee),E=n(f);E!==null&&(!(E.expirationTime>ee)||V&&!fe());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var Q=R(E.expirationTime<=ee);ee=e.unstable_now(),typeof Q=="function"?E.callback=Q:E===n(f)&&r(f),D(ee)}else r(f);E=n(f)}if(E!==null)var N=!0;else{var _e=n(h);_e!==null&&ae(G,_e.startTime-ee),N=!1}return N}finally{E=null,b=w,T=!1}}var B=!1,te=null,Te=-1,Se=5,H=-1;function fe(){return!(e.unstable_now()-H<Se)}function de(){if(te!==null){var V=e.unstable_now();H=V;var ee=!0;try{ee=te(!0,V)}finally{ee?ue():(B=!1,te=null)}}else B=!1}var ue;if(typeof M=="function")ue=function(){M(de)};else if(typeof MessageChannel!="undefined"){var ie=new MessageChannel,ge=ie.port2;ie.port1.onmessage=de,ue=function(){ge.postMessage(null)}}else ue=function(){C(de,0)};function we(V){te=V,B||(B=!0,ue())}function ae(V,ee){Te=C(function(){V(e.unstable_now())},ee)}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(V){V.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,we(q))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Se=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var w=b;b=ee;try{return V()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ee){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var w=b;b=V;try{return ee()}finally{b=w}},e.unstable_scheduleCallback=function(V,ee,w){var R=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?R+w:R):w=R,V){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=w+Q,V={id:m++,callback:ee,priorityLevel:V,startTime:w,expirationTime:Q,sortIndex:-1},w>R?(V.sortIndex=w,t(h,V),n(f)===null&&V===n(h)&&(S?(k(Te),Te=-1):S=!0,ae(G,w-R))):(V.sortIndex=Q,t(f,V),_||T||(_=!0,we(q))),V},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(V){var ee=b;return function(){var w=b;b=ee;try{return V.apply(this,arguments)}finally{b=w}}}}(ad)),ad}var Kg;function xv(){return Kg||(Kg=1,ud.exports=_v()),ud.exports}var Qg;function Sv(){if(Qg)return xn;Qg=1;var e=ms(),t=xv();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function u(i,s){a(i,s),a(i+"Capture",s)}function a(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},E={};function b(i){return f.call(E,i)?!0:f.call(m,i)?!1:h.test(i)?E[i]=!0:(m[i]=!0,!1)}function T(i,s,l,d){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,d){if(s===null||typeof s=="undefined"||T(i,s,l,d))return!0;if(d)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];C[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){C[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function M(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(k,M);C[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(k,M);C[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(k,M);C[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function D(i,s,l,d){var g=C.hasOwnProperty(s)?C[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,d)&&(l=null),d||g===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,d=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,d?i.setAttributeNS(d,s,l):i.setAttribute(s,l))))}var G=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),Te=Symbol.for("react.strict_mode"),Se=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),fe=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),V=Symbol.iterator;function ee(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,R;function Q(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
|
|
8
8
|
`+R+i}var N=!1;function _e(i,s){if(!i||N)return"";N=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Y){var d=Y}Reflect.construct(i,[],s)}else{try{s.call()}catch(Y){d=Y}i.call(s.prototype)}else{try{throw Error()}catch(Y){d=Y}i()}}catch(Y){if(Y&&d&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
|
|
9
9
|
`),y=d.stack.split(`
|
|
10
10
|
`),x=g.length-1,O=y.length-1;1<=x&&0<=O&&g[x]!==y[O];)O--;for(;1<=x&&0<=O;x--,O--)if(g[x]!==y[O]){if(x!==1||O!==1)do if(x--,O--,0>O||g[x]!==y[O]){var L=`
|
|
11
|
-
`+g[x].replace(" at new "," at ");return i.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",i.displayName)),L}while(1<=x&&0<=O);break}}}finally{N=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Be(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Pe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case Se:return"Profiler";case Te:return"StrictMode";case le:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case fe:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case ae:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ye:return s=i.displayName||null,s!==null?s:Pe(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return Pe(i(s))}catch(l){}}return null}function Ye(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pe(s);case 8:return s===Te?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function me(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ne(i){var s=me(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),d=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Xe(i){i._valueTracker||(i._valueTracker=Ne(i))}function yt(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return i&&(d=me(i)?i.checked?"true":"false":i.value),i=d,i!==l?(s.setValue(i),!0):!1}function mt(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function sn(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Kt(i,s){var l=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;l=Ve(s.value!=null?s.value:l),i._wrapperState={initialChecked:d,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xt(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function Dn(i,s){xt(i,s);var l=Ve(s.value),d=s.type;if(l!=null)d==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(d==="submit"||d==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Dt(i,s.type,l):s.hasOwnProperty("defaultValue")&&Dt(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Nt(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Dt(i,s,l){(s!=="number"||mt(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var pi=Array.isArray;function mi(i,s,l,d){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&d&&(i[l].defaultSelected=!0)}else{for(l=""+Ve(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,d&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function Cu(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Bl(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(pi(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function Ul(i,s){var l=Ve(s.value),d=Ve(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),d!=null&&(i.defaultValue=""+d)}function Hl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ee(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ue,We=function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,d,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,d,g)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ue=Ue||document.createElement("div"),Ue.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ue.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ze(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Qt={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},Gr=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(i){Gr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Qt[s]=Qt[i]})});function Wn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Qt.hasOwnProperty(i)&&Qt[i]?(""+s).trim():s+"px"}function gi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var d=l.indexOf("--")===0,g=Wn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var Zi=w({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 Xt(i,s){if(s){if(Zi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Or(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mn=null;function qh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Yh=null,no=null,ro=null;function wb(i){if(i=Wu(i)){if(typeof Yh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=lc(s),Yh(i.stateNode,i.type,s))}}function Cb(i){no?ro?ro.push(i):ro=[i]:no=i}function Ab(){if(no){var i=no,s=ro;if(ro=no=null,wb(i),s)for(i=0;i<s.length;i++)wb(s[i])}}function vb(i,s){return i(s)}function kb(){}var Wh=!1;function Nb(i,s,l){if(Wh)return i(s,l);Wh=!0;try{return vb(i,s,l)}finally{Wh=!1,(no!==null||ro!==null)&&(kb(),Ab())}}function Au(i,s){var l=i.stateNode;if(l===null)return null;var d=lc(l);if(d===null)return null;l=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Gh=!1;if(c)try{var vu={};Object.defineProperty(vu,"passive",{get:function(){Gh=!0}}),window.addEventListener("test",vu,vu),window.removeEventListener("test",vu,vu)}catch(i){Gh=!1}function X5(i,s,l,d,g,y,x,O,L){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(ie){this.onError(ie)}}var ku=!1,zl=null,jl=!1,Kh=null,J5={onError:function(i){ku=!0,zl=i}};function Z5(i,s,l,d,g,y,x,O,L){ku=!1,zl=null,X5.apply(J5,arguments)}function e8(i,s,l,d,g,y,x,O,L){if(Z5.apply(this,arguments),ku){if(ku){var Y=zl;ku=!1,zl=null}else throw Error(n(198));jl||(jl=!0,Kh=Y)}}function es(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function Ob(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Ib(i){if(es(i)!==i)throw Error(n(188))}function t8(i){var s=i.alternate;if(!s){if(s=es(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,d=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){l=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return Ib(g),i;if(y===d)return Ib(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=y;else{for(var x=!1,O=g.child;O;){if(O===l){x=!0,l=g,d=y;break}if(O===d){x=!0,d=g,l=y;break}O=O.sibling}if(!x){for(O=y.child;O;){if(O===l){x=!0,l=y,d=g;break}if(O===d){x=!0,d=y,l=g;break}O=O.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function Pb(i){return i=t8(i),i!==null?Rb(i):null}function Rb(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Rb(i);if(s!==null)return s;i=i.sibling}return null}var Lb=t.unstable_scheduleCallback,Db=t.unstable_cancelCallback,n8=t.unstable_shouldYield,r8=t.unstable_requestPaint,Ot=t.unstable_now,i8=t.unstable_getCurrentPriorityLevel,Qh=t.unstable_ImmediatePriority,Mb=t.unstable_UserBlockingPriority,$l=t.unstable_NormalPriority,s8=t.unstable_LowPriority,Fb=t.unstable_IdlePriority,Vl=null,Ir=null;function o8(i){if(Ir&&typeof Ir.onCommitFiberRoot=="function")try{Ir.onCommitFiberRoot(Vl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var cr=Math.clz32?Math.clz32:l8,u8=Math.log,a8=Math.LN2;function l8(i){return i>>>=0,i===0?32:31-(u8(i)/a8|0)|0}var ql=64,Yl=4194304;function Nu(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 Wl(i,s){var l=i.pendingLanes;if(l===0)return 0;var d=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var O=x&~g;O!==0?d=Nu(O):(y&=x,y!==0&&(d=Nu(y)))}else x=l&~g,x!==0?d=Nu(x):y!==0&&(d=Nu(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=d;0<s;)l=31-cr(s),g=1<<l,d|=i[l],s&=~g;return d}function c8(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function f8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-cr(y),O=1<<x,L=g[x];L===-1?((O&l)===0||(O&d)!==0)&&(g[x]=c8(O,s)):L<=s&&(i.expiredLanes|=O),y&=~O}}function Xh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Bb(){var i=ql;return ql<<=1,(ql&4194240)===0&&(ql=64),i}function Jh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ou(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-cr(s),i[s]=l}function d8(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var d=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-cr(l),y=1<<g;s[g]=0,d[g]=-1,i[g]=-1,l&=~y}}function Zh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var d=31-cr(l),g=1<<d;g&s|i[d]&s&&(i[d]|=s),l&=~g}}var it=0;function Ub(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Hb,ep,zb,jb,$b,tp=!1,Gl=[],Ei=null,yi=null,Ti=null,Iu=new Map,Pu=new Map,bi=[],h8="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 Vb(i,s){switch(i){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":Ti=null;break;case"pointerover":case"pointerout":Iu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pu.delete(s.pointerId)}}function Ru(i,s,l,d,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=Wu(s),s!==null&&ep(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function p8(i,s,l,d,g){switch(s){case"focusin":return Ei=Ru(Ei,i,s,l,d,g),!0;case"dragenter":return yi=Ru(yi,i,s,l,d,g),!0;case"mouseover":return Ti=Ru(Ti,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Iu.set(y,Ru(Iu.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Pu.set(y,Ru(Pu.get(y)||null,i,s,l,d,g)),!0}return!1}function qb(i){var s=ts(i.target);if(s!==null){var l=es(s);if(l!==null){if(s=l.tag,s===13){if(s=Ob(l),s!==null){i.blockedOn=s,$b(i.priority,function(){zb(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Kl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=rp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Mn=d,l.target.dispatchEvent(d),Mn=null}else return s=Wu(l),s!==null&&ep(s),i.blockedOn=l,!1;s.shift()}return!0}function Yb(i,s,l){Kl(i)&&l.delete(s)}function m8(){tp=!1,Ei!==null&&Kl(Ei)&&(Ei=null),yi!==null&&Kl(yi)&&(yi=null),Ti!==null&&Kl(Ti)&&(Ti=null),Iu.forEach(Yb),Pu.forEach(Yb)}function Lu(i,s){i.blockedOn===s&&(i.blockedOn=null,tp||(tp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,m8)))}function Du(i){function s(g){return Lu(g,i)}if(0<Gl.length){Lu(Gl[0],i);for(var l=1;l<Gl.length;l++){var d=Gl[l];d.blockedOn===i&&(d.blockedOn=null)}}for(Ei!==null&&Lu(Ei,i),yi!==null&&Lu(yi,i),Ti!==null&&Lu(Ti,i),Iu.forEach(s),Pu.forEach(s),l=0;l<bi.length;l++)d=bi[l],d.blockedOn===i&&(d.blockedOn=null);for(;0<bi.length&&(l=bi[0],l.blockedOn===null);)qb(l),l.blockedOn===null&&bi.shift()}var io=z.ReactCurrentBatchConfig,Ql=!0;function g8(i,s,l,d){var g=it,y=io.transition;io.transition=null;try{it=1,np(i,s,l,d)}finally{it=g,io.transition=y}}function E8(i,s,l,d){var g=it,y=io.transition;io.transition=null;try{it=4,np(i,s,l,d)}finally{it=g,io.transition=y}}function np(i,s,l,d){if(Ql){var g=rp(i,s,l,d);if(g===null)bp(i,s,d,Xl,l),Vb(i,d);else if(p8(g,i,s,l,d))d.stopPropagation();else if(Vb(i,d),s&4&&-1<h8.indexOf(i)){for(;g!==null;){var y=Wu(g);if(y!==null&&Hb(y),y=rp(i,s,l,d),y===null&&bp(i,s,d,Xl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else bp(i,s,d,null,l)}}var Xl=null;function rp(i,s,l,d){if(Xl=null,i=qh(d),i=ts(i),i!==null)if(s=es(i),s===null)i=null;else if(l=s.tag,l===13){if(i=Ob(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Xl=i,null}function Wb(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(i8()){case Qh:return 1;case Mb:return 4;case $l:case s8:return 16;case Fb:return 536870912;default:return 16}default:return 16}}var _i=null,ip=null,Jl=null;function Gb(){if(Jl)return Jl;var i,s=ip,l=s.length,d,g="value"in _i?_i.value:_i.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(d=1;d<=x&&s[l-d]===g[y-d];d++);return Jl=g.slice(i,1<d?1-d:void 0)}function Zl(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ec(){return!0}function Kb(){return!1}function Fn(i){function s(l,d,g,y,x){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var O in i)i.hasOwnProperty(O)&&(l=i[O],this[O]=l?l(y):y[O]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?ec:Kb,this.isPropagationStopped=Kb,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ec)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ec)},persist:function(){},isPersistent:ec}),s}var so={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sp=Fn(so),Mu=w({},so,{view:0,detail:0}),y8=Fn(Mu),op,up,Fu,tc=w({},Mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lp,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!==Fu&&(Fu&&i.type==="mousemove"?(op=i.screenX-Fu.screenX,up=i.screenY-Fu.screenY):up=op=0,Fu=i),op)},movementY:function(i){return"movementY"in i?i.movementY:up}}),Qb=Fn(tc),T8=w({},tc,{dataTransfer:0}),b8=Fn(T8),_8=w({},Mu,{relatedTarget:0}),ap=Fn(_8),x8=w({},so,{animationName:0,elapsedTime:0,pseudoElement:0}),S8=Fn(x8),w8=w({},so,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),C8=Fn(w8),A8=w({},so,{data:0}),Xb=Fn(A8),v8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k8={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"},N8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O8(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=N8[i])?!!s[i]:!1}function lp(){return O8}var I8=w({},Mu,{key:function(i){if(i.key){var s=v8[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Zl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?k8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lp,charCode:function(i){return i.type==="keypress"?Zl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Zl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),P8=Fn(I8),R8=w({},tc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jb=Fn(R8),L8=w({},Mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lp}),D8=Fn(L8),M8=w({},so,{propertyName:0,elapsedTime:0,pseudoElement:0}),F8=Fn(M8),B8=w({},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}),U8=Fn(B8),H8=[9,13,27,32],cp=c&&"CompositionEvent"in window,Bu=null;c&&"documentMode"in document&&(Bu=document.documentMode);var z8=c&&"TextEvent"in window&&!Bu,Zb=c&&(!cp||Bu&&8<Bu&&11>=Bu),e_=" ",t_=!1;function n_(i,s){switch(i){case"keyup":return H8.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var oo=!1;function j8(i,s){switch(i){case"compositionend":return r_(s);case"keypress":return s.which!==32?null:(t_=!0,e_);case"textInput":return i=s.data,i===e_&&t_?null:i;default:return null}}function $8(i,s){if(oo)return i==="compositionend"||!cp&&n_(i,s)?(i=Gb(),Jl=ip=_i=null,oo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Zb&&s.locale!=="ko"?null:s.data;default:return null}}var V8={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 i_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!V8[i.type]:s==="textarea"}function s_(i,s,l,d){Cb(d),s=oc(s,"onChange"),0<s.length&&(l=new sp("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var Uu=null,Hu=null;function q8(i){S_(i,0)}function nc(i){var s=fo(i);if(yt(s))return i}function Y8(i,s){if(i==="change")return s}var o_=!1;if(c){var fp;if(c){var dp="oninput"in document;if(!dp){var u_=document.createElement("div");u_.setAttribute("oninput","return;"),dp=typeof u_.oninput=="function"}fp=dp}else fp=!1;o_=fp&&(!document.documentMode||9<document.documentMode)}function a_(){Uu&&(Uu.detachEvent("onpropertychange",l_),Hu=Uu=null)}function l_(i){if(i.propertyName==="value"&&nc(Hu)){var s=[];s_(s,Hu,i,qh(i)),Nb(q8,s)}}function W8(i,s,l){i==="focusin"?(a_(),Uu=s,Hu=l,Uu.attachEvent("onpropertychange",l_)):i==="focusout"&&a_()}function G8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return nc(Hu)}function K8(i,s){if(i==="click")return nc(s)}function Q8(i,s){if(i==="input"||i==="change")return nc(s)}function X8(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var fr=typeof Object.is=="function"?Object.is:X8;function zu(i,s){if(fr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),d=Object.keys(s);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var g=l[d];if(!f.call(s,g)||!fr(i[g],s[g]))return!1}return!0}function c_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function f_(i,s){var l=c_(i);i=0;for(var d;l;){if(l.nodeType===3){if(d=i+l.textContent.length,i<=s&&d>=s)return{node:l,offset:s-i};i=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=c_(l)}}function d_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?d_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function h_(){for(var i=window,s=mt();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(d){l=!1}if(l)i=s.contentWindow;else break;s=mt(i.document)}return s}function hp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function J8(i){var s=h_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&d_(l.ownerDocument.documentElement,l)){if(d!==null&&hp(l)){if(s=d.start,i=d.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!i.extend&&y>d&&(g=d,d=y,y=g),g=f_(l,y);var x=f_(l,d);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>d?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var Z8=c&&"documentMode"in document&&11>=document.documentMode,uo=null,pp=null,ju=null,mp=!1;function p_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;mp||uo==null||uo!==mt(d)||(d=uo,"selectionStart"in d&&hp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),ju&&zu(ju,d)||(ju=d,d=oc(pp,"onSelect"),0<d.length&&(s=new sp("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=uo)))}function rc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ao={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},gp={},m_={};c&&(m_=document.createElement("div").style,"AnimationEvent"in window||(delete ao.animationend.animation,delete ao.animationiteration.animation,delete ao.animationstart.animation),"TransitionEvent"in window||delete ao.transitionend.transition);function ic(i){if(gp[i])return gp[i];if(!ao[i])return i;var s=ao[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in m_)return gp[i]=s[l];return i}var g_=ic("animationend"),E_=ic("animationiteration"),y_=ic("animationstart"),T_=ic("transitionend"),b_=new Map,__="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 xi(i,s){b_.set(i,s),u(s,[i])}for(var Ep=0;Ep<__.length;Ep++){var yp=__[Ep],eM=yp.toLowerCase(),tM=yp[0].toUpperCase()+yp.slice(1);xi(eM,"on"+tM)}xi(g_,"onAnimationEnd"),xi(E_,"onAnimationIteration"),xi(y_,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(T_,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $u="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(" "),nM=new Set("cancel close invalid load scroll toggle".split(" ").concat($u));function x_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,e8(d,s,void 0,i),i.currentTarget=null}function S_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var d=i[l],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var O=d[x],L=O.instance,Y=O.currentTarget;if(O=O.listener,L!==y&&g.isPropagationStopped())break e;x_(g,O,Y),y=L}else for(x=0;x<d.length;x++){if(O=d[x],L=O.instance,Y=O.currentTarget,O=O.listener,L!==y&&g.isPropagationStopped())break e;x_(g,O,Y),y=L}}}if(jl)throw i=Kh,jl=!1,Kh=null,i}function ct(i,s){var l=s[Ap];l===void 0&&(l=s[Ap]=new Set);var d=i+"__bubble";l.has(d)||(w_(s,i,2,!1),l.add(d))}function Tp(i,s,l){var d=0;s&&(d|=4),w_(l,i,d,s)}var sc="_reactListening"+Math.random().toString(36).slice(2);function Vu(i){if(!i[sc]){i[sc]=!0,r.forEach(function(l){l!=="selectionchange"&&(nM.has(l)||Tp(l,!1,i),Tp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[sc]||(s[sc]=!0,Tp("selectionchange",!1,s))}}function w_(i,s,l,d){switch(Wb(s)){case 1:var g=g8;break;case 4:g=E8;break;default:g=np}l=g.bind(null,s,l,i),g=void 0,!Gh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function bp(i,s,l,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var O=d.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;x=x.return}for(;O!==null;){if(x=ts(O),x===null)return;if(L=x.tag,L===5||L===6){d=y=x;continue e}O=O.parentNode}}d=d.return}Nb(function(){var Y=y,ie=qh(l),ce=[];e:{var ne=b_.get(i);if(ne!==void 0){var xe=sp,Ce=i;switch(i){case"keypress":if(Zl(l)===0)break e;case"keydown":case"keyup":xe=P8;break;case"focusin":Ce="focus",xe=ap;break;case"focusout":Ce="blur",xe=ap;break;case"beforeblur":case"afterblur":xe=ap;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=Qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=b8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=D8;break;case g_:case E_:case y_:xe=S8;break;case T_:xe=F8;break;case"scroll":xe=y8;break;case"wheel":xe=U8;break;case"copy":case"cut":case"paste":xe=C8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Jb}var ve=(s&4)!==0,It=!ve&&i==="scroll",j=ve?ne!==null?ne+"Capture":null:ne;ve=[];for(var M=Y,V;M!==null;){V=M;var ge=V.stateNode;if(V.tag===5&&ge!==null&&(V=ge,j!==null&&(ge=Au(M,j),ge!=null&&ve.push(qu(M,ge,V)))),It)break;M=M.return}0<ve.length&&(ne=new xe(ne,Ce,null,l,ie),ce.push({event:ne,listeners:ve}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",ne&&l!==Mn&&(Ce=l.relatedTarget||l.fromElement)&&(ts(Ce)||Ce[Kr]))break e;if((xe||ne)&&(ne=ie.window===ie?ie:(ne=ie.ownerDocument)?ne.defaultView||ne.parentWindow:window,xe?(Ce=l.relatedTarget||l.toElement,xe=Y,Ce=Ce?ts(Ce):null,Ce!==null&&(It=es(Ce),Ce!==It||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(xe=null,Ce=Y),xe!==Ce)){if(ve=Qb,ge="onMouseLeave",j="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ve=Jb,ge="onPointerLeave",j="onPointerEnter",M="pointer"),It=xe==null?ne:fo(xe),V=Ce==null?ne:fo(Ce),ne=new ve(ge,M+"leave",xe,l,ie),ne.target=It,ne.relatedTarget=V,ge=null,ts(ie)===Y&&(ve=new ve(j,M+"enter",Ce,l,ie),ve.target=V,ve.relatedTarget=It,ge=ve),It=ge,xe&&Ce)t:{for(ve=xe,j=Ce,M=0,V=ve;V;V=lo(V))M++;for(V=0,ge=j;ge;ge=lo(ge))V++;for(;0<M-V;)ve=lo(ve),M--;for(;0<V-M;)j=lo(j),V--;for(;M--;){if(ve===j||j!==null&&ve===j.alternate)break t;ve=lo(ve),j=lo(j)}ve=null}else ve=null;xe!==null&&C_(ce,ne,xe,ve,!1),Ce!==null&&It!==null&&C_(ce,It,Ce,ve,!0)}}e:{if(ne=Y?fo(Y):window,xe=ne.nodeName&&ne.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ne.type==="file")var ke=Y8;else if(i_(ne))if(o_)ke=Q8;else{ke=G8;var Le=W8}else(xe=ne.nodeName)&&xe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ke=K8);if(ke&&(ke=ke(i,Y))){s_(ce,ke,l,ie);break e}Le&&Le(i,ne,Y),i==="focusout"&&(Le=ne._wrapperState)&&Le.controlled&&ne.type==="number"&&Dt(ne,"number",ne.value)}switch(Le=Y?fo(Y):window,i){case"focusin":(i_(Le)||Le.contentEditable==="true")&&(uo=Le,pp=Y,ju=null);break;case"focusout":ju=pp=uo=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,p_(ce,l,ie);break;case"selectionchange":if(Z8)break;case"keydown":case"keyup":p_(ce,l,ie)}var De;if(cp)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else oo?n_(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(Zb&&l.locale!=="ko"&&(oo||He!=="onCompositionStart"?He==="onCompositionEnd"&&oo&&(De=Gb()):(_i=ie,ip="value"in _i?_i.value:_i.textContent,oo=!0)),Le=oc(Y,He),0<Le.length&&(He=new Xb(He,i,null,l,ie),ce.push({event:He,listeners:Le}),De?He.data=De:(De=r_(l),De!==null&&(He.data=De)))),(De=z8?j8(i,l):$8(i,l))&&(Y=oc(Y,"onBeforeInput"),0<Y.length&&(ie=new Xb("onBeforeInput","beforeinput",null,l,ie),ce.push({event:ie,listeners:Y}),ie.data=De))}S_(ce,s)})}function qu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function oc(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Au(i,l),y!=null&&d.unshift(qu(i,y,g)),y=Au(i,s),y!=null&&d.push(qu(i,y,g))),i=i.return}return d}function lo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function C_(i,s,l,d,g){for(var y=s._reactName,x=[];l!==null&&l!==d;){var O=l,L=O.alternate,Y=O.stateNode;if(L!==null&&L===d)break;O.tag===5&&Y!==null&&(O=Y,g?(L=Au(l,y),L!=null&&x.unshift(qu(l,L,O))):g||(L=Au(l,y),L!=null&&x.push(qu(l,L,O)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var rM=/\r\n?/g,iM=/\u0000|\uFFFD/g;function A_(i){return(typeof i=="string"?i:""+i).replace(rM,`
|
|
12
|
-
`).replace(iM,"")}function uc(i,s,l){if(s=A_(s),A_(i)!==s&&l)throw Error(n(425))}function ac(){}var _p=null,xp=null;function Sp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var wp=typeof setTimeout=="function"?setTimeout:void 0,sM=typeof clearTimeout=="function"?clearTimeout:void 0,v_=typeof Promise=="function"?Promise:void 0,oM=typeof queueMicrotask=="function"?queueMicrotask:typeof v_!="undefined"?function(i){return v_.resolve(null).then(i).catch(uM)}:wp;function uM(i){setTimeout(function(){throw i})}function Cp(i,s){var l=s,d=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(d===0){i.removeChild(g),Du(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);Du(s)}function Si(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function k_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var co=Math.random().toString(36).slice(2),Pr="__reactFiber$"+co,Yu="__reactProps$"+co,Kr="__reactContainer$"+co,Ap="__reactEvents$"+co,aM="__reactListeners$"+co,lM="__reactHandles$"+co;function ts(i){var s=i[Pr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Kr]||l[Pr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=k_(i);i!==null;){if(l=i[Pr])return l;i=k_(i)}return s}i=l,l=i.parentNode}return null}function Wu(i){return i=i[Pr]||i[Kr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function fo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function lc(i){return i[Yu]||null}var vp=[],ho=-1;function wi(i){return{current:i}}function ft(i){0>ho||(i.current=vp[ho],vp[ho]=null,ho--)}function lt(i,s){ho++,vp[ho]=i.current,i.current=s}var Ci={},on=wi(Ci),wn=wi(!1),ns=Ci;function po(i,s){var l=i.type.contextTypes;if(!l)return Ci;var d=i.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function Cn(i){return i=i.childContextTypes,i!=null}function cc(){ft(wn),ft(on)}function N_(i,s,l){if(on.current!==Ci)throw Error(n(168));lt(on,s),lt(wn,l)}function O_(i,s,l){var d=i.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return l;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,Ye(i)||"Unknown",g));return w({},l,d)}function fc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ci,ns=on.current,lt(on,i),lt(wn,wn.current),!0}function I_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=O_(i,s,ns),d.__reactInternalMemoizedMergedChildContext=i,ft(wn),ft(on),lt(on,i)):ft(wn),lt(wn,l)}var Qr=null,dc=!1,kp=!1;function P_(i){Qr===null?Qr=[i]:Qr.push(i)}function cM(i){dc=!0,P_(i)}function Ai(){if(!kp&&Qr!==null){kp=!0;var i=0,s=it;try{var l=Qr;for(it=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}Qr=null,dc=!1}catch(g){throw Qr!==null&&(Qr=Qr.slice(i+1)),Lb(Qh,Ai),g}finally{it=s,kp=!1}}return null}var mo=[],go=0,hc=null,pc=0,Gn=[],Kn=0,rs=null,Xr=1,Jr="";function is(i,s){mo[go++]=pc,mo[go++]=hc,hc=i,pc=s}function R_(i,s,l){Gn[Kn++]=Xr,Gn[Kn++]=Jr,Gn[Kn++]=rs,rs=i;var d=Xr;i=Jr;var g=32-cr(d)-1;d&=~(1<<g),l+=1;var y=32-cr(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Xr=1<<32-cr(s)+g|l<<g|d,Jr=y+i}else Xr=1<<y|l<<g|d,Jr=i}function Np(i){i.return!==null&&(is(i,1),R_(i,1,0))}function Op(i){for(;i===hc;)hc=mo[--go],mo[go]=null,pc=mo[--go],mo[go]=null;for(;i===rs;)rs=Gn[--Kn],Gn[Kn]=null,Jr=Gn[--Kn],Gn[Kn]=null,Xr=Gn[--Kn],Gn[Kn]=null}var Bn=null,Un=null,gt=!1,dr=null;function L_(i,s){var l=Zn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function D_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Bn=i,Un=Si(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Bn=i,Un=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=rs!==null?{id:Xr,overflow:Jr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=Zn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Bn=i,Un=null,!0):!1;default:return!1}}function Ip(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Pp(i){if(gt){var s=Un;if(s){var l=s;if(!D_(i,s)){if(Ip(i))throw Error(n(418));s=Si(l.nextSibling);var d=Bn;s&&D_(i,s)?L_(d,l):(i.flags=i.flags&-4097|2,gt=!1,Bn=i)}}else{if(Ip(i))throw Error(n(418));i.flags=i.flags&-4097|2,gt=!1,Bn=i}}}function M_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Bn=i}function mc(i){if(i!==Bn)return!1;if(!gt)return M_(i),gt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Sp(i.type,i.memoizedProps)),s&&(s=Un)){if(Ip(i))throw F_(),Error(n(418));for(;s;)L_(i,s),s=Si(s.nextSibling)}if(M_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Un=Si(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Un=null}}else Un=Bn?Si(i.stateNode.nextSibling):null;return!0}function F_(){for(var i=Un;i;)i=Si(i.nextSibling)}function Eo(){Un=Bn=null,gt=!1}function Rp(i){dr===null?dr=[i]:dr.push(i)}var fM=z.ReactCurrentBatchConfig;function Gu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var d=l.stateNode}if(!d)throw Error(n(147,i));var g=d,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var O=g.refs;x===null?delete O[y]:O[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function gc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function B_(i){var s=i._init;return s(i._payload)}function U_(i){function s(j,M){if(i){var V=j.deletions;V===null?(j.deletions=[M],j.flags|=16):V.push(M)}}function l(j,M){if(!i)return null;for(;M!==null;)s(j,M),M=M.sibling;return null}function d(j,M){for(j=new Map;M!==null;)M.key!==null?j.set(M.key,M):j.set(M.index,M),M=M.sibling;return j}function g(j,M){return j=Li(j,M),j.index=0,j.sibling=null,j}function y(j,M,V){return j.index=V,i?(V=j.alternate,V!==null?(V=V.index,V<M?(j.flags|=2,M):V):(j.flags|=2,M)):(j.flags|=1048576,M)}function x(j){return i&&j.alternate===null&&(j.flags|=2),j}function O(j,M,V,ge){return M===null||M.tag!==6?(M=wm(V,j.mode,ge),M.return=j,M):(M=g(M,V),M.return=j,M)}function L(j,M,V,ge){var ke=V.type;return ke===te?ie(j,M,V.props.children,ge,V.key):M!==null&&(M.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===Ae&&B_(ke)===M.type)?(ge=g(M,V.props),ge.ref=Gu(j,M,V),ge.return=j,ge):(ge=Hc(V.type,V.key,V.props,null,j.mode,ge),ge.ref=Gu(j,M,V),ge.return=j,ge)}function Y(j,M,V,ge){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=Cm(V,j.mode,ge),M.return=j,M):(M=g(M,V.children||[]),M.return=j,M)}function ie(j,M,V,ge,ke){return M===null||M.tag!==7?(M=ds(V,j.mode,ge,ke),M.return=j,M):(M=g(M,V),M.return=j,M)}function ce(j,M,V){if(typeof M=="string"&&M!==""||typeof M=="number")return M=wm(""+M,j.mode,V),M.return=j,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case X:return V=Hc(M.type,M.key,M.props,null,j.mode,V),V.ref=Gu(j,null,M),V.return=j,V;case B:return M=Cm(M,j.mode,V),M.return=j,M;case Ae:var ge=M._init;return ce(j,ge(M._payload),V)}if(pi(M)||Z(M))return M=ds(M,j.mode,V,null),M.return=j,M;gc(j,M)}return null}function ne(j,M,V,ge){var ke=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return ke!==null?null:O(j,M,""+V,ge);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===ke?L(j,M,V,ge):null;case B:return V.key===ke?Y(j,M,V,ge):null;case Ae:return ke=V._init,ne(j,M,ke(V._payload),ge)}if(pi(V)||Z(V))return ke!==null?null:ie(j,M,V,ge,null);gc(j,V)}return null}function xe(j,M,V,ge,ke){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return j=j.get(V)||null,O(M,j,""+ge,ke);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case X:return j=j.get(ge.key===null?V:ge.key)||null,L(M,j,ge,ke);case B:return j=j.get(ge.key===null?V:ge.key)||null,Y(M,j,ge,ke);case Ae:var Le=ge._init;return xe(j,M,V,Le(ge._payload),ke)}if(pi(ge)||Z(ge))return j=j.get(V)||null,ie(M,j,ge,ke,null);gc(M,ge)}return null}function Ce(j,M,V,ge){for(var ke=null,Le=null,De=M,He=M=0,Wt=null;De!==null&&He<V.length;He++){De.index>He?(Wt=De,De=null):Wt=De.sibling;var tt=ne(j,De,V[He],ge);if(tt===null){De===null&&(De=Wt);break}i&&De&&tt.alternate===null&&s(j,De),M=y(tt,M,He),Le===null?ke=tt:Le.sibling=tt,Le=tt,De=Wt}if(He===V.length)return l(j,De),gt&&is(j,He),ke;if(De===null){for(;He<V.length;He++)De=ce(j,V[He],ge),De!==null&&(M=y(De,M,He),Le===null?ke=De:Le.sibling=De,Le=De);return gt&&is(j,He),ke}for(De=d(j,De);He<V.length;He++)Wt=xe(De,j,He,V[He],ge),Wt!==null&&(i&&Wt.alternate!==null&&De.delete(Wt.key===null?He:Wt.key),M=y(Wt,M,He),Le===null?ke=Wt:Le.sibling=Wt,Le=Wt);return i&&De.forEach(function(Di){return s(j,Di)}),gt&&is(j,He),ke}function ve(j,M,V,ge){var ke=Z(V);if(typeof ke!="function")throw Error(n(150));if(V=ke.call(V),V==null)throw Error(n(151));for(var Le=ke=null,De=M,He=M=0,Wt=null,tt=V.next();De!==null&&!tt.done;He++,tt=V.next()){De.index>He?(Wt=De,De=null):Wt=De.sibling;var Di=ne(j,De,tt.value,ge);if(Di===null){De===null&&(De=Wt);break}i&&De&&Di.alternate===null&&s(j,De),M=y(Di,M,He),Le===null?ke=Di:Le.sibling=Di,Le=Di,De=Wt}if(tt.done)return l(j,De),gt&&is(j,He),ke;if(De===null){for(;!tt.done;He++,tt=V.next())tt=ce(j,tt.value,ge),tt!==null&&(M=y(tt,M,He),Le===null?ke=tt:Le.sibling=tt,Le=tt);return gt&&is(j,He),ke}for(De=d(j,De);!tt.done;He++,tt=V.next())tt=xe(De,j,He,tt.value,ge),tt!==null&&(i&&tt.alternate!==null&&De.delete(tt.key===null?He:tt.key),M=y(tt,M,He),Le===null?ke=tt:Le.sibling=tt,Le=tt);return i&&De.forEach(function(VM){return s(j,VM)}),gt&&is(j,He),ke}function It(j,M,V,ge){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var ke=V.key,Le=M;Le!==null;){if(Le.key===ke){if(ke=V.type,ke===te){if(Le.tag===7){l(j,Le.sibling),M=g(Le,V.props.children),M.return=j,j=M;break e}}else if(Le.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===Ae&&B_(ke)===Le.type){l(j,Le.sibling),M=g(Le,V.props),M.ref=Gu(j,Le,V),M.return=j,j=M;break e}l(j,Le);break}else s(j,Le);Le=Le.sibling}V.type===te?(M=ds(V.props.children,j.mode,ge,V.key),M.return=j,j=M):(ge=Hc(V.type,V.key,V.props,null,j.mode,ge),ge.ref=Gu(j,M,V),ge.return=j,j=ge)}return x(j);case B:e:{for(Le=V.key;M!==null;){if(M.key===Le)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(j,M.sibling),M=g(M,V.children||[]),M.return=j,j=M;break e}else{l(j,M);break}else s(j,M);M=M.sibling}M=Cm(V,j.mode,ge),M.return=j,j=M}return x(j);case Ae:return Le=V._init,It(j,M,Le(V._payload),ge)}if(pi(V))return Ce(j,M,V,ge);if(Z(V))return ve(j,M,V,ge);gc(j,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,M!==null&&M.tag===6?(l(j,M.sibling),M=g(M,V),M.return=j,j=M):(l(j,M),M=wm(V,j.mode,ge),M.return=j,j=M),x(j)):l(j,M)}return It}var yo=U_(!0),H_=U_(!1),Ec=wi(null),yc=null,To=null,Lp=null;function Dp(){Lp=To=yc=null}function Mp(i){var s=Ec.current;ft(Ec),i._currentValue=s}function Fp(i,s,l){for(;i!==null;){var d=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),i===l)break;i=i.return}}function bo(i,s){yc=i,Lp=To=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(An=!0),i.firstContext=null)}function Qn(i){var s=i._currentValue;if(Lp!==i)if(i={context:i,memoizedValue:s,next:null},To===null){if(yc===null)throw Error(n(308));To=i,yc.dependencies={lanes:0,firstContext:i}}else To=To.next=i;return s}var ss=null;function Bp(i){ss===null?ss=[i]:ss.push(i)}function z_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,Bp(s)):(l.next=g.next,g.next=l),s.interleaved=l,Zr(i,d)}function Zr(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var vi=!1;function Up(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function j_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ei(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function ki(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(et&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Zr(i,l)}return g=d.interleaved,g===null?(s.next=s,Bp(d)):(s.next=g.next,g.next=s),d.interleaved=s,Zr(i,l)}function Tc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Zh(i,l)}}function $_(i,s){var l=i.updateQueue,d=i.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function bc(i,s,l,d){var g=i.updateQueue;vi=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var L=O,Y=L.next;L.next=null,x===null?y=Y:x.next=Y,x=L;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,O=ie.lastBaseUpdate,O!==x&&(O===null?ie.firstBaseUpdate=Y:O.next=Y,ie.lastBaseUpdate=L))}if(y!==null){var ce=g.baseState;x=0,ie=Y=L=null,O=y;do{var ne=O.lane,xe=O.eventTime;if((d&ne)===ne){ie!==null&&(ie=ie.next={eventTime:xe,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var Ce=i,ve=O;switch(ne=s,xe=l,ve.tag){case 1:if(Ce=ve.payload,typeof Ce=="function"){ce=Ce.call(xe,ce,ne);break e}ce=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ve.payload,ne=typeof Ce=="function"?Ce.call(xe,ce,ne):Ce,ne==null)break e;ce=w({},ce,ne);break e;case 2:vi=!0}}O.callback!==null&&O.lane!==0&&(i.flags|=64,ne=g.effects,ne===null?g.effects=[O]:ne.push(O))}else xe={eventTime:xe,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ie===null?(Y=ie=xe,L=ce):ie=ie.next=xe,x|=ne;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ne=O,O=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(ie===null&&(L=ce),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=ie,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);as|=x,i.lanes=x,i.memoizedState=ce}}function V_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var d=i[s],g=d.callback;if(g!==null){if(d.callback=null,d=l,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Ku={},Rr=wi(Ku),Qu=wi(Ku),Xu=wi(Ku);function os(i){if(i===Ku)throw Error(n(174));return i}function Hp(i,s){switch(lt(Xu,s),lt(Qu,i),lt(Rr,Ku),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Ee(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Ee(s,i)}ft(Rr),lt(Rr,s)}function _o(){ft(Rr),ft(Qu),ft(Xu)}function q_(i){os(Xu.current);var s=os(Rr.current),l=Ee(s,i.type);s!==l&&(lt(Qu,i),lt(Rr,l))}function zp(i){Qu.current===i&&(ft(Rr),ft(Qu))}var Tt=wi(0);function _c(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var jp=[];function $p(){for(var i=0;i<jp.length;i++)jp[i]._workInProgressVersionPrimary=null;jp.length=0}var xc=z.ReactCurrentDispatcher,Vp=z.ReactCurrentBatchConfig,us=0,bt=null,Ft=null,qt=null,Sc=!1,Ju=!1,Zu=0,dM=0;function un(){throw Error(n(321))}function qp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!fr(i[l],s[l]))return!1;return!0}function Yp(i,s,l,d,g,y){if(us=y,bt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,xc.current=i===null||i.memoizedState===null?gM:EM,i=l(d,g),Ju){y=0;do{if(Ju=!1,Zu=0,25<=y)throw Error(n(301));y+=1,qt=Ft=null,s.updateQueue=null,xc.current=yM,i=l(d,g)}while(Ju)}if(xc.current=Ac,s=Ft!==null&&Ft.next!==null,us=0,qt=Ft=bt=null,Sc=!1,s)throw Error(n(300));return i}function Wp(){var i=Zu!==0;return Zu=0,i}function Lr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?bt.memoizedState=qt=i:qt=qt.next=i,qt}function Xn(){if(Ft===null){var i=bt.alternate;i=i!==null?i.memoizedState:null}else i=Ft.next;var s=qt===null?bt.memoizedState:qt.next;if(s!==null)qt=s,Ft=i;else{if(i===null)throw Error(n(310));Ft=i,i={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},qt===null?bt.memoizedState=qt=i:qt=qt.next=i}return qt}function ea(i,s){return typeof s=="function"?s(i):s}function Gp(i){var s=Xn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=Ft,g=d.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,d=d.baseState;var O=x=null,L=null,Y=y;do{var ie=Y.lane;if((us&ie)===ie)L!==null&&(L=L.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),d=Y.hasEagerState?Y.eagerState:i(d,Y.action);else{var ce={lane:ie,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};L===null?(O=L=ce,x=d):L=L.next=ce,bt.lanes|=ie,as|=ie}Y=Y.next}while(Y!==null&&Y!==y);L===null?x=d:L.next=O,fr(d,s.memoizedState)||(An=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=L,l.lastRenderedState=d}if(i=l.interleaved,i!==null){g=i;do y=g.lane,bt.lanes|=y,as|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Kp(i){var s=Xn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);fr(y,s.memoizedState)||(An=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function Y_(){}function W_(i,s){var l=bt,d=Xn(),g=s(),y=!fr(d.memoizedState,g);if(y&&(d.memoizedState=g,An=!0),d=d.queue,Qp(Q_.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||qt!==null&&qt.memoizedState.tag&1){if(l.flags|=2048,ta(9,K_.bind(null,l,d,g,s),void 0,null),Yt===null)throw Error(n(349));(us&30)!==0||G_(l,s,g)}return g}function G_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function K_(i,s,l,d){s.value=l,s.getSnapshot=d,X_(s)&&J_(i)}function Q_(i,s,l){return l(function(){X_(s)&&J_(i)})}function X_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!fr(i,l)}catch(d){return!0}}function J_(i){var s=Zr(i,1);s!==null&&gr(s,i,1,-1)}function Z_(i){var s=Lr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:i},s.queue=i,i=i.dispatch=mM.bind(null,bt,i),[s.memoizedState,i]}function ta(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(d=l.next,l.next=i,i.next=d,s.lastEffect=i)),i}function e2(){return Xn().memoizedState}function wc(i,s,l,d){var g=Lr();bt.flags|=i,g.memoizedState=ta(1|s,l,void 0,d===void 0?null:d)}function Cc(i,s,l,d){var g=Xn();d=d===void 0?null:d;var y=void 0;if(Ft!==null){var x=Ft.memoizedState;if(y=x.destroy,d!==null&&qp(d,x.deps)){g.memoizedState=ta(s,l,y,d);return}}bt.flags|=i,g.memoizedState=ta(1|s,l,y,d)}function t2(i,s){return wc(8390656,8,i,s)}function Qp(i,s){return Cc(2048,8,i,s)}function n2(i,s){return Cc(4,2,i,s)}function r2(i,s){return Cc(4,4,i,s)}function i2(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function s2(i,s,l){return l=l!=null?l.concat([i]):null,Cc(4,4,i2.bind(null,s,i),l)}function Xp(){}function o2(i,s){var l=Xn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&qp(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function u2(i,s){var l=Xn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&qp(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function a2(i,s,l){return(us&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=l):(fr(l,s)||(l=Bb(),bt.lanes|=l,as|=l,i.baseState=!0),s)}function hM(i,s){var l=it;it=l!==0&&4>l?l:4,i(!0);var d=Vp.transition;Vp.transition={};try{i(!1),s()}finally{it=l,Vp.transition=d}}function l2(){return Xn().memoizedState}function pM(i,s,l){var d=Pi(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},c2(i))f2(s,l);else if(l=z_(i,s,l,d),l!==null){var g=pn();gr(l,i,d,g),d2(l,s,d)}}function mM(i,s,l){var d=Pi(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(c2(i))f2(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,O=y(x,l);if(g.hasEagerState=!0,g.eagerState=O,fr(O,x)){var L=s.interleaved;L===null?(g.next=g,Bp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=z_(i,s,g,d),l!==null&&(g=pn(),gr(l,i,d,g),d2(l,s,d))}}function c2(i){var s=i.alternate;return i===bt||s!==null&&s===bt}function f2(i,s){Ju=Sc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function d2(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Zh(i,l)}}var Ac={readContext:Qn,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},gM={readContext:Qn,useCallback:function(i,s){return Lr().memoizedState=[i,s===void 0?null:s],i},useContext:Qn,useEffect:t2,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,wc(4194308,4,i2.bind(null,s,i),l)},useLayoutEffect:function(i,s){return wc(4194308,4,i,s)},useInsertionEffect:function(i,s){return wc(4,2,i,s)},useMemo:function(i,s){var l=Lr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Lr();return s=l!==void 0?l(s):s,d.memoizedState=d.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},d.queue=i,i=i.dispatch=pM.bind(null,bt,i),[d.memoizedState,i]},useRef:function(i){var s=Lr();return i={current:i},s.memoizedState=i},useState:Z_,useDebugValue:Xp,useDeferredValue:function(i){return Lr().memoizedState=i},useTransition:function(){var i=Z_(!1),s=i[0];return i=hM.bind(null,i[1]),Lr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=bt,g=Lr();if(gt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Yt===null)throw Error(n(349));(us&30)!==0||G_(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,t2(Q_.bind(null,d,y,i),[i]),d.flags|=2048,ta(9,K_.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Lr(),s=Yt.identifierPrefix;if(gt){var l=Jr,d=Xr;l=(d&~(1<<32-cr(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=Zu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=dM++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},EM={readContext:Qn,useCallback:o2,useContext:Qn,useEffect:Qp,useImperativeHandle:s2,useInsertionEffect:n2,useLayoutEffect:r2,useMemo:u2,useReducer:Gp,useRef:e2,useState:function(){return Gp(ea)},useDebugValue:Xp,useDeferredValue:function(i){var s=Xn();return a2(s,Ft.memoizedState,i)},useTransition:function(){var i=Gp(ea)[0],s=Xn().memoizedState;return[i,s]},useMutableSource:Y_,useSyncExternalStore:W_,useId:l2,unstable_isNewReconciler:!1},yM={readContext:Qn,useCallback:o2,useContext:Qn,useEffect:Qp,useImperativeHandle:s2,useInsertionEffect:n2,useLayoutEffect:r2,useMemo:u2,useReducer:Kp,useRef:e2,useState:function(){return Kp(ea)},useDebugValue:Xp,useDeferredValue:function(i){var s=Xn();return Ft===null?s.memoizedState=i:a2(s,Ft.memoizedState,i)},useTransition:function(){var i=Kp(ea)[0],s=Xn().memoizedState;return[i,s]},useMutableSource:Y_,useSyncExternalStore:W_,useId:l2,unstable_isNewReconciler:!1};function hr(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Jp(i,s,l,d){s=i.memoizedState,l=l(d,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var vc={isMounted:function(i){return(i=i._reactInternals)?es(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=pn(),g=Pi(i),y=ei(d,g);y.payload=s,l!=null&&(y.callback=l),s=ki(i,y,g),s!==null&&(gr(s,i,g,d),Tc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=pn(),g=Pi(i),y=ei(d,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=ki(i,y,g),s!==null&&(gr(s,i,g,d),Tc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=pn(),d=Pi(i),g=ei(l,d);g.tag=2,s!=null&&(g.callback=s),s=ki(i,g,d),s!==null&&(gr(s,i,d,l),Tc(s,i,d))}};function h2(i,s,l,d,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!zu(l,d)||!zu(g,y):!0}function p2(i,s,l){var d=!1,g=Ci,y=s.contextType;return typeof y=="object"&&y!==null?y=Qn(y):(g=Cn(s)?ns:on.current,d=s.contextTypes,y=(d=d!=null)?po(i,g):Ci),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=vc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function m2(i,s,l,d){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,d),s.state!==i&&vc.enqueueReplaceState(s,s.state,null)}function Zp(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Up(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Qn(y):(y=Cn(s)?ns:on.current,g.context=po(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Jp(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&vc.enqueueReplaceState(g,g.state,null),bc(i,l,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function xo(i,s){try{var l="",d=s;do l+=Be(d),d=d.return;while(d);var g=l}catch(y){g=`
|
|
11
|
+
`+g[x].replace(" at new "," at ");return i.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",i.displayName)),L}while(1<=x&&0<=O);break}}}finally{N=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Me(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Ie(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case Se:return"Profiler";case Te:return"StrictMode";case ue:return"Suspense";case ie:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case fe:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case de:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:Ie(i.type)||"Memo";case we:s=i._payload,i=i._init;try{return Ie(i(s))}catch(l){}}return null}function Ye(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(s);case 8:return s===Te?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function xt(i){var s=Je(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),d=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function be(i){i._valueTracker||(i._valueTracker=xt(i))}function He(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return i&&(d=Je(i)?i.checked?"true":"false":i.value),i=d,i!==l?(s.setValue(i),!0):!1}function tt(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Tt(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function St(i,s){var l=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;l=Ve(s.value!=null?s.value:l),i._wrapperState={initialChecked:d,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function un(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function Wt(i,s){un(i,s);var l=Ve(s.value),d=s.type;if(l!=null)d==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(d==="submit"||d==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Mn(i,s.type,l):s.hasOwnProperty("defaultValue")&&Mn(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Rt(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Mn(i,s,l){(s!=="number"||tt(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ft=Array.isArray;function vt(i,s,l,d){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&d&&(i[l].defaultSelected=!0)}else{for(l=""+Ve(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,d&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function vu(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Hl(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ft(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function zl(i,s){var l=Ve(s.value),d=Ve(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),d!=null&&(i.defaultValue=""+d)}function jl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ee(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,We=function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,d,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,d,g)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ze(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jr=["Webkit","ms","Moz","O"];Object.keys(Jt).forEach(function(i){Jr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Jt[s]=Jt[i]})});function Kn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Jt.hasOwnProperty(i)&&Jt[i]?(""+s).trim():s+"px"}function yi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var d=l.indexOf("--")===0,g=Kn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var ts=w({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,s){if(s){if(ts[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Rr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bn=null;function Wh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Gh=null,io=null,so=null;function Ab(i){if(i=Ku(i)){if(typeof Gh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=fc(s),Gh(i.stateNode,i.type,s))}}function vb(i){io?so?so.push(i):so=[i]:io=i}function kb(){if(io){var i=io,s=so;if(so=io=null,Ab(i),s)for(i=0;i<s.length;i++)Ab(s[i])}}function Nb(i,s){return i(s)}function Ob(){}var Kh=!1;function Ib(i,s,l){if(Kh)return i(s,l);Kh=!0;try{return Nb(i,s,l)}finally{Kh=!1,(io!==null||so!==null)&&(Ob(),kb())}}function ku(i,s){var l=i.stateNode;if(l===null)return null;var d=fc(l);if(d===null)return null;l=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Qh=!1;if(c)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Qh=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch(i){Qh=!1}function n8(i,s,l,d,g,y,x,O,L){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(se){this.onError(se)}}var Ou=!1,$l=null,Vl=!1,Xh=null,r8={onError:function(i){Ou=!0,$l=i}};function i8(i,s,l,d,g,y,x,O,L){Ou=!1,$l=null,n8.apply(r8,arguments)}function s8(i,s,l,d,g,y,x,O,L){if(i8.apply(this,arguments),Ou){if(Ou){var Y=$l;Ou=!1,$l=null}else throw Error(n(198));Vl||(Vl=!0,Xh=Y)}}function ns(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function Pb(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Rb(i){if(ns(i)!==i)throw Error(n(188))}function o8(i){var s=i.alternate;if(!s){if(s=ns(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,d=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){l=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return Rb(g),i;if(y===d)return Rb(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=y;else{for(var x=!1,O=g.child;O;){if(O===l){x=!0,l=g,d=y;break}if(O===d){x=!0,d=g,l=y;break}O=O.sibling}if(!x){for(O=y.child;O;){if(O===l){x=!0,l=y,d=g;break}if(O===d){x=!0,d=y,l=g;break}O=O.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function Lb(i){return i=o8(i),i!==null?Db(i):null}function Db(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Db(i);if(s!==null)return s;i=i.sibling}return null}var Fb=t.unstable_scheduleCallback,Mb=t.unstable_cancelCallback,u8=t.unstable_shouldYield,a8=t.unstable_requestPaint,Lt=t.unstable_now,l8=t.unstable_getCurrentPriorityLevel,Jh=t.unstable_ImmediatePriority,Bb=t.unstable_UserBlockingPriority,ql=t.unstable_NormalPriority,c8=t.unstable_LowPriority,Ub=t.unstable_IdlePriority,Yl=null,Lr=null;function f8(i){if(Lr&&typeof Lr.onCommitFiberRoot=="function")try{Lr.onCommitFiberRoot(Yl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:p8,d8=Math.log,h8=Math.LN2;function p8(i){return i>>>=0,i===0?32:31-(d8(i)/h8|0)|0}var Wl=64,Gl=4194304;function Iu(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 Kl(i,s){var l=i.pendingLanes;if(l===0)return 0;var d=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var O=x&~g;O!==0?d=Iu(O):(y&=x,y!==0&&(d=Iu(y)))}else x=l&~g,x!==0?d=Iu(x):y!==0&&(d=Iu(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=d;0<s;)l=31-hr(s),g=1<<l,d|=i[l],s&=~g;return d}function m8(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function g8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-hr(y),O=1<<x,L=g[x];L===-1?((O&l)===0||(O&d)!==0)&&(g[x]=m8(O,s)):L<=s&&(i.expiredLanes|=O),y&=~O}}function Zh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Hb(){var i=Wl;return Wl<<=1,(Wl&4194240)===0&&(Wl=64),i}function ep(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Pu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function E8(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var d=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,d[g]=-1,i[g]=-1,l&=~y}}function tp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var d=31-hr(l),g=1<<d;g&s|i[d]&s&&(i[d]|=s),l&=~g}}var st=0;function zb(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var jb,np,$b,Vb,qb,rp=!1,Ql=[],Ti=null,bi=null,_i=null,Ru=new Map,Lu=new Map,xi=[],y8="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 Yb(i,s){switch(i){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":Ru.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lu.delete(s.pointerId)}}function Du(i,s,l,d,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=Ku(s),s!==null&&np(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function T8(i,s,l,d,g){switch(s){case"focusin":return Ti=Du(Ti,i,s,l,d,g),!0;case"dragenter":return bi=Du(bi,i,s,l,d,g),!0;case"mouseover":return _i=Du(_i,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Ru.set(y,Du(Ru.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Lu.set(y,Du(Lu.get(y)||null,i,s,l,d,g)),!0}return!1}function Wb(i){var s=rs(i.target);if(s!==null){var l=ns(s);if(l!==null){if(s=l.tag,s===13){if(s=Pb(l),s!==null){i.blockedOn=s,qb(i.priority,function(){$b(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=sp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Bn=d,l.target.dispatchEvent(d),Bn=null}else return s=Ku(l),s!==null&&np(s),i.blockedOn=l,!1;s.shift()}return!0}function Gb(i,s,l){Xl(i)&&l.delete(s)}function b8(){rp=!1,Ti!==null&&Xl(Ti)&&(Ti=null),bi!==null&&Xl(bi)&&(bi=null),_i!==null&&Xl(_i)&&(_i=null),Ru.forEach(Gb),Lu.forEach(Gb)}function Fu(i,s){i.blockedOn===s&&(i.blockedOn=null,rp||(rp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,b8)))}function Mu(i){function s(g){return Fu(g,i)}if(0<Ql.length){Fu(Ql[0],i);for(var l=1;l<Ql.length;l++){var d=Ql[l];d.blockedOn===i&&(d.blockedOn=null)}}for(Ti!==null&&Fu(Ti,i),bi!==null&&Fu(bi,i),_i!==null&&Fu(_i,i),Ru.forEach(s),Lu.forEach(s),l=0;l<xi.length;l++)d=xi[l],d.blockedOn===i&&(d.blockedOn=null);for(;0<xi.length&&(l=xi[0],l.blockedOn===null);)Wb(l),l.blockedOn===null&&xi.shift()}var oo=G.ReactCurrentBatchConfig,Jl=!0;function _8(i,s,l,d){var g=st,y=oo.transition;oo.transition=null;try{st=1,ip(i,s,l,d)}finally{st=g,oo.transition=y}}function x8(i,s,l,d){var g=st,y=oo.transition;oo.transition=null;try{st=4,ip(i,s,l,d)}finally{st=g,oo.transition=y}}function ip(i,s,l,d){if(Jl){var g=sp(i,s,l,d);if(g===null)xp(i,s,d,Zl,l),Yb(i,d);else if(T8(g,i,s,l,d))d.stopPropagation();else if(Yb(i,d),s&4&&-1<y8.indexOf(i)){for(;g!==null;){var y=Ku(g);if(y!==null&&jb(y),y=sp(i,s,l,d),y===null&&xp(i,s,d,Zl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else xp(i,s,d,null,l)}}var Zl=null;function sp(i,s,l,d){if(Zl=null,i=Wh(d),i=rs(i),i!==null)if(s=ns(i),s===null)i=null;else if(l=s.tag,l===13){if(i=Pb(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Zl=i,null}function Kb(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(l8()){case Jh:return 1;case Bb:return 4;case ql:case c8:return 16;case Ub:return 536870912;default:return 16}default:return 16}}var Si=null,op=null,ec=null;function Qb(){if(ec)return ec;var i,s=op,l=s.length,d,g="value"in Si?Si.value:Si.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(d=1;d<=x&&s[l-d]===g[y-d];d++);return ec=g.slice(i,1<d?1-d:void 0)}function tc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function nc(){return!0}function Xb(){return!1}function Un(i){function s(l,d,g,y,x){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var O in i)i.hasOwnProperty(O)&&(l=i[O],this[O]=l?l(y):y[O]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?nc:Xb,this.isPropagationStopped=Xb,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),s}var uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},up=Un(uo),Bu=w({},uo,{view:0,detail:0}),S8=Un(Bu),ap,lp,Uu,rc=w({},Bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fp,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!==Uu&&(Uu&&i.type==="mousemove"?(ap=i.screenX-Uu.screenX,lp=i.screenY-Uu.screenY):lp=ap=0,Uu=i),ap)},movementY:function(i){return"movementY"in i?i.movementY:lp}}),Jb=Un(rc),w8=w({},rc,{dataTransfer:0}),C8=Un(w8),A8=w({},Bu,{relatedTarget:0}),cp=Un(A8),v8=w({},uo,{animationName:0,elapsedTime:0,pseudoElement:0}),k8=Un(v8),N8=w({},uo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),O8=Un(N8),I8=w({},uo,{data:0}),Zb=Un(I8),P8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R8={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"},L8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D8(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=L8[i])?!!s[i]:!1}function fp(){return D8}var F8=w({},Bu,{key:function(i){if(i.key){var s=P8[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=tc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?R8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fp,charCode:function(i){return i.type==="keypress"?tc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?tc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),M8=Un(F8),B8=w({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),e_=Un(B8),U8=w({},Bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fp}),H8=Un(U8),z8=w({},uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),j8=Un(z8),$8=w({},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}),V8=Un($8),q8=[9,13,27,32],dp=c&&"CompositionEvent"in window,Hu=null;c&&"documentMode"in document&&(Hu=document.documentMode);var Y8=c&&"TextEvent"in window&&!Hu,t_=c&&(!dp||Hu&&8<Hu&&11>=Hu),n_=" ",r_=!1;function i_(i,s){switch(i){case"keyup":return q8.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function s_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ao=!1;function W8(i,s){switch(i){case"compositionend":return s_(s);case"keypress":return s.which!==32?null:(r_=!0,n_);case"textInput":return i=s.data,i===n_&&r_?null:i;default:return null}}function G8(i,s){if(ao)return i==="compositionend"||!dp&&i_(i,s)?(i=Qb(),ec=op=Si=null,ao=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return t_&&s.locale!=="ko"?null:s.data;default:return null}}var K8={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 o_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!K8[i.type]:s==="textarea"}function u_(i,s,l,d){vb(d),s=ac(s,"onChange"),0<s.length&&(l=new up("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var zu=null,ju=null;function Q8(i){C_(i,0)}function ic(i){var s=po(i);if(He(s))return i}function X8(i,s){if(i==="change")return s}var a_=!1;if(c){var hp;if(c){var pp="oninput"in document;if(!pp){var l_=document.createElement("div");l_.setAttribute("oninput","return;"),pp=typeof l_.oninput=="function"}hp=pp}else hp=!1;a_=hp&&(!document.documentMode||9<document.documentMode)}function c_(){zu&&(zu.detachEvent("onpropertychange",f_),ju=zu=null)}function f_(i){if(i.propertyName==="value"&&ic(ju)){var s=[];u_(s,ju,i,Wh(i)),Ib(Q8,s)}}function J8(i,s,l){i==="focusin"?(c_(),zu=s,ju=l,zu.attachEvent("onpropertychange",f_)):i==="focusout"&&c_()}function Z8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ic(ju)}function eF(i,s){if(i==="click")return ic(s)}function tF(i,s){if(i==="input"||i==="change")return ic(s)}function nF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:nF;function $u(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),d=Object.keys(s);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var g=l[d];if(!f.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function d_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function h_(i,s){var l=d_(i);i=0;for(var d;l;){if(l.nodeType===3){if(d=i+l.textContent.length,i<=s&&d>=s)return{node:l,offset:s-i};i=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=d_(l)}}function p_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?p_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function m_(){for(var i=window,s=tt();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(d){l=!1}if(l)i=s.contentWindow;else break;s=tt(i.document)}return s}function mp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function rF(i){var s=m_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&p_(l.ownerDocument.documentElement,l)){if(d!==null&&mp(l)){if(s=d.start,i=d.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!i.extend&&y>d&&(g=d,d=y,y=g),g=h_(l,y);var x=h_(l,d);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>d?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var iF=c&&"documentMode"in document&&11>=document.documentMode,lo=null,gp=null,Vu=null,Ep=!1;function g_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ep||lo==null||lo!==tt(d)||(d=lo,"selectionStart"in d&&mp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Vu&&$u(Vu,d)||(Vu=d,d=ac(gp,"onSelect"),0<d.length&&(s=new up("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=lo)))}function sc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var co={animationend:sc("Animation","AnimationEnd"),animationiteration:sc("Animation","AnimationIteration"),animationstart:sc("Animation","AnimationStart"),transitionend:sc("Transition","TransitionEnd")},yp={},E_={};c&&(E_=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function oc(i){if(yp[i])return yp[i];if(!co[i])return i;var s=co[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in E_)return yp[i]=s[l];return i}var y_=oc("animationend"),T_=oc("animationiteration"),b_=oc("animationstart"),__=oc("transitionend"),x_=new Map,S_="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 wi(i,s){x_.set(i,s),u(s,[i])}for(var Tp=0;Tp<S_.length;Tp++){var bp=S_[Tp],sF=bp.toLowerCase(),oF=bp[0].toUpperCase()+bp.slice(1);wi(sF,"on"+oF)}wi(y_,"onAnimationEnd"),wi(T_,"onAnimationIteration"),wi(b_,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(__,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="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(" "),uF=new Set("cancel close invalid load scroll toggle".split(" ").concat(qu));function w_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,s8(d,s,void 0,i),i.currentTarget=null}function C_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var d=i[l],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var O=d[x],L=O.instance,Y=O.currentTarget;if(O=O.listener,L!==y&&g.isPropagationStopped())break e;w_(g,O,Y),y=L}else for(x=0;x<d.length;x++){if(O=d[x],L=O.instance,Y=O.currentTarget,O=O.listener,L!==y&&g.isPropagationStopped())break e;w_(g,O,Y),y=L}}}if(Vl)throw i=Xh,Vl=!1,Xh=null,i}function dt(i,s){var l=s[kp];l===void 0&&(l=s[kp]=new Set);var d=i+"__bubble";l.has(d)||(A_(s,i,2,!1),l.add(d))}function _p(i,s,l){var d=0;s&&(d|=4),A_(l,i,d,s)}var uc="_reactListening"+Math.random().toString(36).slice(2);function Yu(i){if(!i[uc]){i[uc]=!0,r.forEach(function(l){l!=="selectionchange"&&(uF.has(l)||_p(l,!1,i),_p(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[uc]||(s[uc]=!0,_p("selectionchange",!1,s))}}function A_(i,s,l,d){switch(Kb(s)){case 1:var g=_8;break;case 4:g=x8;break;default:g=ip}l=g.bind(null,s,l,i),g=void 0,!Qh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function xp(i,s,l,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var O=d.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;x=x.return}for(;O!==null;){if(x=rs(O),x===null)return;if(L=x.tag,L===5||L===6){d=y=x;continue e}O=O.parentNode}}d=d.return}Ib(function(){var Y=y,se=Wh(l),ce=[];e:{var ne=x_.get(i);if(ne!==void 0){var xe=up,Ae=i;switch(i){case"keypress":if(tc(l)===0)break e;case"keydown":case"keyup":xe=M8;break;case"focusin":Ae="focus",xe=cp;break;case"focusout":Ae="blur",xe=cp;break;case"beforeblur":case"afterblur":xe=cp;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=Jb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=C8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=H8;break;case y_:case T_:case b_:xe=k8;break;case __:xe=j8;break;case"scroll":xe=S8;break;case"wheel":xe=V8;break;case"copy":case"cut":case"paste":xe=O8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=e_}var ve=(s&4)!==0,Dt=!ve&&i==="scroll",z=ve?ne!==null?ne+"Capture":null:ne;ve=[];for(var F=Y,$;F!==null;){$=F;var me=$.stateNode;if($.tag===5&&me!==null&&($=me,z!==null&&(me=ku(F,z),me!=null&&ve.push(Wu(F,me,$)))),Dt)break;F=F.return}0<ve.length&&(ne=new xe(ne,Ae,null,l,se),ce.push({event:ne,listeners:ve}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",ne&&l!==Bn&&(Ae=l.relatedTarget||l.fromElement)&&(rs(Ae)||Ae[Zr]))break e;if((xe||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=Y,Ae=Ae?rs(Ae):null,Ae!==null&&(Dt=ns(Ae),Ae!==Dt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=Y),xe!==Ae)){if(ve=Jb,me="onMouseLeave",z="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(ve=e_,me="onPointerLeave",z="onPointerEnter",F="pointer"),Dt=xe==null?ne:po(xe),$=Ae==null?ne:po(Ae),ne=new ve(me,F+"leave",xe,l,se),ne.target=Dt,ne.relatedTarget=$,me=null,rs(se)===Y&&(ve=new ve(z,F+"enter",Ae,l,se),ve.target=$,ve.relatedTarget=Dt,me=ve),Dt=me,xe&&Ae)t:{for(ve=xe,z=Ae,F=0,$=ve;$;$=fo($))F++;for($=0,me=z;me;me=fo(me))$++;for(;0<F-$;)ve=fo(ve),F--;for(;0<$-F;)z=fo(z),$--;for(;F--;){if(ve===z||z!==null&&ve===z.alternate)break t;ve=fo(ve),z=fo(z)}ve=null}else ve=null;xe!==null&&v_(ce,ne,xe,ve,!1),Ae!==null&&Dt!==null&&v_(ce,Dt,Ae,ve,!0)}}e:{if(ne=Y?po(Y):window,xe=ne.nodeName&&ne.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ne.type==="file")var Ne=X8;else if(o_(ne))if(a_)Ne=tF;else{Ne=Z8;var Le=J8}else(xe=ne.nodeName)&&xe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ne=eF);if(Ne&&(Ne=Ne(i,Y))){u_(ce,Ne,l,se);break e}Le&&Le(i,ne,Y),i==="focusout"&&(Le=ne._wrapperState)&&Le.controlled&&ne.type==="number"&&Mn(ne,"number",ne.value)}switch(Le=Y?po(Y):window,i){case"focusin":(o_(Le)||Le.contentEditable==="true")&&(lo=Le,gp=Y,Vu=null);break;case"focusout":Vu=gp=lo=null;break;case"mousedown":Ep=!0;break;case"contextmenu":case"mouseup":case"dragend":Ep=!1,g_(ce,l,se);break;case"selectionchange":if(iF)break;case"keydown":case"keyup":g_(ce,l,se)}var De;if(dp)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ao?i_(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(t_&&l.locale!=="ko"&&(ao||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ao&&(De=Qb()):(Si=se,op="value"in Si?Si.value:Si.textContent,ao=!0)),Le=ac(Y,Ue),0<Le.length&&(Ue=new Zb(Ue,i,null,l,se),ce.push({event:Ue,listeners:Le}),De?Ue.data=De:(De=s_(l),De!==null&&(Ue.data=De)))),(De=Y8?W8(i,l):G8(i,l))&&(Y=ac(Y,"onBeforeInput"),0<Y.length&&(se=new Zb("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:Y}),se.data=De))}C_(ce,s)})}function Wu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function ac(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ku(i,l),y!=null&&d.unshift(Wu(i,y,g)),y=ku(i,s),y!=null&&d.push(Wu(i,y,g))),i=i.return}return d}function fo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function v_(i,s,l,d,g){for(var y=s._reactName,x=[];l!==null&&l!==d;){var O=l,L=O.alternate,Y=O.stateNode;if(L!==null&&L===d)break;O.tag===5&&Y!==null&&(O=Y,g?(L=ku(l,y),L!=null&&x.unshift(Wu(l,L,O))):g||(L=ku(l,y),L!=null&&x.push(Wu(l,L,O)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var aF=/\r\n?/g,lF=/\u0000|\uFFFD/g;function k_(i){return(typeof i=="string"?i:""+i).replace(aF,`
|
|
12
|
+
`).replace(lF,"")}function lc(i,s,l){if(s=k_(s),k_(i)!==s&&l)throw Error(n(425))}function cc(){}var Sp=null,wp=null;function Cp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ap=typeof setTimeout=="function"?setTimeout:void 0,cF=typeof clearTimeout=="function"?clearTimeout:void 0,N_=typeof Promise=="function"?Promise:void 0,fF=typeof queueMicrotask=="function"?queueMicrotask:typeof N_!="undefined"?function(i){return N_.resolve(null).then(i).catch(dF)}:Ap;function dF(i){setTimeout(function(){throw i})}function vp(i,s){var l=s,d=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(d===0){i.removeChild(g),Mu(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);Mu(s)}function Ci(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function O_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var ho=Math.random().toString(36).slice(2),Dr="__reactFiber$"+ho,Gu="__reactProps$"+ho,Zr="__reactContainer$"+ho,kp="__reactEvents$"+ho,hF="__reactListeners$"+ho,pF="__reactHandles$"+ho;function rs(i){var s=i[Dr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Zr]||l[Dr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=O_(i);i!==null;){if(l=i[Dr])return l;i=O_(i)}return s}i=l,l=i.parentNode}return null}function Ku(i){return i=i[Dr]||i[Zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function po(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function fc(i){return i[Gu]||null}var Np=[],mo=-1;function Ai(i){return{current:i}}function ht(i){0>mo||(i.current=Np[mo],Np[mo]=null,mo--)}function ct(i,s){mo++,Np[mo]=i.current,i.current=s}var vi={},an=Ai(vi),An=Ai(!1),is=vi;function go(i,s){var l=i.type.contextTypes;if(!l)return vi;var d=i.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function dc(){ht(An),ht(an)}function I_(i,s,l){if(an.current!==vi)throw Error(n(168));ct(an,s),ct(An,l)}function P_(i,s,l){var d=i.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return l;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,Ye(i)||"Unknown",g));return w({},l,d)}function hc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||vi,is=an.current,ct(an,i),ct(An,An.current),!0}function R_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=P_(i,s,is),d.__reactInternalMemoizedMergedChildContext=i,ht(An),ht(an),ct(an,i)):ht(An),ct(An,l)}var ei=null,pc=!1,Op=!1;function L_(i){ei===null?ei=[i]:ei.push(i)}function mF(i){pc=!0,L_(i)}function ki(){if(!Op&&ei!==null){Op=!0;var i=0,s=st;try{var l=ei;for(st=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}ei=null,pc=!1}catch(g){throw ei!==null&&(ei=ei.slice(i+1)),Fb(Jh,ki),g}finally{st=s,Op=!1}}return null}var Eo=[],yo=0,mc=null,gc=0,Qn=[],Xn=0,ss=null,ti=1,ni="";function os(i,s){Eo[yo++]=gc,Eo[yo++]=mc,mc=i,gc=s}function D_(i,s,l){Qn[Xn++]=ti,Qn[Xn++]=ni,Qn[Xn++]=ss,ss=i;var d=ti;i=ni;var g=32-hr(d)-1;d&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,ti=1<<32-hr(s)+g|l<<g|d,ni=y+i}else ti=1<<y|l<<g|d,ni=i}function Ip(i){i.return!==null&&(os(i,1),D_(i,1,0))}function Pp(i){for(;i===mc;)mc=Eo[--yo],Eo[yo]=null,gc=Eo[--yo],Eo[yo]=null;for(;i===ss;)ss=Qn[--Xn],Qn[Xn]=null,ni=Qn[--Xn],Qn[Xn]=null,ti=Qn[--Xn],Qn[Xn]=null}var Hn=null,zn=null,bt=!1,mr=null;function F_(i,s){var l=tr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function M_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Hn=i,zn=Ci(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Hn=i,zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=ss!==null?{id:ti,overflow:ni}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=tr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Hn=i,zn=null,!0):!1;default:return!1}}function Rp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Lp(i){if(bt){var s=zn;if(s){var l=s;if(!M_(i,s)){if(Rp(i))throw Error(n(418));s=Ci(l.nextSibling);var d=Hn;s&&M_(i,s)?F_(d,l):(i.flags=i.flags&-4097|2,bt=!1,Hn=i)}}else{if(Rp(i))throw Error(n(418));i.flags=i.flags&-4097|2,bt=!1,Hn=i}}}function B_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Hn=i}function Ec(i){if(i!==Hn)return!1;if(!bt)return B_(i),bt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Cp(i.type,i.memoizedProps)),s&&(s=zn)){if(Rp(i))throw U_(),Error(n(418));for(;s;)F_(i,s),s=Ci(s.nextSibling)}if(B_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){zn=Ci(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}zn=null}}else zn=Hn?Ci(i.stateNode.nextSibling):null;return!0}function U_(){for(var i=zn;i;)i=Ci(i.nextSibling)}function To(){zn=Hn=null,bt=!1}function Dp(i){mr===null?mr=[i]:mr.push(i)}var gF=G.ReactCurrentBatchConfig;function Qu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var d=l.stateNode}if(!d)throw Error(n(147,i));var g=d,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var O=g.refs;x===null?delete O[y]:O[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function yc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function H_(i){var s=i._init;return s(i._payload)}function z_(i){function s(z,F){if(i){var $=z.deletions;$===null?(z.deletions=[F],z.flags|=16):$.push(F)}}function l(z,F){if(!i)return null;for(;F!==null;)s(z,F),F=F.sibling;return null}function d(z,F){for(z=new Map;F!==null;)F.key!==null?z.set(F.key,F):z.set(F.index,F),F=F.sibling;return z}function g(z,F){return z=Fi(z,F),z.index=0,z.sibling=null,z}function y(z,F,$){return z.index=$,i?($=z.alternate,$!==null?($=$.index,$<F?(z.flags|=2,F):$):(z.flags|=2,F)):(z.flags|=1048576,F)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function O(z,F,$,me){return F===null||F.tag!==6?(F=Am($,z.mode,me),F.return=z,F):(F=g(F,$),F.return=z,F)}function L(z,F,$,me){var Ne=$.type;return Ne===te?se(z,F,$.props.children,me,$.key):F!==null&&(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&H_(Ne)===F.type)?(me=g(F,$.props),me.ref=Qu(z,F,$),me.return=z,me):(me=jc($.type,$.key,$.props,null,z.mode,me),me.ref=Qu(z,F,$),me.return=z,me)}function Y(z,F,$,me){return F===null||F.tag!==4||F.stateNode.containerInfo!==$.containerInfo||F.stateNode.implementation!==$.implementation?(F=vm($,z.mode,me),F.return=z,F):(F=g(F,$.children||[]),F.return=z,F)}function se(z,F,$,me,Ne){return F===null||F.tag!==7?(F=ps($,z.mode,me,Ne),F.return=z,F):(F=g(F,$),F.return=z,F)}function ce(z,F,$){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Am(""+F,z.mode,$),F.return=z,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case q:return $=jc(F.type,F.key,F.props,null,z.mode,$),$.ref=Qu(z,null,F),$.return=z,$;case B:return F=vm(F,z.mode,$),F.return=z,F;case we:var me=F._init;return ce(z,me(F._payload),$)}if(ft(F)||ee(F))return F=ps(F,z.mode,$,null),F.return=z,F;yc(z,F)}return null}function ne(z,F,$,me){var Ne=F!==null?F.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Ne!==null?null:O(z,F,""+$,me);if(typeof $=="object"&&$!==null){switch($.$$typeof){case q:return $.key===Ne?L(z,F,$,me):null;case B:return $.key===Ne?Y(z,F,$,me):null;case we:return Ne=$._init,ne(z,F,Ne($._payload),me)}if(ft($)||ee($))return Ne!==null?null:se(z,F,$,me,null);yc(z,$)}return null}function xe(z,F,$,me,Ne){if(typeof me=="string"&&me!==""||typeof me=="number")return z=z.get($)||null,O(F,z,""+me,Ne);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case q:return z=z.get(me.key===null?$:me.key)||null,L(F,z,me,Ne);case B:return z=z.get(me.key===null?$:me.key)||null,Y(F,z,me,Ne);case we:var Le=me._init;return xe(z,F,$,Le(me._payload),Ne)}if(ft(me)||ee(me))return z=z.get($)||null,se(F,z,me,Ne,null);yc(F,me)}return null}function Ae(z,F,$,me){for(var Ne=null,Le=null,De=F,Ue=F=0,Qt=null;De!==null&&Ue<$.length;Ue++){De.index>Ue?(Qt=De,De=null):Qt=De.sibling;var nt=ne(z,De,$[Ue],me);if(nt===null){De===null&&(De=Qt);break}i&&De&&nt.alternate===null&&s(z,De),F=y(nt,F,Ue),Le===null?Ne=nt:Le.sibling=nt,Le=nt,De=Qt}if(Ue===$.length)return l(z,De),bt&&os(z,Ue),Ne;if(De===null){for(;Ue<$.length;Ue++)De=ce(z,$[Ue],me),De!==null&&(F=y(De,F,Ue),Le===null?Ne=De:Le.sibling=De,Le=De);return bt&&os(z,Ue),Ne}for(De=d(z,De);Ue<$.length;Ue++)Qt=xe(De,z,Ue,$[Ue],me),Qt!==null&&(i&&Qt.alternate!==null&&De.delete(Qt.key===null?Ue:Qt.key),F=y(Qt,F,Ue),Le===null?Ne=Qt:Le.sibling=Qt,Le=Qt);return i&&De.forEach(function(Mi){return s(z,Mi)}),bt&&os(z,Ue),Ne}function ve(z,F,$,me){var Ne=ee($);if(typeof Ne!="function")throw Error(n(150));if($=Ne.call($),$==null)throw Error(n(151));for(var Le=Ne=null,De=F,Ue=F=0,Qt=null,nt=$.next();De!==null&&!nt.done;Ue++,nt=$.next()){De.index>Ue?(Qt=De,De=null):Qt=De.sibling;var Mi=ne(z,De,nt.value,me);if(Mi===null){De===null&&(De=Qt);break}i&&De&&Mi.alternate===null&&s(z,De),F=y(Mi,F,Ue),Le===null?Ne=Mi:Le.sibling=Mi,Le=Mi,De=Qt}if(nt.done)return l(z,De),bt&&os(z,Ue),Ne;if(De===null){for(;!nt.done;Ue++,nt=$.next())nt=ce(z,nt.value,me),nt!==null&&(F=y(nt,F,Ue),Le===null?Ne=nt:Le.sibling=nt,Le=nt);return bt&&os(z,Ue),Ne}for(De=d(z,De);!nt.done;Ue++,nt=$.next())nt=xe(De,z,Ue,nt.value,me),nt!==null&&(i&&nt.alternate!==null&&De.delete(nt.key===null?Ue:nt.key),F=y(nt,F,Ue),Le===null?Ne=nt:Le.sibling=nt,Le=nt);return i&&De.forEach(function(KF){return s(z,KF)}),bt&&os(z,Ue),Ne}function Dt(z,F,$,me){if(typeof $=="object"&&$!==null&&$.type===te&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case q:e:{for(var Ne=$.key,Le=F;Le!==null;){if(Le.key===Ne){if(Ne=$.type,Ne===te){if(Le.tag===7){l(z,Le.sibling),F=g(Le,$.props.children),F.return=z,z=F;break e}}else if(Le.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&H_(Ne)===Le.type){l(z,Le.sibling),F=g(Le,$.props),F.ref=Qu(z,Le,$),F.return=z,z=F;break e}l(z,Le);break}else s(z,Le);Le=Le.sibling}$.type===te?(F=ps($.props.children,z.mode,me,$.key),F.return=z,z=F):(me=jc($.type,$.key,$.props,null,z.mode,me),me.ref=Qu(z,F,$),me.return=z,z=me)}return x(z);case B:e:{for(Le=$.key;F!==null;){if(F.key===Le)if(F.tag===4&&F.stateNode.containerInfo===$.containerInfo&&F.stateNode.implementation===$.implementation){l(z,F.sibling),F=g(F,$.children||[]),F.return=z,z=F;break e}else{l(z,F);break}else s(z,F);F=F.sibling}F=vm($,z.mode,me),F.return=z,z=F}return x(z);case we:return Le=$._init,Dt(z,F,Le($._payload),me)}if(ft($))return Ae(z,F,$,me);if(ee($))return ve(z,F,$,me);yc(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,F!==null&&F.tag===6?(l(z,F.sibling),F=g(F,$),F.return=z,z=F):(l(z,F),F=Am($,z.mode,me),F.return=z,z=F),x(z)):l(z,F)}return Dt}var bo=z_(!0),j_=z_(!1),Tc=Ai(null),bc=null,_o=null,Fp=null;function Mp(){Fp=_o=bc=null}function Bp(i){var s=Tc.current;ht(Tc),i._currentValue=s}function Up(i,s,l){for(;i!==null;){var d=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),i===l)break;i=i.return}}function xo(i,s){bc=i,Fp=_o=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Jn(i){var s=i._currentValue;if(Fp!==i)if(i={context:i,memoizedValue:s,next:null},_o===null){if(bc===null)throw Error(n(308));_o=i,bc.dependencies={lanes:0,firstContext:i}}else _o=_o.next=i;return s}var us=null;function Hp(i){us===null?us=[i]:us.push(i)}function $_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,Hp(s)):(l.next=g.next,g.next=l),s.interleaved=l,ri(i,d)}function ri(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Ni=!1;function zp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function V_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ii(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Oi(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(et&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,ri(i,l)}return g=d.interleaved,g===null?(s.next=s,Hp(d)):(s.next=g.next,g.next=s),d.interleaved=s,ri(i,l)}function _c(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,tp(i,l)}}function q_(i,s){var l=i.updateQueue,d=i.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function xc(i,s,l,d){var g=i.updateQueue;Ni=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var L=O,Y=L.next;L.next=null,x===null?y=Y:x.next=Y,x=L;var se=i.alternate;se!==null&&(se=se.updateQueue,O=se.lastBaseUpdate,O!==x&&(O===null?se.firstBaseUpdate=Y:O.next=Y,se.lastBaseUpdate=L))}if(y!==null){var ce=g.baseState;x=0,se=Y=L=null,O=y;do{var ne=O.lane,xe=O.eventTime;if((d&ne)===ne){se!==null&&(se=se.next={eventTime:xe,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var Ae=i,ve=O;switch(ne=s,xe=l,ve.tag){case 1:if(Ae=ve.payload,typeof Ae=="function"){ce=Ae.call(xe,ce,ne);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ve.payload,ne=typeof Ae=="function"?Ae.call(xe,ce,ne):Ae,ne==null)break e;ce=w({},ce,ne);break e;case 2:Ni=!0}}O.callback!==null&&O.lane!==0&&(i.flags|=64,ne=g.effects,ne===null?g.effects=[O]:ne.push(O))}else xe={eventTime:xe,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},se===null?(Y=se=xe,L=ce):se=se.next=xe,x|=ne;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ne=O,O=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(se===null&&(L=ce),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);cs|=x,i.lanes=x,i.memoizedState=ce}}function Y_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var d=i[s],g=d.callback;if(g!==null){if(d.callback=null,d=l,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Xu={},Fr=Ai(Xu),Ju=Ai(Xu),Zu=Ai(Xu);function as(i){if(i===Xu)throw Error(n(174));return i}function jp(i,s){switch(ct(Zu,s),ct(Ju,i),ct(Fr,Xu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Ee(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Ee(s,i)}ht(Fr),ct(Fr,s)}function So(){ht(Fr),ht(Ju),ht(Zu)}function W_(i){as(Zu.current);var s=as(Fr.current),l=Ee(s,i.type);s!==l&&(ct(Ju,i),ct(Fr,l))}function $p(i){Ju.current===i&&(ht(Fr),ht(Ju))}var wt=Ai(0);function Sc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Vp=[];function qp(){for(var i=0;i<Vp.length;i++)Vp[i]._workInProgressVersionPrimary=null;Vp.length=0}var wc=G.ReactCurrentDispatcher,Yp=G.ReactCurrentBatchConfig,ls=0,Ct=null,Ht=null,Gt=null,Cc=!1,ea=!1,ta=0,EF=0;function ln(){throw Error(n(321))}function Wp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function Gp(i,s,l,d,g,y){if(ls=y,Ct=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,wc.current=i===null||i.memoizedState===null?_F:xF,i=l(d,g),ea){y=0;do{if(ea=!1,ta=0,25<=y)throw Error(n(301));y+=1,Gt=Ht=null,s.updateQueue=null,wc.current=SF,i=l(d,g)}while(ea)}if(wc.current=kc,s=Ht!==null&&Ht.next!==null,ls=0,Gt=Ht=Ct=null,Cc=!1,s)throw Error(n(300));return i}function Kp(){var i=ta!==0;return ta=0,i}function Mr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?Ct.memoizedState=Gt=i:Gt=Gt.next=i,Gt}function Zn(){if(Ht===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var s=Gt===null?Ct.memoizedState:Gt.next;if(s!==null)Gt=s,Ht=i;else{if(i===null)throw Error(n(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Gt===null?Ct.memoizedState=Gt=i:Gt=Gt.next=i}return Gt}function na(i,s){return typeof s=="function"?s(i):s}function Qp(i){var s=Zn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=Ht,g=d.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,d=d.baseState;var O=x=null,L=null,Y=y;do{var se=Y.lane;if((ls&se)===se)L!==null&&(L=L.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),d=Y.hasEagerState?Y.eagerState:i(d,Y.action);else{var ce={lane:se,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};L===null?(O=L=ce,x=d):L=L.next=ce,Ct.lanes|=se,cs|=se}Y=Y.next}while(Y!==null&&Y!==y);L===null?x=d:L.next=O,pr(d,s.memoizedState)||(kn=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=L,l.lastRenderedState=d}if(i=l.interleaved,i!==null){g=i;do y=g.lane,Ct.lanes|=y,cs|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Xp(i){var s=Zn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function G_(){}function K_(i,s){var l=Ct,d=Zn(),g=s(),y=!pr(d.memoizedState,g);if(y&&(d.memoizedState=g,kn=!0),d=d.queue,Jp(J_.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||Gt!==null&&Gt.memoizedState.tag&1){if(l.flags|=2048,ra(9,X_.bind(null,l,d,g,s),void 0,null),Kt===null)throw Error(n(349));(ls&30)!==0||Q_(l,s,g)}return g}function Q_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function X_(i,s,l,d){s.value=l,s.getSnapshot=d,Z_(s)&&e2(i)}function J_(i,s,l){return l(function(){Z_(s)&&e2(i)})}function Z_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(d){return!0}}function e2(i){var s=ri(i,1);s!==null&&Tr(s,i,1,-1)}function t2(i){var s=Mr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:i},s.queue=i,i=i.dispatch=bF.bind(null,Ct,i),[s.memoizedState,i]}function ra(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(d=l.next,l.next=i,i.next=d,s.lastEffect=i)),i}function n2(){return Zn().memoizedState}function Ac(i,s,l,d){var g=Mr();Ct.flags|=i,g.memoizedState=ra(1|s,l,void 0,d===void 0?null:d)}function vc(i,s,l,d){var g=Zn();d=d===void 0?null:d;var y=void 0;if(Ht!==null){var x=Ht.memoizedState;if(y=x.destroy,d!==null&&Wp(d,x.deps)){g.memoizedState=ra(s,l,y,d);return}}Ct.flags|=i,g.memoizedState=ra(1|s,l,y,d)}function r2(i,s){return Ac(8390656,8,i,s)}function Jp(i,s){return vc(2048,8,i,s)}function i2(i,s){return vc(4,2,i,s)}function s2(i,s){return vc(4,4,i,s)}function o2(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function u2(i,s,l){return l=l!=null?l.concat([i]):null,vc(4,4,o2.bind(null,s,i),l)}function Zp(){}function a2(i,s){var l=Zn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&Wp(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function l2(i,s){var l=Zn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&Wp(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function c2(i,s,l){return(ls&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=Hb(),Ct.lanes|=l,cs|=l,i.baseState=!0),s)}function yF(i,s){var l=st;st=l!==0&&4>l?l:4,i(!0);var d=Yp.transition;Yp.transition={};try{i(!1),s()}finally{st=l,Yp.transition=d}}function f2(){return Zn().memoizedState}function TF(i,s,l){var d=Li(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},d2(i))h2(s,l);else if(l=$_(i,s,l,d),l!==null){var g=gn();Tr(l,i,d,g),p2(l,s,d)}}function bF(i,s,l){var d=Li(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(d2(i))h2(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,O=y(x,l);if(g.hasEagerState=!0,g.eagerState=O,pr(O,x)){var L=s.interleaved;L===null?(g.next=g,Hp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=$_(i,s,g,d),l!==null&&(g=gn(),Tr(l,i,d,g),p2(l,s,d))}}function d2(i){var s=i.alternate;return i===Ct||s!==null&&s===Ct}function h2(i,s){ea=Cc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function p2(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,tp(i,l)}}var kc={readContext:Jn,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},_F={readContext:Jn,useCallback:function(i,s){return Mr().memoizedState=[i,s===void 0?null:s],i},useContext:Jn,useEffect:r2,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Ac(4194308,4,o2.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Ac(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ac(4,2,i,s)},useMemo:function(i,s){var l=Mr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Mr();return s=l!==void 0?l(s):s,d.memoizedState=d.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},d.queue=i,i=i.dispatch=TF.bind(null,Ct,i),[d.memoizedState,i]},useRef:function(i){var s=Mr();return i={current:i},s.memoizedState=i},useState:t2,useDebugValue:Zp,useDeferredValue:function(i){return Mr().memoizedState=i},useTransition:function(){var i=t2(!1),s=i[0];return i=yF.bind(null,i[1]),Mr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=Ct,g=Mr();if(bt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Kt===null)throw Error(n(349));(ls&30)!==0||Q_(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,r2(J_.bind(null,d,y,i),[i]),d.flags|=2048,ra(9,X_.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Mr(),s=Kt.identifierPrefix;if(bt){var l=ni,d=ti;l=(d&~(1<<32-hr(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=ta++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=EF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},xF={readContext:Jn,useCallback:a2,useContext:Jn,useEffect:Jp,useImperativeHandle:u2,useInsertionEffect:i2,useLayoutEffect:s2,useMemo:l2,useReducer:Qp,useRef:n2,useState:function(){return Qp(na)},useDebugValue:Zp,useDeferredValue:function(i){var s=Zn();return c2(s,Ht.memoizedState,i)},useTransition:function(){var i=Qp(na)[0],s=Zn().memoizedState;return[i,s]},useMutableSource:G_,useSyncExternalStore:K_,useId:f2,unstable_isNewReconciler:!1},SF={readContext:Jn,useCallback:a2,useContext:Jn,useEffect:Jp,useImperativeHandle:u2,useInsertionEffect:i2,useLayoutEffect:s2,useMemo:l2,useReducer:Xp,useRef:n2,useState:function(){return Xp(na)},useDebugValue:Zp,useDeferredValue:function(i){var s=Zn();return Ht===null?s.memoizedState=i:c2(s,Ht.memoizedState,i)},useTransition:function(){var i=Xp(na)[0],s=Zn().memoizedState;return[i,s]},useMutableSource:G_,useSyncExternalStore:K_,useId:f2,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function em(i,s,l,d){s=i.memoizedState,l=l(d,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Nc={isMounted:function(i){return(i=i._reactInternals)?ns(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=gn(),g=Li(i),y=ii(d,g);y.payload=s,l!=null&&(y.callback=l),s=Oi(i,y,g),s!==null&&(Tr(s,i,g,d),_c(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=gn(),g=Li(i),y=ii(d,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Oi(i,y,g),s!==null&&(Tr(s,i,g,d),_c(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=gn(),d=Li(i),g=ii(l,d);g.tag=2,s!=null&&(g.callback=s),s=Oi(i,g,d),s!==null&&(Tr(s,i,d,l),_c(s,i,d))}};function m2(i,s,l,d,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!$u(l,d)||!$u(g,y):!0}function g2(i,s,l){var d=!1,g=vi,y=s.contextType;return typeof y=="object"&&y!==null?y=Jn(y):(g=vn(s)?is:an.current,d=s.contextTypes,y=(d=d!=null)?go(i,g):vi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Nc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function E2(i,s,l,d){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,d),s.state!==i&&Nc.enqueueReplaceState(s,s.state,null)}function tm(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},zp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Jn(y):(y=vn(s)?is:an.current,g.context=go(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(em(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Nc.enqueueReplaceState(g,g.state,null),xc(i,l,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function wo(i,s){try{var l="",d=s;do l+=Me(d),d=d.return;while(d);var g=l}catch(y){g=`
|
|
13
13
|
Error generating stack: `+y.message+`
|
|
14
|
-
`+y.stack}return{value:i,source:s,stack:g,digest:null}}function em(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function tm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var TM=typeof WeakMap=="function"?WeakMap:Map;function g2(i,s,l){l=ei(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Lc||(Lc=!0,gm=d),tm(i,s)},l}function E2(i,s,l){l=ei(-1,l),l.tag=3;var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;l.payload=function(){return d(g)},l.callback=function(){tm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){tm(i,s),typeof d!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function y2(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new TM;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(l)||(g.add(l),i=RM.bind(null,i,s,l),s.then(i,i))}function T2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function b2(i,s,l,d,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=ei(-1,1),s.tag=2,ki(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var bM=z.ReactCurrentOwner,An=!1;function hn(i,s,l,d){s.child=i===null?H_(s,null,l,d):yo(s,i.child,l,d)}function _2(i,s,l,d,g){l=l.render;var y=s.ref;return bo(s,g),d=Yp(i,s,l,d,y,g),l=Wp(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ti(i,s,g)):(gt&&l&&Np(s),s.flags|=1,hn(i,s,d,g),s.child)}function x2(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!Sm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,S2(i,s,y,d,g)):(i=Hc(l.type,null,d,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:zu,l(x,d)&&i.ref===s.ref)return ti(i,s,g)}return s.flags|=1,i=Li(y,d),i.ref=s.ref,i.return=s,s.child=i}function S2(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if(zu(y,d)&&i.ref===s.ref)if(An=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(An=!0);else return s.lanes=i.lanes,ti(i,s,g)}return nm(i,s,l,d,g)}function w2(i,s,l){var d=s.pendingProps,g=d.children,y=i!==null?i.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(wo,Hn),Hn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,lt(wo,Hn),Hn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,lt(wo,Hn),Hn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,lt(wo,Hn),Hn|=d;return hn(i,s,g,l),s.child}function C2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function nm(i,s,l,d,g){var y=Cn(l)?ns:on.current;return y=po(s,y),bo(s,g),l=Yp(i,s,l,d,y,g),d=Wp(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ti(i,s,g)):(gt&&d&&Np(s),s.flags|=1,hn(i,s,l,g),s.child)}function A2(i,s,l,d,g){if(Cn(l)){var y=!0;fc(s)}else y=!1;if(bo(s,g),s.stateNode===null)Nc(i,s),p2(s,l,d),Zp(s,l,d,g),d=!0;else if(i===null){var x=s.stateNode,O=s.memoizedProps;x.props=O;var L=x.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=Qn(Y):(Y=Cn(l)?ns:on.current,Y=po(s,Y));var ie=l.getDerivedStateFromProps,ce=typeof ie=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==d||L!==Y)&&m2(s,x,d,Y),vi=!1;var ne=s.memoizedState;x.state=ne,bc(s,d,x,g),L=s.memoizedState,O!==d||ne!==L||wn.current||vi?(typeof ie=="function"&&(Jp(s,l,ie,d),L=s.memoizedState),(O=vi||h2(s,l,O,d,ne,L,Y))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=L),x.props=d,x.state=L,x.context=Y,d=O):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,j_(i,s),O=s.memoizedProps,Y=s.type===s.elementType?O:hr(s.type,O),x.props=Y,ce=s.pendingProps,ne=x.context,L=l.contextType,typeof L=="object"&&L!==null?L=Qn(L):(L=Cn(l)?ns:on.current,L=po(s,L));var xe=l.getDerivedStateFromProps;(ie=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==ce||ne!==L)&&m2(s,x,d,L),vi=!1,ne=s.memoizedState,x.state=ne,bc(s,d,x,g);var Ce=s.memoizedState;O!==ce||ne!==Ce||wn.current||vi?(typeof xe=="function"&&(Jp(s,l,xe,d),Ce=s.memoizedState),(Y=vi||h2(s,l,Y,d,ne,Ce,L)||!1)?(ie||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,Ce,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,Ce,L)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=Ce),x.props=d,x.state=Ce,x.context=L,d=Y):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),d=!1)}return rm(i,s,l,d,y,g)}function rm(i,s,l,d,g,y){C2(i,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&I_(s,l,!1),ti(i,s,y);d=s.stateNode,bM.current=s;var O=x&&typeof l.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,i!==null&&x?(s.child=yo(s,i.child,null,y),s.child=yo(s,null,O,y)):hn(i,s,O,y),s.memoizedState=d.state,g&&I_(s,l,!0),s.child}function v2(i){var s=i.stateNode;s.pendingContext?N_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&N_(i,s.context,!1),Hp(i,s.containerInfo)}function k2(i,s,l,d,g){return Eo(),Rp(g),s.flags|=256,hn(i,s,l,d),s.child}var im={dehydrated:null,treeContext:null,retryLane:0};function sm(i){return{baseLanes:i,cachePool:null,transitions:null}}function N2(i,s,l){var d=s.pendingProps,g=Tt.current,y=!1,x=(s.flags&128)!==0,O;if((O=x)||(O=i!==null&&i.memoizedState===null?!1:(g&2)!==0),O?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),lt(Tt,g&1),i===null)return Pp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,i=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=zc(x,d,0,null),i=ds(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=sm(l),s.memoizedState=im,i):om(s,x));if(g=i.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return _M(i,s,x,d,O,g,l);if(y){y=d.fallback,x=s.mode,g=i.child,O=g.sibling;var L={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=L,s.deletions=null):(d=Li(g,L),d.subtreeFlags=g.subtreeFlags&14680064),O!==null?y=Li(O,y):(y=ds(y,x,l,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=i.child.memoizedState,x=x===null?sm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=im,d}return y=i.child,i=y.sibling,d=Li(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=l),d.return=s,d.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=d,s.memoizedState=null,d}function om(i,s){return s=zc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function kc(i,s,l,d){return d!==null&&Rp(d),yo(s,i.child,null,l),i=om(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function _M(i,s,l,d,g,y,x){if(l)return s.flags&256?(s.flags&=-257,d=em(Error(n(422))),kc(i,s,x,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=zc({mode:"visible",children:d.children},g,0,null),y=ds(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&yo(s,i.child,null,x),s.child.memoizedState=sm(x),s.memoizedState=im,y);if((s.mode&1)===0)return kc(i,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var O=d.dgst;return d=O,y=Error(n(419)),d=em(y,d,void 0),kc(i,s,x,d)}if(O=(x&i.childLanes)!==0,An||O){if(d=Yt,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Zr(i,g),gr(d,i,g,-1))}return xm(),d=em(Error(n(421))),kc(i,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=LM.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Un=Si(g.nextSibling),Bn=s,gt=!0,dr=null,i!==null&&(Gn[Kn++]=Xr,Gn[Kn++]=Jr,Gn[Kn++]=rs,Xr=i.id,Jr=i.overflow,rs=s),s=om(s,d.children),s.flags|=4096,s)}function O2(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Fp(i.return,s,l)}function um(i,s,l,d,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=l,y.tailMode=g)}function I2(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(hn(i,s,d.children,l),d=Tt.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&O2(i,l,s);else if(i.tag===19)O2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}d&=1}if(lt(Tt,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&_c(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),um(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&_c(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}um(s,!0,l,null,y);break;case"together":um(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Nc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ti(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),as|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Li(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Li(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function xM(i,s,l){switch(s.tag){case 3:v2(s),Eo();break;case 5:q_(s);break;case 1:Cn(s.type)&&fc(s);break;case 4:Hp(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;lt(Ec,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(lt(Tt,Tt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?N2(i,s,l):(lt(Tt,Tt.current&1),i=ti(i,s,l),i!==null?i.sibling:null);lt(Tt,Tt.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return I2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),lt(Tt,Tt.current),d)break;return null;case 22:case 23:return s.lanes=0,w2(i,s,l)}return ti(i,s,l)}var P2,am,R2,L2;P2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},am=function(){},R2=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,os(Rr.current);var y=null;switch(l){case"input":g=sn(i,g),d=sn(i,d),y=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),y=[];break;case"textarea":g=Cu(i,g),d=Cu(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=ac)}Xt(l,d);var x;l=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(x in O)O.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(o.hasOwnProperty(Y)?y||(y=[]):(y=y||[]).push(Y,null));for(Y in d){var L=d[Y];if(O=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&L!==O&&(L!=null||O!=null))if(Y==="style")if(O){for(x in O)!O.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in L)L.hasOwnProperty(x)&&O[x]!==L[x]&&(l||(l={}),l[x]=L[x])}else l||(y||(y=[]),y.push(Y,l)),l=L;else Y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,O=O?O.__html:void 0,L!=null&&O!==L&&(y=y||[]).push(Y,L)):Y==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(Y,""+L):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(o.hasOwnProperty(Y)?(L!=null&&Y==="onScroll"&&ct("scroll",i),y||O===L||(y=[])):(y=y||[]).push(Y,L))}l&&(y=y||[]).push("style",l);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},L2=function(i,s,l,d){l!==d&&(s.flags|=4)};function na(i,s){if(!gt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:d.sibling=null}}function an(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,d=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=d,i.childLanes=l,s}function SM(i,s,l){var d=s.pendingProps;switch(Op(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return Cn(s.type)&&cc(),an(s),null;case 3:return d=s.stateNode,_o(),ft(wn),ft(on),$p(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(mc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,dr!==null&&(Tm(dr),dr=null))),am(i,s),an(s),null;case 5:zp(s);var g=os(Xu.current);if(l=s.type,i!==null&&s.stateNode!=null)R2(i,s,l,d,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return an(s),null}if(i=os(Rr.current),mc(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Pr]=s,d[Yu]=y,i=(s.mode&1)!==0,l){case"dialog":ct("cancel",d),ct("close",d);break;case"iframe":case"object":case"embed":ct("load",d);break;case"video":case"audio":for(g=0;g<$u.length;g++)ct($u[g],d);break;case"source":ct("error",d);break;case"img":case"image":case"link":ct("error",d),ct("load",d);break;case"details":ct("toggle",d);break;case"input":Kt(d,y),ct("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},ct("invalid",d);break;case"textarea":Bl(d,y),ct("invalid",d)}Xt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var O=y[x];x==="children"?typeof O=="string"?d.textContent!==O&&(y.suppressHydrationWarning!==!0&&uc(d.textContent,O,i),g=["children",O]):typeof O=="number"&&d.textContent!==""+O&&(y.suppressHydrationWarning!==!0&&uc(d.textContent,O,i),g=["children",""+O]):o.hasOwnProperty(x)&&O!=null&&x==="onScroll"&&ct("scroll",d)}switch(l){case"input":Xe(d),Nt(d,y,!0);break;case"textarea":Xe(d),Hl(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=ac)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof d.is=="string"?i=x.createElement(l,{is:d.is}):(i=x.createElement(l),l==="select"&&(x=i,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):i=x.createElementNS(i,l),i[Pr]=s,i[Yu]=d,P2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Or(l,d),l){case"dialog":ct("cancel",i),ct("close",i),g=d;break;case"iframe":case"object":case"embed":ct("load",i),g=d;break;case"video":case"audio":for(g=0;g<$u.length;g++)ct($u[g],i);g=d;break;case"source":ct("error",i),g=d;break;case"img":case"image":case"link":ct("error",i),ct("load",i),g=d;break;case"details":ct("toggle",i),g=d;break;case"input":Kt(i,d),g=sn(i,d),ct("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),ct("invalid",i);break;case"textarea":Bl(i,d),g=Cu(i,d),ct("invalid",i);break;default:g=d}Xt(l,g),O=g;for(y in O)if(O.hasOwnProperty(y)){var L=O[y];y==="style"?gi(i,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&We(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&Ze(i,L):typeof L=="number"&&Ze(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&ct("scroll",i):L!=null&&D(i,y,L,x))}switch(l){case"input":Xe(i),Nt(i,d,!1);break;case"textarea":Xe(i),Hl(i);break;case"option":d.value!=null&&i.setAttribute("value",""+Ve(d.value));break;case"select":i.multiple=!!d.multiple,y=d.value,y!=null?mi(i,!!d.multiple,y,!1):d.defaultValue!=null&&mi(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=ac)}switch(l){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return an(s),null;case 6:if(i&&s.stateNode!=null)L2(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=os(Xu.current),os(Rr.current),mc(s)){if(d=s.stateNode,l=s.memoizedProps,d[Pr]=s,(y=d.nodeValue!==l)&&(i=Bn,i!==null))switch(i.tag){case 3:uc(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&uc(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Pr]=s,s.stateNode=d}return an(s),null;case 13:if(ft(Tt),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(gt&&Un!==null&&(s.mode&1)!==0&&(s.flags&128)===0)F_(),Eo(),s.flags|=98560,y=!1;else if(y=mc(s),d!==null&&d.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Pr]=s}else Eo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),y=!1}else dr!==null&&(Tm(dr),dr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(d=d!==null,d!==(i!==null&&i.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Tt.current&1)!==0?Bt===0&&(Bt=3):xm())),s.updateQueue!==null&&(s.flags|=4),an(s),null);case 4:return _o(),am(i,s),i===null&&Vu(s.stateNode.containerInfo),an(s),null;case 10:return Mp(s.type._context),an(s),null;case 17:return Cn(s.type)&&cc(),an(s),null;case 19:if(ft(Tt),y=s.memoizedState,y===null)return an(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)na(y,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=_c(i),x!==null){for(s.flags|=128,na(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=l,l=s.child;l!==null;)y=l,i=d,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 lt(Tt,Tt.current&1|2),s.child}i=i.sibling}y.tail!==null&&Ot()>Co&&(s.flags|=128,d=!0,na(y,!1),s.lanes=4194304)}else{if(!d)if(i=_c(x),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),na(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!gt)return an(s),null}else 2*Ot()-y.renderingStartTime>Co&&l!==1073741824&&(s.flags|=128,d=!0,na(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Ot(),s.sibling=null,l=Tt.current,lt(Tt,d?l&1|2:l&1),s):(an(s),null);case 22:case 23:return _m(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Hn&1073741824)!==0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function wM(i,s){switch(Op(s),s.tag){case 1:return Cn(s.type)&&cc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return _o(),ft(wn),ft(on),$p(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return zp(s),null;case 13:if(ft(Tt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Eo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ft(Tt),null;case 4:return _o(),null;case 10:return Mp(s.type._context),null;case 22:case 23:return _m(),null;case 24:return null;default:return null}}var Oc=!1,ln=!1,CM=typeof WeakSet=="function"?WeakSet:Set,we=null;function So(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){St(i,s,d)}else l.current=null}function lm(i,s,l){try{l()}catch(d){St(i,s,d)}}var D2=!1;function AM(i,s){if(_p=Ql,i=h_(),hp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{l.nodeType,y.nodeType}catch(ge){l=null;break e}var x=0,O=-1,L=-1,Y=0,ie=0,ce=i,ne=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(O=x+g),ce!==y||d!==0&&ce.nodeType!==3||(L=x+d),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ne=ce,ce=xe;for(;;){if(ce===i)break t;if(ne===l&&++Y===g&&(O=x),ne===y&&++ie===d&&(L=x),(xe=ce.nextSibling)!==null)break;ce=ne,ne=ce.parentNode}ce=xe}l=O===-1||L===-1?null:{start:O,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(xp={focusedElem:i,selectionRange:l},Ql=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var Ce=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var ve=Ce.memoizedProps,It=Ce.memoizedState,j=s.stateNode,M=j.getSnapshotBeforeUpdate(s.elementType===s.type?ve:hr(s.type,ve),It);j.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){St(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return Ce=D2,D2=!1,Ce}function ra(i,s,l){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&lm(s,l,y)}g=g.next}while(g!==d)}}function Ic(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var d=l.create;l.destroy=d()}l=l.next}while(l!==s)}}function cm(i){var s=i.ref;if(s!==null){var l=i.stateNode;switch(i.tag){case 5:i=l;break;default:i=l}typeof s=="function"?s(i):s.current=i}}function M2(i){var s=i.alternate;s!==null&&(i.alternate=null,M2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Pr],delete s[Yu],delete s[Ap],delete s[aM],delete s[lM])),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 F2(i){return i.tag===5||i.tag===3||i.tag===4}function B2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||F2(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 fm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=ac));else if(d!==4&&(i=i.child,i!==null))for(fm(i,s,l),i=i.sibling;i!==null;)fm(i,s,l),i=i.sibling}function dm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(d!==4&&(i=i.child,i!==null))for(dm(i,s,l),i=i.sibling;i!==null;)dm(i,s,l),i=i.sibling}var Jt=null,pr=!1;function Ni(i,s,l){for(l=l.child;l!==null;)U2(i,s,l),l=l.sibling}function U2(i,s,l){if(Ir&&typeof Ir.onCommitFiberUnmount=="function")try{Ir.onCommitFiberUnmount(Vl,l)}catch(O){}switch(l.tag){case 5:ln||So(l,s);case 6:var d=Jt,g=pr;Jt=null,Ni(i,s,l),Jt=d,pr=g,Jt!==null&&(pr?(i=Jt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Jt.removeChild(l.stateNode));break;case 18:Jt!==null&&(pr?(i=Jt,l=l.stateNode,i.nodeType===8?Cp(i.parentNode,l):i.nodeType===1&&Cp(i,l),Du(i)):Cp(Jt,l.stateNode));break;case 4:d=Jt,g=pr,Jt=l.stateNode.containerInfo,pr=!0,Ni(i,s,l),Jt=d,pr=g;break;case 0:case 11:case 14:case 15:if(!ln&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&lm(l,s,x),g=g.next}while(g!==d)}Ni(i,s,l);break;case 1:if(!ln&&(So(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(O){St(l,s,O)}Ni(i,s,l);break;case 21:Ni(i,s,l);break;case 22:l.mode&1?(ln=(d=ln)||l.memoizedState!==null,Ni(i,s,l),ln=d):Ni(i,s,l);break;default:Ni(i,s,l)}}function H2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new CM),s.forEach(function(d){var g=DM.bind(null,i,d);l.has(d)||(l.add(d),d.then(g,g))})}}function mr(i,s){var l=s.deletions;if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];try{var y=i,x=s,O=x;e:for(;O!==null;){switch(O.tag){case 5:Jt=O.stateNode,pr=!1;break e;case 3:Jt=O.stateNode.containerInfo,pr=!0;break e;case 4:Jt=O.stateNode.containerInfo,pr=!0;break e}O=O.return}if(Jt===null)throw Error(n(160));U2(y,x,g),Jt=null,pr=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(Y){St(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)z2(s,i),s=s.sibling}function z2(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(mr(s,i),Dr(i),d&4){try{ra(3,i,i.return),Ic(3,i)}catch(ve){St(i,i.return,ve)}try{ra(5,i,i.return)}catch(ve){St(i,i.return,ve)}}break;case 1:mr(s,i),Dr(i),d&512&&l!==null&&So(l,l.return);break;case 5:if(mr(s,i),Dr(i),d&512&&l!==null&&So(l,l.return),i.flags&32){var g=i.stateNode;try{Ze(g,"")}catch(ve){St(i,i.return,ve)}}if(d&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,O=i.type,L=i.updateQueue;if(i.updateQueue=null,L!==null)try{O==="input"&&y.type==="radio"&&y.name!=null&&xt(g,y),Or(O,x);var Y=Or(O,y);for(x=0;x<L.length;x+=2){var ie=L[x],ce=L[x+1];ie==="style"?gi(g,ce):ie==="dangerouslySetInnerHTML"?We(g,ce):ie==="children"?Ze(g,ce):D(g,ie,ce,Y)}switch(O){case"input":Dn(g,y);break;case"textarea":Ul(g,y);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?mi(g,!!y.multiple,xe,!1):ne!==!!y.multiple&&(y.defaultValue!=null?mi(g,!!y.multiple,y.defaultValue,!0):mi(g,!!y.multiple,y.multiple?[]:"",!1))}g[Yu]=y}catch(ve){St(i,i.return,ve)}}break;case 6:if(mr(s,i),Dr(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ve){St(i,i.return,ve)}}break;case 3:if(mr(s,i),Dr(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Du(s.containerInfo)}catch(ve){St(i,i.return,ve)}break;case 4:mr(s,i),Dr(i);break;case 13:mr(s,i),Dr(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(mm=Ot())),d&4&&H2(i);break;case 22:if(ie=l!==null&&l.memoizedState!==null,i.mode&1?(ln=(Y=ln)||ie,mr(s,i),ln=Y):mr(s,i),Dr(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!ie&&(i.mode&1)!==0)for(we=i,ie=i.child;ie!==null;){for(ce=we=ie;we!==null;){switch(ne=we,xe=ne.child,ne.tag){case 0:case 11:case 14:case 15:ra(4,ne,ne.return);break;case 1:So(ne,ne.return);var Ce=ne.stateNode;if(typeof Ce.componentWillUnmount=="function"){d=ne,l=ne.return;try{s=d,Ce.props=s.memoizedProps,Ce.state=s.memoizedState,Ce.componentWillUnmount()}catch(ve){St(d,l,ve)}}break;case 5:So(ne,ne.return);break;case 22:if(ne.memoizedState!==null){V2(ce);continue}}xe!==null?(xe.return=ne,we=xe):V2(ce)}ie=ie.sibling}e:for(ie=null,ce=i;;){if(ce.tag===5){if(ie===null){ie=ce;try{g=ce.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(O=ce.stateNode,L=ce.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,O.style.display=Wn("display",x))}catch(ve){St(i,i.return,ve)}}}else if(ce.tag===6){if(ie===null)try{ce.stateNode.nodeValue=Y?"":ce.memoizedProps}catch(ve){St(i,i.return,ve)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;ie===ce&&(ie=null),ce=ce.return}ie===ce&&(ie=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:mr(s,i),Dr(i),d&4&&H2(i);break;case 21:break;default:mr(s,i),Dr(i)}}function Dr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(F2(l)){var d=l;break e}l=l.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Ze(g,""),d.flags&=-33);var y=B2(i);dm(i,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,O=B2(i);fm(i,O,x);break;default:throw Error(n(161))}}catch(L){St(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function vM(i,s,l){we=i,j2(i)}function j2(i,s,l){for(var d=(i.mode&1)!==0;we!==null;){var g=we,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Oc;if(!x){var O=g.alternate,L=O!==null&&O.memoizedState!==null||ln;O=Oc;var Y=ln;if(Oc=x,(ln=L)&&!Y)for(we=g;we!==null;)x=we,L=x.child,x.tag===22&&x.memoizedState!==null?q2(g):L!==null?(L.return=x,we=L):q2(g);for(;y!==null;)we=y,j2(y),y=y.sibling;we=g,Oc=O,ln=Y}$2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,we=y):$2(i)}}function $2(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:ln||Ic(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!ln)if(l===null)d.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:hr(s.type,l.memoizedProps);d.componentDidUpdate(g,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&V_(s,y,d);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}V_(s,x,l)}break;case 5:var O=s.stateNode;if(l===null&&s.flags&4){l=O;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&l.focus();break;case"img":L.src&&(l.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var ie=Y.memoizedState;if(ie!==null){var ce=ie.dehydrated;ce!==null&&Du(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ln||s.flags&512&&cm(s)}catch(ne){St(s,s.return,ne)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function V2(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var l=s.sibling;if(l!==null){l.return=s.return,we=l;break}we=s.return}}function q2(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Ic(4,s)}catch(L){St(s,l,L)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(L){St(s,g,L)}}var y=s.return;try{cm(s)}catch(L){St(s,y,L)}break;case 5:var x=s.return;try{cm(s)}catch(L){St(s,x,L)}}}catch(L){St(s,s.return,L)}if(s===i){we=null;break}var O=s.sibling;if(O!==null){O.return=s.return,we=O;break}we=s.return}}var kM=Math.ceil,Pc=z.ReactCurrentDispatcher,hm=z.ReactCurrentOwner,Jn=z.ReactCurrentBatchConfig,et=0,Yt=null,Mt=null,Zt=0,Hn=0,wo=wi(0),Bt=0,ia=null,as=0,Rc=0,pm=0,sa=null,vn=null,mm=0,Co=1/0,ni=null,Lc=!1,gm=null,Oi=null,Dc=!1,Ii=null,Mc=0,oa=0,Em=null,Fc=-1,Bc=0;function pn(){return(et&6)!==0?Ot():Fc!==-1?Fc:Fc=Ot()}function Pi(i){return(i.mode&1)===0?1:(et&2)!==0&&Zt!==0?Zt&-Zt:fM.transition!==null?(Bc===0&&(Bc=Bb()),Bc):(i=it,i!==0||(i=window.event,i=i===void 0?16:Wb(i.type)),i)}function gr(i,s,l,d){if(50<oa)throw oa=0,Em=null,Error(n(185));Ou(i,l,d),((et&2)===0||i!==Yt)&&(i===Yt&&((et&2)===0&&(Rc|=l),Bt===4&&Ri(i,Zt)),kn(i,d),l===1&&et===0&&(s.mode&1)===0&&(Co=Ot()+500,dc&&Ai()))}function kn(i,s){var l=i.callbackNode;f8(i,s);var d=Wl(i,i===Yt?Zt:0);if(d===0)l!==null&&Db(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&Db(l),s===1)i.tag===0?cM(W2.bind(null,i)):P_(W2.bind(null,i)),oM(function(){(et&6)===0&&Ai()}),l=null;else{switch(Ub(d)){case 1:l=Qh;break;case 4:l=Mb;break;case 16:l=$l;break;case 536870912:l=Fb;break;default:l=$l}l=tx(l,Y2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Y2(i,s){if(Fc=-1,Bc=0,(et&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ao()&&i.callbackNode!==l)return null;var d=Wl(i,i===Yt?Zt:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=Uc(i,d);else{s=d;var g=et;et|=2;var y=K2();(Yt!==i||Zt!==s)&&(ni=null,Co=Ot()+500,cs(i,s));do try{IM();break}catch(O){G2(i,O)}while(!0);Dp(),Pc.current=y,et=g,Mt!==null?s=0:(Yt=null,Zt=0,s=Bt)}if(s!==0){if(s===2&&(g=Xh(i),g!==0&&(d=g,s=ym(i,g))),s===1)throw l=ia,cs(i,0),Ri(i,d),kn(i,Ot()),l;if(s===6)Ri(i,d);else{if(g=i.current.alternate,(d&30)===0&&!NM(g)&&(s=Uc(i,d),s===2&&(y=Xh(i),y!==0&&(d=y,s=ym(i,y))),s===1))throw l=ia,cs(i,0),Ri(i,d),kn(i,Ot()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:fs(i,vn,ni);break;case 3:if(Ri(i,d),(d&130023424)===d&&(s=mm+500-Ot(),10<s)){if(Wl(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){pn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=wp(fs.bind(null,i,vn,ni),s);break}fs(i,vn,ni);break;case 4:if(Ri(i,d),(d&4194240)===d)break;for(s=i.eventTimes,g=-1;0<d;){var x=31-cr(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=Ot()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*kM(d/1960))-d,10<d){i.timeoutHandle=wp(fs.bind(null,i,vn,ni),d);break}fs(i,vn,ni);break;case 5:fs(i,vn,ni);break;default:throw Error(n(329))}}}return kn(i,Ot()),i.callbackNode===l?Y2.bind(null,i):null}function ym(i,s){var l=sa;return i.current.memoizedState.isDehydrated&&(cs(i,s).flags|=256),i=Uc(i,s),i!==2&&(s=vn,vn=l,s!==null&&Tm(s)),i}function Tm(i){vn===null?vn=i:vn.push.apply(vn,i)}function NM(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var d=0;d<l.length;d++){var g=l[d],y=g.getSnapshot;g=g.value;try{if(!fr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ri(i,s){for(s&=~pm,s&=~Rc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-cr(s),d=1<<l;i[l]=-1,s&=~d}}function W2(i){if((et&6)!==0)throw Error(n(327));Ao();var s=Wl(i,0);if((s&1)===0)return kn(i,Ot()),null;var l=Uc(i,s);if(i.tag!==0&&l===2){var d=Xh(i);d!==0&&(s=d,l=ym(i,d))}if(l===1)throw l=ia,cs(i,0),Ri(i,s),kn(i,Ot()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,fs(i,vn,ni),kn(i,Ot()),null}function bm(i,s){var l=et;et|=1;try{return i(s)}finally{et=l,et===0&&(Co=Ot()+500,dc&&Ai())}}function ls(i){Ii!==null&&Ii.tag===0&&(et&6)===0&&Ao();var s=et;et|=1;var l=Jn.transition,d=it;try{if(Jn.transition=null,it=1,i)return i()}finally{it=d,Jn.transition=l,et=s,(et&6)===0&&Ai()}}function _m(){Hn=wo.current,ft(wo)}function cs(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,sM(l)),Mt!==null)for(l=Mt.return;l!==null;){var d=l;switch(Op(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&cc();break;case 3:_o(),ft(wn),ft(on),$p();break;case 5:zp(d);break;case 4:_o();break;case 13:ft(Tt);break;case 19:ft(Tt);break;case 10:Mp(d.type._context);break;case 22:case 23:_m()}l=l.return}if(Yt=i,Mt=i=Li(i.current,null),Zt=Hn=s,Bt=0,ia=null,pm=Rc=as=0,vn=sa=null,ss!==null){for(s=0;s<ss.length;s++)if(l=ss[s],d=l.interleaved,d!==null){l.interleaved=null;var g=d.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}l.pending=d}ss=null}return i}function G2(i,s){do{var l=Mt;try{if(Dp(),xc.current=Ac,Sc){for(var d=bt.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Sc=!1}if(us=0,qt=Ft=bt=null,Ju=!1,Zu=0,hm.current=null,l===null||l.return===null){Bt=1,ia=s,Mt=null;break}e:{var y=i,x=l.return,O=l,L=s;if(s=Zt,O.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Y=L,ie=O,ce=ie.tag;if((ie.mode&1)===0&&(ce===0||ce===11||ce===15)){var ne=ie.alternate;ne?(ie.updateQueue=ne.updateQueue,ie.memoizedState=ne.memoizedState,ie.lanes=ne.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var xe=T2(x);if(xe!==null){xe.flags&=-257,b2(xe,x,O,y,s),xe.mode&1&&y2(y,Y,s),s=xe,L=Y;var Ce=s.updateQueue;if(Ce===null){var ve=new Set;ve.add(L),s.updateQueue=ve}else Ce.add(L);break e}else{if((s&1)===0){y2(y,Y,s),xm();break e}L=Error(n(426))}}else if(gt&&O.mode&1){var It=T2(x);if(It!==null){(It.flags&65536)===0&&(It.flags|=256),b2(It,x,O,y,s),Rp(xo(L,O));break e}}y=L=xo(L,O),Bt!==4&&(Bt=2),sa===null?sa=[y]:sa.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var j=g2(y,L,s);$_(y,j);break e;case 1:O=L;var M=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Oi===null||!Oi.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var ge=E2(y,O,s);$_(y,ge);break e}}y=y.return}while(y!==null)}X2(l)}catch(ke){s=ke,Mt===l&&l!==null&&(Mt=l=l.return);continue}break}while(!0)}function K2(){var i=Pc.current;return Pc.current=Ac,i===null?Ac:i}function xm(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Yt===null||(as&268435455)===0&&(Rc&268435455)===0||Ri(Yt,Zt)}function Uc(i,s){var l=et;et|=2;var d=K2();(Yt!==i||Zt!==s)&&(ni=null,cs(i,s));do try{OM();break}catch(g){G2(i,g)}while(!0);if(Dp(),et=l,Pc.current=d,Mt!==null)throw Error(n(261));return Yt=null,Zt=0,Bt}function OM(){for(;Mt!==null;)Q2(Mt)}function IM(){for(;Mt!==null&&!n8();)Q2(Mt)}function Q2(i){var s=ex(i.alternate,i,Hn);i.memoizedProps=i.pendingProps,s===null?X2(i):Mt=s,hm.current=null}function X2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=SM(l,s,Hn),l!==null){Mt=l;return}}else{if(l=wM(l,s),l!==null){l.flags&=32767,Mt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,Mt=null;return}}if(s=s.sibling,s!==null){Mt=s;return}Mt=s=i}while(s!==null);Bt===0&&(Bt=5)}function fs(i,s,l){var d=it,g=Jn.transition;try{Jn.transition=null,it=1,PM(i,s,l,d)}finally{Jn.transition=g,it=d}return null}function PM(i,s,l,d){do Ao();while(Ii!==null);if((et&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(d8(i,y),i===Yt&&(Mt=Yt=null,Zt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Dc||(Dc=!0,tx($l,function(){return Ao(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=Jn.transition,Jn.transition=null;var x=it;it=1;var O=et;et|=4,hm.current=null,AM(i,l),z2(l,i),J8(xp),Ql=!!_p,xp=_p=null,i.current=l,vM(l),r8(),et=O,it=x,Jn.transition=y}else i.current=l;if(Dc&&(Dc=!1,Ii=i,Mc=g),y=i.pendingLanes,y===0&&(Oi=null),o8(l.stateNode),kn(i,Ot()),s!==null)for(d=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],d(g.value,{componentStack:g.stack,digest:g.digest});if(Lc)throw Lc=!1,i=gm,gm=null,i;return(Mc&1)!==0&&i.tag!==0&&Ao(),y=i.pendingLanes,(y&1)!==0?i===Em?oa++:(oa=0,Em=i):oa=0,Ai(),null}function Ao(){if(Ii!==null){var i=Ub(Mc),s=Jn.transition,l=it;try{if(Jn.transition=null,it=16>i?16:i,Ii===null)var d=!1;else{if(i=Ii,Ii=null,Mc=0,(et&6)!==0)throw Error(n(331));var g=et;for(et|=4,we=i.current;we!==null;){var y=we,x=y.child;if((we.flags&16)!==0){var O=y.deletions;if(O!==null){for(var L=0;L<O.length;L++){var Y=O[L];for(we=Y;we!==null;){var ie=we;switch(ie.tag){case 0:case 11:case 15:ra(8,ie,y)}var ce=ie.child;if(ce!==null)ce.return=ie,we=ce;else for(;we!==null;){ie=we;var ne=ie.sibling,xe=ie.return;if(M2(ie),ie===Y){we=null;break}if(ne!==null){ne.return=xe,we=ne;break}we=xe}}}var Ce=y.alternate;if(Ce!==null){var ve=Ce.child;if(ve!==null){Ce.child=null;do{var It=ve.sibling;ve.sibling=null,ve=It}while(ve!==null)}}we=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,we=x;else e:for(;we!==null;){if(y=we,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ra(9,y,y.return)}var j=y.sibling;if(j!==null){j.return=y.return,we=j;break e}we=y.return}}var M=i.current;for(we=M;we!==null;){x=we;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,we=V;else e:for(x=M;we!==null;){if(O=we,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Ic(9,O)}}catch(ke){St(O,O.return,ke)}if(O===x){we=null;break e}var ge=O.sibling;if(ge!==null){ge.return=O.return,we=ge;break e}we=O.return}}if(et=g,Ai(),Ir&&typeof Ir.onPostCommitFiberRoot=="function")try{Ir.onPostCommitFiberRoot(Vl,i)}catch(ke){}d=!0}return d}finally{it=l,Jn.transition=s}}return!1}function J2(i,s,l){s=xo(l,s),s=g2(i,s,1),i=ki(i,s,1),s=pn(),i!==null&&(Ou(i,1,s),kn(i,s))}function St(i,s,l){if(i.tag===3)J2(i,i,l);else for(;s!==null;){if(s.tag===3){J2(s,i,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Oi===null||!Oi.has(d))){i=xo(l,i),i=E2(s,i,1),s=ki(s,i,1),i=pn(),s!==null&&(Ou(s,1,i),kn(s,i));break}}s=s.return}}function RM(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=pn(),i.pingedLanes|=i.suspendedLanes&l,Yt===i&&(Zt&l)===l&&(Bt===4||Bt===3&&(Zt&130023424)===Zt&&500>Ot()-mm?cs(i,0):pm|=l),kn(i,s)}function Z2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Yl,Yl<<=1,(Yl&130023424)===0&&(Yl=4194304)));var l=pn();i=Zr(i,s),i!==null&&(Ou(i,s,l),kn(i,l))}function LM(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Z2(i,l)}function DM(i,s){var l=0;switch(i.tag){case 13:var d=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:d=i.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Z2(i,l)}var ex;ex=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||wn.current)An=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return An=!1,xM(i,s,l);An=(i.flags&131072)!==0}else An=!1,gt&&(s.flags&1048576)!==0&&R_(s,pc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Nc(i,s),i=s.pendingProps;var g=po(s,on.current);bo(s,l),g=Yp(null,s,d,i,g,l);var y=Wp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Cn(d)?(y=!0,fc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Up(s),g.updater=vc,s.stateNode=g,g._reactInternals=s,Zp(s,d,i,l),s=rm(null,s,d,!0,y,l)):(s.tag=0,gt&&y&&Np(s),hn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(Nc(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=FM(d),i=hr(d,i),g){case 0:s=nm(null,s,d,i,l);break e;case 1:s=A2(null,s,d,i,l);break e;case 11:s=_2(null,s,d,i,l);break e;case 14:s=x2(null,s,d,hr(d.type,i),l);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:hr(d,g),nm(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:hr(d,g),A2(i,s,d,g,l);case 3:e:{if(v2(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,j_(i,s),bc(s,d,null,l);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=xo(Error(n(423)),s),s=k2(i,s,d,l,g);break e}else if(d!==g){g=xo(Error(n(424)),s),s=k2(i,s,d,l,g);break e}else for(Un=Si(s.stateNode.containerInfo.firstChild),Bn=s,gt=!0,dr=null,l=H_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Eo(),d===g){s=ti(i,s,l);break e}hn(i,s,d,l)}s=s.child}return s;case 5:return q_(s),i===null&&Pp(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Sp(d,g)?x=null:y!==null&&Sp(d,y)&&(s.flags|=32),C2(i,s),hn(i,s,x,l),s.child;case 6:return i===null&&Pp(s),null;case 13:return N2(i,s,l);case 4:return Hp(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=yo(s,null,d,l):hn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:hr(d,g),_2(i,s,d,g,l);case 7:return hn(i,s,s.pendingProps,l),s.child;case 8:return hn(i,s,s.pendingProps.children,l),s.child;case 12:return hn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,lt(Ec,d._currentValue),d._currentValue=x,y!==null)if(fr(y.value,x)){if(y.children===g.children&&!wn.current){s=ti(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var O=y.dependencies;if(O!==null){x=y.child;for(var L=O.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=ei(-1,l&-l),L.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var ie=Y.pending;ie===null?L.next=L:(L.next=ie.next,ie.next=L),Y.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Fp(y.return,l,s),O.lanes|=l;break}L=L.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,O=x.alternate,O!==null&&(O.lanes|=l),Fp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}hn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,bo(s,l),g=Qn(g),d=d(g),s.flags|=1,hn(i,s,d,l),s.child;case 14:return d=s.type,g=hr(d,s.pendingProps),g=hr(d.type,g),x2(i,s,d,g,l);case 15:return S2(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:hr(d,g),Nc(i,s),s.tag=1,Cn(d)?(i=!0,fc(s)):i=!1,bo(s,l),p2(s,d,g),Zp(s,d,g,l),rm(null,s,d,!0,i,l);case 19:return I2(i,s,l);case 22:return w2(i,s,l)}throw Error(n(156,s.tag))};function tx(i,s){return Lb(i,s)}function MM(i,s,l,d){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(i,s,l,d){return new MM(i,s,l,d)}function Sm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function FM(i){if(typeof i=="function")return Sm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ae)return 11;if(i===ye)return 14}return 2}function Li(i,s){var l=i.alternate;return l===null?(l=Zn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Hc(i,s,l,d,g,y){var x=2;if(d=i,typeof i=="function")Sm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return ds(l.children,g,y,s);case Te:x=8,g|=8;break;case Se:return i=Zn(12,l,s,g|2),i.elementType=Se,i.lanes=y,i;case le:return i=Zn(13,l,s,g),i.elementType=le,i.lanes=y,i;case de:return i=Zn(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return zc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case fe:x=9;break e;case ae:x=11;break e;case ye:x=14;break e;case Ae:x=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Zn(x,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function ds(i,s,l,d){return i=Zn(7,i,d,s),i.lanes=l,i}function zc(i,s,l,d){return i=Zn(22,i,d,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function wm(i,s,l){return i=Zn(6,i,null,s),i.lanes=l,i}function Cm(i,s,l){return s=Zn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function BM(i,s,l,d,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jh(0),this.expirationTimes=Jh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jh(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Am(i,s,l,d,g,y,x,O,L){return i=new BM(i,s,l,O,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=Zn(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Up(y),i}function UM(i,s,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:i,containerInfo:s,implementation:l}}function nx(i){if(!i)return Ci;i=i._reactInternals;e:{if(es(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Cn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Cn(l))return O_(i,l,s)}return s}function rx(i,s,l,d,g,y,x,O,L){return i=Am(l,d,!0,i,g,y,x,O,L),i.context=nx(null),l=i.current,d=pn(),g=Pi(l),y=ei(d,g),y.callback=s!=null?s:null,ki(l,y,g),i.current.lanes=g,Ou(i,g,d),kn(i,d),i}function jc(i,s,l,d){var g=s.current,y=pn(),x=Pi(g);return l=nx(l),s.context===null?s.context=l:s.pendingContext=l,s=ei(y,x),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=ki(g,s,x),i!==null&&(gr(i,g,x,y),Tc(i,g,x)),x}function $c(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function ix(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function vm(i,s){ix(i,s),(i=i.alternate)&&ix(i,s)}function HM(){return null}var sx=typeof reportError=="function"?reportError:function(i){console.error(i)};function km(i){this._internalRoot=i}Vc.prototype.render=km.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));jc(i,s,null,null)},Vc.prototype.unmount=km.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ls(function(){jc(null,i,null,null)}),s[Kr]=null}};function Vc(i){this._internalRoot=i}Vc.prototype.unstable_scheduleHydration=function(i){if(i){var s=jb();i={blockedOn:null,target:i,priority:s};for(var l=0;l<bi.length&&s!==0&&s<bi[l].priority;l++);bi.splice(l,0,i),l===0&&qb(i)}};function Nm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function qc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ox(){}function zM(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=$c(x);y.call(Y)}}var x=rx(s,d,i,0,null,!1,!1,"",ox);return i._reactRootContainer=x,i[Kr]=x.current,Vu(i.nodeType===8?i.parentNode:i),ls(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var O=d;d=function(){var Y=$c(L);O.call(Y)}}var L=Am(i,0,!1,null,null,!1,!1,"",ox);return i._reactRootContainer=L,i[Kr]=L.current,Vu(i.nodeType===8?i.parentNode:i),ls(function(){jc(s,L,l,d)}),L}function Yc(i,s,l,d,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var O=g;g=function(){var L=$c(x);O.call(L)}}jc(s,x,i,g)}else x=zM(l,s,i,g,d);return $c(x)}Hb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Nu(s.pendingLanes);l!==0&&(Zh(s,l|1),kn(s,Ot()),(et&6)===0&&(Co=Ot()+500,Ai()))}break;case 13:ls(function(){var d=Zr(i,1);if(d!==null){var g=pn();gr(d,i,1,g)}}),vm(i,1)}},ep=function(i){if(i.tag===13){var s=Zr(i,134217728);if(s!==null){var l=pn();gr(s,i,134217728,l)}vm(i,134217728)}},zb=function(i){if(i.tag===13){var s=Pi(i),l=Zr(i,s);if(l!==null){var d=pn();gr(l,i,s,d)}vm(i,s)}},jb=function(){return it},$b=function(i,s){var l=it;try{return it=i,s()}finally{it=l}},Yh=function(i,s,l){switch(s){case"input":if(Dn(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var d=l[s];if(d!==i&&d.form===i.form){var g=lc(d);if(!g)throw Error(n(90));yt(d),Dn(d,g)}}}break;case"textarea":Ul(i,l);break;case"select":s=l.value,s!=null&&mi(i,!!l.multiple,s,!1)}},vb=bm,kb=ls;var jM={usingClientEntryPoint:!1,Events:[Wu,fo,lc,Cb,Ab,bm]},ua={findFiberByHostInstance:ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$M={bundleType:ua.bundleType,version:ua.version,rendererPackageName:ua.rendererPackageName,rendererConfig:ua.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Pb(i),i===null?null:i.stateNode},findFiberByHostInstance:ua.findFiberByHostInstance||HM,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 Wc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wc.isDisabled&&Wc.supportsFiber)try{Vl=Wc.inject($M),Ir=Wc}catch(i){}}return bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jM,bn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nm(s))throw Error(n(200));return UM(i,s,null,l)},bn.createRoot=function(i,s){if(!Nm(i))throw Error(n(299));var l=!1,d="",g=sx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Am(i,1,!1,null,null,l,!1,d,g),i[Kr]=s.current,Vu(i.nodeType===8?i.parentNode:i),new km(s)},bn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Pb(s),i=i===null?null:i.stateNode,i},bn.flushSync=function(i){return ls(i)},bn.hydrate=function(i,s,l){if(!qc(s))throw Error(n(200));return Yc(null,i,s,!0,l)},bn.hydrateRoot=function(i,s,l){if(!Nm(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",x=sx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=rx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[Kr]=s.current,Vu(i),d)for(i=0;i<d.length;i++)l=d[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new Vc(s)},bn.render=function(i,s,l){if(!qc(s))throw Error(n(200));return Yc(null,i,s,!1,l)},bn.unmountComponentAtNode=function(i){if(!qc(i))throw Error(n(40));return i._reactRootContainer?(ls(function(){Yc(null,null,i,!1,function(){i._reactRootContainer=null,i[Kr]=null})}),!0):!1},bn.unstable_batchedUpdates=bm,bn.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!qc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Yc(i,s,l,!1,d)},bn.version="18.3.1-next-f1338f8080-20240426",bn}var Kg;function Qg(){if(Kg)return id.exports;Kg=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(),id.exports=Tv(),id.exports}var Ga=Qg();function bv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ud=()=>e=>Array.from(new Set(e)),Xg=typeof globalThis.document!="undefined"?W.useLayoutEffect:W.useEffect;function Ka(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=W.useState(t),[o,u]=W.useState(r),a=e().value!==void 0,c=W.useRef(o);c.current=a?e().value:o;const f=W.useRef(c.current);Xg(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,k;const _=f.current,S=As(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),a||u(S),n(S,_)||(k=(C=e()).onChange)==null||k.call(C,S,_)};function m(){return a?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?Ga.flushSync:EA)(()=>h(T))},invoke(T,_){var S,C;(C=(S=e()).onChange)==null||C.call(S,T,_)},hash(T){var _,S,C;return(C=(S=(_=e()).hash)==null?void 0:S.call(_,T))!=null?C:String(T)}}}Ka.cleanup=e=>{W.useEffect(()=>e,[])},Ka.ref=e=>{const t=W.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function _v(e){const t=W.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var xv=(e,t)=>{const n=W.useRef(!1),r=W.useRef(!1);W.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),W.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ad(e,t={}){var fe,ae,le,de,ye,Ae;const n=W.useMemo(()=>{const{id:oe,ids:q,getRootNode:Z}=t;return gv({id:oe,ids:q,getRootNode:Z})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(ae=(fe=e.props)==null?void 0:fe.call(e,{props:Wf(t),scope:n}))!=null?ae:t,u=Sv(o),a=(le=e.context)==null?void 0:le.call(e,{prop:u,bindable:Ka,scope:n,flush:Zg,getContext(){return f},getComputed(){return X},getRefs(){return S},getEvent(){return T()}}),c=Jg(a),f={get(oe){var q;return(q=c.current)==null?void 0:q[oe].ref.current},set(oe,q){var Z;(Z=c.current)==null||Z[oe].set(q)},initial(oe){var q;return(q=c.current)==null?void 0:q[oe].initial},hash(oe){var Z,w;const q=(Z=c.current)==null?void 0:Z[oe].get();return(w=c.current)==null?void 0:w[oe].hash(q)}},h=W.useRef(new Map),m=W.useRef(null),E=W.useRef(null),b=W.useRef({type:""}),T=()=>be(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>be(U({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var q,Z;return!!((Z=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&Z.includes(oe))}}),S=_v((ye=(de=e.refs)==null?void 0:de.call(e,{prop:u,context:f}))!=null?ye:{}),C=()=>({state:_(),context:f,event:T(),prop:u,send:H,action:k,guard:F,track:xv,refs:S,computed:X,flush:Zg,scope:n,choose:z}),k=oe=>{const q=As(oe)?oe(C()):oe;if(!q)return;const Z=q.map(w=>{var K,N;const R=(N=(K=e.implementations)==null?void 0:K.actions)==null?void 0:N[w];return R||Gf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of Z)w==null||w(C())},F=oe=>{var q,Z;return As(oe)?oe(C()):(Z=(q=e.implementations)==null?void 0:q.guards)==null?void 0:Z[oe](C())},D=oe=>{const q=As(oe)?oe(C()):oe;if(!q)return;const Z=q.map(R=>{var N,_e;const K=(_e=(N=e.implementations)==null?void 0:N.effects)==null?void 0:_e[R];return K||Gf(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),K}),w=[];for(const R of Z){const K=R==null?void 0:R(C());K&&w.push(K)}return()=>w.forEach(R=>R==null?void 0:R())},z=oe=>uA(oe).find(q=>{let Z=!q.guard;return za(q.guard)?Z=!!F(q.guard):As(q.guard)&&(Z=q.guard(C())),Z}),X=oe=>{TA(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[oe];return q({context:f,event:T(),prop:u,refs:S,scope:n,computed:X})},B=Ka(()=>({defaultValue:e.initialState({prop:u}),onChange(oe,q){var w,R,K,N;if(q){const _e=h.current.get(q);_e==null||_e(),h.current.delete(q)}q&&k((w=e.states[q])==null?void 0:w.exit),k((R=m.current)==null?void 0:R.actions);const Z=D((K=e.states[oe])==null?void 0:K.effects);if(Z&&h.current.set(oe,Z),q===rd){k(e.entry);const _e=D(e.effects);_e&&h.current.set(rd,_e)}k((N=e.states[oe])==null?void 0:N.entry)}})),te=W.useRef(void 0),Te=W.useRef(Ns.NotStarted);Xg(()=>{queueMicrotask(()=>{var R;const Z=Te.current===Ns.Started;Te.current=Ns.Started,r(Z?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,Z?B.get():rd)});const oe=h.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,Te.current=Ns.Stopped,oe.forEach(Z=>Z==null?void 0:Z()),h.current=new Map,m.current=null,queueMicrotask(()=>{k(e.exit)})}},[]);const Se=()=>"ref"in B?B.ref.current:B.get(),H=oe=>{queueMicrotask(()=>{var N,_e,Be,Pe,Ye;if(Te.current!==Ns.Started)return;E.current=b.current,b.current=oe;let q=Se();const Z=(Be=(N=e.states[q].on)==null?void 0:N[oe.type])!=null?Be:(_e=e.on)==null?void 0:_e[oe.type],w=z(Z);if(!w)return;m.current=w;const R=(Pe=w.target)!=null?Pe:q;r("transition",oe.type,w.target||q,`(${w.actions})`);const K=R!==q;K?Ga.flushSync(()=>B.set(R)):w.reenter&&!K?B.invoke(q,q):k((Ye=w.actions)!=null?Ye:[])})};return(Ae=e.watch)==null||Ae.call(e,C()),{state:_(),send:H,context:f,prop:u,scope:n,refs:S,computed:X,event:T(),getStatus:()=>Te.current}}function Jg(e){const t=W.useRef(e);return t.current=e,t}function Sv(e){const t=Jg(e);return function(r){return t.current[r]}}function Zg(e){queueMicrotask(()=>{Ga.flushSync(()=>e())})}var e1=bv(e=>e);function Qa(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function wv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const ld=e=>{const t=W.memo(W.forwardRef((n,r)=>{const h=n,{asChild:o,children:u}=h,a=Gt(h,["asChild","children"]);if(!o)return W.createElement(e,be(U({},a),{ref:r}),u);if(!W.isValidElement(u))return null;const c=W.Children.only(u),f=wv(c);return W.cloneElement(c,be(U({},sr(a,c.props)),{ref:r?Qa(r,f):f}))}));return t.displayName=e.displayName||e.name,t},oi=(()=>{const e=new Map;return new Proxy(ld,{apply(t,n,r){return ld(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,ld(r)),e.get(r)}})})();function Cv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Os(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:u,defaultValue:a}=e,c=W.createContext(a);c.displayName=t;function f(){var m;const h=W.useContext(c);if(!h&&n){const E=new Error(u!=null?u:Cv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Av,cd]=Os({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[t1,Yo]=Os({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),n1=W.forwardRef((e,t)=>{const n=cd(),r=Yo(),o=sr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:I.jsx(oi.div,be(U({},o),{ref:Qa(r.ref,t)}))});n1.displayName="PopoverContent";const r1=W.forwardRef((e,t)=>{const n=cd(),r=Yo(),o=sr(n.getPositionerProps(),e);return r.unmounted?null:I.jsx(oi.div,be(U({},o),{ref:t}))});r1.displayName="PopoverPositioner";const i1=()=>(e,t)=>t.reduce((n,r)=>{const[o,u]=n,a=r;return u[a]!==void 0&&(o[a]=u[a]),delete u[a],[o,u]},[{},U({},e)]),s1=e=>i1()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function vv(e,t){const{state:n,send:r,context:o}=e,u=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:u,setNode(a){a&&r({type:"NODE.SET",node:a})},unmount(){r({type:"UNMOUNT"})}}}var kv={props({props:e}){return be(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",qa(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const u=t.get("node");if(!o&&(u==null?void 0:u.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Tn(()=>{var c,f;const a=Xa(t.get("styles"));e.set("unmountAnimationName",a),a==="none"||a===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((f=t.get("styles"))==null?void 0:f.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Tn(()=>{e.set("prevAnimationName",Xa(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const u=f=>{var m,E,b;((b=(E=(m=f.composedPath)==null?void 0:m.call(f))==null?void 0:E[0])!=null?b:f.target)===o&&e.set("prevAnimationName",Xa(t.get("styles")))},a=f=>{const h=Xa(t.get("styles"));zr(f)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",u),o.addEventListener("animationcancel",a),o.addEventListener("animationend",a);const c=Wa(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",u),o.removeEventListener("animationcancel",a),o.removeEventListener("animationend",a),iv(()=>c())}}}}};function Xa(e){return(e==null?void 0:e.animationName)||"none"}ud()(["onExitComplete","present","immediate"]);function Nv(e,t={}){const{sync:n=!1}=t,r=Ov(e);return W.useCallback((...o)=>{var u;return n?queueMicrotask(()=>{var a;return(a=r.current)==null?void 0:a.call(r,...o)}):(u=r.current)==null?void 0:u.call(r,...o)},[n,r])}function Ov(e){const t=W.useRef(e);return t.current=e,t}const fd=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,u=Gt(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),a=W.useRef(!1),c=be(U({},u),{present:r,onExitComplete:Nv(e.onExitComplete)}),f=ad(kv,c),h=vv(f);h.present&&(a.current=!0);const m=!h.present&&!a.current&&t||n&&!h.present&&a.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var Is=(e,t=[])=>({parts:(...n)=>{if(Iv(t))return Is(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Is(e,[...t,...n]),omit:(...n)=>Is(e,t.filter(r=>!n.includes(r))),rename:n=>Is(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ps(e)}"][data-part="${Ps(r)}"]`,`& [data-scope="${Ps(e)}"][data-part="${Ps(r)}"]`].join(", "),attrs:{"data-scope":Ps(e),"data-part":Ps(r)}}}),{})}),Ps=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Iv=e=>e.length===0;const Pv=["top","right","bottom","left"],ui=Math.min,On=Math.max,Ja=Math.round,Za=Math.floor,_r=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Lv={start:"end",end:"start"};function dd(e,t,n){return On(e,ui(t,n))}function $r(e,t){return typeof e=="function"?e(t):e}function Vr(e){return e.split("-")[0]}function Rs(e){return e.split("-")[1]}function hd(e){return e==="x"?"y":"x"}function pd(e){return e==="y"?"height":"width"}const Dv=new Set(["top","bottom"]);function xr(e){return Dv.has(Vr(e))?"y":"x"}function md(e){return hd(xr(e))}function Mv(e,t,n){n===void 0&&(n=!1);const r=Rs(e),o=md(e),u=pd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(a=el(a)),[a,el(a)]}function Fv(e){const t=el(e);return[gd(e),t,gd(t)]}function gd(e){return e.replace(/start|end/g,t=>Lv[t])}const o1=["left","right"],u1=["right","left"],Bv=["top","bottom"],Uv=["bottom","top"];function Hv(e,t,n){switch(e){case"top":case"bottom":return n?t?u1:o1:t?o1:u1;case"left":case"right":return t?Bv:Uv;default:return[]}}function zv(e,t,n,r){const o=Rs(e);let u=Hv(Vr(e),n==="start",r);return o&&(u=u.map(a=>a+"-"+o),t&&(u=u.concat(u.map(gd)))),u}function el(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function jv(e){return U({top:0,right:0,bottom:0,left:0},e)}function a1(e){return typeof e!="number"?jv(e):{top:e,right:e,bottom:e,left:e}}function tl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function l1(e,t,n){let{reference:r,floating:o}=e;const u=xr(t),a=md(t),c=pd(a),f=Vr(t),h=u==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let T;switch(f){case"top":T={x:m,y:r.y-o.height};break;case"bottom":T={x:m,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:E};break;case"left":T={x:r.x-o.width,y:E};break;default:T={x:r.x,y:r.y}}switch(Rs(t)){case"start":T[a]-=b*(n&&h?-1:1);break;case"end":T[a]+=b*(n&&h?-1:1);break}return T}const $v=(e,t,n)=>rt(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:u=[],platform:a}=n,c=u.filter(Boolean),f=yield a.isRTL==null?void 0:a.isRTL(t);let h=yield a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=l1(h,r,f),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:C,fn:k}=c[S],{x:F,y:D,data:z,reset:X}=yield k({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:a,elements:{reference:e,floating:t}});m=F!=null?F:m,E=D!=null?D:E,T=be(U({},T),{[C]:U(U({},T[C]),z)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(b=X.placement),X.rects&&(h=X.rects===!0?yield a.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:m,y:E}=l1(h,b,f)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function Wo(e,t){return rt(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:u,rects:a,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=$r(t,e),_=a1(T),C=c[b?E==="floating"?"reference":"floating":E],k=tl(yield u.getClippingRect({element:(n=yield u.isElement==null?void 0:u.isElement(C))==null||n?C:C.contextElement||(yield u.getDocumentElement==null?void 0:u.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),F=E==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,D=yield u.getOffsetParent==null?void 0:u.getOffsetParent(c.floating),z=(yield u.isElement==null?void 0:u.isElement(D))?(yield u.getScale==null?void 0:u.getScale(D))||{x:1,y:1}:{x:1,y:1},X=tl(u.convertOffsetParentRelativeRectToViewportRelativeRect?yield u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:D,strategy:f}):F);return{top:(k.top-X.top+_.top)/z.y,bottom:(X.bottom-k.bottom+_.bottom)/z.y,left:(k.left-X.left+_.left)/z.x,right:(X.right-k.right+_.right)/z.x}})}const Vv=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:u,rects:a,platform:c,elements:f,middlewareData:h}=n,{element:m,padding:E=0}=$r(e,n)||{};if(m==null)return{};const b=a1(E),T={x:r,y:o},_=md(u),S=pd(_),C=yield c.getDimensions(m),k=_==="y",F=k?"top":"left",D=k?"bottom":"right",z=k?"clientHeight":"clientWidth",X=a.reference[S]+a.reference[_]-T[_]-a.floating[S],B=T[_]-a.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let Te=te?te[z]:0;(!Te||!(yield c.isElement==null?void 0:c.isElement(te)))&&(Te=f.floating[z]||a.floating[S]);const Se=X/2-B/2,H=Te/2-C[S]/2-1,fe=ui(b[F],H),ae=ui(b[D],H),le=fe,de=Te-C[S]-ae,ye=Te/2-C[S]/2+Se,Ae=dd(le,ye,de),oe=!h.arrow&&Rs(u)!=null&&ye!==Ae&&a.reference[S]/2-(ye<le?fe:ae)-C[S]/2<0,q=oe?ye<le?ye-le:ye-de:0;return{[_]:T[_]+q,data:U({[_]:Ae,centerOffset:ye-Ae-q},oe&&{alignmentOffset:q}),reset:oe}})}}),qv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:u,middlewareData:a,rects:c,initialPlacement:f,platform:h,elements:m}=n,ye=$r(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0}=ye,k=Gt(ye,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const F=Vr(u),D=xr(f),z=Vr(f)===f,X=yield h.isRTL==null?void 0:h.isRTL(m.floating),B=T||(z||!C?[el(f)]:Fv(f)),te=S!=="none";!T&&te&&B.push(...zv(f,C,S,X));const Te=[f,...B],Se=yield Wo(n,k),H=[];let fe=((o=a.flip)==null?void 0:o.overflows)||[];if(E&&H.push(Se[F]),b){const Ae=Mv(u,c,X);H.push(Se[Ae[0]],Se[Ae[1]])}if(fe=[...fe,{placement:u,overflows:H}],!H.every(Ae=>Ae<=0)){var ae,le;const Ae=(((ae=a.flip)==null?void 0:ae.index)||0)+1,oe=Te[Ae];if(oe&&(!(b==="alignment"?D!==xr(oe):!1)||fe.every(w=>xr(w.placement)===D?w.overflows[0]>0:!0)))return{data:{index:Ae,overflows:fe},reset:{placement:oe}};let q=(le=fe.filter(Z=>Z.overflows[0]<=0).sort((Z,w)=>Z.overflows[1]-w.overflows[1])[0])==null?void 0:le.placement;if(!q)switch(_){case"bestFit":{var de;const Z=(de=fe.filter(w=>{if(te){const R=xr(w.placement);return R===D||R==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((w,R)=>w[1]-R[1])[0])==null?void 0:de[0];Z&&(q=Z);break}case"initialPlacement":q=f;break}if(u!==q)return{reset:{placement:q}}}return{}})}}};function c1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function f1(e){return Pv.some(t=>e[t]>=0)}const Yv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,a=$r(e,n),{strategy:o="referenceHidden"}=a,u=Gt(a,["strategy"]);switch(o){case"referenceHidden":{const c=yield Wo(n,be(U({},u),{elementContext:"reference"})),f=c1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:f1(f)}}}case"escaped":{const c=yield Wo(n,be(U({},u),{altBoundary:!0})),f=c1(c,r.floating);return{data:{escapedOffsets:f,escaped:f1(f)}}}default:return{}}})}}},d1=new Set(["left","top"]);function Wv(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,u=yield r.isRTL==null?void 0:r.isRTL(o.floating),a=Vr(n),c=Rs(n),f=xr(n)==="y",h=d1.has(a)?-1:1,m=u&&f?-1:1,E=$r(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(T=c==="end"?_*-1:_),f?{x:T*m,y:b*h}:{x:b*h,y:T*m}})}const Gv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:u,y:a,placement:c,middlewareData:f}=n,h=yield Wv(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:u+h.x,y:a+h.y,data:be(U({},h),{placement:c})}})}}},Kv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:u}=n,k=$r(e,n),{mainAxis:a=!0,crossAxis:c=!1,limiter:f={fn:F=>{let{x:D,y:z}=F;return{x:D,y:z}}}}=k,h=Gt(k,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Wo(n,h),b=xr(Vr(u)),T=hd(b);let _=m[T],S=m[b];if(a){const F=T==="y"?"top":"left",D=T==="y"?"bottom":"right",z=_+E[F],X=_-E[D];_=dd(z,_,X)}if(c){const F=b==="y"?"top":"left",D=b==="y"?"bottom":"right",z=S+E[F],X=S-E[D];S=dd(z,S,X)}const C=f.fn(be(U({},n),{[T]:_,[b]:S}));return be(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:a,[b]:c}}})})}}},Qv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:u,middlewareData:a}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=$r(e,t),m={x:n,y:r},E=xr(o),b=hd(E);let T=m[b],_=m[E];const S=$r(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(f){const D=b==="y"?"height":"width",z=u.reference[b]-u.floating[D]+C.mainAxis,X=u.reference[b]+u.reference[D]-C.mainAxis;T<z?T=z:T>X&&(T=X)}if(h){var k,F;const D=b==="y"?"width":"height",z=d1.has(Vr(o)),X=u.reference[E]-u.floating[D]+(z&&((k=a.offset)==null?void 0:k[E])||0)+(z?0:C.crossAxis),B=u.reference[E]+u.reference[D]+(z?0:((F=a.offset)==null?void 0:F[E])||0)-(z?C.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[b]:T,[E]:_}}}},Xv=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:u,rects:a,platform:c,elements:f}=n,fe=$r(e,n),{apply:h=()=>{}}=fe,m=Gt(fe,["apply"]),E=yield Wo(n,m),b=Vr(u),T=Rs(u),_=xr(u)==="y",{width:S,height:C}=a.floating;let k,F;b==="top"||b==="bottom"?(k=b,F=T===((yield c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(F=b,k=T==="end"?"top":"bottom");const D=C-E.top-E.bottom,z=S-E.left-E.right,X=ui(C-E[k],D),B=ui(S-E[F],z),te=!n.middlewareData.shift;let Te=X,Se=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Se=z),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(Te=D),te&&!T){const ae=On(E.left,0),le=On(E.right,0),de=On(E.top,0),ye=On(E.bottom,0);_?Se=S-2*(ae!==0||le!==0?ae+le:On(E.left,E.right)):Te=C-2*(de!==0||ye!==0?de+ye:On(E.top,E.bottom))}yield h(be(U({},n),{availableWidth:Se,availableHeight:Te}));const H=yield c.getDimensions(f.floating);return S!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function nl(){return typeof window!="undefined"}function Ls(e){return h1(e)?(e.nodeName||"").toLowerCase():"#document"}function In(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sr(e){var t;return(t=(h1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function h1(e){return nl()?e instanceof Node||e instanceof In(e).Node:!1}function or(e){return nl()?e instanceof Element||e instanceof In(e).Element:!1}function wr(e){return nl()?e instanceof HTMLElement||e instanceof In(e).HTMLElement:!1}function p1(e){return!nl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof In(e).ShadowRoot}const Jv=new Set(["inline","contents"]);function Go(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jv.has(o)}const Zv=new Set(["table","td","th"]);function ek(e){return Zv.has(Ls(e))}const tk=[":popover-open",":modal"];function rl(e){return tk.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const nk=["transform","translate","scale","rotate","perspective"],rk=["transform","translate","scale","rotate","perspective","filter"],ik=["paint","layout","strict","content"];function Ed(e){const t=yd(),n=or(e)?ur(e):e;return nk.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)||rk.some(r=>(n.willChange||"").includes(r))||ik.some(r=>(n.contain||"").includes(r))}function sk(e){let t=ai(e);for(;wr(t)&&!Ds(t);){if(Ed(t))return t;if(rl(t))return null;t=ai(t)}return null}function yd(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ok=new Set(["html","body","#document"]);function Ds(e){return ok.has(Ls(e))}function ur(e){return In(e).getComputedStyle(e)}function il(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ai(e){if(Ls(e)==="html")return e;const t=e.assignedSlot||e.parentNode||p1(e)&&e.host||Sr(e);return p1(t)?t.host:t}function m1(e){const t=ai(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&Go(t)?t:m1(t)}function Ko(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=m1(e),u=o===((r=e.ownerDocument)==null?void 0:r.body),a=In(o);if(u){const c=Td(a);return t.concat(a,a.visualViewport||[],Go(o)?o:[],c&&n?Ko(c):[])}return t.concat(o,Ko(o,[],n))}function Td(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g1(e){const t=ur(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wr(e),u=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Ja(n)!==u||Ja(r)!==a;return c&&(n=u,r=a),{width:n,height:r,$:c}}function bd(e){return or(e)?e:e.contextElement}function Ms(e){const t=bd(e);if(!wr(t))return _r(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:u}=g1(t);let a=(u?Ja(n.width):n.width)/r,c=(u?Ja(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const uk=_r(0);function E1(e){const t=In(e);return!yd()||!t.visualViewport?uk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ak(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==In(e)?!1:t}function Vi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),u=bd(e);let a=_r(1);t&&(r?or(r)&&(a=Ms(r)):a=Ms(e));const c=ak(u,n,r)?E1(u):_r(0);let f=(o.left+c.x)/a.x,h=(o.top+c.y)/a.y,m=o.width/a.x,E=o.height/a.y;if(u){const b=In(u),T=r&&or(r)?In(r):r;let _=b,S=Td(_);for(;S&&r&&T!==_;){const C=Ms(S),k=S.getBoundingClientRect(),F=ur(S),D=k.left+(S.clientLeft+parseFloat(F.paddingLeft))*C.x,z=k.top+(S.clientTop+parseFloat(F.paddingTop))*C.y;f*=C.x,h*=C.y,m*=C.x,E*=C.y,f+=D,h+=z,_=In(S),S=Td(_)}}return tl({width:m,height:E,x:f,y:h})}function sl(e,t){const n=il(e).scrollLeft;return t?t.left+n:Vi(Sr(e)).left+n}function y1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-sl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function lk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const u=o==="fixed",a=Sr(r),c=t?rl(t.floating):!1;if(r===a||c&&u)return n;let f={scrollLeft:0,scrollTop:0},h=_r(1);const m=_r(0),E=wr(r);if((E||!E&&!u)&&((Ls(r)!=="body"||Go(a))&&(f=il(r)),wr(r))){const T=Vi(r);h=Ms(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=a&&!E&&!u?y1(a,f):_r(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function ck(e){return Array.from(e.getClientRects())}function fk(e){const t=Sr(e),n=il(e),r=e.ownerDocument.body,o=On(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),u=On(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+sl(e);const c=-n.scrollTop;return ur(r).direction==="rtl"&&(a+=On(t.clientWidth,r.clientWidth)-o),{width:o,height:u,x:a,y:c}}const T1=25;function dk(e,t){const n=In(e),r=Sr(e),o=n.visualViewport;let u=r.clientWidth,a=r.clientHeight,c=0,f=0;if(o){u=o.width,a=o.height;const m=yd();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=sl(r);if(h<=0){const m=r.ownerDocument,E=m.body,b=getComputedStyle(E),T=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-T);_<=T1&&(u-=_)}else h<=T1&&(u+=h);return{width:u,height:a,x:c,y:f}}const hk=new Set(["absolute","fixed"]);function pk(e,t){const n=Vi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,u=wr(e)?Ms(e):_r(1),a=e.clientWidth*u.x,c=e.clientHeight*u.y,f=o*u.x,h=r*u.y;return{width:a,height:c,x:f,y:h}}function b1(e,t,n){let r;if(t==="viewport")r=dk(e,n);else if(t==="document")r=fk(Sr(e));else if(or(t))r=pk(t,n);else{const o=E1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return tl(r)}function _1(e,t){const n=ai(e);return n===t||!or(n)||Ds(n)?!1:ur(n).position==="fixed"||_1(n,t)}function mk(e,t){const n=t.get(e);if(n)return n;let r=Ko(e,[],!1).filter(c=>or(c)&&Ls(c)!=="body"),o=null;const u=ur(e).position==="fixed";let a=u?ai(e):e;for(;or(a)&&!Ds(a);){const c=ur(a),f=Ed(a);!f&&c.position==="fixed"&&(o=null),(u?!f&&!o:!f&&c.position==="static"&&!!o&&hk.has(o.position)||Go(a)&&!f&&_1(e,a))?r=r.filter(m=>m!==a):o=c,a=ai(a)}return t.set(e,r),r}function gk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?rl(t)?[]:mk(t,this._c):[].concat(n),r],c=a[0],f=a.reduce((h,m)=>{const E=b1(t,m,o);return h.top=On(E.top,h.top),h.right=ui(E.right,h.right),h.bottom=ui(E.bottom,h.bottom),h.left=On(E.left,h.left),h},b1(t,c,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ek(e){const{width:t,height:n}=g1(e);return{width:t,height:n}}function yk(e,t,n){const r=wr(t),o=Sr(t),u=n==="fixed",a=Vi(e,!0,u,t);let c={scrollLeft:0,scrollTop:0};const f=_r(0);function h(){f.x=sl(o)}if(r||!r&&!u)if((Ls(t)!=="body"||Go(o))&&(c=il(t)),r){const T=Vi(t,!0,u,t);f.x=T.x+t.clientLeft,f.y=T.y+t.clientTop}else o&&h();u&&!r&&o&&h();const m=o&&!r&&!u?y1(o,c):_r(0),E=a.left+c.scrollLeft-f.x-m.x,b=a.top+c.scrollTop-f.y-m.y;return{x:E,y:b,width:a.width,height:a.height}}function _d(e){return ur(e).position==="static"}function x1(e,t){if(!wr(e)||ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Sr(e)===n&&(n=n.ownerDocument.body),n}function S1(e,t){const n=In(e);if(rl(e))return n;if(!wr(e)){let o=ai(e);for(;o&&!Ds(o);){if(or(o)&&!_d(o))return o;o=ai(o)}return n}let r=x1(e,t);for(;r&&ek(r)&&_d(r);)r=x1(r,t);return r&&Ds(r)&&_d(r)&&!Ed(r)?n:r||sk(e)||n}const Tk=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||S1,n=this.getDimensions,r=yield n(e.floating);return{reference:yk(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function bk(e){return ur(e).direction==="rtl"}const _k={convertOffsetParentRelativeRectToViewportRelativeRect:lk,getDocumentElement:Sr,getClippingRect:gk,getOffsetParent:S1,getElementRects:Tk,getClientRects:ck,getDimensions:Ek,getScale:Ms,isElement:or,isRTL:bk};function w1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xk(e,t){let n=null,r;const o=Sr(e);function u(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),u();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=Za(E),S=Za(o.clientWidth-(m+b)),C=Za(o.clientHeight-(E+T)),k=Za(m),D={rootMargin:-_+"px "+-S+"px "+-C+"px "+-k+"px",threshold:On(0,ui(1,f))||1};let z=!0;function X(B){const te=B[0].intersectionRatio;if(te!==f){if(!z)return a();te?a(!1,te):r=setTimeout(()=>{a(!1,1e-7)},1e3)}te===1&&!w1(h,e.getBoundingClientRect())&&a(),z=!1}try{n=new IntersectionObserver(X,be(U({},D),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,D)}n.observe(e)}return a(!0),u}function Sk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=bd(e),m=o||u?[...h?Ko(h):[],...Ko(t)]:[];m.forEach(k=>{o&&k.addEventListener("scroll",n,{passive:!0}),u&&k.addEventListener("resize",n)});const E=h&&c?xk(h,n):null;let b=-1,T=null;a&&(T=new ResizeObserver(k=>{let[F]=k;F&&F.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(t)})),n()}),h&&!f&&T.observe(h),T.observe(t));let _,S=f?Vi(e):null;f&&C();function C(){const k=Vi(e);S&&!w1(S,k)&&n(),S=k,_=requestAnimationFrame(C)}return n(),()=>{var k;m.forEach(F=>{o&&F.removeEventListener("scroll",n),u&&F.removeEventListener("resize",n)}),E==null||E(),(k=T)==null||k.disconnect(),T=null,f&&cancelAnimationFrame(_)}}const wk=Gv,Ck=Kv,Ak=qv,vk=Xv,kk=Yv,Nk=Vv,Ok=Qv,Ik=(e,t,n)=>{const r=new Map,o=U({platform:_k},n),u=be(U({},o.platform),{_c:r});return $v(e,t,be(U({},o),{platform:u}))};function C1(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return be(U({},o),{toJSON:()=>o})}function Pk(e){if(!e)return C1();const{x:t,y:n,width:r,height:o}=e;return C1(t,n,r,o)}function Rk(e,t){return{contextElement:jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?Pk(r):n.getBoundingClientRect()}}}var Qo=e=>({variable:e,reference:`var(${e})`}),qr={arrowSize:Qo("--arrow-size"),arrowSizeHalf:Qo("--arrow-size-half"),arrowBg:Qo("--arrow-background"),transformOrigin:Qo("--transform-origin"),arrowOffset:Qo("--arrow-offset")},Lk=e=>e==="top"||e==="bottom"?"y":"x";function Dk(e,t){return{name:"transformOrigin",fn(n){var Se,H,fe,ae,le;const{elements:r,middlewareData:o,placement:u,rects:a,y:c}=n,f=u.split("-")[0],h=Lk(f),m=((Se=o.arrow)==null?void 0:Se.x)||0,E=((H=o.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=m+b/2,S=E+T/2,C=Math.abs(((fe=o.shift)==null?void 0:fe.y)||0),k=a.reference.height/2,F=T/2,D=(le=(ae=e.offset)==null?void 0:ae.mainAxis)!=null?le:e.gutter,z=typeof D=="number"?D+F:D!=null?D:F,X=C>z,B={top:`${_}px calc(100% + ${z}px)`,bottom:`${_}px ${-z}px`,left:`calc(100% + ${z}px) ${S}px`,right:`${-z}px ${S}px`}[f],te=`${_}px ${a.reference.y+k-c}px`,Te=!!e.overlap&&h==="y"&&X;return r.floating.style.setProperty(qr.transformOrigin.variable,Te?te:B),{data:{transformOrigin:Te?te:B}}}}}var Mk={name:"rects",fn({rects:e}){return{data:e}}},Fk=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,u=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[u]:`calc(100% + ${qr.arrowOffset.reference})`}),{}}}};function Bk(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var Uk={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function A1(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function xd(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Hk(e,t,n){const r=e||t.createElement("div");return Nk({element:r,padding:n.arrowPadding})}function zk(e,t){var n;if(!lA((n=t.offset)!=null?n:t.gutter))return wk(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,u=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,a=typeof u=="number"?u+o:u!=null?u:o,{hasAlign:c}=Bk(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return Wf({crossAxis:h,mainAxis:a,alignmentAxis:t.shift})})}function jk(e){if(!e.flip)return;const t=xd(e.boundary);return Ak(be(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function $k(e){if(!e.slide&&!e.overlap)return;const t=xd(e.boundary);return Ck(be(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Ok()}))}function Vk(e){return vk({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const u=t.floating,a=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),u.style.setProperty("--reference-width",`${a}px`),u.style.setProperty("--reference-height",`${c}px`),u.style.setProperty("--available-width",`${o}px`),u.style.setProperty("--available-height",`${r}px`)}})}function qk(e){var t;if(e.hideWhenDetached)return kk({strategy:"referenceHidden",boundary:(t=xd(e.boundary))!=null?t:"clippingAncestors"})}function Yk(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Wk(e,t,n={}){const r=Rk(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},Uk,n),u=t.querySelector("[data-part=arrow]"),a=[zk(u,o),jk(o),$k(o),Hk(u,t.ownerDocument,o),Fk(u),Dk({gutter:o.gutter,offset:o.offset,overlap:o.overlap},u),Vk(o),qk(o),Mk],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>rt(null,null,function*(){var z;if(!r||!t)return;const S=yield Ik(r,t,{placement:c,middleware:a,strategy:f});h==null||h(S),m==null||m({placed:!0});const C=vs(t),k=A1(C,S.x),F=A1(C,S.y);t.style.setProperty("--x",`${k}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((z=S.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const D=t.firstElementChild;if(D){const X=qa(D);t.style.setProperty("--z-index",X.zIndex)}}),b=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=Yk(o.listeners),_=o.listeners?Sk(r,t,b,T):yA;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function v1(e,t,n={}){const c=n,{defer:r}=c,o=Gt(c,["defer"]),u=r?Tn:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;a.push(Wk(f,h,o))})),()=>{a.forEach(f=>f==null?void 0:f())}}var Gk={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Kk(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:qr.arrowSize.reference,height:qr.arrowSize.reference,[qr.arrowSizeHalf.variable]:`calc(${qr.arrowSize.reference} / 2)`,[qr.arrowOffset.variable]:`calc(${qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Gk[t.split("-")[0]]:void 0,background:qr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Fs=new WeakMap,ol=new WeakMap,ul={},Sd=0,k1=e=>e&&(e.host||k1(e.parentNode)),Qk=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=k1(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),Xk=new Set(["script","output","status","next-route-announcer"]),Jk=e=>Xk.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Zk=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:u=!0}=t,a=Qk(n,Array.isArray(e)?e:[e]);ul[r]||(ul[r]=new WeakMap);const c=ul[r],f=[],h=new Set,m=new Set(a),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};a.forEach(T=>{E(T),u&&jt(T)&&Fg(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(Jk(_))return;const C=_.getAttribute(o)==="true",k=(Fs.get(_)||0)+1,F=(c.get(_)||0)+1;Fs.set(_,k),c.set(_,F),f.push(_),k===1&&C&&ol.set(_,!0),F===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),h.clear(),Sd++,()=>{f.forEach(T=>{const _=Fs.get(T)-1,S=c.get(T)-1;Fs.set(T,_),c.set(T,S),_||(ol.has(T)||T.removeAttribute(o),ol.delete(T)),S||T.removeAttribute(r)}),Sd--,Sd||(Fs=new WeakMap,Fs=new WeakMap,ol=new WeakMap,ul={})}},eN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,tN=(e,t=eN(e),n="data-aria-hidden",r=!0)=>{if(t)return Zk(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},nN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function N1(e,t={}){const{defer:n=!0}=t,r=n?nN:u=>u(),o=[];return o.push(r(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&o.push(tN(a))})),()=>{o.forEach(u=>u==null?void 0:u())}}function rN(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const u=e.frames[o];u&&n(u)}},addEventListener(n,r,o){return t.each(u=>{try{u.document.addEventListener(n,r,o)}catch(a){}}),()=>{try{t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener(n,r,o){t.each(u=>{try{u.document.removeEventListener(n,r,o)}catch(a){}})}};return t}function iN(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(u){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}}}var O1="pointerdown.outside",I1="focus.outside";function sN(e){for(const t of e)if(jt(t)&&jr(t))return!0;return!1}var P1=e=>"clientY"in e;function oN(e,t){if(!P1(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 uN(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function R1(e,t){if(!t||!P1(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,u=o&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return uN(a,c)?r||u:!1}function aN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:u,defer:a,followControlledElements:c=!0}=t;if(!e)return;const f=br(e),h=vs(e),m=rN(h),E=iN(h);function b(D,z){if(!jt(z)||!z.isConnected||Va(e,z)||oN(e,D)||c&&Mg(e,z))return!1;const X=f.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=nd(X);if(R1(D,te))return!1}const B=nd(e);return R1(D,B)?!1:!(n!=null&&n(z))}const T=new Set,_=ji(e==null?void 0:e.getRootNode());function S(D){function z(X){var Se,H;const B=a&&!Bg()?Tn:fe=>fe(),te=X!=null?X:D,Te=(H=(Se=te==null?void 0:te.composedPath)==null?void 0:Se.call(te))!=null?H:[te==null?void 0:te.target];B(()=>{const fe=_?Te[0]:zr(D);if(!(!e||!b(D,fe))){if(o||u){const ae=Yf(o,u);e.addEventListener(O1,ae,{once:!0})}L1(e,O1,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:QA(te),focusable:sN(Te),target:fe}})}})}D.pointerType==="touch"?(T.forEach(X=>X()),T.add(ir(f,"click",z,{once:!0})),T.add(E.addEventListener("click",z,{once:!0})),T.add(m.addEventListener("click",z,{once:!0}))):z()}const C=new Set,k=setTimeout(()=>{C.add(ir(f,"pointerdown",S,!0)),C.add(E.addEventListener("pointerdown",S,!0)),C.add(m.addEventListener("pointerdown",S,!0))},0);function F(D){(a?Tn:X=>X())(()=>{var te,Te;const X=(Te=(te=D==null?void 0:D.composedPath)==null?void 0:te.call(D))!=null?Te:[D==null?void 0:D.target],B=_?X[0]:zr(D);if(!(!e||!b(D,B))){if(r||u){const Se=Yf(r,u);e.addEventListener(I1,Se,{once:!0})}L1(e,I1,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:jr(B),target:B}})}})}return Bg()||(C.add(ir(f,"focusin",F,!0)),C.add(E.addEventListener("focusin",F,!0)),C.add(m.addEventListener("focusin",F,!0))),()=>{clearTimeout(k),T.forEach(D=>D()),C.forEach(D=>D())}}function lN(e,t){const{defer:n}=t,r=n?Tn:u=>u(),o=[];return o.push(r(()=>{const u=typeof e=="function"?e():e;o.push(aN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}function L1(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function cN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ir(br(e),"keydown",n,{capture:!0})}var D1="layer:request-dismiss",$n={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=>Va(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Va(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=>$n.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];dN(e,D1,o=>{var u;(u=r.requestDismiss)==null||u.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),fN(e,D1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function fN(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function dN(e,t,n){e.addEventListener(t,n,{once:!0})}var M1;function F1(){$n.layers.forEach(({node:e})=>{e.style.pointerEvents=$n.isBelowPointerBlockingLayer(e)?"none":"auto"})}function hN(e){e.style.pointerEvents=""}function pN(e,t){const n=br(e),r=[];return $n.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(M1=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[u,a]=dv(()=>{const c=o();return jt(c)?c:null},{timeout:1e3});u.then(c=>r.push(Wa(c,{pointerEvents:"auto"}))),r.push(a)}),()=>{$n.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=M1,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function mN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Gf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:u,exclude:a,debug:c,type:f="dialog"}=t,h={dismiss:r,node:e,type:f,pointerBlocking:u,requestDismiss:o};$n.add(h),F1();function m(S){var k,F;const C=zr(S.detail.originalEvent);$n.isBelowPointerBlockingLayer(e)||$n.isInBranch(C)||((k=t.onPointerDownOutside)==null||k.call(t,S),(F=t.onInteractOutside)==null||F.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var k,F;const C=zr(S.detail.originalEvent);$n.isInBranch(C)||((k=t.onFocusOutside)==null||k.call(t,S),(F=t.onInteractOutside)==null||F.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var C;$n.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var D;if(!e)return!1;const C=typeof a=="function"?a():a,k=Array.isArray(C)?C:[C],F=(D=t.persistentElements)==null?void 0:D.map(z=>z()).filter(jt);return F&&k.push(...F),k.some(z=>Va(z,S))||$n.isInNestedLayer(e,S)}const _=[u?pN(e,t.persistentElements):void 0,cN(e,b),lN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{$n.remove(e),F1(),hN(e),_.forEach(S=>S==null?void 0:S())}}function B1(e,t){const{defer:n}=t,r=n?Tn:u=>u(),o=[];return o.push(r(()=>{const u=As(e)?e():e;o.push(mN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}var gN=Object.defineProperty,EN=(e,t,n)=>t in e?gN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>EN(e,typeof t!="symbol"?t+"":t,n),U1={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()}},yN=[],TN=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=zr(r),u=this.findContainerIndex(o,r)>=0;if(u||$a(o))u&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let a,c=!0;if(this.state.mostRecentlyFocusedNode)if(qo(this.state.mostRecentlyFocusedNode)>0){const f=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[f];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(a=h[m+1],c=!1):m-1>=0&&(a=h[m-1],c=!1))}}else this.state.containerGroups.some(f=>f.tabbableNodes.some(h=>qo(h)>0))||(c=!1);else c=!1;c&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ht(this,"handlePointerDown",r=>{const o=zr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Jo(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Jo(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=zr(r);this.findContainerIndex(o,r)>=0||Jo(this.config.clickOutsideDeactivates,r)||Jo(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),u=this.findNextNavNode({event:r,isBackward:o});if(!u)return;Xo(r)&&r.preventDefault(),this.tryFocus(u)}}),ht(this,"handleEscapeKey",r=>{bN(r)&&Jo(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(f=>{if(f.nodeType!==Node.ELEMENT_NODE)return!1;const h=f;return HA(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?zA(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var u;(u=this._mutationObserver)==null||u.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!jr(r)){const o=ks(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const u=this.state.tabbableGroups[0];r=u&&u.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}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==ks(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,_N(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=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(),U1.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const u=this.getOption(o,"onDeactivate"),a=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),f=this.getOption(o,"returnFocus","returnFocusOnDeactivate");u==null||u();const h=()=>{H1(()=>{if(f){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}a==null||a()})};if(f&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),ht(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),u=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),u==null||u(),this}),ht(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),u=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),u==null||u(),this}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,u)=>r&&r[o]!==void 0?r[o]:this.config[u||o]),ht(this,"getNodeForOption",(r,{hasFallback:o=!1,params:u=[]}={})=>{let a=this.config[r];if(typeof a=="function"&&(a=a(...u)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=a;if(typeof a=="string"){try{c=this.doc.querySelector(a)}catch(f){throw new Error(`\`${r}\` appears to be an invalid selector; error="${f.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:u=!1}=r,a=r.target||zr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const f=this.findContainerIndex(a,o),h=f>=0?this.state.containerGroups[f]:void 0;if(f<0)u?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(u){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||jr(a)&&!$i(a)&&!(h!=null&&h.nextTabbableNode(a,!1)))&&(m=f),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=qo(a)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Xo(o)||(c=h==null?void 0:h.nextTabbableNode(a,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||jr(a)&&!$i(a)&&!(h!=null&&h.nextTabbableNode(a)))&&(m=f),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=qo(a)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Xo(o)||(c=h==null?void 0:h.nextTabbableNode(a))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||yN;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Xo(r)&&!r.shiftKey},isKeyBackward(r){return Xo(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=>{FA(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(u=>u===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Mg(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Vo(e,{getShadowRoot:this.config.getShadowRoot}),n=$g(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],u=r,a=o;let c=!1;for(let h=0;h<t.length;h++)if(qo(t[h])>0){c=!0;break}function f(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(m){for(let T=b+1;T<n.length;T++)if($i(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if($i(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:u,lastDomTabbableNode:a,nextTabbableNode:f}}),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 U1.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?H1(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ir(this.doc,"focusin",this.handleFocus,!0),ir(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ir(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ir(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ir(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ir(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=ks(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Xo=e=>e.key==="Tab",Jo=(e,...t)=>typeof e=="function"?e(...t):e,bN=e=>!e.isComposing&&e.key==="Escape",H1=e=>setTimeout(e,0),_N=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function z1(e,t={}){let n;const r=Tn(()=>{const o=typeof e=="function"?e():e;if(o){n=new TN(o,be(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:br(o)}));try{n.activate()}catch(u){}}});return function(){n==null||n.deactivate(),r()}}var wd="data-scroll-lock";function xN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function j1(e){const t=qa(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function $1(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(wd))return;const a=j1(r)||j1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(wd,"");const f=()=>cv(r,"--scrollbar-width",`${c}px`),h=xN(r),m=()=>{const _={overflow:"hidden"};return!a&&c>0&&(_[h]=`${c}px`),Wa(o,_)},E=()=>{var X,B;const{scrollX:_,scrollY:S,visualViewport:C}=n,k=(X=C==null?void 0:C.offsetLeft)!=null?X:0,F=(B=C==null?void 0:C.offsetTop)!=null?B:0,D={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(F))}px`,left:`${-(_-Math.floor(k))}px`,right:"0"};!a&&c>0&&(D[h]=`${c}px`);const z=Wa(o,D);return()=>{z==null||z(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[f(),Ug()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(wd)}}var SN=Is("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Cr=SN.build(),V1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},q1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Cd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Y1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},wN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Ad=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},vd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},CN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},W1=e=>e.getById(V1(e)),Bs=e=>e.getById(q1(e)),Us=e=>e.getById(Cd(e)),G1=e=>e.getById(Y1(e)),AN=e=>e.getById(Ad(e)),vN=e=>e.getById(vd(e));function kN(e,t){const{state:n,context:r,send:o,computed:u,prop:a,scope:c}=e,f=n.matches("open"),h=r.get("currentPlacement"),m=u("currentPortalled"),E=r.get("renderedElements"),b=Kk(be(U({},a("positioning")),{placement:h}));return{portalled:m,open:f,setOpen(T){n.matches("open")!==T&&o({type:T?"OPEN":"CLOSE"})},reposition(T={}){o({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(be(U({id:wN(c)},Cr.arrow.attrs),{dir:a("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(be(U({},Cr.arrowTip.attrs),{dir:a("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(be(U({},Cr.anchor.attrs),{dir:a("dir"),id:V1(c)}))},getTriggerProps(){return t.button(be(U({},Cr.trigger.attrs),{dir:a("dir"),type:"button","data-placement":h,id:q1(c),"aria-haspopup":"dialog","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Cd(c),onPointerDown(T){KA(T)&&WA()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(be(U({},Cr.indicator.attrs),{dir:a("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(be(U({id:Y1(c)},Cr.positioner.attrs),{dir:a("dir"),style:b.floating}))},getContentProps(){return t.element(be(U({},Cr.content.attrs),{dir:a("dir"),id:Cd(c),tabIndex:-1,role:"dialog","aria-modal":SA(a("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":xA(f),"aria-labelledby":E.title?Ad(c):void 0,"aria-describedby":E.description?vd(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(be(U({},Cr.title.attrs),{id:Ad(c),dir:a("dir")}))},getDescriptionProps(){return t.element(be(U({},Cr.description.attrs),{id:vd(c),dir:a("dir")}))},getCloseTriggerProps(){return t.button(be(U({},Cr.closeTrigger.attrs),{dir:a("dir"),id:CN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var NN={props({props:e}){return be(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 u;e.set("currentPlacement",t("positioning").placement);const r=(u=W1(n))!=null?u:Bs(n);return v1(r,()=>G1(n),be(U({},t("positioning")),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Us(n);let o=!0;return B1(r,{type:"popover",pointerBlocking:t("modal"),exclude:Bs(n),defer:!0,onEscapeKeyDown(u){var a;(a=t("onEscapeKeyDown"))==null||a(u),!t("closeOnEscape")&&u.preventDefault()},onInteractOutside(u){var a;(a=t("onInteractOutside"))==null||a(u),!u.defaultPrevented&&(o=!(u.detail.focusable||u.detail.contextmenu),t("closeOnInteractOutside")||u.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:lv(()=>Us(t),{triggerElement:Bs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?N1(()=>[Us(t),Bs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return $1(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?z1(()=>Us(t),{initialFocus:()=>Vg({root:Us(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var a;const o=(a=W1(n))!=null?a:Bs(n);v1(o,()=>G1(n),be(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Tn(()=>{Object.assign(e.get("renderedElements"),{title:!!AN(t),description:!!vN(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Tn(()=>{const n=Vg({root:Us(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Tn(()=>{const u=Bs(t);u==null||u.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})}}}};ud()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[HF,kd]=Os({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[zF,K1]=Os({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),ON=e=>{const t=W.useId(),{getRootNode:n}=kd(),{dir:r}=K1(),o=U({id:t,dir:r,getRootNode:n},e),u=ad(NN,o);return kN(u,e1)},IN=e=>{const[t,a]=s1(e),c=a,{children:n}=c,r=Gt(c,["children"]),o=ON(r),u=fd(sr({present:o.open},t));return I.jsx(Av,{value:o,children:I.jsx(t1,{value:u,children:n})})},Q1=W.forwardRef((e,t)=>{const n=cd(),r=Yo(),o=sr(be(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return I.jsx(oi.button,be(U({},o),{ref:t}))});Q1.displayName="PopoverTrigger";function PN(e){return fn({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 RN(e){return fn({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 LN(e){return fn({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 DN(e){return fn({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 MN=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=si(),r=()=>{n(),e()};return I.jsxs("button",{className:se(`${ee}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[I.jsx(DN,{}),"Clear chat"]})},Nd=({className:e,componentType:t,children:n})=>{const[r,o]=W.useState(!1),{globalClassName:u}=rr(),a=()=>{o(!1)},c=f=>{o(f.open)};return I.jsxs(IN,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[I.jsx(Q1,{"aria-label":`Overflow menu for ${t}`,className:se(`${ee}-overflow-menu-button-trigger`,u,e,t),children:I.jsx(LN,{})}),I.jsx(r1,{children:I.jsxs(n1,{className:se(`${ee}-overflow-menu-list`,u,t),children:[n,I.jsx(MN,{componentType:t,onClearChat:a})]})})]})};function FN(e){return fn({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 X1(e){return fn({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 J1=({className:e,onClick:t,disabled:n=!1})=>I.jsx("button",{"aria-label":"Close",className:se(e,`${ee}-close-button`),disabled:n,onClick:t,children:I.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:I.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"})})}),Z1=({componentType:e,isIcon:t})=>{const n=()=>{jf("modal")};return t?I.jsx(Ha,{className:se("toggle-modal-button",e),ariaLabel:"Toggle Modal",onClick:n,icon:I.jsx(X1,{})}):I.jsxs("button",{className:se(`${ee}-overflow-menu-button`,e,"toggle-modal-button"),onClick:n,children:[I.jsx(X1,{}),"Show modal"]})},BN=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=rr();if(!n)return null;const o=n.getName(t),u=n.getBrand(t),a=n.getPriceDisplay(t),c=n.getRelativePdp(t),f=n.getPdp(t),h=n.getImage(t),m=c&&typeof c=="string"?new URL(c,window.location.origin).href:f;return I.jsxs("div",{className:se(r,`${ee}-product-tile`,{embedded:!e,standalone:e}),children:[I.jsx("img",{className:se(r,`${ee}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),I.jsxs("div",{className:se(r,`${ee}-product-tile-details`,{embedded:!e,standalone:e}),children:[I.jsxs("div",{className:se(r,`${ee}-product-tile-content`),children:[u&&I.jsx("p",{className:`${ee}-product-tile-brand`,children:u}),m?I.jsxs("a",{"aria-label":`Go to product page for ${o}`,className:se(r,`${ee}-product-tile-pdp`),href:`${m}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",I.jsx("span",{className:se(r,`${ee}-product-tile-pdp-arrow`),children:"→"})]}):I.jsx("p",{className:se(r,`${ee}-product-tile-name`),title:o,children:o})]}),I.jsx("div",{className:se(r,`${ee}-product-tile-footer`),children:I.jsx("p",{className:se(r,`${ee}-product-tile-price`),children:a})})]})]})},UN=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=rr(),o=t;return n?I.jsxs("div",{className:se(r,`${ee}-display-products widget-message`),children:[I.jsx("p",{children:o.message}),o.products&&o.products.length>0&&I.jsx("div",{className:se(r,`${ee}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(u=>{const a=n.getPid(u);return I.jsx(BN,{isWidgetStandalone:e,product:u},`${a}`)})})]}):null},HN=({globalClassName:e,message:t,isWidgetStandalone:n})=>I.jsx("div",{className:se(e,`${ee}-error-message`,{standalone:n,embedded:!n}),children:I.jsxs("p",{className:se(e,`${ee}-error-message-text`,{standalone:n,embedded:!n}),children:[I.jsx(tA,{})," ",t.message||"An error occurred while processing your request."]})});function zN(e){return fn({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 jN=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:u})=>I.jsx("div",{className:se(e,`${ee}-suggestion-container standalone`),children:o.map(a=>I.jsxs(Vf,{disabled:r,className:se(e,`${ee}-suggestion-button standalone`),onClick:()=>u(a,n||t),children:[I.jsx(zN,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",a.displayText]},a.displayText))}),$N=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=si();return I.jsxs("div",{className:se(e,`${ee}-follow-up`),children:[I.jsx("p",{className:se(e,`${ee}-text`),children:t.message}),n&&I.jsx(jN,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&I.jsx("div",{className:se(e,`${ee}-suggestion-container embedded`),children:t.suggestions.map(u=>I.jsx("button",{disabled:o,className:se(e,`${ee}-suggestion-button embedded`),onClick:()=>r(u,t.eventSourceId||t.id),children:u.displayText},u.displayText))})]})};function jF(){}function $F(){}function eE(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const a=n.slice(o,r).trim();(a||!u)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function tE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const VN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YN={};function nE(e,t){return(YN.jsx?qN:VN).test(e)}const WN=/[ \t\n\f\r]/g;function GN(e){return typeof e=="object"?e.type==="text"?rE(e.value):!1:rE(e)}function rE(e){return e.replace(WN,"")===""}let Zo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Zo.prototype.normal={},Zo.prototype.property={},Zo.prototype.space=void 0;function iE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Zo(n,r,t)}function eu(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let KN=0;const $e=qi(),Rt=qi(),Od=qi(),he=qi(),ut=qi(),Hs=qi(),Pn=qi();function qi(){return Kc(2,++KN)}const Id=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Rt,commaOrSpaceSeparated:Pn,commaSeparated:Hs,number:he,overloadedBoolean:Od,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Pd=Object.keys(Id);let Rd=class extends _n{constructor(t,n,r,o){let u=-1;if(super(t,n),sE(this,"space",o),typeof r=="number")for(;++u<Pd.length;){const a=Pd[u];sE(this,Pd[u],(r&Id[a])===Id[a])}}};Rd.prototype.defined=!0;function sE(e,t,n){n&&(e[t]=n)}function zs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new Rd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[eu(r)]=r,n[eu(u.attribute)]=r}return new Zo(t,n,e.space)}const oE=zs({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:ut,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Rt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uE(e,t){return t in e?e[t]:t}function aE(e,t){return uE(e,t.toLowerCase())}const QN=zs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hs,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ut,autoFocus:$e,autoPlay:$e,blocking:ut,capture:null,charSet:null,checked:$e,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:Rt,controls:$e,controlsList:ut,coords:he|Hs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Od,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ut,height:he,hidden:Od,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ut,itemRef:ut,itemScope:$e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:he,pattern:null,ping:ut,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ut,required:$e,reversed:$e,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Rt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:aE}),XN=zs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Hs,g2:Hs,glyphName:Hs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uE}),lE=zs({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()}}),cE=zs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aE}),fE=zs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JN={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"},ZN=/[A-Z]/g,dE=/-[a-z]/g,e3=/^data[-\w.:]+$/i;function Ld(e,t){const n=eu(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&e3.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(dE,n3);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!dE.test(u)){let a=u.replace(ZN,t3);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Rd}return new o(r,t)}function t3(e){return"-"+e.toLowerCase()}function n3(e){return e.charAt(1).toUpperCase()}const al=iE([oE,QN,lE,cE,fE],"html"),js=iE([oE,XN,lE,cE,fE],"svg");function hE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pE(e){return e.join(" ").trim()}var $s={},Dd,mE;function r3(){if(mE)return Dd;mE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
15
|
-
`,h="/",m="*",E="",b="comment",T="declaration";Dd=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var k=1,F=1;function D(le){var de=le.match(t);de&&(k+=de.length);var ye=le.lastIndexOf(f);F=~ye?le.length-ye:F+le.length}function z(){var le={line:k,column:F};return function(de){return de.position=new X(le),Te(),de}}function X(le){this.start=le,this.end={line:k,column:F},this.source=C.source}X.prototype.content=S;function B(le){var de=new Error(C.source+":"+k+":"+F+": "+le);if(de.reason=le,de.filename=C.source,de.line=k,de.column=F,de.source=S,!C.silent)throw de}function te(le){var de=le.exec(S);if(de){var ye=de[0];return D(ye),S=S.slice(ye.length),de}}function Te(){te(n)}function Se(le){var de;for(le=le||[];de=H();)de!==!1&&le.push(de);return le}function H(){var le=z();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var de=2;E!=S.charAt(de)&&(m!=S.charAt(de)||h!=S.charAt(de+1));)++de;if(de+=2,E===S.charAt(de-1))return B("End of comment missing");var ye=S.slice(2,de-2);return F+=2,D(ye),S=S.slice(de),F+=2,le({type:b,comment:ye})}}function fe(){var le=z(),de=te(r);if(de){if(H(),!te(o))return B("property missing ':'");var ye=te(u),Ae=le({type:T,property:_(de[0].replace(e,E)),value:ye?_(ye[0].replace(e,E)):E});return te(a),Ae}}function ae(){var le=[];Se(le);for(var de;de=fe();)de!==!1&&(le.push(de),Se(le));return le}return Te(),ae()};function _(S){return S?S.replace(c,E):E}return Dd}var gE;function i3(){if(gE)return $s;gE=1;var e=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0}),$s.default=n;var t=e(r3());function n(r,o){var u=null;if(!r||typeof r!="string")return u;var a=(0,t.default)(r),c=typeof o=="function";return a.forEach(function(f){if(f.type==="declaration"){var h=f.property,m=f.value;c?o(h,m,f):m&&(u=u||{},u[h]=m)}}),u}return $s}var tu={},EE;function s3(){if(EE)return tu;EE=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),u(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,a))};return tu.camelCase=f,tu}var nu,yE;function o3(){if(yE)return nu;yE=1;var e=nu&&nu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(i3()),n=s3();function r(o,u){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,u)]=f)}),a}return r.default=r,nu=r,nu}var u3=o3();const a3=Ge(u3),ll=TE("end"),Ar=TE("start");function TE(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 l3(e){const t=Ar(e),n=ll(e);if(t&&n)return{start:t,end:n}}function ru(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bE(e.position):"start"in e||"end"in e?bE(e):"line"in e||"column"in e?Md(e):""}function Md(e){return _E(e&&e.line)+":"+_E(e&&e.column)}function bE(e){return Md(e&&e.start)+"-"+Md(e&&e.end)}function _E(e){return e&&typeof e=="number"?e:1}class tn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",u={},a=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u=U({},n)),typeof t=="string"?o=t:!u.cause&&t&&(a=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?u.ruleId=r:(u.source=r.slice(0,f),u.ruleId=r.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=ru(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=a&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual,this.expected,this.note,this.url}}tn.prototype.file="",tn.prototype.name="",tn.prototype.reason="",tn.prototype.message="",tn.prototype.stack="",tn.prototype.column=void 0,tn.prototype.line=void 0,tn.prototype.ancestors=void 0,tn.prototype.cause=void 0,tn.prototype.fatal=void 0,tn.prototype.place=void 0,tn.prototype.ruleId=void 0,tn.prototype.source=void 0;const Fd={}.hasOwnProperty,c3=new Map,f3=/[A-Z]/g,d3=new Set(["table","tbody","thead","tfoot","tr"]),h3=new Set(["td","th"]),xE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function p3(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=x3(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=_3(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?js:al,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=SE(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function SE(e,t,n){if(t.type==="element")return m3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return g3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return y3(e,t,n);if(t.type==="mdxjsEsm")return E3(e,t);if(t.type==="root")return T3(e,t,n);if(t.type==="text")return b3(e,t)}function m3(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=js,e.schema=o),e.ancestors.push(t);const u=CE(e,t.tagName,!1),a=S3(e,t);let c=Ud(e,t);return d3.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!GN(f):!0})),wE(e,a,u,t),Bd(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function g3(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)}iu(e,t.position)}function E3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);iu(e,t.position)}function y3(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=js,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:CE(e,t.name,!0),a=w3(e,t),c=Ud(e,t);return wE(e,a,u,t),Bd(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function T3(e,t,n){const r={};return Bd(r,Ud(e,t)),e.create(t,e.Fragment,r,n)}function b3(e,t){return t.value}function wE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _3(e,t,n){return r;function r(o,u,a,c){const h=Array.isArray(a.children)?n:t;return c?h(u,a,c):h(u,a)}}function x3(e,t){return n;function n(r,o,u,a){const c=Array.isArray(u.children),f=Ar(r);return t(o,u,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function S3(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Fd.call(t.properties,o)){const u=C3(e,o,t.properties[o]);if(u){const[a,c]=u;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&h3.has(t.tagName)?r=c:n[a]=c}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function w3(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const a=u.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else iu(e,t.position);else{const o=r.name;let u;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,u=e.evaluater.evaluateExpression(c.expression)}else iu(e,t.position);else u=r.value===null?!0:r.value;n[o]=u}return n}function Ud(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:c3;for(;++r<t.children.length;){const u=t.children[r];let a;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=SE(e,u,a);c!==void 0&&n.push(c)}return n}function C3(e,t,n){const r=Ld(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tE(n):pE(n)),r.property==="style"){let o=typeof n=="object"?n:A3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=v3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?JN[r.property]||r.property:r.attribute,n]}}function A3(e,t){try{return a3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new tn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=xE+"#cannot-parse-style-attribute",o}}function CE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,a;for(;++u<o.length;){const c=nE(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}r=a}else r=nE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Fd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);iu(e)}function iu(e,t){const n=new tn("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=xE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function v3(e){const t={};let n;for(n in e)Fd.call(e,n)&&(t[k3(n)]=e[n]);return t}function k3(e){let t=e.replace(f3,N3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N3(e){return"-"+e.toLowerCase()}const Hd={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"]},O3={};function zd(e,t){const n=O3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return AE(e,r,o)}function AE(e,t,n){if(I3(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 vE(e.children,t,n)}return Array.isArray(e)?vE(e,t,n):""}function vE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=AE(e[o],t,n);return r.join("")}function I3(e){return!!(e&&typeof e=="object")}const kE=document.createElement("i");function jd(e){const t="&"+e+";";kE.innerHTML=t;const n=kE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(e,t,n,r){const o=e.length;let u=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);u<r.length;)a=r.slice(u,u+1e4),a.unshift(t,0),e.splice(...a),u+=1e4,t+=1e4}function Vn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const NE={}.hasOwnProperty;function OE(e){const t={};let n=-1;for(;++n<e.length;)P3(t,e[n]);return t}function P3(e,t){let n;for(n in t){const o=(NE.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let a;if(u)for(a in u){NE.call(o,a)||(o[a]=[]);const c=u[a];R3(o[a],Array.isArray(c)?c:c?[c]:[])}}}function R3(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function IE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dn=li(/[A-Za-z]/),nn=li(/[\dA-Za-z]/),L3=li(/[#-'*+\--9=?A-Z^-~]/);function cl(e){return e!==null&&(e<32||e===127)}const $d=li(/\d/),D3=li(/[\dA-Fa-f]/),M3=li(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function ot(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const fl=li(new RegExp("\\p{P}|\\p{S}","u")),Yi=li(/\s/);function li(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Vs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let a="";if(u===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(a=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(a=String.fromCharCode(u,c),o=1):a="�"}else a=String.fromCharCode(u);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return a;function a(f){return Ke(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ke(f)&&u++<o?(e.consume(f),c):(e.exit(n),t(f))}}const F3={tokenize:B3};function B3(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),a)}}const U3={tokenize:H3},PE={tokenize:z3};function H3(e){const t=this,n=[];let r=0,o,u,a;return c;function c(D){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,f,h)(D)}return h(D)}function f(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const z=t.events.length;let X=z,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}k(r);let te=z;for(;te<t.events.length;)t.events[te][1].end=U({},B),te++;return Rn(t.events,X+1,0,t.events.slice(z)),t.events.length=te,h(D)}return c(D)}function h(D){if(r===n.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return _(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PE,m,E)(D)}function m(D){return o&&F(),k(r),b(D)}function E(D){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,_(D)}function b(D){return t.containerState={},e.attempt(PE,T,_)(D)}function T(D){return r++,n.push([t.currentConstruct,t.containerState]),b(D)}function _(D){if(D===null){o&&F(),k(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(D)}function S(D){if(D===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(D);return}return Re(D)?(e.consume(D),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),S)}function C(D,z){const X=t.sliceStream(D);if(z&&X.push(null),D.previous=u,u&&(u.next=D),u=D,o.defineSkip(D.start),o.write(X),t.parser.lazy[D.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<a&&(!o.events[B][1].end||o.events[B][1].end.offset>a))return;const te=t.events.length;let Te=te,Se,H;for(;Te--;)if(t.events[Te][0]==="exit"&&t.events[Te][1].type==="chunkFlow"){if(Se){H=t.events[Te][1].end;break}Se=!0}for(k(r),B=te;B<t.events.length;)t.events[B][1].end=U({},H),B++;Rn(t.events,Te+1,0,t.events.slice(te)),t.events.length=B}}function k(D){let z=n.length;for(;z-- >D;){const X=n[z];t.containerState=X[1],X[0].exit.call(t,e)}n.length=D}function F(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function z3(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qs(e){if(e===null||ot(e)||Yi(e))return 1;if(fl(e))return 2}function dl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const Vd={name:"attention",resolveAll:j3,tokenize:$3};function j3(e,t){let n=-1,r,o,u,a,c,f,h,m;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;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=U({},e[r][1].end),b=U({},e[n][1].start);RE(E,-f),RE(b,f),a={type:f>1?"strongSequence":"emphasisSequence",start:E,end:U({},e[r][1].end)},c={type:f>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},u={type:f>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},o={type:f>1?"strong":"emphasis",start:U({},a.start),end:U({},c.end)},e[r][1].end=U({},a.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Vn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Vn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",u,t]]),h=Vn(h,dl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Vn(h,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Vn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Rn(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qs(r);let u;return a;function a(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const h=e.exit("attentionSequence"),m=qs(f),E=!m||m===2&&o||n.includes(f),b=!o||o===2&&m||n.includes(r);return h._open=!!(u===42?E:E&&(o||!b)),h._close=!!(u===42?b:b&&(m||!E)),t(f)}}function RE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const V3={name:"autolink",tokenize:q3};function q3(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(T){return dn(T)?(e.consume(T),a):T===64?n(T):h(T)}function a(T){return T===43||T===45||T===46||nn(T)?(r=1,c(T)):h(T)}function c(T){return T===58?(e.consume(T),r=0,f):(T===43||T===45||T===46||nn(T))&&r++<32?(e.consume(T),c):(r=0,h(T))}function f(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||cl(T)?n(T):(e.consume(T),f)}function h(T){return T===64?(e.consume(T),m):L3(T)?(e.consume(T),h):n(T)}function m(T){return nn(T)?E(T):n(T)}function E(T){return T===46?(e.consume(T),r=0,m):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||nn(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const su={partial:!0,tokenize:Y3};function Y3(e,t,n){return r;function r(u){return Ke(u)?Je(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Re(u)?t(u):n(u)}}const LE={continuation:{tokenize:G3},exit:K3,name:"blockQuote",tokenize:W3};function W3(e,t,n){const r=this;return o;function o(a){if(a===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),u}return n(a)}function u(a){return Ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function G3(e,t,n){const r=this;return o;function o(a){return Ke(a)?Je(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):u(a)}function u(a){return e.attempt(LE,t,n)(a)}}function K3(e){e.exit("blockQuote")}const DE={name:"characterEscape",tokenize:Q3};function Q3(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return M3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const ME={name:"characterReference",tokenize:X3};function X3(e,t,n){const r=this;let o=0,u,a;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,a=nn,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,a=D3,m):(e.enter("characterReferenceValue"),u=7,a=$d,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return a===nn&&!jd(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(E)&&o++<u?(e.consume(E),m):n(E)}}const FE={partial:!0,tokenize:Z3},BE={concrete:!0,name:"codeFenced",tokenize:J3};function J3(e,t,n){const r=this,o={partial:!0,tokenize:X};let u=0,a=0,c;return f;function f(B){return h(B)}function h(B){const te=r.events[r.events.length-1];return u=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(a++,e.consume(B),m):a<3?n(B):(e.exit("codeFencedFenceSequence"),Ke(B)?Je(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Re(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(FE,S,z)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Ke(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,T,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function T(B){return B===null||Re(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function S(B){return e.attempt(o,z,C)(B)}function C(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),k}function k(B){return u>0&&Ke(B)?Je(e,F,"linePrefix",u+1)(B):F(B)}function F(B){return B===null||Re(B)?e.check(FE,S,z)(B):(e.enter("codeFlowValue"),D(B))}function D(B){return B===null||Re(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),D)}function z(B){return e.exit("codeFenced"),t(B)}function X(B,te,Te){let Se=0;return H;function H(ye){return B.enter("lineEnding"),B.consume(ye),B.exit("lineEnding"),fe}function fe(ye){return B.enter("codeFencedFence"),Ke(ye)?Je(B,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):ae(ye)}function ae(ye){return ye===c?(B.enter("codeFencedFenceSequence"),le(ye)):Te(ye)}function le(ye){return ye===c?(Se++,B.consume(ye),le):Se>=a?(B.exit("codeFencedFenceSequence"),Ke(ye)?Je(B,de,"whitespace")(ye):de(ye)):Te(ye)}function de(ye){return ye===null||Re(ye)?(B.exit("codeFencedFence"),te(ye)):Te(ye)}}}function Z3(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const qd={name:"codeIndented",tokenize:tO},eO={partial:!0,tokenize:nO};function tO(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,u,"linePrefix",5)(h)}function u(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):Re(h)?e.attempt(eO,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function nO(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Je(e,u,"linePrefix",5)(a)}function u(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Re(a)?o(a):n(a)}}const rO={name:"codeText",previous:sO,resolve:iO,tokenize:oO};function iO(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function sO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oO(e,t,n){let r=0,o,u;return a;function a(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),o=0,m(E)):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Re(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",h(E))}}class uO{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ou(this.left,r),u.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),ou(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ou(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);ou(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ou(this.left,n.reverse())}}}function ou(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 UE(e){const t={};let n=-1,r,o,u,a,c,f,h;const m=new uO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aO(m,n)),n=t[n],h=!0);else if(r[1]._container){for(u=n,o=void 0;u--;)if(a=m.get(u),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=u);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function aO(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const u=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let m,E,b=-1,T=n,_=0,S=0;const C=[S];for(;T;){for(;e.get(++o)[1]!==T;);u.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&a.defineSkip(T.start),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),E=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,C.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(a.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),b=C.length;b--;){const k=c.slice(C[b],C[b+1]),F=u.pop();f.push([F,F+k.length-1]),e.splice(F,2,k)}for(f.reverse(),b=-1;++b<f.length;)h[_+f[b][0]]=_+f[b][1],_+=f[b][1]-f[b][0]-1;return h}const lO={resolve:fO,tokenize:dO},cO={partial:!0,tokenize:hO};function fO(e){return UE(e),e}function dO(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?u(c):Re(c)?e.check(cO,a,u)(c):(e.consume(c),o)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function hO(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,u,"linePrefix")}function u(a){if(a===null||Re(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function HE(e,t,n,r,o,u,a,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return E;function E(k){return k===60?(e.enter(r),e.enter(o),e.enter(u),e.consume(k),e.exit(u),b):k===null||k===32||k===41||cl(k)?n(k):(e.enter(r),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(k))}function b(k){return k===62?(e.enter(u),e.consume(k),e.exit(u),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(k))}function T(k){return k===62?(e.exit("chunkString"),e.exit(c),b(k)):k===null||k===60||Re(k)?n(k):(e.consume(k),k===92?_:T)}function _(k){return k===60||k===62||k===92?(e.consume(k),T):T(k)}function S(k){return!m&&(k===null||k===41||ot(k))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(r),t(k)):m<h&&k===40?(e.consume(k),m++,S):k===41?(e.consume(k),m--,S):k===null||k===32||k===40||cl(k)?n(k):(e.consume(k),k===92?C:S)}function C(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function zE(e,t,n,r,o,u){const a=this;let c=0,f;return h;function h(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(u),m}function m(T){return c>999||T===null||T===91||T===93&&!f||T===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(T):T===93?(e.exit(u),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Re(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Re(T)||c++>999?(e.exit("chunkString"),m(T)):(e.consume(T),f||(f=!Ke(T)),T===92?b:E)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,E):E(T)}}function jE(e,t,n,r,o,u){let a;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),a=b===40?41:b,f):n(b)}function f(b){return b===a?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(u),h(b))}function h(b){return b===a?(e.exit(u),f(a)):b===null?n(b):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===a||b===null||Re(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===a||b===92?(e.consume(b),m):m(b)}}function uu(e,t){let n;return r;function r(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const pO={name:"definition",tokenize:gO},mO={partial:!0,tokenize:EO};function gO(e,t,n){const r=this;let o;return u;function u(T){return e.enter("definition"),a(T)}function a(T){return zE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),f):n(T)}function f(T){return ot(T)?uu(e,h)(T):h(T)}function h(T){return HE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(mO,E,E)(T)}function E(T){return Ke(T)?Je(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Re(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function EO(e,t,n){return r;function r(c){return ot(c)?uu(e,o)(c):n(c)}function o(c){return jE(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Ke(c)?Je(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Re(c)?t(c):n(c)}}const yO={name:"hardBreakEscape",tokenize:TO};function TO(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Re(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const bO={name:"headingAtx",resolve:_O,tokenize:xO};function _O(e,t){let n=e.length-2,r=3,o,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rn(e,r,n-r+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function xO(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||ot(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Re(m)?(e.exit("atxHeading"),t(m)):Ke(m)?Je(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||ot(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const SO=["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"],$E=["pre","script","style","textarea"],wO={concrete:!0,name:"htmlFlow",resolveTo:vO,tokenize:kO},CO={partial:!0,tokenize:OO},AO={partial:!0,tokenize:NO};function vO(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 kO(e,t,n){const r=this;let o,u,a,c,f;return h;function h(N){return m(N)}function m(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),E}function E(N){return N===33?(e.consume(N),b):N===47?(e.consume(N),u=!0,S):N===63?(e.consume(N),o=3,r.interrupt?t:w):dn(N)?(e.consume(N),a=String.fromCharCode(N),C):n(N)}function b(N){return N===45?(e.consume(N),o=2,T):N===91?(e.consume(N),o=5,c=0,_):dn(N)?(e.consume(N),o=4,r.interrupt?t:w):n(N)}function T(N){return N===45?(e.consume(N),r.interrupt?t:w):n(N)}function _(N){const _e="CDATA[";return N===_e.charCodeAt(c++)?(e.consume(N),c===_e.length?r.interrupt?t:ae:_):n(N)}function S(N){return dn(N)?(e.consume(N),a=String.fromCharCode(N),C):n(N)}function C(N){if(N===null||N===47||N===62||ot(N)){const _e=N===47,Be=a.toLowerCase();return!_e&&!u&&$E.includes(Be)?(o=1,r.interrupt?t(N):ae(N)):SO.includes(a.toLowerCase())?(o=6,_e?(e.consume(N),k):r.interrupt?t(N):ae(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):u?F(N):D(N))}return N===45||nn(N)?(e.consume(N),a+=String.fromCharCode(N),C):n(N)}function k(N){return N===62?(e.consume(N),r.interrupt?t:ae):n(N)}function F(N){return Ke(N)?(e.consume(N),F):H(N)}function D(N){return N===47?(e.consume(N),H):N===58||N===95||dn(N)?(e.consume(N),z):Ke(N)?(e.consume(N),D):H(N)}function z(N){return N===45||N===46||N===58||N===95||nn(N)?(e.consume(N),z):X(N)}function X(N){return N===61?(e.consume(N),B):Ke(N)?(e.consume(N),X):D(N)}function B(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,te):Ke(N)?(e.consume(N),B):Te(N)}function te(N){return N===f?(e.consume(N),f=null,Se):N===null||Re(N)?n(N):(e.consume(N),te)}function Te(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ot(N)?X(N):(e.consume(N),Te)}function Se(N){return N===47||N===62||Ke(N)?D(N):n(N)}function H(N){return N===62?(e.consume(N),fe):n(N)}function fe(N){return N===null||Re(N)?ae(N):Ke(N)?(e.consume(N),fe):n(N)}function ae(N){return N===45&&o===2?(e.consume(N),Ae):N===60&&o===1?(e.consume(N),oe):N===62&&o===4?(e.consume(N),R):N===63&&o===3?(e.consume(N),w):N===93&&o===5?(e.consume(N),Z):Re(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(CO,K,le)(N)):N===null||Re(N)?(e.exit("htmlFlowData"),le(N)):(e.consume(N),ae)}function le(N){return e.check(AO,de,K)(N)}function de(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ye}function ye(N){return N===null||Re(N)?le(N):(e.enter("htmlFlowData"),ae(N))}function Ae(N){return N===45?(e.consume(N),w):ae(N)}function oe(N){return N===47?(e.consume(N),a="",q):ae(N)}function q(N){if(N===62){const _e=a.toLowerCase();return $E.includes(_e)?(e.consume(N),R):ae(N)}return dn(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),q):ae(N)}function Z(N){return N===93?(e.consume(N),w):ae(N)}function w(N){return N===62?(e.consume(N),R):N===45&&o===2?(e.consume(N),w):ae(N)}function R(N){return N===null||Re(N)?(e.exit("htmlFlowData"),K(N)):(e.consume(N),R)}function K(N){return e.exit("htmlFlow"),t(N)}}function NO(e,t,n){const r=this;return o;function o(a){return Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):n(a)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function OO(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(su,t,n)}}const IO={name:"htmlText",tokenize:PO};function PO(e,t,n){const r=this;let o,u,a;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),X):w===63?(e.consume(w),D):dn(w)?(e.consume(w),Te):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),u=0,_):dn(w)?(e.consume(w),F):n(w)}function m(w){return w===45?(e.consume(w),T):n(w)}function E(w){return w===null?n(w):w===45?(e.consume(w),b):Re(w)?(a=E,oe(w)):(e.consume(w),E)}function b(w){return w===45?(e.consume(w),T):E(w)}function T(w){return w===62?Ae(w):w===45?b(w):E(w)}function _(w){const R="CDATA[";return w===R.charCodeAt(u++)?(e.consume(w),u===R.length?S:_):n(w)}function S(w){return w===null?n(w):w===93?(e.consume(w),C):Re(w)?(a=S,oe(w)):(e.consume(w),S)}function C(w){return w===93?(e.consume(w),k):S(w)}function k(w){return w===62?Ae(w):w===93?(e.consume(w),k):S(w)}function F(w){return w===null||w===62?Ae(w):Re(w)?(a=F,oe(w)):(e.consume(w),F)}function D(w){return w===null?n(w):w===63?(e.consume(w),z):Re(w)?(a=D,oe(w)):(e.consume(w),D)}function z(w){return w===62?Ae(w):D(w)}function X(w){return dn(w)?(e.consume(w),B):n(w)}function B(w){return w===45||nn(w)?(e.consume(w),B):te(w)}function te(w){return Re(w)?(a=te,oe(w)):Ke(w)?(e.consume(w),te):Ae(w)}function Te(w){return w===45||nn(w)?(e.consume(w),Te):w===47||w===62||ot(w)?Se(w):n(w)}function Se(w){return w===47?(e.consume(w),Ae):w===58||w===95||dn(w)?(e.consume(w),H):Re(w)?(a=Se,oe(w)):Ke(w)?(e.consume(w),Se):Ae(w)}function H(w){return w===45||w===46||w===58||w===95||nn(w)?(e.consume(w),H):fe(w)}function fe(w){return w===61?(e.consume(w),ae):Re(w)?(a=fe,oe(w)):Ke(w)?(e.consume(w),fe):Se(w)}function ae(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,le):Re(w)?(a=ae,oe(w)):Ke(w)?(e.consume(w),ae):(e.consume(w),de)}function le(w){return w===o?(e.consume(w),o=void 0,ye):w===null?n(w):Re(w)?(a=le,oe(w)):(e.consume(w),le)}function de(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ot(w)?Se(w):(e.consume(w),de)}function ye(w){return w===47||w===62||ot(w)?Se(w):n(w)}function Ae(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function oe(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),q}function q(w){return Ke(w)?Je(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):Z(w)}function Z(w){return e.enter("htmlTextData"),a(w)}}const Yd={name:"labelEnd",resolveAll:MO,resolveTo:FO,tokenize:BO},RO={tokenize:UO},LO={tokenize:HO},DO={tokenize:zO};function MO(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Rn(e,0,e.length,n),e}function FO(e,t){let n=e.length,r=0,o,u,a,c;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:U({},e[u][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[u][1].start),end:U({},e[a][1].end)},m={type:"labelText",start:U({},e[u+r+2][1].end),end:U({},e[a-2][1].start)};return c=[["enter",f,t],["enter",h,t]],c=Vn(c,e.slice(u+1,u+r+3)),c=Vn(c,[["enter",m,t]]),c=Vn(c,dl(t.parser.constructs.insideSpan.null,e.slice(u+r+4,a-3),t)),c=Vn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=Vn(c,e.slice(a+1)),c=Vn(c,[["exit",f,t]]),Rn(e,u,e.length,c),e}function BO(e,t,n){const r=this;let o=r.events.length,u,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return c;function c(b){return u?u._inactive?E(b):(a=r.parser.defined.includes(ar(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(RO,m,a?m:E)(b):b===91?e.attempt(LO,m,a?h:E)(b):a?m(b):E(b)}function h(b){return e.attempt(DO,m,E)(b)}function m(b){return t(b)}function E(b){return u._balanced=!0,n(b)}}function UO(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ot(E)?uu(e,u)(E):u(E)}function u(E){return E===41?m(E):HE(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function a(E){return ot(E)?uu(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?jE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return ot(E)?uu(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function HO(e,t,n){const r=this;return o;function o(c){return zE.call(r,e,u,a,"reference","referenceMarker","referenceString")(c)}function u(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function zO(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const jO={name:"labelStartImage",resolveAll:Yd.resolveAll,tokenize:$O};function $O(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const VO={name:"labelStartLink",resolveAll:Yd.resolveAll,tokenize:qO};function qO(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),u}function u(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Wd={name:"lineEnding",tokenize:YO};function YO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const hl={name:"thematicBreak",tokenize:WO};function WO(e,t,n){let r=0,o;return u;function u(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ke(h)?Je(e,c,"whitespace")(h):c(h))}}const xn={continuation:{tokenize:XO},exit:ZO,name:"list",tokenize:QO},GO={partial:!0,tokenize:eI},KO={partial:!0,tokenize:JO};function QO(e,t,n){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=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:$d(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(hl,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(T)}return n(T)}function f(T){return $d(T)&&++a<10?(e.consume(T),f):(!r.interrupt||a<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):n(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(su,r.interrupt?n:m,e.attempt(GO,b,E))}function m(T){return r.containerState.initialBlankLine=!0,u++,b(T)}function E(T){return Ke(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function XO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(su,o,u);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(c)}function u(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KO,t,a)(c))}function a(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function JO(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(u):n(u)}}function ZO(e){e.exit(this.containerState.type)}function eI(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const a=r.events[r.events.length-1];return!Ke(u)&&a&&a[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const VE={name:"setextUnderline",resolveTo:tI,tokenize:nI};function tI(e,t){let n=e.length,r,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const a={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",a,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[u][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function nI(e,t,n){const r=this;let o;return u;function u(h){let m=r.events.length,E;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){E=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ke(h)?Je(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const rI={tokenize:iI};function iI(e){const t=this,n=e.attempt(su,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(lO,o)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sI={resolveAll:YE()},oI=qE("string"),uI=qE("text");function qE(e){return{resolveAll:YE(e==="text"?aI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],u=n.attempt(o,a,c);return a;function a(m){return h(m)?u(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),u(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const E=o[m];let b=-1;if(E)for(;++b<E.length;){const T=E[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function YE(e){return t;function t(n,r){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,r):n}}function aI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let u=o.length,a=-1,c=0,f;for(;u--;){const h=o[u];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?a:r.start._bufferIndex+a,_index:r.start._index+u,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:U({},r.end)};r.end=U({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const lI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:pO},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:LE},flow:{35:bO,42:hl,45:[VE,hl],60:wO,61:VE,95:hl,96:BE,126:BE},flowInitial:{[-2]:qd,[-1]:qd,32:qd},insideSpan:{null:[Vd,sI]},string:{38:ME,92:DE},text:{[-5]:Wd,[-4]:Wd,[-3]:Wd,33:jO,38:ME,42:Vd,60:[V3,IO],91:VO,92:[yO,DE],93:Yd,95:Vd,96:rO}},Symbol.toStringTag,{value:"Module"}));function cI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},u=[];let a=[],c=[];const f={attempt:te(X),check:te(B),consume:F,enter:D,exit:z,interrupt:te(B,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let m=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function E(fe){return a=Vn(a,fe),C(),a[a.length-1]!==null?[]:(Te(t,0),h.events=dl(u,h.events,h),h.events)}function b(fe,ae){return dI(T(fe),ae)}function T(fe){return fI(a,fe)}function _(){const{_bufferIndex:fe,_index:ae,line:le,column:de,offset:ye}=r;return{_bufferIndex:fe,_index:ae,line:le,column:de,offset:ye}}function S(fe){o[fe.line]=fe.column,H()}function C(){let fe;for(;r._index<a.length;){const ae=a[r._index];if(typeof ae=="string")for(fe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===fe&&r._bufferIndex<ae.length;)k(ae.charCodeAt(r._bufferIndex));else k(ae)}}function k(fe){m=m(fe)}function F(fe){Re(fe)?(r.line++,r.column=1,r.offset+=fe===-3?2:1,H()):fe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=fe}function D(fe,ae){const le=ae||{};return le.type=fe,le.start=_(),h.events.push(["enter",le,h]),c.push(le),le}function z(fe){const ae=c.pop();return ae.end=_(),h.events.push(["exit",ae,h]),ae}function X(fe,ae){Te(fe,ae.from)}function B(fe,ae){ae.restore()}function te(fe,ae){return le;function le(de,ye,Ae){let oe,q,Z,w;return Array.isArray(de)?K(de):"tokenize"in de?K([de]):R(de);function R(Pe){return Ye;function Ye(Ve){const me=Ve!==null&&Pe[Ve],Ne=Ve!==null&&Pe.null,Xe=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return K(Xe)(Ve)}}function K(Pe){return oe=Pe,q=0,Pe.length===0?Ae:N(Pe[q])}function N(Pe){return Ye;function Ye(Ve){return w=Se(),Z=Pe,Pe.partial||(h.currentConstruct=Pe),Pe.name&&h.parser.constructs.disable.null.includes(Pe.name)?Be():Pe.tokenize.call(ae?Object.assign(Object.create(h),ae):h,f,_e,Be)(Ve)}}function _e(Pe){return fe(Z,w),ye}function Be(Pe){return w.restore(),++q<oe.length?N(oe[q]):Ae}}}function Te(fe,ae){fe.resolveAll&&!u.includes(fe)&&u.push(fe),fe.resolve&&Rn(h.events,ae,h.events.length-ae,fe.resolve(h.events.slice(ae),h)),fe.resolveTo&&(h.events=fe.resolveTo(h.events,h))}function Se(){const fe=_(),ae=h.previous,le=h.currentConstruct,de=h.events.length,ye=Array.from(c);return{from:de,restore:Ae};function Ae(){r=fe,h.previous=ae,h.currentConstruct=le,h.events.length=de,c=ye,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function fI(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,u)];else{if(a=e.slice(n,o),r>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(r):a.shift()}u>0&&a.push(e[o].slice(0,u))}return a}function dI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const u=e[n];let a;if(typeof u=="string")a=u;else switch(u){case-5:{a="\r";break}case-4:{a=`
|
|
14
|
+
`+y.stack}return{value:i,source:s,stack:g,digest:null}}function nm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function rm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var wF=typeof WeakMap=="function"?WeakMap:Map;function y2(i,s,l){l=ii(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Fc||(Fc=!0,ym=d),rm(i,s)},l}function T2(i,s,l){l=ii(-1,l),l.tag=3;var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;l.payload=function(){return d(g)},l.callback=function(){rm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){rm(i,s),typeof d!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function b2(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new wF;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(l)||(g.add(l),i=BF.bind(null,i,s,l),s.then(i,i))}function _2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function x2(i,s,l,d,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=ii(-1,1),s.tag=2,Oi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var CF=G.ReactCurrentOwner,kn=!1;function mn(i,s,l,d){s.child=i===null?j_(s,null,l,d):bo(s,i.child,l,d)}function S2(i,s,l,d,g){l=l.render;var y=s.ref;return xo(s,g),d=Gp(i,s,l,d,y,g),l=Kp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,si(i,s,g)):(bt&&l&&Ip(s),s.flags|=1,mn(i,s,d,g),s.child)}function w2(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!Cm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,C2(i,s,y,d,g)):(i=jc(l.type,null,d,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:$u,l(x,d)&&i.ref===s.ref)return si(i,s,g)}return s.flags|=1,i=Fi(y,d),i.ref=s.ref,i.return=s,s.child=i}function C2(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if($u(y,d)&&i.ref===s.ref)if(kn=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,si(i,s,g)}return im(i,s,l,d,g)}function A2(i,s,l){var d=s.pendingProps,g=d.children,y=i!==null?i.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ct(Ao,jn),jn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ct(Ao,jn),jn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,ct(Ao,jn),jn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,ct(Ao,jn),jn|=d;return mn(i,s,g,l),s.child}function v2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function im(i,s,l,d,g){var y=vn(l)?is:an.current;return y=go(s,y),xo(s,g),l=Gp(i,s,l,d,y,g),d=Kp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,si(i,s,g)):(bt&&d&&Ip(s),s.flags|=1,mn(i,s,l,g),s.child)}function k2(i,s,l,d,g){if(vn(l)){var y=!0;hc(s)}else y=!1;if(xo(s,g),s.stateNode===null)Ic(i,s),g2(s,l,d),tm(s,l,d,g),d=!0;else if(i===null){var x=s.stateNode,O=s.memoizedProps;x.props=O;var L=x.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=Jn(Y):(Y=vn(l)?is:an.current,Y=go(s,Y));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==d||L!==Y)&&E2(s,x,d,Y),Ni=!1;var ne=s.memoizedState;x.state=ne,xc(s,d,x,g),L=s.memoizedState,O!==d||ne!==L||An.current||Ni?(typeof se=="function"&&(em(s,l,se,d),L=s.memoizedState),(O=Ni||m2(s,l,O,d,ne,L,Y))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=L),x.props=d,x.state=L,x.context=Y,d=O):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,V_(i,s),O=s.memoizedProps,Y=s.type===s.elementType?O:gr(s.type,O),x.props=Y,ce=s.pendingProps,ne=x.context,L=l.contextType,typeof L=="object"&&L!==null?L=Jn(L):(L=vn(l)?is:an.current,L=go(s,L));var xe=l.getDerivedStateFromProps;(se=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==ce||ne!==L)&&E2(s,x,d,L),Ni=!1,ne=s.memoizedState,x.state=ne,xc(s,d,x,g);var Ae=s.memoizedState;O!==ce||ne!==Ae||An.current||Ni?(typeof xe=="function"&&(em(s,l,xe,d),Ae=s.memoizedState),(Y=Ni||m2(s,l,Y,d,ne,Ae,L)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,Ae,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,Ae,L)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=Ae),x.props=d,x.state=Ae,x.context=L,d=Y):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),d=!1)}return sm(i,s,l,d,y,g)}function sm(i,s,l,d,g,y){v2(i,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&R_(s,l,!1),si(i,s,y);d=s.stateNode,CF.current=s;var O=x&&typeof l.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,i!==null&&x?(s.child=bo(s,i.child,null,y),s.child=bo(s,null,O,y)):mn(i,s,O,y),s.memoizedState=d.state,g&&R_(s,l,!0),s.child}function N2(i){var s=i.stateNode;s.pendingContext?I_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&I_(i,s.context,!1),jp(i,s.containerInfo)}function O2(i,s,l,d,g){return To(),Dp(g),s.flags|=256,mn(i,s,l,d),s.child}var om={dehydrated:null,treeContext:null,retryLane:0};function um(i){return{baseLanes:i,cachePool:null,transitions:null}}function I2(i,s,l){var d=s.pendingProps,g=wt.current,y=!1,x=(s.flags&128)!==0,O;if((O=x)||(O=i!==null&&i.memoizedState===null?!1:(g&2)!==0),O?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ct(wt,g&1),i===null)return Lp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,i=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=$c(x,d,0,null),i=ps(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=um(l),s.memoizedState=om,i):am(s,x));if(g=i.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return AF(i,s,x,d,O,g,l);if(y){y=d.fallback,x=s.mode,g=i.child,O=g.sibling;var L={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=L,s.deletions=null):(d=Fi(g,L),d.subtreeFlags=g.subtreeFlags&14680064),O!==null?y=Fi(O,y):(y=ps(y,x,l,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=i.child.memoizedState,x=x===null?um(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=om,d}return y=i.child,i=y.sibling,d=Fi(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=l),d.return=s,d.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=d,s.memoizedState=null,d}function am(i,s){return s=$c({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Oc(i,s,l,d){return d!==null&&Dp(d),bo(s,i.child,null,l),i=am(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function AF(i,s,l,d,g,y,x){if(l)return s.flags&256?(s.flags&=-257,d=nm(Error(n(422))),Oc(i,s,x,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=$c({mode:"visible",children:d.children},g,0,null),y=ps(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&bo(s,i.child,null,x),s.child.memoizedState=um(x),s.memoizedState=om,y);if((s.mode&1)===0)return Oc(i,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var O=d.dgst;return d=O,y=Error(n(419)),d=nm(y,d,void 0),Oc(i,s,x,d)}if(O=(x&i.childLanes)!==0,kn||O){if(d=Kt,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,ri(i,g),Tr(d,i,g,-1))}return wm(),d=nm(Error(n(421))),Oc(i,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=UF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,zn=Ci(g.nextSibling),Hn=s,bt=!0,mr=null,i!==null&&(Qn[Xn++]=ti,Qn[Xn++]=ni,Qn[Xn++]=ss,ti=i.id,ni=i.overflow,ss=s),s=am(s,d.children),s.flags|=4096,s)}function P2(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Up(i.return,s,l)}function lm(i,s,l,d,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=l,y.tailMode=g)}function R2(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(mn(i,s,d.children,l),d=wt.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&P2(i,l,s);else if(i.tag===19)P2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}d&=1}if(ct(wt,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Sc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),lm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Sc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}lm(s,!0,l,null,y);break;case"together":lm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Ic(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function si(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),cs|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Fi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Fi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function vF(i,s,l){switch(s.tag){case 3:N2(s),To();break;case 5:W_(s);break;case 1:vn(s.type)&&hc(s);break;case 4:jp(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;ct(Tc,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(ct(wt,wt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?I2(i,s,l):(ct(wt,wt.current&1),i=si(i,s,l),i!==null?i.sibling:null);ct(wt,wt.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return R2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ct(wt,wt.current),d)break;return null;case 22:case 23:return s.lanes=0,A2(i,s,l)}return si(i,s,l)}var L2,cm,D2,F2;L2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},cm=function(){},D2=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,as(Fr.current);var y=null;switch(l){case"input":g=Tt(i,g),d=Tt(i,d),y=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),y=[];break;case"textarea":g=vu(i,g),d=vu(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=cc)}Zt(l,d);var x;l=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(x in O)O.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(o.hasOwnProperty(Y)?y||(y=[]):(y=y||[]).push(Y,null));for(Y in d){var L=d[Y];if(O=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&L!==O&&(L!=null||O!=null))if(Y==="style")if(O){for(x in O)!O.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in L)L.hasOwnProperty(x)&&O[x]!==L[x]&&(l||(l={}),l[x]=L[x])}else l||(y||(y=[]),y.push(Y,l)),l=L;else Y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,O=O?O.__html:void 0,L!=null&&O!==L&&(y=y||[]).push(Y,L)):Y==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(Y,""+L):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(o.hasOwnProperty(Y)?(L!=null&&Y==="onScroll"&&dt("scroll",i),y||O===L||(y=[])):(y=y||[]).push(Y,L))}l&&(y=y||[]).push("style",l);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},F2=function(i,s,l,d){l!==d&&(s.flags|=4)};function ia(i,s){if(!bt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:d.sibling=null}}function cn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,d=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=d,i.childLanes=l,s}function kF(i,s,l){var d=s.pendingProps;switch(Pp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(s),null;case 1:return vn(s.type)&&dc(),cn(s),null;case 3:return d=s.stateNode,So(),ht(An),ht(an),qp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Ec(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(_m(mr),mr=null))),cm(i,s),cn(s),null;case 5:$p(s);var g=as(Zu.current);if(l=s.type,i!==null&&s.stateNode!=null)D2(i,s,l,d,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return cn(s),null}if(i=as(Fr.current),Ec(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Dr]=s,d[Gu]=y,i=(s.mode&1)!==0,l){case"dialog":dt("cancel",d),dt("close",d);break;case"iframe":case"object":case"embed":dt("load",d);break;case"video":case"audio":for(g=0;g<qu.length;g++)dt(qu[g],d);break;case"source":dt("error",d);break;case"img":case"image":case"link":dt("error",d),dt("load",d);break;case"details":dt("toggle",d);break;case"input":St(d,y),dt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},dt("invalid",d);break;case"textarea":Hl(d,y),dt("invalid",d)}Zt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var O=y[x];x==="children"?typeof O=="string"?d.textContent!==O&&(y.suppressHydrationWarning!==!0&&lc(d.textContent,O,i),g=["children",O]):typeof O=="number"&&d.textContent!==""+O&&(y.suppressHydrationWarning!==!0&&lc(d.textContent,O,i),g=["children",""+O]):o.hasOwnProperty(x)&&O!=null&&x==="onScroll"&&dt("scroll",d)}switch(l){case"input":be(d),Rt(d,y,!0);break;case"textarea":be(d),jl(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=cc)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof d.is=="string"?i=x.createElement(l,{is:d.is}):(i=x.createElement(l),l==="select"&&(x=i,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):i=x.createElementNS(i,l),i[Dr]=s,i[Gu]=d,L2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Rr(l,d),l){case"dialog":dt("cancel",i),dt("close",i),g=d;break;case"iframe":case"object":case"embed":dt("load",i),g=d;break;case"video":case"audio":for(g=0;g<qu.length;g++)dt(qu[g],i);g=d;break;case"source":dt("error",i),g=d;break;case"img":case"image":case"link":dt("error",i),dt("load",i),g=d;break;case"details":dt("toggle",i),g=d;break;case"input":St(i,d),g=Tt(i,d),dt("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),dt("invalid",i);break;case"textarea":Hl(i,d),g=vu(i,d),dt("invalid",i);break;default:g=d}Zt(l,g),O=g;for(y in O)if(O.hasOwnProperty(y)){var L=O[y];y==="style"?yi(i,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&We(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&Ze(i,L):typeof L=="number"&&Ze(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&dt("scroll",i):L!=null&&D(i,y,L,x))}switch(l){case"input":be(i),Rt(i,d,!1);break;case"textarea":be(i),jl(i);break;case"option":d.value!=null&&i.setAttribute("value",""+Ve(d.value));break;case"select":i.multiple=!!d.multiple,y=d.value,y!=null?vt(i,!!d.multiple,y,!1):d.defaultValue!=null&&vt(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=cc)}switch(l){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return cn(s),null;case 6:if(i&&s.stateNode!=null)F2(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=as(Zu.current),as(Fr.current),Ec(s)){if(d=s.stateNode,l=s.memoizedProps,d[Dr]=s,(y=d.nodeValue!==l)&&(i=Hn,i!==null))switch(i.tag){case 3:lc(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&lc(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Dr]=s,s.stateNode=d}return cn(s),null;case 13:if(ht(wt),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(bt&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)U_(),To(),s.flags|=98560,y=!1;else if(y=Ec(s),d!==null&&d.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Dr]=s}else To(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),y=!1}else mr!==null&&(_m(mr),mr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(d=d!==null,d!==(i!==null&&i.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(wt.current&1)!==0?zt===0&&(zt=3):wm())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return So(),cm(i,s),i===null&&Yu(s.stateNode.containerInfo),cn(s),null;case 10:return Bp(s.type._context),cn(s),null;case 17:return vn(s.type)&&dc(),cn(s),null;case 19:if(ht(wt),y=s.memoizedState,y===null)return cn(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)ia(y,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Sc(i),x!==null){for(s.flags|=128,ia(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=l,l=s.child;l!==null;)y=l,i=d,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 ct(wt,wt.current&1|2),s.child}i=i.sibling}y.tail!==null&&Lt()>vo&&(s.flags|=128,d=!0,ia(y,!1),s.lanes=4194304)}else{if(!d)if(i=Sc(x),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),ia(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!bt)return cn(s),null}else 2*Lt()-y.renderingStartTime>vo&&l!==1073741824&&(s.flags|=128,d=!0,ia(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Lt(),s.sibling=null,l=wt.current,ct(wt,d?l&1|2:l&1),s):(cn(s),null);case 22:case 23:return Sm(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(jn&1073741824)!==0&&(cn(s),s.subtreeFlags&6&&(s.flags|=8192)):cn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function NF(i,s){switch(Pp(s),s.tag){case 1:return vn(s.type)&&dc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return So(),ht(An),ht(an),qp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return $p(s),null;case 13:if(ht(wt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));To()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ht(wt),null;case 4:return So(),null;case 10:return Bp(s.type._context),null;case 22:case 23:return Sm(),null;case 24:return null;default:return null}}var Pc=!1,fn=!1,OF=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Co(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){kt(i,s,d)}else l.current=null}function fm(i,s,l){try{l()}catch(d){kt(i,s,d)}}var M2=!1;function IF(i,s){if(Sp=Jl,i=m_(),mp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{l.nodeType,y.nodeType}catch(me){l=null;break e}var x=0,O=-1,L=-1,Y=0,se=0,ce=i,ne=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(O=x+g),ce!==y||d!==0&&ce.nodeType!==3||(L=x+d),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ne=ce,ce=xe;for(;;){if(ce===i)break t;if(ne===l&&++Y===g&&(O=x),ne===y&&++se===d&&(L=x),(xe=ce.nextSibling)!==null)break;ce=ne,ne=ce.parentNode}ce=xe}l=O===-1||L===-1?null:{start:O,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(wp={focusedElem:i,selectionRange:l},Jl=!1,Ce=s;Ce!==null;)if(s=Ce,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ce=i;else for(;Ce!==null;){s=Ce;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ve=Ae.memoizedProps,Dt=Ae.memoizedState,z=s.stateNode,F=z.getSnapshotBeforeUpdate(s.elementType===s.type?ve:gr(s.type,ve),Dt);z.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){kt(s,s.return,me)}if(i=s.sibling,i!==null){i.return=s.return,Ce=i;break}Ce=s.return}return Ae=M2,M2=!1,Ae}function sa(i,s,l){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&fm(s,l,y)}g=g.next}while(g!==d)}}function Rc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var d=l.create;l.destroy=d()}l=l.next}while(l!==s)}}function dm(i){var s=i.ref;if(s!==null){var l=i.stateNode;switch(i.tag){case 5:i=l;break;default:i=l}typeof s=="function"?s(i):s.current=i}}function B2(i){var s=i.alternate;s!==null&&(i.alternate=null,B2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Dr],delete s[Gu],delete s[kp],delete s[hF],delete s[pF])),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 U2(i){return i.tag===5||i.tag===3||i.tag===4}function H2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||U2(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 hm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=cc));else if(d!==4&&(i=i.child,i!==null))for(hm(i,s,l),i=i.sibling;i!==null;)hm(i,s,l),i=i.sibling}function pm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(d!==4&&(i=i.child,i!==null))for(pm(i,s,l),i=i.sibling;i!==null;)pm(i,s,l),i=i.sibling}var en=null,Er=!1;function Ii(i,s,l){for(l=l.child;l!==null;)z2(i,s,l),l=l.sibling}function z2(i,s,l){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Yl,l)}catch(O){}switch(l.tag){case 5:fn||Co(l,s);case 6:var d=en,g=Er;en=null,Ii(i,s,l),en=d,Er=g,en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?vp(i.parentNode,l):i.nodeType===1&&vp(i,l),Mu(i)):vp(en,l.stateNode));break;case 4:d=en,g=Er,en=l.stateNode.containerInfo,Er=!0,Ii(i,s,l),en=d,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&fm(l,s,x),g=g.next}while(g!==d)}Ii(i,s,l);break;case 1:if(!fn&&(Co(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(O){kt(l,s,O)}Ii(i,s,l);break;case 21:Ii(i,s,l);break;case 22:l.mode&1?(fn=(d=fn)||l.memoizedState!==null,Ii(i,s,l),fn=d):Ii(i,s,l);break;default:Ii(i,s,l)}}function j2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new OF),s.forEach(function(d){var g=HF.bind(null,i,d);l.has(d)||(l.add(d),d.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];try{var y=i,x=s,O=x;e:for(;O!==null;){switch(O.tag){case 5:en=O.stateNode,Er=!1;break e;case 3:en=O.stateNode.containerInfo,Er=!0;break e;case 4:en=O.stateNode.containerInfo,Er=!0;break e}O=O.return}if(en===null)throw Error(n(160));z2(y,x,g),en=null,Er=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(Y){kt(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)$2(s,i),s=s.sibling}function $2(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Br(i),d&4){try{sa(3,i,i.return),Rc(3,i)}catch(ve){kt(i,i.return,ve)}try{sa(5,i,i.return)}catch(ve){kt(i,i.return,ve)}}break;case 1:yr(s,i),Br(i),d&512&&l!==null&&Co(l,l.return);break;case 5:if(yr(s,i),Br(i),d&512&&l!==null&&Co(l,l.return),i.flags&32){var g=i.stateNode;try{Ze(g,"")}catch(ve){kt(i,i.return,ve)}}if(d&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,O=i.type,L=i.updateQueue;if(i.updateQueue=null,L!==null)try{O==="input"&&y.type==="radio"&&y.name!=null&&un(g,y),Rr(O,x);var Y=Rr(O,y);for(x=0;x<L.length;x+=2){var se=L[x],ce=L[x+1];se==="style"?yi(g,ce):se==="dangerouslySetInnerHTML"?We(g,ce):se==="children"?Ze(g,ce):D(g,se,ce,Y)}switch(O){case"input":Wt(g,y);break;case"textarea":zl(g,y);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?vt(g,!!y.multiple,xe,!1):ne!==!!y.multiple&&(y.defaultValue!=null?vt(g,!!y.multiple,y.defaultValue,!0):vt(g,!!y.multiple,y.multiple?[]:"",!1))}g[Gu]=y}catch(ve){kt(i,i.return,ve)}}break;case 6:if(yr(s,i),Br(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ve){kt(i,i.return,ve)}}break;case 3:if(yr(s,i),Br(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Mu(s.containerInfo)}catch(ve){kt(i,i.return,ve)}break;case 4:yr(s,i),Br(i);break;case 13:yr(s,i),Br(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(Em=Lt())),d&4&&j2(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(Y=fn)||se,yr(s,i),fn=Y):yr(s,i),Br(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!se&&(i.mode&1)!==0)for(Ce=i,se=i.child;se!==null;){for(ce=Ce=se;Ce!==null;){switch(ne=Ce,xe=ne.child,ne.tag){case 0:case 11:case 14:case 15:sa(4,ne,ne.return);break;case 1:Co(ne,ne.return);var Ae=ne.stateNode;if(typeof Ae.componentWillUnmount=="function"){d=ne,l=ne.return;try{s=d,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ve){kt(d,l,ve)}}break;case 5:Co(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Y2(ce);continue}}xe!==null?(xe.return=ne,Ce=xe):Y2(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(O=ce.stateNode,L=ce.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,O.style.display=Kn("display",x))}catch(ve){kt(i,i.return,ve)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=Y?"":ce.memoizedProps}catch(ve){kt(i,i.return,ve)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Br(i),d&4&&j2(i);break;case 21:break;default:yr(s,i),Br(i)}}function Br(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(U2(l)){var d=l;break e}l=l.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Ze(g,""),d.flags&=-33);var y=H2(i);pm(i,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,O=H2(i);hm(i,O,x);break;default:throw Error(n(161))}}catch(L){kt(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function PF(i,s,l){Ce=i,V2(i)}function V2(i,s,l){for(var d=(i.mode&1)!==0;Ce!==null;){var g=Ce,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Pc;if(!x){var O=g.alternate,L=O!==null&&O.memoizedState!==null||fn;O=Pc;var Y=fn;if(Pc=x,(fn=L)&&!Y)for(Ce=g;Ce!==null;)x=Ce,L=x.child,x.tag===22&&x.memoizedState!==null?W2(g):L!==null?(L.return=x,Ce=L):W2(g);for(;y!==null;)Ce=y,V2(y),y=y.sibling;Ce=g,Pc=O,fn=Y}q2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Ce=y):q2(i)}}function q2(i){for(;Ce!==null;){var s=Ce;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||Rc(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!fn)if(l===null)d.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);d.componentDidUpdate(g,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&Y_(s,y,d);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Y_(s,x,l)}break;case 5:var O=s.stateNode;if(l===null&&s.flags&4){l=O;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&l.focus();break;case"img":L.src&&(l.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Mu(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&dm(s)}catch(ne){kt(s,s.return,ne)}}if(s===i){Ce=null;break}if(l=s.sibling,l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function Y2(i){for(;Ce!==null;){var s=Ce;if(s===i){Ce=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function W2(i){for(;Ce!==null;){var s=Ce;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Rc(4,s)}catch(L){kt(s,l,L)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(L){kt(s,g,L)}}var y=s.return;try{dm(s)}catch(L){kt(s,y,L)}break;case 5:var x=s.return;try{dm(s)}catch(L){kt(s,x,L)}}}catch(L){kt(s,s.return,L)}if(s===i){Ce=null;break}var O=s.sibling;if(O!==null){O.return=s.return,Ce=O;break}Ce=s.return}}var RF=Math.ceil,Lc=G.ReactCurrentDispatcher,mm=G.ReactCurrentOwner,er=G.ReactCurrentBatchConfig,et=0,Kt=null,Ut=null,tn=0,jn=0,Ao=Ai(0),zt=0,oa=null,cs=0,Dc=0,gm=0,ua=null,Nn=null,Em=0,vo=1/0,oi=null,Fc=!1,ym=null,Pi=null,Mc=!1,Ri=null,Bc=0,aa=0,Tm=null,Uc=-1,Hc=0;function gn(){return(et&6)!==0?Lt():Uc!==-1?Uc:Uc=Lt()}function Li(i){return(i.mode&1)===0?1:(et&2)!==0&&tn!==0?tn&-tn:gF.transition!==null?(Hc===0&&(Hc=Hb()),Hc):(i=st,i!==0||(i=window.event,i=i===void 0?16:Kb(i.type)),i)}function Tr(i,s,l,d){if(50<aa)throw aa=0,Tm=null,Error(n(185));Pu(i,l,d),((et&2)===0||i!==Kt)&&(i===Kt&&((et&2)===0&&(Dc|=l),zt===4&&Di(i,tn)),On(i,d),l===1&&et===0&&(s.mode&1)===0&&(vo=Lt()+500,pc&&ki()))}function On(i,s){var l=i.callbackNode;g8(i,s);var d=Kl(i,i===Kt?tn:0);if(d===0)l!==null&&Mb(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&Mb(l),s===1)i.tag===0?mF(K2.bind(null,i)):L_(K2.bind(null,i)),fF(function(){(et&6)===0&&ki()}),l=null;else{switch(zb(d)){case 1:l=Jh;break;case 4:l=Bb;break;case 16:l=ql;break;case 536870912:l=Ub;break;default:l=ql}l=rx(l,G2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function G2(i,s){if(Uc=-1,Hc=0,(et&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ko()&&i.callbackNode!==l)return null;var d=Kl(i,i===Kt?tn:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=zc(i,d);else{s=d;var g=et;et|=2;var y=X2();(Kt!==i||tn!==s)&&(oi=null,vo=Lt()+500,ds(i,s));do try{FF();break}catch(O){Q2(i,O)}while(!0);Mp(),Lc.current=y,et=g,Ut!==null?s=0:(Kt=null,tn=0,s=zt)}if(s!==0){if(s===2&&(g=Zh(i),g!==0&&(d=g,s=bm(i,g))),s===1)throw l=oa,ds(i,0),Di(i,d),On(i,Lt()),l;if(s===6)Di(i,d);else{if(g=i.current.alternate,(d&30)===0&&!LF(g)&&(s=zc(i,d),s===2&&(y=Zh(i),y!==0&&(d=y,s=bm(i,y))),s===1))throw l=oa,ds(i,0),Di(i,d),On(i,Lt()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:hs(i,Nn,oi);break;case 3:if(Di(i,d),(d&130023424)===d&&(s=Em+500-Lt(),10<s)){if(Kl(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){gn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Ap(hs.bind(null,i,Nn,oi),s);break}hs(i,Nn,oi);break;case 4:if(Di(i,d),(d&4194240)===d)break;for(s=i.eventTimes,g=-1;0<d;){var x=31-hr(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=Lt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*RF(d/1960))-d,10<d){i.timeoutHandle=Ap(hs.bind(null,i,Nn,oi),d);break}hs(i,Nn,oi);break;case 5:hs(i,Nn,oi);break;default:throw Error(n(329))}}}return On(i,Lt()),i.callbackNode===l?G2.bind(null,i):null}function bm(i,s){var l=ua;return i.current.memoizedState.isDehydrated&&(ds(i,s).flags|=256),i=zc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&_m(s)),i}function _m(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function LF(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var d=0;d<l.length;d++){var g=l[d],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Di(i,s){for(s&=~gm,s&=~Dc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),d=1<<l;i[l]=-1,s&=~d}}function K2(i){if((et&6)!==0)throw Error(n(327));ko();var s=Kl(i,0);if((s&1)===0)return On(i,Lt()),null;var l=zc(i,s);if(i.tag!==0&&l===2){var d=Zh(i);d!==0&&(s=d,l=bm(i,d))}if(l===1)throw l=oa,ds(i,0),Di(i,s),On(i,Lt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,hs(i,Nn,oi),On(i,Lt()),null}function xm(i,s){var l=et;et|=1;try{return i(s)}finally{et=l,et===0&&(vo=Lt()+500,pc&&ki())}}function fs(i){Ri!==null&&Ri.tag===0&&(et&6)===0&&ko();var s=et;et|=1;var l=er.transition,d=st;try{if(er.transition=null,st=1,i)return i()}finally{st=d,er.transition=l,et=s,(et&6)===0&&ki()}}function Sm(){jn=Ao.current,ht(Ao)}function ds(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,cF(l)),Ut!==null)for(l=Ut.return;l!==null;){var d=l;switch(Pp(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&dc();break;case 3:So(),ht(An),ht(an),qp();break;case 5:$p(d);break;case 4:So();break;case 13:ht(wt);break;case 19:ht(wt);break;case 10:Bp(d.type._context);break;case 22:case 23:Sm()}l=l.return}if(Kt=i,Ut=i=Fi(i.current,null),tn=jn=s,zt=0,oa=null,gm=Dc=cs=0,Nn=ua=null,us!==null){for(s=0;s<us.length;s++)if(l=us[s],d=l.interleaved,d!==null){l.interleaved=null;var g=d.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}l.pending=d}us=null}return i}function Q2(i,s){do{var l=Ut;try{if(Mp(),wc.current=kc,Cc){for(var d=Ct.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Cc=!1}if(ls=0,Gt=Ht=Ct=null,ea=!1,ta=0,mm.current=null,l===null||l.return===null){zt=1,oa=s,Ut=null;break}e:{var y=i,x=l.return,O=l,L=s;if(s=tn,O.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Y=L,se=O,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var ne=se.alternate;ne?(se.updateQueue=ne.updateQueue,se.memoizedState=ne.memoizedState,se.lanes=ne.lanes):(se.updateQueue=null,se.memoizedState=null)}var xe=_2(x);if(xe!==null){xe.flags&=-257,x2(xe,x,O,y,s),xe.mode&1&&b2(y,Y,s),s=xe,L=Y;var Ae=s.updateQueue;if(Ae===null){var ve=new Set;ve.add(L),s.updateQueue=ve}else Ae.add(L);break e}else{if((s&1)===0){b2(y,Y,s),wm();break e}L=Error(n(426))}}else if(bt&&O.mode&1){var Dt=_2(x);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),x2(Dt,x,O,y,s),Dp(wo(L,O));break e}}y=L=wo(L,O),zt!==4&&(zt=2),ua===null?ua=[y]:ua.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=y2(y,L,s);q_(y,z);break e;case 1:O=L;var F=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(Pi===null||!Pi.has($)))){y.flags|=65536,s&=-s,y.lanes|=s;var me=T2(y,O,s);q_(y,me);break e}}y=y.return}while(y!==null)}Z2(l)}catch(Ne){s=Ne,Ut===l&&l!==null&&(Ut=l=l.return);continue}break}while(!0)}function X2(){var i=Lc.current;return Lc.current=kc,i===null?kc:i}function wm(){(zt===0||zt===3||zt===2)&&(zt=4),Kt===null||(cs&268435455)===0&&(Dc&268435455)===0||Di(Kt,tn)}function zc(i,s){var l=et;et|=2;var d=X2();(Kt!==i||tn!==s)&&(oi=null,ds(i,s));do try{DF();break}catch(g){Q2(i,g)}while(!0);if(Mp(),et=l,Lc.current=d,Ut!==null)throw Error(n(261));return Kt=null,tn=0,zt}function DF(){for(;Ut!==null;)J2(Ut)}function FF(){for(;Ut!==null&&!u8();)J2(Ut)}function J2(i){var s=nx(i.alternate,i,jn);i.memoizedProps=i.pendingProps,s===null?Z2(i):Ut=s,mm.current=null}function Z2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=kF(l,s,jn),l!==null){Ut=l;return}}else{if(l=NF(l,s),l!==null){l.flags&=32767,Ut=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{zt=6,Ut=null;return}}if(s=s.sibling,s!==null){Ut=s;return}Ut=s=i}while(s!==null);zt===0&&(zt=5)}function hs(i,s,l){var d=st,g=er.transition;try{er.transition=null,st=1,MF(i,s,l,d)}finally{er.transition=g,st=d}return null}function MF(i,s,l,d){do ko();while(Ri!==null);if((et&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(E8(i,y),i===Kt&&(Ut=Kt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Mc||(Mc=!0,rx(ql,function(){return ko(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=er.transition,er.transition=null;var x=st;st=1;var O=et;et|=4,mm.current=null,IF(i,l),$2(l,i),rF(wp),Jl=!!Sp,wp=Sp=null,i.current=l,PF(l),a8(),et=O,st=x,er.transition=y}else i.current=l;if(Mc&&(Mc=!1,Ri=i,Bc=g),y=i.pendingLanes,y===0&&(Pi=null),f8(l.stateNode),On(i,Lt()),s!==null)for(d=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],d(g.value,{componentStack:g.stack,digest:g.digest});if(Fc)throw Fc=!1,i=ym,ym=null,i;return(Bc&1)!==0&&i.tag!==0&&ko(),y=i.pendingLanes,(y&1)!==0?i===Tm?aa++:(aa=0,Tm=i):aa=0,ki(),null}function ko(){if(Ri!==null){var i=zb(Bc),s=er.transition,l=st;try{if(er.transition=null,st=16>i?16:i,Ri===null)var d=!1;else{if(i=Ri,Ri=null,Bc=0,(et&6)!==0)throw Error(n(331));var g=et;for(et|=4,Ce=i.current;Ce!==null;){var y=Ce,x=y.child;if((Ce.flags&16)!==0){var O=y.deletions;if(O!==null){for(var L=0;L<O.length;L++){var Y=O[L];for(Ce=Y;Ce!==null;){var se=Ce;switch(se.tag){case 0:case 11:case 15:sa(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,Ce=ce;else for(;Ce!==null;){se=Ce;var ne=se.sibling,xe=se.return;if(B2(se),se===Y){Ce=null;break}if(ne!==null){ne.return=xe,Ce=ne;break}Ce=xe}}}var Ae=y.alternate;if(Ae!==null){var ve=Ae.child;if(ve!==null){Ae.child=null;do{var Dt=ve.sibling;ve.sibling=null,ve=Dt}while(ve!==null)}}Ce=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Ce=x;else e:for(;Ce!==null;){if(y=Ce,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:sa(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Ce=z;break e}Ce=y.return}}var F=i.current;for(Ce=F;Ce!==null;){x=Ce;var $=x.child;if((x.subtreeFlags&2064)!==0&&$!==null)$.return=x,Ce=$;else e:for(x=F;Ce!==null;){if(O=Ce,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Rc(9,O)}}catch(Ne){kt(O,O.return,Ne)}if(O===x){Ce=null;break e}var me=O.sibling;if(me!==null){me.return=O.return,Ce=me;break e}Ce=O.return}}if(et=g,ki(),Lr&&typeof Lr.onPostCommitFiberRoot=="function")try{Lr.onPostCommitFiberRoot(Yl,i)}catch(Ne){}d=!0}return d}finally{st=l,er.transition=s}}return!1}function ex(i,s,l){s=wo(l,s),s=y2(i,s,1),i=Oi(i,s,1),s=gn(),i!==null&&(Pu(i,1,s),On(i,s))}function kt(i,s,l){if(i.tag===3)ex(i,i,l);else for(;s!==null;){if(s.tag===3){ex(s,i,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Pi===null||!Pi.has(d))){i=wo(l,i),i=T2(s,i,1),s=Oi(s,i,1),i=gn(),s!==null&&(Pu(s,1,i),On(s,i));break}}s=s.return}}function BF(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=gn(),i.pingedLanes|=i.suspendedLanes&l,Kt===i&&(tn&l)===l&&(zt===4||zt===3&&(tn&130023424)===tn&&500>Lt()-Em?ds(i,0):gm|=l),On(i,s)}function tx(i,s){s===0&&((i.mode&1)===0?s=1:(s=Gl,Gl<<=1,(Gl&130023424)===0&&(Gl=4194304)));var l=gn();i=ri(i,s),i!==null&&(Pu(i,s,l),On(i,l))}function UF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),tx(i,l)}function HF(i,s){var l=0;switch(i.tag){case 13:var d=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:d=i.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),tx(i,l)}var nx;nx=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,vF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,bt&&(s.flags&1048576)!==0&&D_(s,gc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Ic(i,s),i=s.pendingProps;var g=go(s,an.current);xo(s,l),g=Gp(null,s,d,i,g,l);var y=Kp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(d)?(y=!0,hc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,zp(s),g.updater=Nc,s.stateNode=g,g._reactInternals=s,tm(s,d,i,l),s=sm(null,s,d,!0,y,l)):(s.tag=0,bt&&y&&Ip(s),mn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(Ic(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=jF(d),i=gr(d,i),g){case 0:s=im(null,s,d,i,l);break e;case 1:s=k2(null,s,d,i,l);break e;case 11:s=S2(null,s,d,i,l);break e;case 14:s=w2(null,s,d,gr(d.type,i),l);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),im(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),k2(i,s,d,g,l);case 3:e:{if(N2(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,V_(i,s),xc(s,d,null,l);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=wo(Error(n(423)),s),s=O2(i,s,d,l,g);break e}else if(d!==g){g=wo(Error(n(424)),s),s=O2(i,s,d,l,g);break e}else for(zn=Ci(s.stateNode.containerInfo.firstChild),Hn=s,bt=!0,mr=null,l=j_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(To(),d===g){s=si(i,s,l);break e}mn(i,s,d,l)}s=s.child}return s;case 5:return W_(s),i===null&&Lp(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Cp(d,g)?x=null:y!==null&&Cp(d,y)&&(s.flags|=32),v2(i,s),mn(i,s,x,l),s.child;case 6:return i===null&&Lp(s),null;case 13:return I2(i,s,l);case 4:return jp(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=bo(s,null,d,l):mn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),S2(i,s,d,g,l);case 7:return mn(i,s,s.pendingProps,l),s.child;case 8:return mn(i,s,s.pendingProps.children,l),s.child;case 12:return mn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,ct(Tc,d._currentValue),d._currentValue=x,y!==null)if(pr(y.value,x)){if(y.children===g.children&&!An.current){s=si(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var O=y.dependencies;if(O!==null){x=y.child;for(var L=O.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=ii(-1,l&-l),L.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?L.next=L:(L.next=se.next,se.next=L),Y.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Up(y.return,l,s),O.lanes|=l;break}L=L.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,O=x.alternate,O!==null&&(O.lanes|=l),Up(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}mn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,xo(s,l),g=Jn(g),d=d(g),s.flags|=1,mn(i,s,d,l),s.child;case 14:return d=s.type,g=gr(d,s.pendingProps),g=gr(d.type,g),w2(i,s,d,g,l);case 15:return C2(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),Ic(i,s),s.tag=1,vn(d)?(i=!0,hc(s)):i=!1,xo(s,l),g2(s,d,g),tm(s,d,g,l),sm(null,s,d,!0,i,l);case 19:return R2(i,s,l);case 22:return A2(i,s,l)}throw Error(n(156,s.tag))};function rx(i,s){return Fb(i,s)}function zF(i,s,l,d){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(i,s,l,d){return new zF(i,s,l,d)}function Cm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function jF(i){if(typeof i=="function")return Cm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===ge)return 14}return 2}function Fi(i,s){var l=i.alternate;return l===null?(l=tr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function jc(i,s,l,d,g,y){var x=2;if(d=i,typeof i=="function")Cm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return ps(l.children,g,y,s);case Te:x=8,g|=8;break;case Se:return i=tr(12,l,s,g|2),i.elementType=Se,i.lanes=y,i;case ue:return i=tr(13,l,s,g),i.elementType=ue,i.lanes=y,i;case ie:return i=tr(19,l,s,g),i.elementType=ie,i.lanes=y,i;case ae:return $c(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case fe:x=9;break e;case de:x=11;break e;case ge:x=14;break e;case we:x=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=tr(x,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function ps(i,s,l,d){return i=tr(7,i,d,s),i.lanes=l,i}function $c(i,s,l,d){return i=tr(22,i,d,s),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function Am(i,s,l){return i=tr(6,i,null,s),i.lanes=l,i}function vm(i,s,l){return s=tr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function $F(i,s,l,d,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ep(0),this.expirationTimes=ep(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function km(i,s,l,d,g,y,x,O,L){return i=new $F(i,s,l,O,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=tr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(y),i}function VF(i,s,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:i,containerInfo:s,implementation:l}}function ix(i){if(!i)return vi;i=i._reactInternals;e:{if(ns(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return P_(i,l,s)}return s}function sx(i,s,l,d,g,y,x,O,L){return i=km(l,d,!0,i,g,y,x,O,L),i.context=ix(null),l=i.current,d=gn(),g=Li(l),y=ii(d,g),y.callback=s!=null?s:null,Oi(l,y,g),i.current.lanes=g,Pu(i,g,d),On(i,d),i}function Vc(i,s,l,d){var g=s.current,y=gn(),x=Li(g);return l=ix(l),s.context===null?s.context=l:s.pendingContext=l,s=ii(y,x),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=Oi(g,s,x),i!==null&&(Tr(i,g,x,y),_c(i,g,x)),x}function qc(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function ox(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Nm(i,s){ox(i,s),(i=i.alternate)&&ox(i,s)}function qF(){return null}var ux=typeof reportError=="function"?reportError:function(i){console.error(i)};function Om(i){this._internalRoot=i}Yc.prototype.render=Om.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Vc(i,s,null,null)},Yc.prototype.unmount=Om.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;fs(function(){Vc(null,i,null,null)}),s[Zr]=null}};function Yc(i){this._internalRoot=i}Yc.prototype.unstable_scheduleHydration=function(i){if(i){var s=Vb();i={blockedOn:null,target:i,priority:s};for(var l=0;l<xi.length&&s!==0&&s<xi[l].priority;l++);xi.splice(l,0,i),l===0&&Wb(i)}};function Im(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Wc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ax(){}function YF(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=qc(x);y.call(Y)}}var x=sx(s,d,i,0,null,!1,!1,"",ax);return i._reactRootContainer=x,i[Zr]=x.current,Yu(i.nodeType===8?i.parentNode:i),fs(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var O=d;d=function(){var Y=qc(L);O.call(Y)}}var L=km(i,0,!1,null,null,!1,!1,"",ax);return i._reactRootContainer=L,i[Zr]=L.current,Yu(i.nodeType===8?i.parentNode:i),fs(function(){Vc(s,L,l,d)}),L}function Gc(i,s,l,d,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var O=g;g=function(){var L=qc(x);O.call(L)}}Vc(s,x,i,g)}else x=YF(l,s,i,g,d);return qc(x)}jb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Iu(s.pendingLanes);l!==0&&(tp(s,l|1),On(s,Lt()),(et&6)===0&&(vo=Lt()+500,ki()))}break;case 13:fs(function(){var d=ri(i,1);if(d!==null){var g=gn();Tr(d,i,1,g)}}),Nm(i,1)}},np=function(i){if(i.tag===13){var s=ri(i,134217728);if(s!==null){var l=gn();Tr(s,i,134217728,l)}Nm(i,134217728)}},$b=function(i){if(i.tag===13){var s=Li(i),l=ri(i,s);if(l!==null){var d=gn();Tr(l,i,s,d)}Nm(i,s)}},Vb=function(){return st},qb=function(i,s){var l=st;try{return st=i,s()}finally{st=l}},Gh=function(i,s,l){switch(s){case"input":if(Wt(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var d=l[s];if(d!==i&&d.form===i.form){var g=fc(d);if(!g)throw Error(n(90));He(d),Wt(d,g)}}}break;case"textarea":zl(i,l);break;case"select":s=l.value,s!=null&&vt(i,!!l.multiple,s,!1)}},Nb=xm,Ob=fs;var WF={usingClientEntryPoint:!1,Events:[Ku,po,fc,vb,kb,xm]},la={findFiberByHostInstance:rs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GF={bundleType:la.bundleType,version:la.version,rendererPackageName:la.rendererPackageName,rendererConfig:la.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Lb(i),i===null?null:i.stateNode},findFiberByHostInstance:la.findFiberByHostInstance||qF,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 Kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kc.isDisabled&&Kc.supportsFiber)try{Yl=Kc.inject(GF),Lr=Kc}catch(i){}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WF,xn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Im(s))throw Error(n(200));return VF(i,s,null,l)},xn.createRoot=function(i,s){if(!Im(i))throw Error(n(299));var l=!1,d="",g=ux;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=km(i,1,!1,null,null,l,!1,d,g),i[Zr]=s.current,Yu(i.nodeType===8?i.parentNode:i),new Om(s)},xn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Lb(s),i=i===null?null:i.stateNode,i},xn.flushSync=function(i){return fs(i)},xn.hydrate=function(i,s,l){if(!Wc(s))throw Error(n(200));return Gc(null,i,s,!0,l)},xn.hydrateRoot=function(i,s,l){if(!Im(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",x=ux;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=sx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[Zr]=s.current,Yu(i),d)for(i=0;i<d.length;i++)l=d[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new Yc(s)},xn.render=function(i,s,l){if(!Wc(s))throw Error(n(200));return Gc(null,i,s,!1,l)},xn.unmountComponentAtNode=function(i){if(!Wc(i))throw Error(n(40));return i._reactRootContainer?(fs(function(){Gc(null,null,i,!1,function(){i._reactRootContainer=null,i[Zr]=null})}),!0):!1},xn.unstable_batchedUpdates=xm,xn.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!Wc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Gc(i,s,l,!1,d)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var Xg;function Jg(){if(Xg)return od.exports;Xg=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(),od.exports=Sv(),od.exports}var Qa=Jg();function wv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ld=()=>e=>Array.from(new Set(e)),Zg=typeof globalThis.document!="undefined"?W.useLayoutEffect:W.useEffect;function Xa(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=W.useState(t),[o,u]=W.useState(r),a=e().value!==void 0,c=W.useRef(o);c.current=a?e().value:o;const f=W.useRef(c.current);Zg(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,k;const _=f.current,S=ks(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),a||u(S),n(S,_)||(k=(C=e()).onChange)==null||k.call(C,S,_)};function m(){return a?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?Qa.flushSync:_A)(()=>h(T))},invoke(T,_){var S,C;(C=(S=e()).onChange)==null||C.call(S,T,_)},hash(T){var _,S,C;return(C=(S=(_=e()).hash)==null?void 0:S.call(_,T))!=null?C:String(T)}}}Xa.cleanup=e=>{W.useEffect(()=>e,[])},Xa.ref=e=>{const t=W.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Cv(e){const t=W.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Av=(e,t)=>{const n=W.useRef(!1),r=W.useRef(!1);W.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),W.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function cd(e,t={}){var fe,de,ue,ie,ge,we;const n=W.useMemo(()=>{const{id:ae,ids:V,getRootNode:ee}=t;return bv({id:ae,ids:V,getRootNode:ee})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},o=(de=(fe=e.props)==null?void 0:fe.call(e,{props:Kf(t),scope:n}))!=null?de:t,u=vv(o),a=(ue=e.context)==null?void 0:ue.call(e,{prop:u,bindable:Xa,scope:n,flush:t1,getContext(){return f},getComputed(){return q},getRefs(){return S},getEvent(){return T()}}),c=e1(a),f={get(ae){var V;return(V=c.current)==null?void 0:V[ae].ref.current},set(ae,V){var ee;(ee=c.current)==null||ee[ae].set(V)},initial(ae){var V;return(V=c.current)==null?void 0:V[ae].initial},hash(ae){var ee,w;const V=(ee=c.current)==null?void 0:ee[ae].get();return(w=c.current)==null?void 0:w[ae].hash(V)}},h=W.useRef(new Map),m=W.useRef(null),E=W.useRef(null),b=W.useRef({type:""}),T=()=>ye(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>ye(U({},B),{matches(...ae){return ae.includes(B.ref.current)},hasTag(ae){var V,ee;return!!((ee=(V=e.states[B.ref.current])==null?void 0:V.tags)!=null&&ee.includes(ae))}}),S=Cv((ge=(ie=e.refs)==null?void 0:ie.call(e,{prop:u,context:f}))!=null?ge:{}),C=()=>({state:_(),context:f,event:T(),prop:u,send:H,action:k,guard:M,track:Av,refs:S,computed:q,flush:t1,scope:n,choose:G}),k=ae=>{const V=ks(ae)?ae(C()):ae;if(!V)return;const ee=V.map(w=>{var Q,N;const R=(N=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:N[w];return R||Qf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of ee)w==null||w(C())},M=ae=>{var V,ee;return ks(ae)?ae(C()):(ee=(V=e.implementations)==null?void 0:V.guards)==null?void 0:ee[ae](C())},D=ae=>{const V=ks(ae)?ae(C()):ae;if(!V)return;const ee=V.map(R=>{var N,_e;const Q=(_e=(N=e.implementations)==null?void 0:N.effects)==null?void 0:_e[R];return Q||Qf(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),Q}),w=[];for(const R of ee){const Q=R==null?void 0:R(C());Q&&w.push(Q)}return()=>w.forEach(R=>R==null?void 0:R())},G=ae=>fA(ae).find(V=>{let ee=!V.guard;return $a(V.guard)?ee=!!M(V.guard):ks(V.guard)&&(ee=V.guard(C())),ee}),q=ae=>{SA(e.computed,()=>"[zag-js] No computed object found on machine");const V=e.computed[ae];return V({context:f,event:T(),prop:u,refs:S,scope:n,computed:q})},B=Xa(()=>({defaultValue:e.initialState({prop:u}),onChange(ae,V){var w,R,Q,N;if(V){const _e=h.current.get(V);_e==null||_e(),h.current.delete(V)}V&&k((w=e.states[V])==null?void 0:w.exit),k((R=m.current)==null?void 0:R.actions);const ee=D((Q=e.states[ae])==null?void 0:Q.effects);if(ee&&h.current.set(ae,ee),V===sd){k(e.entry);const _e=D(e.effects);_e&&h.current.set(sd,_e)}k((N=e.states[ae])==null?void 0:N.entry)}})),te=W.useRef(void 0),Te=W.useRef(Is.NotStarted);Zg(()=>{queueMicrotask(()=>{var R;const ee=Te.current===Is.Started;Te.current=Is.Started,r(ee?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,ee?B.get():sd)});const ae=h.current,V=B.ref.current;return()=>{r("unmounting..."),te.current=V,Te.current=Is.Stopped,ae.forEach(ee=>ee==null?void 0:ee()),h.current=new Map,m.current=null,queueMicrotask(()=>{k(e.exit)})}},[]);const Se=()=>"ref"in B?B.ref.current:B.get(),H=ae=>{queueMicrotask(()=>{var N,_e,Me,Ie,Ye;if(Te.current!==Is.Started)return;E.current=b.current,b.current=ae;let V=Se();const ee=(Me=(N=e.states[V].on)==null?void 0:N[ae.type])!=null?Me:(_e=e.on)==null?void 0:_e[ae.type],w=G(ee);if(!w)return;m.current=w;const R=(Ie=w.target)!=null?Ie:V;r("transition",ae.type,w.target||V,`(${w.actions})`);const Q=R!==V;Q?Qa.flushSync(()=>B.set(R)):w.reenter&&!Q?B.invoke(V,V):k((Ye=w.actions)!=null?Ye:[])})};return(we=e.watch)==null||we.call(e,C()),{state:_(),send:H,context:f,prop:u,scope:n,refs:S,computed:q,event:T(),getStatus:()=>Te.current}}function e1(e){const t=W.useRef(e);return t.current=e,t}function vv(e){const t=e1(e);return function(r){return t.current[r]}}function t1(e){queueMicrotask(()=>{Qa.flushSync(()=>e())})}var n1=wv(e=>e);function Ja(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function kv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const fd=e=>{const t=W.memo(W.forwardRef((n,r)=>{const h=n,{asChild:o,children:u}=h,a=Xt(h,["asChild","children"]);if(!o)return W.createElement(e,ye(U({},a),{ref:r}),u);if(!W.isValidElement(u))return null;const c=W.Children.only(u),f=kv(c);return W.cloneElement(c,ye(U({},ar(a,c.props)),{ref:r?Ja(r,f):f}))}));return t.displayName=e.displayName||e.name,t},ci=(()=>{const e=new Map;return new Proxy(fd,{apply(t,n,r){return fd(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,fd(r)),e.get(r)}})})();function Nv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ps(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:u,defaultValue:a}=e,c=W.createContext(a);c.displayName=t;function f(){var m;const h=W.useContext(c);if(!h&&n){const E=new Error(u!=null?u:Nv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Ov,dd]=Ps({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[r1,Go]=Ps({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),i1=W.forwardRef((e,t)=>{const n=dd(),r=Go(),o=ar(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:I.jsx(ci.div,ye(U({},o),{ref:Ja(r.ref,t)}))});i1.displayName="PopoverContent";const s1=W.forwardRef((e,t)=>{const n=dd(),r=Go(),o=ar(n.getPositionerProps(),e);return r.unmounted?null:I.jsx(ci.div,ye(U({},o),{ref:t}))});s1.displayName="PopoverPositioner";const o1=()=>(e,t)=>t.reduce((n,r)=>{const[o,u]=n,a=r;return u[a]!==void 0&&(o[a]=u[a]),delete u[a],[o,u]},[{},U({},e)]),u1=e=>o1()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Iv(e,t){const{state:n,send:r,context:o}=e,u=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:u,setNode(a){a&&r({type:"NODE.SET",node:a})},unmount(){r({type:"UNMOUNT"})}}}var Pv={props({props:e}){return ye(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",Wa(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const u=t.get("node");if(!o&&(u==null?void 0:u.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});_n(()=>{var c,f;const a=Za(t.get("styles"));e.set("unmountAnimationName",a),a==="none"||a===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((f=t.get("styles"))==null?void 0:f.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{_n(()=>{e.set("prevAnimationName",Za(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const u=f=>{var m,E,b;((b=(E=(m=f.composedPath)==null?void 0:m.call(f))==null?void 0:E[0])!=null?b:f.target)===o&&e.set("prevAnimationName",Za(t.get("styles")))},a=f=>{const h=Za(t.get("styles"));qr(f)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",u),o.addEventListener("animationcancel",a),o.addEventListener("animationend",a);const c=Ka(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",u),o.removeEventListener("animationcancel",a),o.removeEventListener("animationend",a),av(()=>c())}}}}};function Za(e){return(e==null?void 0:e.animationName)||"none"}ld()(["onExitComplete","present","immediate"]);function Rv(e,t={}){const{sync:n=!1}=t,r=Lv(e);return W.useCallback((...o)=>{var u;return n?queueMicrotask(()=>{var a;return(a=r.current)==null?void 0:a.call(r,...o)}):(u=r.current)==null?void 0:u.call(r,...o)},[n,r])}function Lv(e){const t=W.useRef(e);return t.current=e,t}const hd=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,u=Xt(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),a=W.useRef(!1),c=ye(U({},u),{present:r,onExitComplete:Rv(e.onExitComplete)}),f=cd(Pv,c),h=Iv(f);h.present&&(a.current=!0);const m=!h.present&&!a.current&&t||n&&!h.present&&a.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var Rs=(e,t=[])=>({parts:(...n)=>{if(Dv(t))return Rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Rs(e,[...t,...n]),omit:(...n)=>Rs(e,t.filter(r=>!n.includes(r))),rename:n=>Rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ls(e)}"][data-part="${Ls(r)}"]`,`& [data-scope="${Ls(e)}"][data-part="${Ls(r)}"]`].join(", "),attrs:{"data-scope":Ls(e),"data-part":Ls(r)}}}),{})}),Ls=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Dv=e=>e.length===0;const Fv=["top","right","bottom","left"],fi=Math.min,Pn=Math.max,el=Math.round,tl=Math.floor,wr=e=>({x:e,y:e}),Mv={left:"right",right:"left",bottom:"top",top:"bottom"},Bv={start:"end",end:"start"};function pd(e,t,n){return Pn(e,fi(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function Ds(e){return e.split("-")[1]}function md(e){return e==="x"?"y":"x"}function gd(e){return e==="y"?"height":"width"}const Uv=new Set(["top","bottom"]);function Cr(e){return Uv.has(Gr(e))?"y":"x"}function Ed(e){return md(Cr(e))}function Hv(e,t,n){n===void 0&&(n=!1);const r=Ds(e),o=Ed(e),u=gd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(a=nl(a)),[a,nl(a)]}function zv(e){const t=nl(e);return[yd(e),t,yd(t)]}function yd(e){return e.replace(/start|end/g,t=>Bv[t])}const a1=["left","right"],l1=["right","left"],jv=["top","bottom"],$v=["bottom","top"];function Vv(e,t,n){switch(e){case"top":case"bottom":return n?t?l1:a1:t?a1:l1;case"left":case"right":return t?jv:$v;default:return[]}}function qv(e,t,n,r){const o=Ds(e);let u=Vv(Gr(e),n==="start",r);return o&&(u=u.map(a=>a+"-"+o),t&&(u=u.concat(u.map(yd)))),u}function nl(e){return e.replace(/left|right|bottom|top/g,t=>Mv[t])}function Yv(e){return U({top:0,right:0,bottom:0,left:0},e)}function c1(e){return typeof e!="number"?Yv(e):{top:e,right:e,bottom:e,left:e}}function rl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function f1(e,t,n){let{reference:r,floating:o}=e;const u=Cr(t),a=Ed(t),c=gd(a),f=Gr(t),h=u==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let T;switch(f){case"top":T={x:m,y:r.y-o.height};break;case"bottom":T={x:m,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:E};break;case"left":T={x:r.x-o.width,y:E};break;default:T={x:r.x,y:r.y}}switch(Ds(t)){case"start":T[a]-=b*(n&&h?-1:1);break;case"end":T[a]+=b*(n&&h?-1:1);break}return T}const Wv=(e,t,n)=>it(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:u=[],platform:a}=n,c=u.filter(Boolean),f=yield a.isRTL==null?void 0:a.isRTL(t);let h=yield a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=f1(h,r,f),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:C,fn:k}=c[S],{x:M,y:D,data:G,reset:q}=yield k({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:a,elements:{reference:e,floating:t}});m=M!=null?M:m,E=D!=null?D:E,T=ye(U({},T),{[C]:U(U({},T[C]),G)}),q&&_<=50&&(_++,typeof q=="object"&&(q.placement&&(b=q.placement),q.rects&&(h=q.rects===!0?yield a.getElementRects({reference:e,floating:t,strategy:o}):q.rects),{x:m,y:E}=f1(h,b,f)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function Ko(e,t){return it(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:u,rects:a,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Wr(t,e),_=c1(T),C=c[b?E==="floating"?"reference":"floating":E],k=rl(yield u.getClippingRect({element:(n=yield u.isElement==null?void 0:u.isElement(C))==null||n?C:C.contextElement||(yield u.getDocumentElement==null?void 0:u.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),M=E==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,D=yield u.getOffsetParent==null?void 0:u.getOffsetParent(c.floating),G=(yield u.isElement==null?void 0:u.isElement(D))?(yield u.getScale==null?void 0:u.getScale(D))||{x:1,y:1}:{x:1,y:1},q=rl(u.convertOffsetParentRelativeRectToViewportRelativeRect?yield u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:M,offsetParent:D,strategy:f}):M);return{top:(k.top-q.top+_.top)/G.y,bottom:(q.bottom-k.bottom+_.bottom)/G.y,left:(k.left-q.left+_.left)/G.x,right:(q.right-k.right+_.right)/G.x}})}const Gv=e=>({name:"arrow",options:e,fn(n){return it(this,null,function*(){const{x:r,y:o,placement:u,rects:a,platform:c,elements:f,middlewareData:h}=n,{element:m,padding:E=0}=Wr(e,n)||{};if(m==null)return{};const b=c1(E),T={x:r,y:o},_=Ed(u),S=gd(_),C=yield c.getDimensions(m),k=_==="y",M=k?"top":"left",D=k?"bottom":"right",G=k?"clientHeight":"clientWidth",q=a.reference[S]+a.reference[_]-T[_]-a.floating[S],B=T[_]-a.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let Te=te?te[G]:0;(!Te||!(yield c.isElement==null?void 0:c.isElement(te)))&&(Te=f.floating[G]||a.floating[S]);const Se=q/2-B/2,H=Te/2-C[S]/2-1,fe=fi(b[M],H),de=fi(b[D],H),ue=fe,ie=Te-C[S]-de,ge=Te/2-C[S]/2+Se,we=pd(ue,ge,ie),ae=!h.arrow&&Ds(u)!=null&&ge!==we&&a.reference[S]/2-(ge<ue?fe:de)-C[S]/2<0,V=ae?ge<ue?ge-ue:ge-ie:0;return{[_]:T[_]+V,data:U({[_]:we,centerOffset:ge-we-V},ae&&{alignmentOffset:V}),reset:ae}})}}),Kv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return it(this,null,function*(){var r,o;const{placement:u,middlewareData:a,rects:c,initialPlacement:f,platform:h,elements:m}=n,ge=Wr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0}=ge,k=Xt(ge,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const M=Gr(u),D=Cr(f),G=Gr(f)===f,q=yield h.isRTL==null?void 0:h.isRTL(m.floating),B=T||(G||!C?[nl(f)]:zv(f)),te=S!=="none";!T&&te&&B.push(...qv(f,C,S,q));const Te=[f,...B],Se=yield Ko(n,k),H=[];let fe=((o=a.flip)==null?void 0:o.overflows)||[];if(E&&H.push(Se[M]),b){const we=Hv(u,c,q);H.push(Se[we[0]],Se[we[1]])}if(fe=[...fe,{placement:u,overflows:H}],!H.every(we=>we<=0)){var de,ue;const we=(((de=a.flip)==null?void 0:de.index)||0)+1,ae=Te[we];if(ae&&(!(b==="alignment"?D!==Cr(ae):!1)||fe.every(w=>Cr(w.placement)===D?w.overflows[0]>0:!0)))return{data:{index:we,overflows:fe},reset:{placement:ae}};let V=(ue=fe.filter(ee=>ee.overflows[0]<=0).sort((ee,w)=>ee.overflows[1]-w.overflows[1])[0])==null?void 0:ue.placement;if(!V)switch(_){case"bestFit":{var ie;const ee=(ie=fe.filter(w=>{if(te){const R=Cr(w.placement);return R===D||R==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(R=>R>0).reduce((R,Q)=>R+Q,0)]).sort((w,R)=>w[1]-R[1])[0])==null?void 0:ie[0];ee&&(V=ee);break}case"initialPlacement":V=f;break}if(u!==V)return{reset:{placement:V}}}return{}})}}};function d1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function h1(e){return Fv.some(t=>e[t]>=0)}const Qv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return it(this,null,function*(){const{rects:r}=n,a=Wr(e,n),{strategy:o="referenceHidden"}=a,u=Xt(a,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ko(n,ye(U({},u),{elementContext:"reference"})),f=d1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:h1(f)}}}case"escaped":{const c=yield Ko(n,ye(U({},u),{altBoundary:!0})),f=d1(c,r.floating);return{data:{escapedOffsets:f,escaped:h1(f)}}}default:return{}}})}}},p1=new Set(["left","top"]);function Xv(e,t){return it(this,null,function*(){const{placement:n,platform:r,elements:o}=e,u=yield r.isRTL==null?void 0:r.isRTL(o.floating),a=Gr(n),c=Ds(n),f=Cr(n)==="y",h=p1.has(a)?-1:1,m=u&&f?-1:1,E=Wr(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(T=c==="end"?_*-1:_),f?{x:T*m,y:b*h}:{x:b*h,y:T*m}})}const Jv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return it(this,null,function*(){var r,o;const{x:u,y:a,placement:c,middlewareData:f}=n,h=yield Xv(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:u+h.x,y:a+h.y,data:ye(U({},h),{placement:c})}})}}},Zv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return it(this,null,function*(){const{x:r,y:o,placement:u}=n,k=Wr(e,n),{mainAxis:a=!0,crossAxis:c=!1,limiter:f={fn:M=>{let{x:D,y:G}=M;return{x:D,y:G}}}}=k,h=Xt(k,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Ko(n,h),b=Cr(Gr(u)),T=md(b);let _=m[T],S=m[b];if(a){const M=T==="y"?"top":"left",D=T==="y"?"bottom":"right",G=_+E[M],q=_-E[D];_=pd(G,_,q)}if(c){const M=b==="y"?"top":"left",D=b==="y"?"bottom":"right",G=S+E[M],q=S-E[D];S=pd(G,S,q)}const C=f.fn(ye(U({},n),{[T]:_,[b]:S}));return ye(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:a,[b]:c}}})})}}},ek=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:u,middlewareData:a}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=Wr(e,t),m={x:n,y:r},E=Cr(o),b=md(E);let T=m[b],_=m[E];const S=Wr(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(f){const D=b==="y"?"height":"width",G=u.reference[b]-u.floating[D]+C.mainAxis,q=u.reference[b]+u.reference[D]-C.mainAxis;T<G?T=G:T>q&&(T=q)}if(h){var k,M;const D=b==="y"?"width":"height",G=p1.has(Gr(o)),q=u.reference[E]-u.floating[D]+(G&&((k=a.offset)==null?void 0:k[E])||0)+(G?0:C.crossAxis),B=u.reference[E]+u.reference[D]+(G?0:((M=a.offset)==null?void 0:M[E])||0)-(G?C.crossAxis:0);_<q?_=q:_>B&&(_=B)}return{[b]:T,[E]:_}}}},tk=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return it(this,null,function*(){var r,o;const{placement:u,rects:a,platform:c,elements:f}=n,fe=Wr(e,n),{apply:h=()=>{}}=fe,m=Xt(fe,["apply"]),E=yield Ko(n,m),b=Gr(u),T=Ds(u),_=Cr(u)==="y",{width:S,height:C}=a.floating;let k,M;b==="top"||b==="bottom"?(k=b,M=T===((yield c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(M=b,k=T==="end"?"top":"bottom");const D=C-E.top-E.bottom,G=S-E.left-E.right,q=fi(C-E[k],D),B=fi(S-E[M],G),te=!n.middlewareData.shift;let Te=q,Se=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Se=G),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(Te=D),te&&!T){const de=Pn(E.left,0),ue=Pn(E.right,0),ie=Pn(E.top,0),ge=Pn(E.bottom,0);_?Se=S-2*(de!==0||ue!==0?de+ue:Pn(E.left,E.right)):Te=C-2*(ie!==0||ge!==0?ie+ge:Pn(E.top,E.bottom))}yield h(ye(U({},n),{availableWidth:Se,availableHeight:Te}));const H=yield c.getDimensions(f.floating);return S!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function il(){return typeof window!="undefined"}function Fs(e){return m1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(m1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function m1(e){return il()?e instanceof Node||e instanceof Rn(e).Node:!1}function lr(e){return il()?e instanceof Element||e instanceof Rn(e).Element:!1}function vr(e){return il()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function g1(e){return!il()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}const nk=new Set(["inline","contents"]);function Qo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!nk.has(o)}const rk=new Set(["table","td","th"]);function ik(e){return rk.has(Fs(e))}const sk=[":popover-open",":modal"];function sl(e){return sk.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const ok=["transform","translate","scale","rotate","perspective"],uk=["transform","translate","scale","rotate","perspective","filter"],ak=["paint","layout","strict","content"];function Td(e){const t=bd(),n=lr(e)?cr(e):e;return ok.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)||uk.some(r=>(n.willChange||"").includes(r))||ak.some(r=>(n.contain||"").includes(r))}function lk(e){let t=di(e);for(;vr(t)&&!Ms(t);){if(Td(t))return t;if(sl(t))return null;t=di(t)}return null}function bd(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ck=new Set(["html","body","#document"]);function Ms(e){return ck.has(Fs(e))}function cr(e){return Rn(e).getComputedStyle(e)}function ol(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||g1(e)&&e.host||Ar(e);return g1(t)?t.host:t}function E1(e){const t=di(e);return Ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:vr(t)&&Qo(t)?t:E1(t)}function Xo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=E1(e),u=o===((r=e.ownerDocument)==null?void 0:r.body),a=Rn(o);if(u){const c=_d(a);return t.concat(a,a.visualViewport||[],Qo(o)?o:[],c&&n?Xo(c):[])}return t.concat(o,Xo(o,[],n))}function _d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y1(e){const t=cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=vr(e),u=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=el(n)!==u||el(r)!==a;return c&&(n=u,r=a),{width:n,height:r,$:c}}function xd(e){return lr(e)?e:e.contextElement}function Bs(e){const t=xd(e);if(!vr(t))return wr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:u}=y1(t);let a=(u?el(n.width):n.width)/r,c=(u?el(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const fk=wr(0);function T1(e){const t=Rn(e);return!bd()||!t.visualViewport?fk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),u=xd(e);let a=wr(1);t&&(r?lr(r)&&(a=Bs(r)):a=Bs(e));const c=dk(u,n,r)?T1(u):wr(0);let f=(o.left+c.x)/a.x,h=(o.top+c.y)/a.y,m=o.width/a.x,E=o.height/a.y;if(u){const b=Rn(u),T=r&&lr(r)?Rn(r):r;let _=b,S=_d(_);for(;S&&r&&T!==_;){const C=Bs(S),k=S.getBoundingClientRect(),M=cr(S),D=k.left+(S.clientLeft+parseFloat(M.paddingLeft))*C.x,G=k.top+(S.clientTop+parseFloat(M.paddingTop))*C.y;f*=C.x,h*=C.y,m*=C.x,E*=C.y,f+=D,h+=G,_=Rn(S),S=_d(_)}}return rl({width:m,height:E,x:f,y:h})}function ul(e,t){const n=ol(e).scrollLeft;return t?t.left+n:Yi(Ar(e)).left+n}function b1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ul(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function hk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const u=o==="fixed",a=Ar(r),c=t?sl(t.floating):!1;if(r===a||c&&u)return n;let f={scrollLeft:0,scrollTop:0},h=wr(1);const m=wr(0),E=vr(r);if((E||!E&&!u)&&((Fs(r)!=="body"||Qo(a))&&(f=ol(r)),vr(r))){const T=Yi(r);h=Bs(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=a&&!E&&!u?b1(a,f):wr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function pk(e){return Array.from(e.getClientRects())}function mk(e){const t=Ar(e),n=ol(e),r=e.ownerDocument.body,o=Pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),u=Pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ul(e);const c=-n.scrollTop;return cr(r).direction==="rtl"&&(a+=Pn(t.clientWidth,r.clientWidth)-o),{width:o,height:u,x:a,y:c}}const _1=25;function gk(e,t){const n=Rn(e),r=Ar(e),o=n.visualViewport;let u=r.clientWidth,a=r.clientHeight,c=0,f=0;if(o){u=o.width,a=o.height;const m=bd();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=ul(r);if(h<=0){const m=r.ownerDocument,E=m.body,b=getComputedStyle(E),T=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-T);_<=_1&&(u-=_)}else h<=_1&&(u+=h);return{width:u,height:a,x:c,y:f}}const Ek=new Set(["absolute","fixed"]);function yk(e,t){const n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,u=vr(e)?Bs(e):wr(1),a=e.clientWidth*u.x,c=e.clientHeight*u.y,f=o*u.x,h=r*u.y;return{width:a,height:c,x:f,y:h}}function x1(e,t,n){let r;if(t==="viewport")r=gk(e,n);else if(t==="document")r=mk(Ar(e));else if(lr(t))r=yk(t,n);else{const o=T1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rl(r)}function S1(e,t){const n=di(e);return n===t||!lr(n)||Ms(n)?!1:cr(n).position==="fixed"||S1(n,t)}function Tk(e,t){const n=t.get(e);if(n)return n;let r=Xo(e,[],!1).filter(c=>lr(c)&&Fs(c)!=="body"),o=null;const u=cr(e).position==="fixed";let a=u?di(e):e;for(;lr(a)&&!Ms(a);){const c=cr(a),f=Td(a);!f&&c.position==="fixed"&&(o=null),(u?!f&&!o:!f&&c.position==="static"&&!!o&&Ek.has(o.position)||Qo(a)&&!f&&S1(e,a))?r=r.filter(m=>m!==a):o=c,a=di(a)}return t.set(e,r),r}function bk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?sl(t)?[]:Tk(t,this._c):[].concat(n),r],c=a[0],f=a.reduce((h,m)=>{const E=x1(t,m,o);return h.top=Pn(E.top,h.top),h.right=fi(E.right,h.right),h.bottom=fi(E.bottom,h.bottom),h.left=Pn(E.left,h.left),h},x1(t,c,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function _k(e){const{width:t,height:n}=y1(e);return{width:t,height:n}}function xk(e,t,n){const r=vr(t),o=Ar(t),u=n==="fixed",a=Yi(e,!0,u,t);let c={scrollLeft:0,scrollTop:0};const f=wr(0);function h(){f.x=ul(o)}if(r||!r&&!u)if((Fs(t)!=="body"||Qo(o))&&(c=ol(t)),r){const T=Yi(t,!0,u,t);f.x=T.x+t.clientLeft,f.y=T.y+t.clientTop}else o&&h();u&&!r&&o&&h();const m=o&&!r&&!u?b1(o,c):wr(0),E=a.left+c.scrollLeft-f.x-m.x,b=a.top+c.scrollTop-f.y-m.y;return{x:E,y:b,width:a.width,height:a.height}}function Sd(e){return cr(e).position==="static"}function w1(e,t){if(!vr(e)||cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function C1(e,t){const n=Rn(e);if(sl(e))return n;if(!vr(e)){let o=di(e);for(;o&&!Ms(o);){if(lr(o)&&!Sd(o))return o;o=di(o)}return n}let r=w1(e,t);for(;r&&ik(r)&&Sd(r);)r=w1(r,t);return r&&Ms(r)&&Sd(r)&&!Td(r)?n:r||lk(e)||n}const Sk=function(e){return it(this,null,function*(){const t=this.getOffsetParent||C1,n=this.getDimensions,r=yield n(e.floating);return{reference:xk(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function wk(e){return cr(e).direction==="rtl"}const Ck={convertOffsetParentRelativeRectToViewportRelativeRect:hk,getDocumentElement:Ar,getClippingRect:bk,getOffsetParent:C1,getElementRects:Sk,getClientRects:pk,getDimensions:_k,getScale:Bs,isElement:lr,isRTL:wk};function A1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ak(e,t){let n=null,r;const o=Ar(e);function u(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),u();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=tl(E),S=tl(o.clientWidth-(m+b)),C=tl(o.clientHeight-(E+T)),k=tl(m),D={rootMargin:-_+"px "+-S+"px "+-C+"px "+-k+"px",threshold:Pn(0,fi(1,f))||1};let G=!0;function q(B){const te=B[0].intersectionRatio;if(te!==f){if(!G)return a();te?a(!1,te):r=setTimeout(()=>{a(!1,1e-7)},1e3)}te===1&&!A1(h,e.getBoundingClientRect())&&a(),G=!1}try{n=new IntersectionObserver(q,ye(U({},D),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(q,D)}n.observe(e)}return a(!0),u}function vk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=xd(e),m=o||u?[...h?Xo(h):[],...Xo(t)]:[];m.forEach(k=>{o&&k.addEventListener("scroll",n,{passive:!0}),u&&k.addEventListener("resize",n)});const E=h&&c?Ak(h,n):null;let b=-1,T=null;a&&(T=new ResizeObserver(k=>{let[M]=k;M&&M.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(t)})),n()}),h&&!f&&T.observe(h),T.observe(t));let _,S=f?Yi(e):null;f&&C();function C(){const k=Yi(e);S&&!A1(S,k)&&n(),S=k,_=requestAnimationFrame(C)}return n(),()=>{var k;m.forEach(M=>{o&&M.removeEventListener("scroll",n),u&&M.removeEventListener("resize",n)}),E==null||E(),(k=T)==null||k.disconnect(),T=null,f&&cancelAnimationFrame(_)}}const kk=Jv,Nk=Zv,Ok=Kv,Ik=tk,Pk=Qv,Rk=Gv,Lk=ek,Dk=(e,t,n)=>{const r=new Map,o=U({platform:Ck},n),u=ye(U({},o.platform),{_c:r});return Wv(e,t,ye(U({},o),{platform:u}))};function v1(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ye(U({},o),{toJSON:()=>o})}function Fk(e){if(!e)return v1();const{x:t,y:n,width:r,height:o}=e;return v1(t,n,r,o)}function Mk(e,t){return{contextElement:Vt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?Fk(r):n.getBoundingClientRect()}}}var Jo=e=>({variable:e,reference:`var(${e})`}),Kr={arrowSize:Jo("--arrow-size"),arrowSizeHalf:Jo("--arrow-size-half"),arrowBg:Jo("--arrow-background"),transformOrigin:Jo("--transform-origin"),arrowOffset:Jo("--arrow-offset")},Bk=e=>e==="top"||e==="bottom"?"y":"x";function Uk(e,t){return{name:"transformOrigin",fn(n){var Se,H,fe,de,ue;const{elements:r,middlewareData:o,placement:u,rects:a,y:c}=n,f=u.split("-")[0],h=Bk(f),m=((Se=o.arrow)==null?void 0:Se.x)||0,E=((H=o.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=m+b/2,S=E+T/2,C=Math.abs(((fe=o.shift)==null?void 0:fe.y)||0),k=a.reference.height/2,M=T/2,D=(ue=(de=e.offset)==null?void 0:de.mainAxis)!=null?ue:e.gutter,G=typeof D=="number"?D+M:D!=null?D:M,q=C>G,B={top:`${_}px calc(100% + ${G}px)`,bottom:`${_}px ${-G}px`,left:`calc(100% + ${G}px) ${S}px`,right:`${-G}px ${S}px`}[f],te=`${_}px ${a.reference.y+k-c}px`,Te=!!e.overlap&&h==="y"&&q;return r.floating.style.setProperty(Kr.transformOrigin.variable,Te?te:B),{data:{transformOrigin:Te?te:B}}}}}var Hk={name:"rects",fn({rects:e}){return{data:e}}},zk=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,u=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[u]:`calc(100% + ${Kr.arrowOffset.reference})`}),{}}}};function jk(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var $k={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function k1(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function wd(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Vk(e,t,n){const r=e||t.createElement("div");return Rk({element:r,padding:n.arrowPadding})}function qk(e,t){var n;if(!hA((n=t.offset)!=null?n:t.gutter))return kk(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,u=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,a=typeof u=="number"?u+o:u!=null?u:o,{hasAlign:c}=jk(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return Kf({crossAxis:h,mainAxis:a,alignmentAxis:t.shift})})}function Yk(e){if(!e.flip)return;const t=wd(e.boundary);return Ok(ye(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function Wk(e){if(!e.slide&&!e.overlap)return;const t=wd(e.boundary);return Nk(ye(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Lk()}))}function Gk(e){return Ik({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const u=t.floating,a=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),u.style.setProperty("--reference-width",`${a}px`),u.style.setProperty("--reference-height",`${c}px`),u.style.setProperty("--available-width",`${o}px`),u.style.setProperty("--available-height",`${r}px`)}})}function Kk(e){var t;if(e.hideWhenDetached)return Pk({strategy:"referenceHidden",boundary:(t=wd(e.boundary))!=null?t:"clippingAncestors"})}function Qk(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Xk(e,t,n={}){const r=Mk(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},$k,n),u=t.querySelector("[data-part=arrow]"),a=[qk(u,o),Yk(o),Wk(o),Vk(u,t.ownerDocument,o),zk(u),Uk({gutter:o.gutter,offset:o.offset,overlap:o.overlap},u),Gk(o),Kk(o),Hk],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>it(null,null,function*(){var G;if(!r||!t)return;const S=yield Dk(r,t,{placement:c,middleware:a,strategy:f});h==null||h(S),m==null||m({placed:!0});const C=Ns(t),k=k1(C,S.x),M=k1(C,S.y);t.style.setProperty("--x",`${k}px`),t.style.setProperty("--y",`${M}px`),o.hideWhenDetached&&(((G=S.middlewareData.hide)==null?void 0:G.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const D=t.firstElementChild;if(D){const q=Wa(D);t.style.setProperty("--z-index",q.zIndex)}}),b=()=>it(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=Qk(o.listeners),_=o.listeners?vk(r,t,b,T):xA;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function N1(e,t,n={}){const c=n,{defer:r}=c,o=Xt(c,["defer"]),u=r?_n:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;a.push(Xk(f,h,o))})),()=>{a.forEach(f=>f==null?void 0:f())}}var Jk={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Zk(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Kr.arrowSize.reference,height:Kr.arrowSize.reference,[Kr.arrowSizeHalf.variable]:`calc(${Kr.arrowSize.reference} / 2)`,[Kr.arrowOffset.variable]:`calc(${Kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Jk[t.split("-")[0]]:void 0,background:Kr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Us=new WeakMap,al=new WeakMap,ll={},Cd=0,O1=e=>e&&(e.host||O1(e.parentNode)),eN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=O1(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),tN=new Set(["script","output","status","next-route-announcer"]),nN=e=>tN.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),rN=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:u=!0}=t,a=eN(n,Array.isArray(e)?e:[e]);ll[r]||(ll[r]=new WeakMap);const c=ll[r],f=[],h=new Set,m=new Set(a),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};a.forEach(T=>{E(T),u&&Vt(T)&&Ug(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(nN(_))return;const C=_.getAttribute(o)==="true",k=(Us.get(_)||0)+1,M=(c.get(_)||0)+1;Us.set(_,k),c.set(_,M),f.push(_),k===1&&C&&al.set(_,!0),M===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),h.clear(),Cd++,()=>{f.forEach(T=>{const _=Us.get(T)-1,S=c.get(T)-1;Us.set(T,_),c.set(T,S),_||(al.has(T)||T.removeAttribute(o),al.delete(T)),S||T.removeAttribute(r)}),Cd--,Cd||(Us=new WeakMap,Us=new WeakMap,al=new WeakMap,ll={})}},iN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,sN=(e,t=iN(e),n="data-aria-hidden",r=!0)=>{if(t)return rN(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},oN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function I1(e,t={}){const{defer:n=!0}=t,r=n?oN:u=>u(),o=[];return o.push(r(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&o.push(sN(a))})),()=>{o.forEach(u=>u==null?void 0:u())}}function uN(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const u=e.frames[o];u&&n(u)}},addEventListener(n,r,o){return t.each(u=>{try{u.document.addEventListener(n,r,o)}catch(a){}}),()=>{try{t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener(n,r,o){t.each(u=>{try{u.document.removeEventListener(n,r,o)}catch(a){}})}};return t}function aN(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(u){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}}}var P1="pointerdown.outside",R1="focus.outside";function lN(e){for(const t of e)if(Vt(t)&&Yr(t))return!0;return!1}var L1=e=>"clientY"in e;function cN(e,t){if(!L1(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 fN(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function D1(e,t){if(!t||!L1(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,u=o&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return fN(a,c)?r||u:!1}function dN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:u,defer:a,followControlledElements:c=!0}=t;if(!e)return;const f=Sr(e),h=Ns(e),m=uN(h),E=aN(h);function b(D,G){if(!Vt(G)||!G.isConnected||Ya(e,G)||cN(e,D)||c&&Bg(e,G))return!1;const q=f.querySelector(`[aria-controls="${e.id}"]`);if(q){const te=id(q);if(D1(D,te))return!1}const B=id(e);return D1(D,B)?!1:!(n!=null&&n(G))}const T=new Set,_=Vi(e==null?void 0:e.getRootNode());function S(D){function G(q){var Se,H;const B=a&&!Hg()?_n:fe=>fe(),te=q!=null?q:D,Te=(H=(Se=te==null?void 0:te.composedPath)==null?void 0:Se.call(te))!=null?H:[te==null?void 0:te.target];B(()=>{const fe=_?Te[0]:qr(D);if(!(!e||!b(D,fe))){if(o||u){const de=Gf(o,u);e.addEventListener(P1,de,{once:!0})}F1(e,P1,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:ev(te),focusable:lN(Te),target:fe}})}})}D.pointerType==="touch"?(T.forEach(q=>q()),T.add(ur(f,"click",G,{once:!0})),T.add(E.addEventListener("click",G,{once:!0})),T.add(m.addEventListener("click",G,{once:!0}))):G()}const C=new Set,k=setTimeout(()=>{C.add(ur(f,"pointerdown",S,!0)),C.add(E.addEventListener("pointerdown",S,!0)),C.add(m.addEventListener("pointerdown",S,!0))},0);function M(D){(a?_n:q=>q())(()=>{var te,Te;const q=(Te=(te=D==null?void 0:D.composedPath)==null?void 0:te.call(D))!=null?Te:[D==null?void 0:D.target],B=_?q[0]:qr(D);if(!(!e||!b(D,B))){if(r||u){const Se=Gf(r,u);e.addEventListener(R1,Se,{once:!0})}F1(e,R1,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:Yr(B),target:B}})}})}return Hg()||(C.add(ur(f,"focusin",M,!0)),C.add(E.addEventListener("focusin",M,!0)),C.add(m.addEventListener("focusin",M,!0))),()=>{clearTimeout(k),T.forEach(D=>D()),C.forEach(D=>D())}}function hN(e,t){const{defer:n}=t,r=n?_n:u=>u(),o=[];return o.push(r(()=>{const u=typeof e=="function"?e():e;o.push(dN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}function F1(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function pN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ur(Sr(e),"keydown",n,{capture:!0})}var M1="layer:request-dismiss",qn={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=>Ya(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ya(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=>qn.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];gN(e,M1,o=>{var u;(u=r.requestDismiss)==null||u.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),mN(e,M1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function mN(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function gN(e,t,n){e.addEventListener(t,n,{once:!0})}var B1;function U1(){qn.layers.forEach(({node:e})=>{e.style.pointerEvents=qn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function EN(e){e.style.pointerEvents=""}function yN(e,t){const n=Sr(e),r=[];return qn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(B1=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[u,a]=gv(()=>{const c=o();return Vt(c)?c:null},{timeout:1e3});u.then(c=>r.push(Ka(c,{pointerEvents:"auto"}))),r.push(a)}),()=>{qn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=B1,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function TN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Qf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:u,exclude:a,debug:c,type:f="dialog"}=t,h={dismiss:r,node:e,type:f,pointerBlocking:u,requestDismiss:o};qn.add(h),U1();function m(S){var k,M;const C=qr(S.detail.originalEvent);qn.isBelowPointerBlockingLayer(e)||qn.isInBranch(C)||((k=t.onPointerDownOutside)==null||k.call(t,S),(M=t.onInteractOutside)==null||M.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var k,M;const C=qr(S.detail.originalEvent);qn.isInBranch(C)||((k=t.onFocusOutside)==null||k.call(t,S),(M=t.onInteractOutside)==null||M.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var C;qn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var D;if(!e)return!1;const C=typeof a=="function"?a():a,k=Array.isArray(C)?C:[C],M=(D=t.persistentElements)==null?void 0:D.map(G=>G()).filter(Vt);return M&&k.push(...M),k.some(G=>Ya(G,S))||qn.isInNestedLayer(e,S)}const _=[u?yN(e,t.persistentElements):void 0,pN(e,b),hN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{qn.remove(e),U1(),EN(e),_.forEach(S=>S==null?void 0:S())}}function H1(e,t){const{defer:n}=t,r=n?_n:u=>u(),o=[];return o.push(r(()=>{const u=ks(e)?e():e;o.push(TN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}var bN=Object.defineProperty,_N=(e,t,n)=>t in e?bN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Et=(e,t,n)=>_N(e,typeof t!="symbol"?t+"":t,n),z1={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()}},xN=[],SN=class{constructor(e,t){Et(this,"trapStack"),Et(this,"config"),Et(this,"doc"),Et(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Et(this,"portalContainers",new Set),Et(this,"listenerCleanups",[]),Et(this,"handleFocus",r=>{const o=qr(r),u=this.findContainerIndex(o,r)>=0;if(u||qa(o))u&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let a,c=!0;if(this.state.mostRecentlyFocusedNode)if(Wo(this.state.mostRecentlyFocusedNode)>0){const f=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[f];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(a=h[m+1],c=!1):m-1>=0&&(a=h[m-1],c=!1))}}else this.state.containerGroups.some(f=>f.tabbableNodes.some(h=>Wo(h)>0))||(c=!1);else c=!1;c&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Et(this,"handlePointerDown",r=>{const o=qr(r);if(!(this.findContainerIndex(o,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Et(this,"handleClick",r=>{const o=qr(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Et(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),u=this.findNextNavNode({event:r,isBackward:o});if(!u)return;Zo(r)&&r.preventDefault(),this.tryFocus(u)}}),Et(this,"handleEscapeKey",r=>{wN(r)&&eu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Et(this,"_mutationObserver"),Et(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(f=>{if(f.nodeType!==Node.ELEMENT_NODE)return!1;const h=f;return VA(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?qA(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Et(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var u;(u=this._mutationObserver)==null||u.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Et(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Yr(r)){const o=Os(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const u=this.state.tabbableGroups[0];r=u&&u.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}),Et(this,"tryFocus",r=>{if(r!==!1&&r!==Os(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,CN(r)&&r.select()}}),Et(this,"deactivate",r=>{if(!this.state.active)return this;const o=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(),z1.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const u=this.getOption(o,"onDeactivate"),a=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),f=this.getOption(o,"returnFocus","returnFocusOnDeactivate");u==null||u();const h=()=>{j1(()=>{if(f){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}a==null||a()})};if(f&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),Et(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),u=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),u==null||u(),this}),Et(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),u=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),u==null||u(),this}),Et(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Et(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Et(this,"getOption",(r,o,u)=>r&&r[o]!==void 0?r[o]:this.config[u||o]),Et(this,"getNodeForOption",(r,{hasFallback:o=!1,params:u=[]}={})=>{let a=this.config[r];if(typeof a=="function"&&(a=a(...u)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=a;if(typeof a=="string"){try{c=this.doc.querySelector(a)}catch(f){throw new Error(`\`${r}\` appears to be an invalid selector; error="${f.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Et(this,"findNextNavNode",r=>{const{event:o,isBackward:u=!1}=r,a=r.target||qr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const f=this.findContainerIndex(a,o),h=f>=0?this.state.containerGroups[f]:void 0;if(f<0)u?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(u){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||Yr(a)&&!qi(a)&&!(h!=null&&h.nextTabbableNode(a,!1)))&&(m=f),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=Wo(a)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Zo(o)||(c=h==null?void 0:h.nextTabbableNode(a,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||Yr(a)&&!qi(a)&&!(h!=null&&h.nextTabbableNode(a)))&&(m=f),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=Wo(a)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Zo(o)||(c=h==null?void 0:h.nextTabbableNode(a))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||xN;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Zo(r)&&!r.shiftKey},isKeyBackward(r){return Zo(r)&&r.shiftKey}},t);this.doc=n.document||Sr(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=>{zA(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(u=>u===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Bg(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Yo(e,{getShadowRoot:this.config.getShadowRoot}),n=qg(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],u=r,a=o;let c=!1;for(let h=0;h<t.length;h++)if(Wo(t[h])>0){c=!0;break}function f(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(m){for(let T=b+1;T<n.length;T++)if(qi(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(qi(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:u,lastDomTabbableNode:a,nextTabbableNode:f}}),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 z1.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?j1(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ur(this.doc,"focusin",this.handleFocus,!0),ur(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ur(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ur(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ur(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ur(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=Os(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Zo=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,wN=e=>!e.isComposing&&e.key==="Escape",j1=e=>setTimeout(e,0),CN=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function $1(e,t={}){let n;const r=_n(()=>{const o=typeof e=="function"?e():e;if(o){n=new SN(o,ye(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Sr(o)}));try{n.activate()}catch(u){}}});return function(){n==null||n.deactivate(),r()}}var Ad="data-scroll-lock";function AN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function V1(e){const t=Wa(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function q1(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Ad))return;const a=V1(r)||V1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Ad,"");const f=()=>pv(r,"--scrollbar-width",`${c}px`),h=AN(r),m=()=>{const _={overflow:"hidden"};return!a&&c>0&&(_[h]=`${c}px`),Ka(o,_)},E=()=>{var q,B;const{scrollX:_,scrollY:S,visualViewport:C}=n,k=(q=C==null?void 0:C.offsetLeft)!=null?q:0,M=(B=C==null?void 0:C.offsetTop)!=null?B:0,D={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(M))}px`,left:`${-(_-Math.floor(k))}px`,right:"0"};!a&&c>0&&(D[h]=`${c}px`);const G=Ka(o,D);return()=>{G==null||G(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[f(),zg()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Ad)}}var vN=Rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),kr=vN.build(),Y1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},W1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},vd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},G1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},kN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},kd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Nd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},NN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},K1=e=>e.getById(Y1(e)),Hs=e=>e.getById(W1(e)),zs=e=>e.getById(vd(e)),Q1=e=>e.getById(G1(e)),ON=e=>e.getById(kd(e)),IN=e=>e.getById(Nd(e));function PN(e,t){const{state:n,context:r,send:o,computed:u,prop:a,scope:c}=e,f=n.matches("open"),h=r.get("currentPlacement"),m=u("currentPortalled"),E=r.get("renderedElements"),b=Zk(ye(U({},a("positioning")),{placement:h}));return{portalled:m,open:f,setOpen(T){n.matches("open")!==T&&o({type:T?"OPEN":"CLOSE"})},reposition(T={}){o({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(ye(U({id:kN(c)},kr.arrow.attrs),{dir:a("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ye(U({},kr.arrowTip.attrs),{dir:a("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ye(U({},kr.anchor.attrs),{dir:a("dir"),id:Y1(c)}))},getTriggerProps(){return t.button(ye(U({},kr.trigger.attrs),{dir:a("dir"),type:"button","data-placement":h,id:W1(c),"aria-haspopup":"dialog","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":vd(c),onPointerDown(T){ZA(T)&&XA()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(ye(U({},kr.indicator.attrs),{dir:a("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({id:G1(c)},kr.positioner.attrs),{dir:a("dir"),style:b.floating}))},getContentProps(){return t.element(ye(U({},kr.content.attrs),{dir:a("dir"),id:vd(c),tabIndex:-1,role:"dialog","aria-modal":vA(a("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":AA(f),"aria-labelledby":E.title?kd(c):void 0,"aria-describedby":E.description?Nd(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ye(U({},kr.title.attrs),{id:kd(c),dir:a("dir")}))},getDescriptionProps(){return t.element(ye(U({},kr.description.attrs),{id:Nd(c),dir:a("dir")}))},getCloseTriggerProps(){return t.button(ye(U({},kr.closeTrigger.attrs),{dir:a("dir"),id:NN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var RN={props({props:e}){return ye(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 u;e.set("currentPlacement",t("positioning").placement);const r=(u=K1(n))!=null?u:Hs(n);return N1(r,()=>Q1(n),ye(U({},t("positioning")),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>zs(n);let o=!0;return H1(r,{type:"popover",pointerBlocking:t("modal"),exclude:Hs(n),defer:!0,onEscapeKeyDown(u){var a;(a=t("onEscapeKeyDown"))==null||a(u),!t("closeOnEscape")&&u.preventDefault()},onInteractOutside(u){var a;(a=t("onInteractOutside"))==null||a(u),!u.defaultPrevented&&(o=!(u.detail.focusable||u.detail.contextmenu),t("closeOnInteractOutside")||u.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:hv(()=>zs(t),{triggerElement:Hs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?I1(()=>[zs(t),Hs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return q1(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?$1(()=>zs(t),{initialFocus:()=>Yg({root:zs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var a;const o=(a=K1(n))!=null?a:Hs(n);N1(o,()=>Q1(n),ye(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){_n(()=>{Object.assign(e.get("renderedElements"),{title:!!ON(t),description:!!IN(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||_n(()=>{const n=Yg({root:zs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||_n(()=>{const u=Hs(t);u==null||u.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})}}}};ld()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[qM,Od]=Ps({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[YM,X1]=Ps({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),LN=e=>{const t=W.useId(),{getRootNode:n}=Od(),{dir:r}=X1(),o=U({id:t,dir:r,getRootNode:n},e),u=cd(RN,o);return PN(u,n1)},DN=e=>{const[t,a]=u1(e),c=a,{children:n}=c,r=Xt(c,["children"]),o=LN(r),u=hd(ar({present:o.open},t));return I.jsx(Ov,{value:o,children:I.jsx(r1,{value:u,children:n})})},J1=W.forwardRef((e,t)=>{const n=dd(),r=Go(),o=ar(ye(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return I.jsx(ci.button,ye(U({},o),{ref:t}))});J1.displayName="PopoverTrigger";function FN(e){return hn({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 MN(e){return hn({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 BN(e){return hn({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 UN(e){return hn({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 HN=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=li(),r=()=>{n(),e()};return I.jsxs("button",{className:oe(`${Z}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[I.jsx(UN,{}),"Clear chat"]})},Id=({className:e,componentType:t,children:n})=>{const[r,o]=W.useState(!1),{globalClassName:u}=sr(),a=()=>{o(!1)},c=f=>{o(f.open)};return I.jsxs(DN,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[I.jsx(J1,{"aria-label":`Overflow menu for ${t}`,className:oe(`${Z}-overflow-menu-button-trigger`,u,e,t),children:I.jsx(BN,{})}),I.jsx(s1,{children:I.jsxs(i1,{className:oe(`${Z}-overflow-menu-list`,u,t),children:[n,I.jsx(HN,{componentType:t,onClearChat:a})]})})]})};function zN(e){return hn({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 Z1(e){return hn({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 eE=({className:e,onClick:t,disabled:n=!1})=>I.jsx("button",{"aria-label":"Close",className:oe(e,`${Z}-close-button`),disabled:n,onClick:t,children:I.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:I.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"})})}),tE=({componentType:e,isIcon:t})=>{const n=()=>{Vf("modal")};return t?I.jsx(ja,{className:oe("toggle-modal-button",e),ariaLabel:"Toggle Modal",onClick:n,icon:I.jsx(Z1,{})}):I.jsxs("button",{className:oe(`${Z}-overflow-menu-button`,e,"toggle-modal-button"),onClick:n,children:[I.jsx(Z1,{}),"Show modal"]})},jN=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=sr();if(!n)return null;const o=n.getName(t),u=n.getBrand(t),a=n.getPriceDisplay(t),c=n.getRelativePdp(t),f=n.getPdp(t),h=n.getImage(t),m=c&&typeof c=="string"?new URL(c,window.location.origin).href:f;return I.jsxs("div",{className:oe(r,`${Z}-product-tile`,{embedded:!e,standalone:e}),children:[I.jsx("img",{className:oe(r,`${Z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),I.jsxs("div",{className:oe(r,`${Z}-product-tile-details`,{embedded:!e,standalone:e}),children:[I.jsxs("div",{className:oe(r,`${Z}-product-tile-content`),children:[u&&I.jsx("p",{className:`${Z}-product-tile-brand`,children:u}),m?I.jsxs("a",{"aria-label":`Go to product page for ${o}`,className:oe(r,`${Z}-product-tile-pdp`),href:`${m}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",I.jsx("span",{className:oe(r,`${Z}-product-tile-pdp-arrow`),children:"→"})]}):I.jsx("p",{className:oe(r,`${Z}-product-tile-name`),title:o,children:o})]}),I.jsx("div",{className:oe(r,`${Z}-product-tile-footer`),children:I.jsx("p",{className:oe(r,`${Z}-product-tile-price`),children:a})})]})]})},$N=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=sr(),o=t;return n?I.jsxs("div",{className:oe(r,`${Z}-display-products widget-message`),children:[I.jsx("p",{children:o.message}),o.products&&o.products.length>0&&I.jsx("div",{className:oe(r,`${Z}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(u=>{const a=n.getPid(u);return I.jsx(jN,{isWidgetStandalone:e,product:u},`${a}`)})})]}):null},VN=({globalClassName:e,message:t,isWidgetStandalone:n})=>I.jsx("div",{className:oe(e,`${Z}-error-message`,{standalone:n,embedded:!n}),children:I.jsxs("p",{className:oe(e,`${Z}-error-message-text`,{standalone:n,embedded:!n}),children:[I.jsx(sA,{})," ",t.message||"An error occurred while processing your request."]})});function qN(e){return hn({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 YN=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:u})=>I.jsx("div",{className:oe(e,`${Z}-suggestion-container standalone`),children:o.map(a=>I.jsxs(Yf,{disabled:r,className:oe(e,`${Z}-suggestion-button standalone`),onClick:()=>u(a,n||t),children:[I.jsx(qN,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",a.displayText]},a.displayText))}),WN=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=li();return I.jsxs("div",{className:oe(e,`${Z}-follow-up`),children:[I.jsx("p",{className:oe(e,`${Z}-text`),children:t.message}),n&&I.jsx(YN,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&I.jsx("div",{className:oe(e,`${Z}-suggestion-container embedded`),children:t.suggestions.map(u=>I.jsx("button",{disabled:o,className:oe(e,`${Z}-suggestion-button embedded`),onClick:()=>r(u,t.eventSourceId||t.id),children:u.displayText},u.displayText))})]})};function WM(){}function GM(){}function nE(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const a=n.slice(o,r).trim();(a||!u)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function rE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QN={};function iE(e,t){return(QN.jsx?KN:GN).test(e)}const XN=/[ \t\n\f\r]/g;function JN(e){return typeof e=="object"?e.type==="text"?sE(e.value):!1:sE(e)}function sE(e){return e.replace(XN,"")===""}let tu=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};tu.prototype.normal={},tu.prototype.property={},tu.prototype.space=void 0;function oE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new tu(n,r,t)}function nu(e){return e.toLowerCase()}let Sn=class{constructor(t,n){this.attribute=n,this.property=t}};Sn.prototype.attribute="",Sn.prototype.booleanish=!1,Sn.prototype.boolean=!1,Sn.prototype.commaOrSpaceSeparated=!1,Sn.prototype.commaSeparated=!1,Sn.prototype.defined=!1,Sn.prototype.mustUseProperty=!1,Sn.prototype.number=!1,Sn.prototype.overloadedBoolean=!1,Sn.prototype.property="",Sn.prototype.spaceSeparated=!1,Sn.prototype.space=void 0;let ZN=0;const $e=Wi(),Mt=Wi(),Pd=Wi(),he=Wi(),at=Wi(),js=Wi(),Ln=Wi();function Wi(){return Xc(2,++ZN)}const Rd=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Mt,commaOrSpaceSeparated:Ln,commaSeparated:js,number:he,overloadedBoolean:Pd,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),Ld=Object.keys(Rd);let Dd=class extends Sn{constructor(t,n,r,o){let u=-1;if(super(t,n),uE(this,"space",o),typeof r=="number")for(;++u<Ld.length;){const a=Ld[u];uE(this,Ld[u],(r&Rd[a])===Rd[a])}}};Dd.prototype.defined=!0;function uE(e,t,n){n&&(e[t]=n)}function $s(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new Dd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[nu(r)]=r,n[nu(u.attribute)]=r}return new tu(t,n,e.space)}const aE=$s({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:at,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:he,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:at,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Mt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function lE(e,t){return t in e?e[t]:t}function cE(e,t){return lE(e,t.toLowerCase())}const e3=$s({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:at,autoFocus:$e,autoPlay:$e,blocking:at,capture:null,charSet:null,checked:$e,cite:null,className:at,cols:he,colSpan:null,content:null,contentEditable:Mt,controls:$e,controlsList:at,coords:he|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Pd,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:at,height:he,hidden:Pd,high:he,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:at,itemRef:at,itemScope:$e,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:he,pattern:null,ping:at,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:at,required:$e,reversed:$e,rows:he,rowSpan:he,sandbox:at,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Mt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:cE}),t3=$s({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ln,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:at,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lE}),fE=$s({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),dE=$s({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cE}),hE=$s({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),n3={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"},r3=/[A-Z]/g,pE=/-[a-z]/g,i3=/^data[-\w.:]+$/i;function Fd(e,t){const n=nu(t);let r=t,o=Sn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&i3.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(pE,o3);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!pE.test(u)){let a=u.replace(r3,s3);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Dd}return new o(r,t)}function s3(e){return"-"+e.toLowerCase()}function o3(e){return e.charAt(1).toUpperCase()}const cl=oE([aE,e3,fE,dE,hE],"html"),Vs=oE([aE,t3,fE,dE,hE],"svg");function mE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function gE(e){return e.join(" ").trim()}var qs={},Md,EE;function u3(){if(EE)return Md;EE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
15
|
+
`,h="/",m="*",E="",b="comment",T="declaration";Md=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var k=1,M=1;function D(ue){var ie=ue.match(t);ie&&(k+=ie.length);var ge=ue.lastIndexOf(f);M=~ge?ue.length-ge:M+ue.length}function G(){var ue={line:k,column:M};return function(ie){return ie.position=new q(ue),Te(),ie}}function q(ue){this.start=ue,this.end={line:k,column:M},this.source=C.source}q.prototype.content=S;function B(ue){var ie=new Error(C.source+":"+k+":"+M+": "+ue);if(ie.reason=ue,ie.filename=C.source,ie.line=k,ie.column=M,ie.source=S,!C.silent)throw ie}function te(ue){var ie=ue.exec(S);if(ie){var ge=ie[0];return D(ge),S=S.slice(ge.length),ie}}function Te(){te(n)}function Se(ue){var ie;for(ue=ue||[];ie=H();)ie!==!1&&ue.push(ie);return ue}function H(){var ue=G();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var ie=2;E!=S.charAt(ie)&&(m!=S.charAt(ie)||h!=S.charAt(ie+1));)++ie;if(ie+=2,E===S.charAt(ie-1))return B("End of comment missing");var ge=S.slice(2,ie-2);return M+=2,D(ge),S=S.slice(ie),M+=2,ue({type:b,comment:ge})}}function fe(){var ue=G(),ie=te(r);if(ie){if(H(),!te(o))return B("property missing ':'");var ge=te(u),we=ue({type:T,property:_(ie[0].replace(e,E)),value:ge?_(ge[0].replace(e,E)):E});return te(a),we}}function de(){var ue=[];Se(ue);for(var ie;ie=fe();)ie!==!1&&(ue.push(ie),Se(ue));return ue}return Te(),de()};function _(S){return S?S.replace(c,E):E}return Md}var yE;function a3(){if(yE)return qs;yE=1;var e=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=n;var t=e(u3());function n(r,o){var u=null;if(!r||typeof r!="string")return u;var a=(0,t.default)(r),c=typeof o=="function";return a.forEach(function(f){if(f.type==="declaration"){var h=f.property,m=f.value;c?o(h,m,f):m&&(u=u||{},u[h]=m)}}),u}return qs}var ru={},TE;function l3(){if(TE)return ru;TE=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),u(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,a))};return ru.camelCase=f,ru}var iu,bE;function c3(){if(bE)return iu;bE=1;var e=iu&&iu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(a3()),n=l3();function r(o,u){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,u)]=f)}),a}return r.default=r,iu=r,iu}var f3=c3();const d3=Ge(f3),fl=_E("end"),Nr=_E("start");function _E(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 h3(e){const t=Nr(e),n=fl(e);if(t&&n)return{start:t,end:n}}function su(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xE(e.position):"start"in e||"end"in e?xE(e):"line"in e||"column"in e?Bd(e):""}function Bd(e){return SE(e&&e.line)+":"+SE(e&&e.column)}function xE(e){return Bd(e&&e.start)+"-"+Bd(e&&e.end)}function SE(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",u={},a=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u=U({},n)),typeof t=="string"?o=t:!u.cause&&t&&(a=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?u.ruleId=r:(u.source=r.slice(0,f),u.ruleId=r.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=su(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=a&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual,this.expected,this.note,this.url}}rn.prototype.file="",rn.prototype.name="",rn.prototype.reason="",rn.prototype.message="",rn.prototype.stack="",rn.prototype.column=void 0,rn.prototype.line=void 0,rn.prototype.ancestors=void 0,rn.prototype.cause=void 0,rn.prototype.fatal=void 0,rn.prototype.place=void 0,rn.prototype.ruleId=void 0,rn.prototype.source=void 0;const Ud={}.hasOwnProperty,p3=new Map,m3=/[A-Z]/g,g3=new Set(["table","tbody","thead","tfoot","tr"]),E3=new Set(["td","th"]),wE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y3(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=A3(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=C3(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vs:cl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=CE(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function CE(e,t,n){if(t.type==="element")return T3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x3(e,t,n);if(t.type==="mdxjsEsm")return _3(e,t);if(t.type==="root")return S3(e,t,n);if(t.type==="text")return w3(e,t)}function T3(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Vs,e.schema=o),e.ancestors.push(t);const u=vE(e,t.tagName,!1),a=v3(e,t);let c=zd(e,t);return g3.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!JN(f):!0})),AE(e,a,u,t),Hd(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function b3(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)}ou(e,t.position)}function _3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ou(e,t.position)}function x3(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Vs,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:vE(e,t.name,!0),a=k3(e,t),c=zd(e,t);return AE(e,a,u,t),Hd(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function S3(e,t,n){const r={};return Hd(r,zd(e,t)),e.create(t,e.Fragment,r,n)}function w3(e,t){return t.value}function AE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function C3(e,t,n){return r;function r(o,u,a,c){const h=Array.isArray(a.children)?n:t;return c?h(u,a,c):h(u,a)}}function A3(e,t){return n;function n(r,o,u,a){const c=Array.isArray(u.children),f=Nr(r);return t(o,u,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function v3(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Ud.call(t.properties,o)){const u=N3(e,o,t.properties[o]);if(u){const[a,c]=u;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&E3.has(t.tagName)?r=c:n[a]=c}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function k3(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const a=u.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ou(e,t.position);else{const o=r.name;let u;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,u=e.evaluater.evaluateExpression(c.expression)}else ou(e,t.position);else u=r.value===null?!0:r.value;n[o]=u}return n}function zd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:p3;for(;++r<t.children.length;){const u=t.children[r];let a;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=CE(e,u,a);c!==void 0&&n.push(c)}return n}function N3(e,t,n){const r=Fd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?rE(n):gE(n)),r.property==="style"){let o=typeof n=="object"?n:O3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=I3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?n3[r.property]||r.property:r.attribute,n]}}function O3(e,t){try{return d3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=wE+"#cannot-parse-style-attribute",o}}function vE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,a;for(;++u<o.length;){const c=iE(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}r=a}else r=iE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Ud.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ou(e)}function ou(e,t){const n=new rn("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=wE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function I3(e){const t={};let n;for(n in e)Ud.call(e,n)&&(t[P3(n)]=e[n]);return t}function P3(e){let t=e.replace(m3,R3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R3(e){return"-"+e.toLowerCase()}const jd={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"]},L3={};function $d(e,t){const n=L3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return kE(e,r,o)}function kE(e,t,n){if(D3(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 NE(e.children,t,n)}return Array.isArray(e)?NE(e,t,n):""}function NE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=kE(e[o],t,n);return r.join("")}function D3(e){return!!(e&&typeof e=="object")}const OE=document.createElement("i");function Vd(e){const t="&"+e+";";OE.innerHTML=t;const n=OE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dn(e,t,n,r){const o=e.length;let u=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);u<r.length;)a=r.slice(u,u+1e4),a.unshift(t,0),e.splice(...a),u+=1e4,t+=1e4}function Yn(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}const IE={}.hasOwnProperty;function PE(e){const t={};let n=-1;for(;++n<e.length;)F3(t,e[n]);return t}function F3(e,t){let n;for(n in t){const o=(IE.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let a;if(u)for(a in u){IE.call(o,a)||(o[a]=[]);const c=u[a];M3(o[a],Array.isArray(c)?c:c?[c]:[])}}}function M3(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dn(e,0,0,r)}function RE(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 fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=hi(/[A-Za-z]/),sn=hi(/[\dA-Za-z]/),B3=hi(/[#-'*+\--9=?A-Z^-~]/);function dl(e){return e!==null&&(e<32||e===127)}const qd=hi(/\d/),U3=hi(/[\dA-Fa-f]/),H3=hi(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function ut(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const hl=hi(new RegExp("\\p{P}|\\p{S}","u")),Gi=hi(/\s/);function hi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let a="";if(u===37&&sn(e.charCodeAt(n+1))&&sn(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(a=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(a=String.fromCharCode(u,c),o=1):a="�"}else a=String.fromCharCode(u);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return a;function a(f){return Ke(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ke(f)&&u++<o?(e.consume(f),c):(e.exit(n),t(f))}}const z3={tokenize:j3};function j3(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),a)}}const $3={tokenize:V3},LE={tokenize:q3};function V3(e){const t=this,n=[];let r=0,o,u,a;return c;function c(D){if(r<n.length){const G=n[r];return t.containerState=G[1],e.attempt(G[0].continuation,f,h)(D)}return h(D)}function f(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&M();const G=t.events.length;let q=G,B;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){B=t.events[q][1].end;break}k(r);let te=G;for(;te<t.events.length;)t.events[te][1].end=U({},B),te++;return Dn(t.events,q+1,0,t.events.slice(G)),t.events.length=te,h(D)}return c(D)}function h(D){if(r===n.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return _(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(LE,m,E)(D)}function m(D){return o&&M(),k(r),b(D)}function E(D){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,_(D)}function b(D){return t.containerState={},e.attempt(LE,T,_)(D)}function T(D){return r++,n.push([t.currentConstruct,t.containerState]),b(D)}function _(D){if(D===null){o&&M(),k(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(D)}function S(D){if(D===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(D);return}return Re(D)?(e.consume(D),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),S)}function C(D,G){const q=t.sliceStream(D);if(G&&q.push(null),D.previous=u,u&&(u.next=D),u=D,o.defineSkip(D.start),o.write(q),t.parser.lazy[D.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<a&&(!o.events[B][1].end||o.events[B][1].end.offset>a))return;const te=t.events.length;let Te=te,Se,H;for(;Te--;)if(t.events[Te][0]==="exit"&&t.events[Te][1].type==="chunkFlow"){if(Se){H=t.events[Te][1].end;break}Se=!0}for(k(r),B=te;B<t.events.length;)t.events[B][1].end=U({},H),B++;Dn(t.events,Te+1,0,t.events.slice(te)),t.events.length=B}}function k(D){let G=n.length;for(;G-- >D;){const q=n[G];t.containerState=q[1],q[0].exit.call(t,e)}n.length=D}function M(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function q3(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||ut(e)||Gi(e))return 1;if(hl(e))return 2}function pl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const Yd={name:"attention",resolveAll:Y3,tokenize:W3};function Y3(e,t){let n=-1,r,o,u,a,c,f,h,m;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;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=U({},e[r][1].end),b=U({},e[n][1].start);DE(E,-f),DE(b,f),a={type:f>1?"strongSequence":"emphasisSequence",start:E,end:U({},e[r][1].end)},c={type:f>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},u={type:f>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},o={type:f>1?"strong":"emphasis",start:U({},a.start),end:U({},c.end)},e[r][1].end=U({},a.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Yn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Yn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",u,t]]),h=Yn(h,pl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Yn(h,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Yn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Dn(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function W3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ws(r);let u;return a;function a(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const h=e.exit("attentionSequence"),m=Ws(f),E=!m||m===2&&o||n.includes(f),b=!o||o===2&&m||n.includes(r);return h._open=!!(u===42?E:E&&(o||!b)),h._close=!!(u===42?b:b&&(m||!E)),t(f)}}function DE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const G3={name:"autolink",tokenize:K3};function K3(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(T){return pn(T)?(e.consume(T),a):T===64?n(T):h(T)}function a(T){return T===43||T===45||T===46||sn(T)?(r=1,c(T)):h(T)}function c(T){return T===58?(e.consume(T),r=0,f):(T===43||T===45||T===46||sn(T))&&r++<32?(e.consume(T),c):(r=0,h(T))}function f(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),f)}function h(T){return T===64?(e.consume(T),m):B3(T)?(e.consume(T),h):n(T)}function m(T){return sn(T)?E(T):n(T)}function E(T){return T===46?(e.consume(T),r=0,m):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||sn(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const uu={partial:!0,tokenize:Q3};function Q3(e,t,n){return r;function r(u){return Ke(u)?Xe(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Re(u)?t(u):n(u)}}const FE={continuation:{tokenize:J3},exit:Z3,name:"blockQuote",tokenize:X3};function X3(e,t,n){const r=this;return o;function o(a){if(a===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),u}return n(a)}function u(a){return Ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function J3(e,t,n){const r=this;return o;function o(a){return Ke(a)?Xe(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):u(a)}function u(a){return e.attempt(FE,t,n)(a)}}function Z3(e){e.exit("blockQuote")}const ME={name:"characterEscape",tokenize:eO};function eO(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return H3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const BE={name:"characterReference",tokenize:tO};function tO(e,t,n){const r=this;let o=0,u,a;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,a=sn,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,a=U3,m):(e.enter("characterReferenceValue"),u=7,a=qd,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return a===sn&&!Vd(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(E)&&o++<u?(e.consume(E),m):n(E)}}const UE={partial:!0,tokenize:rO},HE={concrete:!0,name:"codeFenced",tokenize:nO};function nO(e,t,n){const r=this,o={partial:!0,tokenize:q};let u=0,a=0,c;return f;function f(B){return h(B)}function h(B){const te=r.events[r.events.length-1];return u=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(a++,e.consume(B),m):a<3?n(B):(e.exit("codeFencedFenceSequence"),Ke(B)?Xe(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Re(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(UE,S,G)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Ke(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,T,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function T(B){return B===null||Re(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function S(B){return e.attempt(o,G,C)(B)}function C(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),k}function k(B){return u>0&&Ke(B)?Xe(e,M,"linePrefix",u+1)(B):M(B)}function M(B){return B===null||Re(B)?e.check(UE,S,G)(B):(e.enter("codeFlowValue"),D(B))}function D(B){return B===null||Re(B)?(e.exit("codeFlowValue"),M(B)):(e.consume(B),D)}function G(B){return e.exit("codeFenced"),t(B)}function q(B,te,Te){let Se=0;return H;function H(ge){return B.enter("lineEnding"),B.consume(ge),B.exit("lineEnding"),fe}function fe(ge){return B.enter("codeFencedFence"),Ke(ge)?Xe(B,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ge):de(ge)}function de(ge){return ge===c?(B.enter("codeFencedFenceSequence"),ue(ge)):Te(ge)}function ue(ge){return ge===c?(Se++,B.consume(ge),ue):Se>=a?(B.exit("codeFencedFenceSequence"),Ke(ge)?Xe(B,ie,"whitespace")(ge):ie(ge)):Te(ge)}function ie(ge){return ge===null||Re(ge)?(B.exit("codeFencedFence"),te(ge)):Te(ge)}}}function rO(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Wd={name:"codeIndented",tokenize:sO},iO={partial:!0,tokenize:oO};function sO(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Xe(e,u,"linePrefix",5)(h)}function u(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):Re(h)?e.attempt(iO,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function oO(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Xe(e,u,"linePrefix",5)(a)}function u(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Re(a)?o(a):n(a)}}const uO={name:"codeText",previous:lO,resolve:aO,tokenize:cO};function aO(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function lO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cO(e,t,n){let r=0,o,u;return a;function a(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),o=0,m(E)):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Re(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",h(E))}}class fO{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&au(this.left,r),u.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),au(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),au(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);au(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);au(this.left,n.reverse())}}}function au(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 zE(e){const t={};let n=-1,r,o,u,a,c,f,h;const m=new fO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,dO(m,n)),n=t[n],h=!0);else if(r[1]._container){for(u=n,o=void 0;u--;)if(a=m.get(u),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=u);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Dn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function dO(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const u=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let m,E,b=-1,T=n,_=0,S=0;const C=[S];for(;T;){for(;e.get(++o)[1]!==T;);u.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&a.defineSkip(T.start),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),E=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,C.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(a.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),b=C.length;b--;){const k=c.slice(C[b],C[b+1]),M=u.pop();f.push([M,M+k.length-1]),e.splice(M,2,k)}for(f.reverse(),b=-1;++b<f.length;)h[_+f[b][0]]=_+f[b][1],_+=f[b][1]-f[b][0]-1;return h}const hO={resolve:mO,tokenize:gO},pO={partial:!0,tokenize:EO};function mO(e){return zE(e),e}function gO(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?u(c):Re(c)?e.check(pO,a,u)(c):(e.consume(c),o)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function EO(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Xe(e,u,"linePrefix")}function u(a){if(a===null||Re(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function jE(e,t,n,r,o,u,a,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return E;function E(k){return k===60?(e.enter(r),e.enter(o),e.enter(u),e.consume(k),e.exit(u),b):k===null||k===32||k===41||dl(k)?n(k):(e.enter(r),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(k))}function b(k){return k===62?(e.enter(u),e.consume(k),e.exit(u),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(k))}function T(k){return k===62?(e.exit("chunkString"),e.exit(c),b(k)):k===null||k===60||Re(k)?n(k):(e.consume(k),k===92?_:T)}function _(k){return k===60||k===62||k===92?(e.consume(k),T):T(k)}function S(k){return!m&&(k===null||k===41||ut(k))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(r),t(k)):m<h&&k===40?(e.consume(k),m++,S):k===41?(e.consume(k),m--,S):k===null||k===32||k===40||dl(k)?n(k):(e.consume(k),k===92?C:S)}function C(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function $E(e,t,n,r,o,u){const a=this;let c=0,f;return h;function h(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(u),m}function m(T){return c>999||T===null||T===91||T===93&&!f||T===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(T):T===93?(e.exit(u),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Re(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Re(T)||c++>999?(e.exit("chunkString"),m(T)):(e.consume(T),f||(f=!Ke(T)),T===92?b:E)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,E):E(T)}}function VE(e,t,n,r,o,u){let a;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),a=b===40?41:b,f):n(b)}function f(b){return b===a?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(u),h(b))}function h(b){return b===a?(e.exit(u),f(a)):b===null?n(b):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===a||b===null||Re(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===a||b===92?(e.consume(b),m):m(b)}}function lu(e,t){let n;return r;function r(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const yO={name:"definition",tokenize:bO},TO={partial:!0,tokenize:_O};function bO(e,t,n){const r=this;let o;return u;function u(T){return e.enter("definition"),a(T)}function a(T){return $E.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=fr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),f):n(T)}function f(T){return ut(T)?lu(e,h)(T):h(T)}function h(T){return jE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(TO,E,E)(T)}function E(T){return Ke(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Re(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function _O(e,t,n){return r;function r(c){return ut(c)?lu(e,o)(c):n(c)}function o(c){return VE(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Ke(c)?Xe(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Re(c)?t(c):n(c)}}const xO={name:"hardBreakEscape",tokenize:SO};function SO(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Re(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const wO={name:"headingAtx",resolve:CO,tokenize:AO};function CO(e,t){let n=e.length-2,r=3,o,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dn(e,r,n-r+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function AO(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||ut(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Re(m)?(e.exit("atxHeading"),t(m)):Ke(m)?Xe(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||ut(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const vO=["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"],qE=["pre","script","style","textarea"],kO={concrete:!0,name:"htmlFlow",resolveTo:IO,tokenize:PO},NO={partial:!0,tokenize:LO},OO={partial:!0,tokenize:RO};function IO(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 PO(e,t,n){const r=this;let o,u,a,c,f;return h;function h(N){return m(N)}function m(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),E}function E(N){return N===33?(e.consume(N),b):N===47?(e.consume(N),u=!0,S):N===63?(e.consume(N),o=3,r.interrupt?t:w):pn(N)?(e.consume(N),a=String.fromCharCode(N),C):n(N)}function b(N){return N===45?(e.consume(N),o=2,T):N===91?(e.consume(N),o=5,c=0,_):pn(N)?(e.consume(N),o=4,r.interrupt?t:w):n(N)}function T(N){return N===45?(e.consume(N),r.interrupt?t:w):n(N)}function _(N){const _e="CDATA[";return N===_e.charCodeAt(c++)?(e.consume(N),c===_e.length?r.interrupt?t:de:_):n(N)}function S(N){return pn(N)?(e.consume(N),a=String.fromCharCode(N),C):n(N)}function C(N){if(N===null||N===47||N===62||ut(N)){const _e=N===47,Me=a.toLowerCase();return!_e&&!u&&qE.includes(Me)?(o=1,r.interrupt?t(N):de(N)):vO.includes(a.toLowerCase())?(o=6,_e?(e.consume(N),k):r.interrupt?t(N):de(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):u?M(N):D(N))}return N===45||sn(N)?(e.consume(N),a+=String.fromCharCode(N),C):n(N)}function k(N){return N===62?(e.consume(N),r.interrupt?t:de):n(N)}function M(N){return Ke(N)?(e.consume(N),M):H(N)}function D(N){return N===47?(e.consume(N),H):N===58||N===95||pn(N)?(e.consume(N),G):Ke(N)?(e.consume(N),D):H(N)}function G(N){return N===45||N===46||N===58||N===95||sn(N)?(e.consume(N),G):q(N)}function q(N){return N===61?(e.consume(N),B):Ke(N)?(e.consume(N),q):D(N)}function B(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,te):Ke(N)?(e.consume(N),B):Te(N)}function te(N){return N===f?(e.consume(N),f=null,Se):N===null||Re(N)?n(N):(e.consume(N),te)}function Te(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ut(N)?q(N):(e.consume(N),Te)}function Se(N){return N===47||N===62||Ke(N)?D(N):n(N)}function H(N){return N===62?(e.consume(N),fe):n(N)}function fe(N){return N===null||Re(N)?de(N):Ke(N)?(e.consume(N),fe):n(N)}function de(N){return N===45&&o===2?(e.consume(N),we):N===60&&o===1?(e.consume(N),ae):N===62&&o===4?(e.consume(N),R):N===63&&o===3?(e.consume(N),w):N===93&&o===5?(e.consume(N),ee):Re(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(NO,Q,ue)(N)):N===null||Re(N)?(e.exit("htmlFlowData"),ue(N)):(e.consume(N),de)}function ue(N){return e.check(OO,ie,Q)(N)}function ie(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ge}function ge(N){return N===null||Re(N)?ue(N):(e.enter("htmlFlowData"),de(N))}function we(N){return N===45?(e.consume(N),w):de(N)}function ae(N){return N===47?(e.consume(N),a="",V):de(N)}function V(N){if(N===62){const _e=a.toLowerCase();return qE.includes(_e)?(e.consume(N),R):de(N)}return pn(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),V):de(N)}function ee(N){return N===93?(e.consume(N),w):de(N)}function w(N){return N===62?(e.consume(N),R):N===45&&o===2?(e.consume(N),w):de(N)}function R(N){return N===null||Re(N)?(e.exit("htmlFlowData"),Q(N)):(e.consume(N),R)}function Q(N){return e.exit("htmlFlow"),t(N)}}function RO(e,t,n){const r=this;return o;function o(a){return Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):n(a)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function LO(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(uu,t,n)}}const DO={name:"htmlText",tokenize:FO};function FO(e,t,n){const r=this;let o,u,a;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),q):w===63?(e.consume(w),D):pn(w)?(e.consume(w),Te):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),u=0,_):pn(w)?(e.consume(w),M):n(w)}function m(w){return w===45?(e.consume(w),T):n(w)}function E(w){return w===null?n(w):w===45?(e.consume(w),b):Re(w)?(a=E,ae(w)):(e.consume(w),E)}function b(w){return w===45?(e.consume(w),T):E(w)}function T(w){return w===62?we(w):w===45?b(w):E(w)}function _(w){const R="CDATA[";return w===R.charCodeAt(u++)?(e.consume(w),u===R.length?S:_):n(w)}function S(w){return w===null?n(w):w===93?(e.consume(w),C):Re(w)?(a=S,ae(w)):(e.consume(w),S)}function C(w){return w===93?(e.consume(w),k):S(w)}function k(w){return w===62?we(w):w===93?(e.consume(w),k):S(w)}function M(w){return w===null||w===62?we(w):Re(w)?(a=M,ae(w)):(e.consume(w),M)}function D(w){return w===null?n(w):w===63?(e.consume(w),G):Re(w)?(a=D,ae(w)):(e.consume(w),D)}function G(w){return w===62?we(w):D(w)}function q(w){return pn(w)?(e.consume(w),B):n(w)}function B(w){return w===45||sn(w)?(e.consume(w),B):te(w)}function te(w){return Re(w)?(a=te,ae(w)):Ke(w)?(e.consume(w),te):we(w)}function Te(w){return w===45||sn(w)?(e.consume(w),Te):w===47||w===62||ut(w)?Se(w):n(w)}function Se(w){return w===47?(e.consume(w),we):w===58||w===95||pn(w)?(e.consume(w),H):Re(w)?(a=Se,ae(w)):Ke(w)?(e.consume(w),Se):we(w)}function H(w){return w===45||w===46||w===58||w===95||sn(w)?(e.consume(w),H):fe(w)}function fe(w){return w===61?(e.consume(w),de):Re(w)?(a=fe,ae(w)):Ke(w)?(e.consume(w),fe):Se(w)}function de(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,ue):Re(w)?(a=de,ae(w)):Ke(w)?(e.consume(w),de):(e.consume(w),ie)}function ue(w){return w===o?(e.consume(w),o=void 0,ge):w===null?n(w):Re(w)?(a=ue,ae(w)):(e.consume(w),ue)}function ie(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ut(w)?Se(w):(e.consume(w),ie)}function ge(w){return w===47||w===62||ut(w)?Se(w):n(w)}function we(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ae(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return Ke(w)?Xe(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ee(w)}function ee(w){return e.enter("htmlTextData"),a(w)}}const Gd={name:"labelEnd",resolveAll:HO,resolveTo:zO,tokenize:jO},MO={tokenize:$O},BO={tokenize:VO},UO={tokenize:qO};function HO(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Dn(e,0,e.length,n),e}function zO(e,t){let n=e.length,r=0,o,u,a,c;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:U({},e[u][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[u][1].start),end:U({},e[a][1].end)},m={type:"labelText",start:U({},e[u+r+2][1].end),end:U({},e[a-2][1].start)};return c=[["enter",f,t],["enter",h,t]],c=Yn(c,e.slice(u+1,u+r+3)),c=Yn(c,[["enter",m,t]]),c=Yn(c,pl(t.parser.constructs.insideSpan.null,e.slice(u+r+4,a-3),t)),c=Yn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=Yn(c,e.slice(a+1)),c=Yn(c,[["exit",f,t]]),Dn(e,u,e.length,c),e}function jO(e,t,n){const r=this;let o=r.events.length,u,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return c;function c(b){return u?u._inactive?E(b):(a=r.parser.defined.includes(fr(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(MO,m,a?m:E)(b):b===91?e.attempt(BO,m,a?h:E)(b):a?m(b):E(b)}function h(b){return e.attempt(UO,m,E)(b)}function m(b){return t(b)}function E(b){return u._balanced=!0,n(b)}}function $O(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ut(E)?lu(e,u)(E):u(E)}function u(E){return E===41?m(E):jE(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function a(E){return ut(E)?lu(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?VE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return ut(E)?lu(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function VO(e,t,n){const r=this;return o;function o(c){return $E.call(r,e,u,a,"reference","referenceMarker","referenceString")(c)}function u(c){return r.parser.defined.includes(fr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function qO(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const YO={name:"labelStartImage",resolveAll:Gd.resolveAll,tokenize:WO};function WO(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const GO={name:"labelStartLink",resolveAll:Gd.resolveAll,tokenize:KO};function KO(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),u}function u(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Kd={name:"lineEnding",tokenize:QO};function QO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const ml={name:"thematicBreak",tokenize:XO};function XO(e,t,n){let r=0,o;return u;function u(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ke(h)?Xe(e,c,"whitespace")(h):c(h))}}const wn={continuation:{tokenize:tI},exit:rI,name:"list",tokenize:eI},JO={partial:!0,tokenize:iI},ZO={partial:!0,tokenize:nI};function eI(e,t,n){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=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:qd(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(ml,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(T)}return n(T)}function f(T){return qd(T)&&++a<10?(e.consume(T),f):(!r.interrupt||a<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):n(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(uu,r.interrupt?n:m,e.attempt(JO,b,E))}function m(T){return r.containerState.initialBlankLine=!0,u++,b(T)}function E(T){return Ke(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function tI(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(uu,o,u);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function u(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ZO,t,a)(c))}function a(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(wn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function nI(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(u):n(u)}}function rI(e){e.exit(this.containerState.type)}function iI(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const a=r.events[r.events.length-1];return!Ke(u)&&a&&a[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const YE={name:"setextUnderline",resolveTo:sI,tokenize:oI};function sI(e,t){let n=e.length,r,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const a={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",a,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[u][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function oI(e,t,n){const r=this;let o;return u;function u(h){let m=r.events.length,E;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){E=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ke(h)?Xe(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const uI={tokenize:aI};function aI(e){const t=this,n=e.attempt(uu,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(hO,o)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lI={resolveAll:GE()},cI=WE("string"),fI=WE("text");function WE(e){return{resolveAll:GE(e==="text"?dI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],u=n.attempt(o,a,c);return a;function a(m){return h(m)?u(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),u(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const E=o[m];let b=-1;if(E)for(;++b<E.length;){const T=E[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function GE(e){return t;function t(n,r){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,r):n}}function dI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let u=o.length,a=-1,c=0,f;for(;u--;){const h=o[u];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?a:r.start._bufferIndex+a,_index:r.start._index+u,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:U({},r.end)};r.end=U({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const hI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:yO},disable:{null:[]},document:{42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:FE},flow:{35:wO,42:ml,45:[YE,ml],60:kO,61:YE,95:ml,96:HE,126:HE},flowInitial:{[-2]:Wd,[-1]:Wd,32:Wd},insideSpan:{null:[Yd,lI]},string:{38:BE,92:ME},text:{[-5]:Kd,[-4]:Kd,[-3]:Kd,33:YO,38:BE,42:Yd,60:[G3,DO],91:GO,92:[xO,ME],93:Gd,95:Yd,96:uO}},Symbol.toStringTag,{value:"Module"}));function pI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},u=[];let a=[],c=[];const f={attempt:te(q),check:te(B),consume:M,enter:D,exit:G,interrupt:te(B,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let m=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function E(fe){return a=Yn(a,fe),C(),a[a.length-1]!==null?[]:(Te(t,0),h.events=pl(u,h.events,h),h.events)}function b(fe,de){return gI(T(fe),de)}function T(fe){return mI(a,fe)}function _(){const{_bufferIndex:fe,_index:de,line:ue,column:ie,offset:ge}=r;return{_bufferIndex:fe,_index:de,line:ue,column:ie,offset:ge}}function S(fe){o[fe.line]=fe.column,H()}function C(){let fe;for(;r._index<a.length;){const de=a[r._index];if(typeof de=="string")for(fe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===fe&&r._bufferIndex<de.length;)k(de.charCodeAt(r._bufferIndex));else k(de)}}function k(fe){m=m(fe)}function M(fe){Re(fe)?(r.line++,r.column=1,r.offset+=fe===-3?2:1,H()):fe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=fe}function D(fe,de){const ue=de||{};return ue.type=fe,ue.start=_(),h.events.push(["enter",ue,h]),c.push(ue),ue}function G(fe){const de=c.pop();return de.end=_(),h.events.push(["exit",de,h]),de}function q(fe,de){Te(fe,de.from)}function B(fe,de){de.restore()}function te(fe,de){return ue;function ue(ie,ge,we){let ae,V,ee,w;return Array.isArray(ie)?Q(ie):"tokenize"in ie?Q([ie]):R(ie);function R(Ie){return Ye;function Ye(Ve){const Je=Ve!==null&&Ie[Ve],xt=Ve!==null&&Ie.null,be=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return Q(be)(Ve)}}function Q(Ie){return ae=Ie,V=0,Ie.length===0?we:N(Ie[V])}function N(Ie){return Ye;function Ye(Ve){return w=Se(),ee=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?Me():Ie.tokenize.call(de?Object.assign(Object.create(h),de):h,f,_e,Me)(Ve)}}function _e(Ie){return fe(ee,w),ge}function Me(Ie){return w.restore(),++V<ae.length?N(ae[V]):we}}}function Te(fe,de){fe.resolveAll&&!u.includes(fe)&&u.push(fe),fe.resolve&&Dn(h.events,de,h.events.length-de,fe.resolve(h.events.slice(de),h)),fe.resolveTo&&(h.events=fe.resolveTo(h.events,h))}function Se(){const fe=_(),de=h.previous,ue=h.currentConstruct,ie=h.events.length,ge=Array.from(c);return{from:ie,restore:we};function we(){r=fe,h.previous=de,h.currentConstruct=ue,h.events.length=ie,c=ge,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function mI(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,u)];else{if(a=e.slice(n,o),r>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(r):a.shift()}u>0&&a.push(e[o].slice(0,u))}return a}function gI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const u=e[n];let a;if(typeof u=="string")a=u;else switch(u){case-5:{a="\r";break}case-4:{a=`
|
|
16
16
|
`;break}case-3:{a=`\r
|
|
17
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(u)}o=u===-2,r.push(a)}return r.join("")}function hI(e){const r={constructs:OE([lI,...(e||{}).extensions||[]]),content:o(F3),defined:[],document:o(U3),flow:o(rI),lazy:{},string:o(oI),text:o(uI)};return r;function o(u){return a;function a(c){return cI(r,u,c)}}}function pI(e){for(;!UE(e););return e}const WE=/[\0\t\n\r]/g;function mI(){let e=1,t="",n=!0,r;return o;function o(u,a,c){const f=[];let h,m,E,b,T;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(a||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(WE.lastIndex=E,h=WE.exec(u),b=h&&h.index!==void 0?h.index:u.length,T=u.charCodeAt(b),!h){t=u.slice(E);break}if(T===10&&E===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),E<b&&(f.push(u.slice(E,b)),e+=b-E),T){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}E=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const gI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EI(e){return e.replace(gI,yI)}function yI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return IE(n.slice(u?2:1),u?16:10)}return jd(n)||e}const GE={}.hasOwnProperty;function TI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bI(n)(pI(hI(n).document().write(mI()(e,t,!0))))}function bI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Dt),autolinkProtocol:Se,autolinkEmail:Se,atxHeading:u(Kt),blockQuote:u(Ne),characterEscape:Se,characterReference:Se,codeFenced:u(Xe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:u(Xe,a),codeText:u(yt,a),codeTextData:Se,data:Se,codeFlowValue:Se,definition:u(mt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:u(sn),hardBreakEscape:u(xt),hardBreakTrailing:u(xt),htmlFlow:u(Dn,a),htmlFlowData:Se,htmlText:u(Dn,a),htmlTextData:Se,image:u(Nt),label:a,link:u(Dt),listItem:u(mi),listItemValue:b,listOrdered:u(pi,E),listUnordered:u(pi),paragraph:u(Cu),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:u(Kt),strong:u(Bl),thematicBreak:u(Hl)},exit:{atxHeading:f(),atxHeadingSequence:X,autolink:f(),autolinkEmail:me,autolinkProtocol:Ve,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:Pe,characterReference:Ye,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(k),codeText:f(ye),codeTextData:H,data:H,definition:f(),definitionDestinationString:z,definitionLabelString:F,definitionTitleString:D,emphasis:f(),hardBreakEscape:f(ae),hardBreakTrailing:f(ae),htmlFlow:f(le),htmlFlowData:H,htmlText:f(de),htmlTextData:H,image:f(oe),label:Z,labelText:q,lineEnding:fe,link:f(Ae),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:_e,resourceDestinationString:w,resourceTitleString:R,resource:K,setextHeading:f(Te),setextHeadingLineSequence:te,setextHeadingText:B,strong:f(),thematicBreak:f()}};KE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let Ee={type:"root",children:[]};const Ue={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},We=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")We.push(Ze);else{const Qt=We.pop();Ze=o(J,Qt,Ze)}for(Ze=-1;++Ze<J.length;){const Qt=t[J[Ze][0]];GE.call(Qt,J[Ze][1].type)&&Qt[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},Ue),J[Ze][1])}if(Ue.tokenStack.length>0){const Qt=Ue.tokenStack[Ue.tokenStack.length-1];(Qt[1]||QE).call(Ue,void 0,Qt[0])}for(Ee.position={start:ci(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:ci(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)Ee=t.transforms[Ze](Ee)||Ee;return Ee}function o(J,Ee,Ue){let We=Ee-1,Ze=-1,Qt=!1,Gr,Wn,gi,Zi;for(;++We<=Ue;){const Xt=J[We];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?Ze++:Ze--,Zi=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Gr&&!Zi&&!Ze&&!gi&&(gi=We),Zi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zi=void 0}if(!Ze&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||Ze===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Gr){let Or=We;for(Wn=void 0;Or--;){const Mn=J[Or];if(Mn[1].type==="lineEnding"||Mn[1].type==="lineEndingBlank"){if(Mn[0]==="exit")continue;Wn&&(J[Wn][1].type="lineEndingBlank",Qt=!0),Mn[1].type="lineEnding",Wn=Or}else if(!(Mn[1].type==="linePrefix"||Mn[1].type==="blockQuotePrefix"||Mn[1].type==="blockQuotePrefixWhitespace"||Mn[1].type==="blockQuoteMarker"||Mn[1].type==="listItemIndent"))break}gi&&(!Wn||gi<Wn)&&(Gr._spread=!0),Gr.end=Object.assign({},Wn?J[Wn][1].start:Xt[1].end),J.splice(Wn||We,0,["exit",Gr,Xt[2]]),We++,Ue++}if(Xt[1].type==="listItemPrefix"){const Or={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Gr=Or,J.splice(We,0,["enter",Or,Xt[2]]),We++,Ue++,gi=void 0,Zi=!0}}}return J[Ee][1]._spread=Qt,Ue}function u(J,Ee){return Ue;function Ue(We){c.call(this,J(We),We),Ee&&Ee.call(this,We)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(J,Ee,Ue){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([Ee,Ue||void 0]),J.position={start:ci(Ee.start),end:void 0}}function f(J){return Ee;function Ee(Ue){J&&J.call(this,Ue),h.call(this,Ue)}}function h(J,Ee){const Ue=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==J.type&&(Ee?Ee.call(this,J,We[0]):(We[1]||QE).call(this,J,We[0]));else throw new Error("Cannot close `"+J.type+"` ("+ru({start:J.start,end:J.end})+"): it’s not open");Ue.position.end=ci(J.end)}function m(){return zd(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function T(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=J}function _(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/(\r?\n|\r)$/g,"")}function F(J){const Ee=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Ee,Ue.identifier=ar(this.sliceSerialize(J)).toLowerCase()}function D(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function z(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function X(J){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const Ue=this.sliceSerialize(J).length;Ee.depth=Ue}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(J){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function Te(){this.data.setextHeadingSlurpLineEnding=void 0}function Se(J){const Ue=this.stack[this.stack.length-1].children;let We=Ue[Ue.length-1];(!We||We.type!=="text")&&(We=Ul(),We.position={start:ci(J.start),end:void 0},Ue.push(We)),this.stack.push(We)}function H(J){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(J),Ee.position.end=ci(J.end)}function fe(J){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=Ee.children[Ee.children.length-1];Ue.position.end=ci(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(Se.call(this,J),H.call(this,J))}function ae(){this.data.atHardBreak=!0}function le(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function de(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function ye(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function Ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function q(J){const Ee=this.sliceSerialize(J),Ue=this.stack[this.stack.length-2];Ue.label=EI(Ee),Ue.identifier=ar(Ee).toLowerCase()}function Z(){const J=this.stack[this.stack.length-1],Ee=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const We=J.children;Ue.children=We}else Ue.alt=Ee}function w(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function R(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function K(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function _e(J){const Ee=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Ee,Ue.identifier=ar(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Be(J){this.data.characterReferenceType=J.type}function Pe(J){const Ee=this.sliceSerialize(J),Ue=this.data.characterReferenceType;let We;Ue?(We=IE(Ee,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=jd(Ee);const Ze=this.stack[this.stack.length-1];Ze.value+=We}function Ye(J){const Ee=this.stack.pop();Ee.position.end=ci(J.end)}function Ve(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(J)}function me(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(J)}function Ne(){return{type:"blockquote",children:[]}}function Xe(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sn(){return{type:"emphasis",children:[]}}function Kt(){return{type:"heading",depth:0,children:[]}}function xt(){return{type:"break"}}function Dn(){return{type:"html",value:""}}function Nt(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function pi(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function mi(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Cu(){return{type:"paragraph",children:[]}}function Bl(){return{type:"strong",children:[]}}function Ul(){return{type:"text",value:""}}function Hl(){return{type:"thematicBreak"}}}function ci(e){return{line:e.line,column:e.column,offset:e.offset}}function KE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?KE(e,r):_I(e,r)}}function _I(e,t){let n;for(n in t)if(GE.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 QE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ru({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is still open")}function xI(e){const t=this;t.parser=n;function n(r){return TI(r,be(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function SI(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 wI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
18
|
-
`}]}function
|
|
19
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function
|
|
17
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(u)}o=u===-2,r.push(a)}return r.join("")}function EI(e){const r={constructs:PE([hI,...(e||{}).extensions||[]]),content:o(z3),defined:[],document:o($3),flow:o(uI),lazy:{},string:o(cI),text:o(fI)};return r;function o(u){return a;function a(c){return pI(r,u,c)}}}function yI(e){for(;!zE(e););return e}const KE=/[\0\t\n\r]/g;function TI(){let e=1,t="",n=!0,r;return o;function o(u,a,c){const f=[];let h,m,E,b,T;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(a||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(KE.lastIndex=E,h=KE.exec(u),b=h&&h.index!==void 0?h.index:u.length,T=u.charCodeAt(b),!h){t=u.slice(E);break}if(T===10&&E===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),E<b&&(f.push(u.slice(E,b)),e+=b-E),T){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}E=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const bI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _I(e){return e.replace(bI,xI)}function xI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return RE(n.slice(u?2:1),u?16:10)}return Vd(n)||e}const QE={}.hasOwnProperty;function SI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),wI(n)(yI(EI(n).document().write(TI()(e,t,!0))))}function wI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Mn),autolinkProtocol:Se,autolinkEmail:Se,atxHeading:u(St),blockQuote:u(xt),characterEscape:Se,characterReference:Se,codeFenced:u(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:u(be,a),codeText:u(He,a),codeTextData:Se,data:Se,codeFlowValue:Se,definition:u(tt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:u(Tt),hardBreakEscape:u(un),hardBreakTrailing:u(un),htmlFlow:u(Wt,a),htmlFlowData:Se,htmlText:u(Wt,a),htmlTextData:Se,image:u(Rt),label:a,link:u(Mn),listItem:u(vt),listItemValue:b,listOrdered:u(ft,E),listUnordered:u(ft),paragraph:u(vu),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:u(St),strong:u(Hl),thematicBreak:u(jl)},exit:{atxHeading:f(),atxHeadingSequence:q,autolink:f(),autolinkEmail:Je,autolinkProtocol:Ve,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:Ie,characterReference:Ye,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(k),codeText:f(ge),codeTextData:H,data:H,definition:f(),definitionDestinationString:G,definitionLabelString:M,definitionTitleString:D,emphasis:f(),hardBreakEscape:f(de),hardBreakTrailing:f(de),htmlFlow:f(ue),htmlFlowData:H,htmlText:f(ie),htmlTextData:H,image:f(ae),label:ee,labelText:V,lineEnding:fe,link:f(we),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:_e,resourceDestinationString:w,resourceTitleString:R,resource:Q,setextHeading:f(Te),setextHeadingLineSequence:te,setextHeadingText:B,strong:f(),thematicBreak:f()}};XE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let Ee={type:"root",children:[]};const Be={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},We=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")We.push(Ze);else{const Jt=We.pop();Ze=o(J,Jt,Ze)}for(Ze=-1;++Ze<J.length;){const Jt=t[J[Ze][0]];QE.call(Jt,J[Ze][1].type)&&Jt[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},Be),J[Ze][1])}if(Be.tokenStack.length>0){const Jt=Be.tokenStack[Be.tokenStack.length-1];(Jt[1]||JE).call(Be,void 0,Jt[0])}for(Ee.position={start:pi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:pi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)Ee=t.transforms[Ze](Ee)||Ee;return Ee}function o(J,Ee,Be){let We=Ee-1,Ze=-1,Jt=!1,Jr,Kn,yi,ts;for(;++We<=Be;){const Zt=J[We];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?Ze++:Ze--,ts=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(Jr&&!ts&&!Ze&&!yi&&(yi=We),ts=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ts=void 0}if(!Ze&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||Ze===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(Jr){let Rr=We;for(Kn=void 0;Rr--;){const Bn=J[Rr];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;Kn&&(J[Kn][1].type="lineEndingBlank",Jt=!0),Bn[1].type="lineEnding",Kn=Rr}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}yi&&(!Kn||yi<Kn)&&(Jr._spread=!0),Jr.end=Object.assign({},Kn?J[Kn][1].start:Zt[1].end),J.splice(Kn||We,0,["exit",Jr,Zt[2]]),We++,Be++}if(Zt[1].type==="listItemPrefix"){const Rr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};Jr=Rr,J.splice(We,0,["enter",Rr,Zt[2]]),We++,Be++,yi=void 0,ts=!0}}}return J[Ee][1]._spread=Jt,Be}function u(J,Ee){return Be;function Be(We){c.call(this,J(We),We),Ee&&Ee.call(this,We)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(J,Ee,Be){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([Ee,Be||void 0]),J.position={start:pi(Ee.start),end:void 0}}function f(J){return Ee;function Ee(Be){J&&J.call(this,Be),h.call(this,Be)}}function h(J,Ee){const Be=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==J.type&&(Ee?Ee.call(this,J,We[0]):(We[1]||JE).call(this,J,We[0]));else throw new Error("Cannot close `"+J.type+"` ("+su({start:J.start,end:J.end})+"): it’s not open");Be.position.end=pi(J.end)}function m(){return $d(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function T(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=J}function _(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/(\r?\n|\r)$/g,"")}function M(J){const Ee=this.resume(),Be=this.stack[this.stack.length-1];Be.label=Ee,Be.identifier=fr(this.sliceSerialize(J)).toLowerCase()}function D(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function G(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function q(J){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const Be=this.sliceSerialize(J).length;Ee.depth=Be}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(J){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function Te(){this.data.setextHeadingSlurpLineEnding=void 0}function Se(J){const Be=this.stack[this.stack.length-1].children;let We=Be[Be.length-1];(!We||We.type!=="text")&&(We=zl(),We.position={start:pi(J.start),end:void 0},Be.push(We)),this.stack.push(We)}function H(J){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(J),Ee.position.end=pi(J.end)}function fe(J){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=Ee.children[Ee.children.length-1];Be.position.end=pi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(Se.call(this,J),H.call(this,J))}function de(){this.data.atHardBreak=!0}function ue(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function ie(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function ge(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function we(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function V(J){const Ee=this.sliceSerialize(J),Be=this.stack[this.stack.length-2];Be.label=_I(Ee),Be.identifier=fr(Ee).toLowerCase()}function ee(){const J=this.stack[this.stack.length-1],Ee=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const We=J.children;Be.children=We}else Be.alt=Ee}function w(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function R(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function Q(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function _e(J){const Ee=this.resume(),Be=this.stack[this.stack.length-1];Be.label=Ee,Be.identifier=fr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Me(J){this.data.characterReferenceType=J.type}function Ie(J){const Ee=this.sliceSerialize(J),Be=this.data.characterReferenceType;let We;Be?(We=RE(Ee,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=Vd(Ee);const Ze=this.stack[this.stack.length-1];Ze.value+=We}function Ye(J){const Ee=this.stack.pop();Ee.position.end=pi(J.end)}function Ve(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(J)}function Je(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(J)}function xt(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function He(){return{type:"inlineCode",value:""}}function tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Tt(){return{type:"emphasis",children:[]}}function St(){return{type:"heading",depth:0,children:[]}}function un(){return{type:"break"}}function Wt(){return{type:"html",value:""}}function Rt(){return{type:"image",title:null,url:"",alt:null}}function Mn(){return{type:"link",title:null,url:"",children:[]}}function ft(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function vt(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function vu(){return{type:"paragraph",children:[]}}function Hl(){return{type:"strong",children:[]}}function zl(){return{type:"text",value:""}}function jl(){return{type:"thematicBreak"}}}function pi(e){return{line:e.line,column:e.column,offset:e.offset}}function XE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?XE(e,r):CI(e,r)}}function CI(e,t){let n;for(n in t)if(QE.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 JE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+su({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+su({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+su({start:t.start,end:t.end})+") is still open")}function AI(e){const t=this;t.parser=n;function n(r){return SI(r,ye(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function vI(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 kI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
18
|
+
`}]}function NI(e,t){const n=t.value?t.value+`
|
|
19
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function OI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function II(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Ys(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let a,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=u+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function RI(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 LI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ZE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function DI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZE(e,t);const o={src:Ys(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function FI(e,t){const n={src:Ys(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function MI(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 BI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZE(e,t);const o={href:Ys(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function UI(e,t){const n={href:Ys(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function HI(e,t,n){const r=e.all(t),o=n?zI(n):ey(t),u={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
|
|
20
20
|
`}),m.type==="element"&&m.tagName==="p"&&!o?a.push(...m.children):a.push(m)}const f=r[r.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
21
|
-
`});const h={type:"element",tagName:"li",properties:u,children:a};return e.patch(t,h),e.applyData(t,h)}function
|
|
21
|
+
`});const h={type:"element",tagName:"li",properties:u,children:a};return e.patch(t,h),e.applyData(t,h)}function zI(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=ey(n[r])}return t}function ey(e){const t=e.spread;return t==null?e.children.length>1:t}function jI(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,u),e.applyData(t,u)}function $I(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YI(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Nr(t.children[1]),f=fl(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),o.push(a)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function WI(e,t,n){const r=n?n.children:void 0,u=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const E=t.children[f],b={},T=a?a[f]:void 0;T&&(b.align=T);let _={type:"element",tagName:u,properties:b,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),h.push(_)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function GI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ty=9,ny=32;function KI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const u=[];for(;r;)u.push(ry(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return u.push(ry(t.slice(o),o>0,!1)),u.join("")}function ry(e,t,n){let r=0,o=e.length;if(t){let u=e.codePointAt(r);for(;u===ty||u===ny;)r++,u=e.codePointAt(r)}if(n){let u=e.codePointAt(o-1);for(;u===ty||u===ny;)o--,u=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function QI(e,t){const n={type:"text",value:KI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function XI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const JI={blockquote:vI,break:kI,code:NI,delete:OI,emphasis:II,footnoteReference:PI,heading:RI,html:LI,imageReference:DI,image:FI,inlineCode:MI,linkReference:BI,link:UI,listItem:HI,list:jI,paragraph:$I,root:VI,strong:qI,table:YI,tableCell:GI,tableRow:WI,text:QI,thematicBreak:XI,toml:gl,yaml:gl,definition:gl,footnoteDefinition:gl};function gl(){}const iy=-1,El=0,cu=1,yl=2,Qd=3,Xd=4,Jd=5,Zd=6,sy=7,oy=8,uy=typeof self=="object"?self:globalThis,ZI=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),r=o=>{if(e.has(o))return e.get(o);const[u,a]=t[o];switch(u){case El:case iy:return n(a,o);case cu:{const c=n([],o);for(const f of a)c.push(r(f));return c}case yl:{const c=n({},o);for(const[f,h]of a)c[r(f)]=r(h);return c}case Qd:return n(new Date(a),o);case Xd:{const{source:c,flags:f}=a;return n(new RegExp(c,f),o)}case Jd:{const c=n(new Map,o);for(const[f,h]of a)c.set(r(f),r(h));return c}case Zd:{const c=n(new Set,o);for(const f of a)c.add(r(f));return c}case sy:{const{name:c,message:f}=a;return n(new uy[c](f),o)}case oy:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(new uy[u](a),o)};return r},ay=e=>ZI(new Map,e)(0),Gs="",{toString:eP}={},{keys:tP}=Object,fu=e=>{const t=typeof e;if(t!=="object"||!e)return[El,t];const n=eP.call(e).slice(8,-1);switch(n){case"Array":return[cu,Gs];case"Object":return[yl,Gs];case"Date":return[Qd,Gs];case"RegExp":return[Xd,Gs];case"Map":return[Jd,Gs];case"Set":return[Zd,Gs];case"DataView":return[cu,n]}return n.includes("Array")?[cu,n]:n.includes("Error")?[sy,n]:[yl,n]},Tl=([e,t])=>e===El&&(t==="function"||t==="symbol"),nP=(e,t,n,r)=>{const o=(a,c)=>{const f=r.push(a)-1;return n.set(c,f),f},u=a=>{if(n.has(a))return n.get(a);let[c,f]=fu(a);switch(c){case El:{let m=a;switch(f){case"bigint":c=oy,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return o([iy],a)}return o([c,m],a)}case cu:{if(f){let b=a;return f==="DataView"?b=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(a)),o([f,[...b]],a)}const m=[],E=o([c,m],a);for(const b of a)m.push(u(b));return E}case yl:{if(f)switch(f){case"BigInt":return o([f,a.toString()],a);case"Boolean":case"Number":case"String":return o([f,a.valueOf()],a)}if(t&&"toJSON"in a)return u(a.toJSON());const m=[],E=o([c,m],a);for(const b of tP(a))(e||!Tl(fu(a[b])))&&m.push([u(b),u(a[b])]);return E}case Qd:return o([c,a.toISOString()],a);case Xd:{const{source:m,flags:E}=a;return o([c,{source:m,flags:E}],a)}case Jd:{const m=[],E=o([c,m],a);for(const[b,T]of a)(e||!(Tl(fu(b))||Tl(fu(T))))&&m.push([u(b),u(T)]);return E}case Zd:{const m=[],E=o([c,m],a);for(const b of a)(e||!Tl(fu(b)))&&m.push(u(b));return E}}const{message:h}=a;return o([c,{name:f,message:h}],a)};return u},ly=(e,{json:t,lossy:n}={})=>{const r=[];return nP(!(t||n),!!t,new Map,r)(e),r},Ks=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ay(ly(e,t)):structuredClone(e):(e,t)=>ay(ly(e,t));function rP(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 iP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rP,r=e.options.footnoteBackLabel||iP,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const m=e.all(h),E=String(h.identifier).toUpperCase(),b=Ys(E.toLowerCase());let T=0;const _=[],S=e.footnoteCounts.get(E);for(;S!==void 0&&++T<=S;){_.length>0&&_.push({type:"text",value:" "});let M=typeof n=="string"?n:n(f,T);typeof M=="string"&&(M={type:"text",value:M}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,T),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(..._)}else m.push(..._);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(h,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:ye(U({},Ks(a)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
|
|
22
22
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
23
|
-
`}]}}const
|
|
23
|
+
`}]}}const bl=function(e){if(e==null)return lP;if(typeof e=="function")return _l(e);if(typeof e=="object")return Array.isArray(e)?oP(e):uP(e);if(typeof e=="string")return aP(e);throw new Error("Expected function, string, or object as test")};function oP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bl(e[n]);return _l(r);function r(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function uP(e){const t=e;return _l(n);function n(r){const o=r;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function aP(e){return _l(t);function t(n){return n&&n.type===e}}function _l(e){return t;function t(n,r,o){return!!(cP(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function lP(){return!0}function cP(e){return e!==null&&typeof e=="object"&&"type"in e}function iB(e){return e}const cy=[],fP=!0,eh=!1,dP="skip";function fy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const u=bl(o),a=r?-1:1;c(e,void 0,[])();function c(f,h,m){const E=f&&typeof f=="object"?f:{};if(typeof E.type=="string"){const T=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(T?"<"+T+">":""))+")"})}return b;function b(){let T=cy,_,S,C;if((!t||u(f,h,m[m.length-1]||void 0))&&(T=hP(n(f,m)),T[0]===eh))return T;if("children"in f&&f.children){const k=f;if(k.children&&T[0]!==dP)for(S=(r?k.children.length:-1)+a,C=m.concat(k);S>-1&&S<k.children.length;){const M=k.children[S];if(_=c(M,S,C)(),_[0]===eh)return _;S=typeof _[1]=="number"?_[1]:S+a}}return T}}}function hP(e){return Array.isArray(e)?e:typeof e=="number"?[fP,e]:e==null?cy:[e]}function xl(e,t,n,r){let o,u,a;typeof t=="function"&&typeof n!="function"?(u=void 0,a=t,o=n):(u=t,a=n,o=r),fy(e,u,c,o);function c(f,h){const m=h[h.length-1],E=m?m.children.indexOf(f):void 0;return a(f,E,m)}}const th={}.hasOwnProperty,pP={};function mP(e,t){const n=t||pP,r=new Map,o=new Map,u=new Map,a=U(U({},JI),n.handlers),c={all:h,applyData:EP,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:a,one:f,options:n,patch:gP,wrap:TP};return xl(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const E=m.type==="definition"?r:o,b=String(m.identifier).toUpperCase();E.has(b)||E.set(b,m)}}),c;function f(m,E){const b=m.type,T=c.handlers[b];if(th.call(c.handlers,b)&&T)return T(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const S=m,{children:C}=S,k=Xt(S,["children"]),M=Ks(k);return M.children=c.all(m),M}return Ks(m)}return(c.options.unknownHandler||yP)(c,m,E)}function h(m){const E=[];if("children"in m){const b=m.children;let T=-1;for(;++T<b.length;){const _=c.one(b[T],m);if(_){if(T&&b[T-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=dy(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=dy(S.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function gP(e,t){e.position&&(t.position=h3(e))}function EP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&u&&Object.assign(n.properties,Ks(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function yP(e,t){const n=t.data||{},r="value"in t&&!(th.call(n,"hProperties")||th.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 TP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
24
24
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
25
25
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
26
|
-
`}),n}function
|
|
27
|
-
`},o),u}function gP(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=fy(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return fy(n,U({file:r},e||t))}}function dy(e){if(e)throw e}var eh,hy;function EP(){if(hy)return eh;hy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return eh=function f(){var h,m,E,b,T,_,S=arguments[0],C=1,k=arguments.length,F=!1;for(typeof S=="boolean"&&(F=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<k;++C)if(h=arguments[C],h!=null)for(m in h)E=c(S,m),b=c(h,m),S!==b&&(F&&b&&(u(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&u(E)?E:{},a(S,{name:m,newValue:f(F,_,b)})):typeof b!="undefined"&&a(S,{name:m,newValue:b}));return S},eh}var yP=EP();const th=Ge(yP);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 TP(){const e=[],t={run:n,use:r};return t;function n(...o){let u=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const m=e[++u];let E=-1;if(f){a(f);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?bP(m,c)(...h):a(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function bP(e,t){let n;return r;function r(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,o):f instanceof Error?o(f):u(f))}function o(a,...c){n||(n=!0,t(a,...c))}function u(a){o(null,a)}}const vr={basename:_P,dirname:xP,extname:SP,join:wP,sep:"/"};function _P(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cu(e);let n=0,r=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else a<0&&(u=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function xP(e){if(cu(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 SP(e){cu(e);let t=e.length,n=-1,r=0,o=-1,u=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function wP(...e){let t=-1,n;for(;++t<e.length;)cu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":CP(n)}function CP(e){cu(e);const t=e.codePointAt(0)===47;let n=AP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AP(e,t){let n="",r=0,o=-1,u=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||u===1))if(o!==a-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=a,u=0;continue}}else if(n.length>0){n="",r=0,o=a,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,u=0}else c===46&&u>-1?u++:u=-1}return n}function cu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vP={cwd:kP};function kP(){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 NP(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 OP(e)}function OP(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ih=["history","path","basename","stem","extname","dirname"];class py{constructor(t){let n;t?rh(t)?n={path:t}:typeof t=="string"||IP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ih.length;){const u=ih[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)ih.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){oh(t,"basename"),sh(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){my(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),my(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rh(t)&&(t=NP(t)),oh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){oh(t,"stem"),sh(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new tn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sh(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function oh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function my(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function IP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PP=function(e){const r=this.constructor.prototype,o=r[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u},RP={}.hasOwnProperty;class uh extends PP{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=TP()}copy(){const t=new uh;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):RP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=_l(t),r=this.parser||this.Parser;return ah("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ah("process",this.parser||this.Parser),lh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,a){const c=_l(t),f=r.parse(c);r.run(f,c,function(m,E,b){if(m||!E||!b)return h(m);const T=E,_=r.stringify(T,b);MP(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?a(m):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),ah("processSync",this.parser||this.Parser),lh("processSync",this.compiler||this.Compiler),this.process(t,o),Ey("processSync","process",n),r;function o(u,a){n=!0,dy(u),r=a}}run(t,n,r){gy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(a,c){const f=_l(n);o.run(t,f,h);function h(m,E,b){const T=E||t;m?c(m):a?a(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,u),Ey("runSync","run",r),o;function u(a,c){dy(a),o=c,r=!0}}stringify(t,n){this.freeze();const r=_l(n),o=this.compiler||this.Compiler;return lh("stringify",o),gy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=th(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];u(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===h){b=E;break}if(b===-1)r.push([h,...m]);else if(m.length>0){let[T,..._]=m;const S=r[b][1];nh(S)&&nh(T)&&(T=th(!0,S,T)),r[b]=[h,T,..._]}}}}const LP=new uh().freeze();function ah(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 gy(e){if(!nh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ey(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _l(e){return DP(e)?e:new py(e)}function DP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MP(e){return typeof e=="string"||FP(e)}function FP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yy=[],Ty={allowDangerousHtml:!0},UP=/^(https?|ircs?|mailto|xmpp)$/i,HP=[{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 zP(e){const t=jP(e),n=$P(e);return VP(t.runSync(t.parse(n),n),e)}function jP(e){const t=e.rehypePlugins||yy,n=e.remarkPlugins||yy,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Ty):Ty;return LP().use(xI).use(n).use(gP,r).use(t)}function $P(e){const t=e.children||"",n=new py;return typeof t=="string"&&(n.value=t),n}function VP(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,u=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||qP;for(const m of HP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+BP+m.id,void 0);return bl(e,h),p3(e,{Fragment:I.Fragment,components:o,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return a?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in Hd)if(Object.hasOwn(Hd,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=Hd[T];(S===null||S.includes(m.tagName))&&(m.properties[T]=f(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):u?u.includes(m.tagName):!1;if(!T&&r&&typeof E=="number"&&(T=!r(m,E,b)),T&&b&&typeof E=="number")return c&&m.children?b.children.splice(E,1,...m.children):b.children.splice(E,1),E}}}function qP(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||UP.test(e.slice(0,t))?e:""}const by=/[#.]/g;function YP(e,t){const n=e||"",r={};let o=0,u,a;for(;o<n.length;){by.lastIndex=o;const c=by.exec(n),f=n.slice(o,c?c.index:n.length);f&&(u?u==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:a=f,o+=f.length),c&&(u=c[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function _y(e,t,n){const r=n?QP(n):void 0;function o(u,a,...c){let f;if(u==null){f={type:"root",children:[]};const h=a;c.unshift(h)}else{f=YP(u,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,WP(a))c.unshift(a);else for(const[E,b]of Object.entries(a))GP(e,f.properties,E,b)}for(const h of c)fh(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function WP(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const u=o;for(const a of u)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function GP(e,t,n,r){const o=Ld(e,n);let u;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;u=r}else typeof r=="boolean"?u=r:typeof r=="string"?o.spaceSeparated?u=hE(r):o.commaSeparated?u=eE(r):o.commaOrSpaceSeparated?u=hE(eE(r).join(" ")):u=xy(o,o.property,r):Array.isArray(r)?u=[...r]:u=o.property==="style"?KP(r):String(r);if(Array.isArray(u)){const a=[];for(const c of u)a.push(xy(o,o.property,c));u=a}o.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[o.property]=u}}function fh(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)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function xy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||eu(n)===eu(t)))return!0}return n}function KP(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 XP=["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"],JP=_y(al,"div"),ZP=_y(js,"g",XP);function eR(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(u){if(typeof u=="number"&&u>-1&&u<=t.length){let a=0;for(;;){let c=n[a];if(c===void 0){const f=Sy(t,n[a-1]);c=f===-1?t.length+1:f+1,n[a]=c}if(c>u)return{line:a+1,column:u-(a>0?n[a-1]:0)+1,offset:u};a++}}}function o(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=Sy(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const a=(u.line>1?n[u.line-2]:0)+u.column-1;if(a<n[u.line-1])return a}}}function Sy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
28
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Wi={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/"},wy={}.hasOwnProperty,tR=Object.prototype;function nR(e,t){const n=t||{};return dh({file:n.file||void 0,location:!1,schema:n.space==="svg"?js:al,verbose:n.verbose||!1},e)}function dh(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,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Cy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const u=String(e.file),a=eR(u),c=a.toPoint(0),f=a.toPoint(u.length);n.position={start:c,end:f}}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=rR(e,t),n}}function Cy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=dh(e,t[n]);r.push(o)}return r}function rR(e,t){const n=e.schema;e.schema=t.namespaceURI===Wi.svg?js:al;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;wy.call(tR,f)||(o[f]=c.value)}const a=(e.schema.space==="svg"?ZP:JP)(t.tagName,o,Cy(e,t.childNodes));if(xl(e,t,a),a.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Gs(f.startTag),m=f&&f.endTag&&Gs(f.endTag),E=dh(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),a.content=E}return e.schema=n,a}function xl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=iR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function iR(e,t,n){const r=Gs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const u={};let a;if(n.attrs)for(a in n.attrs)wy.call(n.attrs,a)&&(u[Ld(e.schema,a).property]=Gs(n.attrs[a]));n.startTag;const c=Gs(n.startTag),f=n.endTag?Gs(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=u,t.data={position:h}}}return r}function Gs(e){const t=Ay({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ay({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ay(e){return e.line&&e.column?e:void 0}class fu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}fu.prototype.property={},fu.prototype.normal={},fu.prototype.space=null;function vy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new fu(n,r,t)}function hh(e){return e.toLowerCase()}class qn{constructor(t,n){this.property=t,this.attribute=n}}qn.prototype.space=null,qn.prototype.boolean=!1,qn.prototype.booleanish=!1,qn.prototype.overloadedBoolean=!1,qn.prototype.number=!1,qn.prototype.commaSeparated=!1,qn.prototype.spaceSeparated=!1,qn.prototype.commaOrSpaceSeparated=!1,qn.prototype.mustUseProperty=!1,qn.prototype.defined=!1;let sR=0;const je=Gi(),Lt=Gi(),ky=Gi(),pe=Gi(),at=Gi(),Ks=Gi(),Ln=Gi();function Gi(){return Kc(2,++sR)}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Lt,commaOrSpaceSeparated:Ln,commaSeparated:Ks,number:pe,overloadedBoolean:ky,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(ph);class gh extends qn{constructor(t,n,r,o){let u=-1;if(super(t,n),Ny(this,"space",o),typeof r=="number")for(;++u<mh.length;){const a=mh[u];Ny(this,mh[u],(r&ph[a])===ph[a])}}}gh.prototype.defined=!0;function Ny(e,t,n){n&&(e[t]=n)}const oR={}.hasOwnProperty;function Qs(e){const t={},n={};let r;for(r in e.properties)if(oR.call(e.properties,r)){const o=e.properties[r],u=new gh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[hh(r)]=r,n[hh(u.attribute)]=r}return new fu(t,n,e.space)}const Oy=Qs({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Iy=Qs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Py(e,t){return t in e?e[t]:t}function Ry(e,t){return Py(e,t.toLowerCase())}const Ly=Qs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ry,properties:{xmlns:null,xmlnsXLink:null}}),Dy=Qs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:at,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:pe,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:at,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Lt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null}}),uR=Qs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ry,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ks,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:at,autoFocus:je,autoPlay:je,blocking:at,capture:null,charSet:null,checked:je,cite:null,className:at,cols:pe,colSpan:null,content:null,contentEditable:Lt,controls:je,controlsList:at,coords:pe|Ks,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ky,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:at,height:pe,hidden:je,high:pe,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:at,itemRef:at,itemScope:je,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:pe,pattern:null,ping:at,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:at,required:je,reversed:je,rows:pe,rowSpan:pe,sandbox:at,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Lt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:pe,security:null,unselectable:null}}),aR=Qs({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Py,properties:{about:Ln,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:at,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ks,g2:Ks,glyphName:Ks,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),lR=/^data[-\w.:]+$/i,My=/-[a-z]/g,cR=/[A-Z]/g;function fR(e,t){const n=hh(t);let r=t,o=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lR.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(My,hR);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!My.test(u)){let a=u.replace(cR,dR);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=gh}return new o(r,t)}function dR(e){return"-"+e.toLowerCase()}function hR(e){return e.charAt(1).toUpperCase()}const pR=vy([Iy,Oy,Ly,Dy,uR],"html"),Fy=vy([Iy,Oy,Ly,Dy,aR],"svg"),By={}.hasOwnProperty;function Uy(e,t){const n=t||{};function r(o,...u){let a=r.invalid;const c=r.handlers;if(o&&By.call(o,e)){const f=String(o[e]);a=By.call(c,f)?c[f]:r.unknown}if(a)return a.call(this,o,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const mR={},gR={}.hasOwnProperty,Hy=Uy("type",{handlers:{root:yR,element:SR,text:_R,comment:xR,doctype:bR}});function ER(e,t){const r=(t||mR).space;return Hy(e,r==="svg"?Fy:pR)}function yR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Eh(e.children,n,t),Xs(e,n),n}function TR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Eh(e.children,n,t),Xs(e,n),n}function bR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xs(e,t),t}function _R(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xs(e,t),t}function xR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xs(e,t),t}function SR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Fy);const o=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&gR.call(e.properties,u)){const f=wR(r,u,e.properties[u]);f&&o.push(f)}}const a=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Wi[a],childNodes:[],parentNode:null};return c.childNodes=Eh(e.children,c,r),Xs(e,c),e.tagName==="template"&&e.content&&(c.content=TR(e.content,r)),c}function wR(e,t,n){const r=fR(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?tE(n):pE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const u=o.name.indexOf(":");u<0?o.prefix="":(o.name=o.name.slice(u+1),o.prefix=r.attribute.slice(0,u)),o.namespace=Wi[r.space]}return o}function Eh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const u=Hy(e[r],n);u.parentNode=t,o.push(u)}return o}function Xs(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 CR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],AR=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]),pt="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const Sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function zy(e){return e>=55296&&e<=57343}function vR(e){return e>=56320&&e<=57343}function kR(e,t){return(e-55296)*1024+9216+t}function jy(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||AR.has(e)}var Q;(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"})(Q||(Q={}));const NR=65536;class OR{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=NR,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:u}=this,a=o+n,c=u+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(vR(n))return this.pos++,this._addGap(),kR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(Q.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){jy(t)?this._err(Q.controlCharacterInInputStream):$y(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(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"})(qe||(qe={}));function Vy(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 IR=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))),PR=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 RR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=PR.get(e))!==null&&t!==void 0?t:e}var $t;(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"})($t||($t={}));const LR=32;var fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(fi||(fi={}));function yh(e){return e>=$t.ZERO&&e<=$t.NINE}function DR(e){return e>=$t.UPPER_A&&e<=$t.UPPER_F||e>=$t.LOWER_A&&e<=$t.LOWER_F}function MR(e){return e>=$t.UPPER_A&&e<=$t.UPPER_Z||e>=$t.LOWER_A&&e<=$t.LOWER_Z||yh(e)}function FR(e){return e===$t.EQUALS||MR(e)}var Vt;(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"})(Vt||(Vt={}));var Yr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Yr||(Yr={}));class BR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Vt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Yr.Strict}startEntity(t){this.decodeMode=t,this.state=Vt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Vt.EntityStart:return t.charCodeAt(n)===$t.NUM?(this.state=Vt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Vt.NamedEntity,this.stateNamedEntity(t,n));case Vt.NumericStart:return this.stateNumericStart(t,n);case Vt.NumericDecimal:return this.stateNumericDecimal(t,n);case Vt.NumericHex:return this.stateNumericHex(t,n);case Vt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|LR)===$t.LOWER_X?(this.state=Vt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Vt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const u=r-n;this.result=this.result*Math.pow(o,u)+Number.parseInt(t.substr(n,u),o),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yh(o)||DR(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===$t.SEMI)this.consumed+=1;else if(this.decodeMode===Yr.Strict)return 0;return this.emitCodePoint(RR(this.result),this.consumed),this.errors&&(t!==$t.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=UR(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===Yr.Attribute&&(u===0||FR(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&fi.VALUE_LENGTH)>>14,u!==0){if(a===$t.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Yr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&fi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~fi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Vt.NamedEntity:return this.result!==0&&(this.decodeMode!==Yr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Vt.NumericDecimal:return this.emitNumericEntity(0,2);case Vt.NumericHex:return this.emitNumericEntity(0,3);case Vt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Vt.EntityStart:return 0}}}function UR(e,t,n,r){const o=(t&fi.BRANCH_LENGTH)>>7,u=t&fi.JUMP_TABLE;if(o===0)return u!==0&&r===u?n:-1;if(u){const f=r-u;return f<0||f>=o?-1:e[n+f]-1}let a=n,c=a+o-1;for(;a<=c;){const f=a+c>>>1,h=e[f];if(h<r)a=f+1;else if(h>r)c=f-1;else return e[f+o]}return-1}var re;(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/"})(re||(re={}));var Ki;(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"})(Ki||(Ki={}));var Yn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Yn||(Yn={}));var $;(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"})($||($={}));var p;(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"})(p||(p={}));const HR=new Map([[$.A,p.A],[$.ADDRESS,p.ADDRESS],[$.ANNOTATION_XML,p.ANNOTATION_XML],[$.APPLET,p.APPLET],[$.AREA,p.AREA],[$.ARTICLE,p.ARTICLE],[$.ASIDE,p.ASIDE],[$.B,p.B],[$.BASE,p.BASE],[$.BASEFONT,p.BASEFONT],[$.BGSOUND,p.BGSOUND],[$.BIG,p.BIG],[$.BLOCKQUOTE,p.BLOCKQUOTE],[$.BODY,p.BODY],[$.BR,p.BR],[$.BUTTON,p.BUTTON],[$.CAPTION,p.CAPTION],[$.CENTER,p.CENTER],[$.CODE,p.CODE],[$.COL,p.COL],[$.COLGROUP,p.COLGROUP],[$.DD,p.DD],[$.DESC,p.DESC],[$.DETAILS,p.DETAILS],[$.DIALOG,p.DIALOG],[$.DIR,p.DIR],[$.DIV,p.DIV],[$.DL,p.DL],[$.DT,p.DT],[$.EM,p.EM],[$.EMBED,p.EMBED],[$.FIELDSET,p.FIELDSET],[$.FIGCAPTION,p.FIGCAPTION],[$.FIGURE,p.FIGURE],[$.FONT,p.FONT],[$.FOOTER,p.FOOTER],[$.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[$.FORM,p.FORM],[$.FRAME,p.FRAME],[$.FRAMESET,p.FRAMESET],[$.H1,p.H1],[$.H2,p.H2],[$.H3,p.H3],[$.H4,p.H4],[$.H5,p.H5],[$.H6,p.H6],[$.HEAD,p.HEAD],[$.HEADER,p.HEADER],[$.HGROUP,p.HGROUP],[$.HR,p.HR],[$.HTML,p.HTML],[$.I,p.I],[$.IMG,p.IMG],[$.IMAGE,p.IMAGE],[$.INPUT,p.INPUT],[$.IFRAME,p.IFRAME],[$.KEYGEN,p.KEYGEN],[$.LABEL,p.LABEL],[$.LI,p.LI],[$.LINK,p.LINK],[$.LISTING,p.LISTING],[$.MAIN,p.MAIN],[$.MALIGNMARK,p.MALIGNMARK],[$.MARQUEE,p.MARQUEE],[$.MATH,p.MATH],[$.MENU,p.MENU],[$.META,p.META],[$.MGLYPH,p.MGLYPH],[$.MI,p.MI],[$.MO,p.MO],[$.MN,p.MN],[$.MS,p.MS],[$.MTEXT,p.MTEXT],[$.NAV,p.NAV],[$.NOBR,p.NOBR],[$.NOFRAMES,p.NOFRAMES],[$.NOEMBED,p.NOEMBED],[$.NOSCRIPT,p.NOSCRIPT],[$.OBJECT,p.OBJECT],[$.OL,p.OL],[$.OPTGROUP,p.OPTGROUP],[$.OPTION,p.OPTION],[$.P,p.P],[$.PARAM,p.PARAM],[$.PLAINTEXT,p.PLAINTEXT],[$.PRE,p.PRE],[$.RB,p.RB],[$.RP,p.RP],[$.RT,p.RT],[$.RTC,p.RTC],[$.RUBY,p.RUBY],[$.S,p.S],[$.SCRIPT,p.SCRIPT],[$.SEARCH,p.SEARCH],[$.SECTION,p.SECTION],[$.SELECT,p.SELECT],[$.SOURCE,p.SOURCE],[$.SMALL,p.SMALL],[$.SPAN,p.SPAN],[$.STRIKE,p.STRIKE],[$.STRONG,p.STRONG],[$.STYLE,p.STYLE],[$.SUB,p.SUB],[$.SUMMARY,p.SUMMARY],[$.SUP,p.SUP],[$.TABLE,p.TABLE],[$.TBODY,p.TBODY],[$.TEMPLATE,p.TEMPLATE],[$.TEXTAREA,p.TEXTAREA],[$.TFOOT,p.TFOOT],[$.TD,p.TD],[$.TH,p.TH],[$.THEAD,p.THEAD],[$.TITLE,p.TITLE],[$.TR,p.TR],[$.TRACK,p.TRACK],[$.TT,p.TT],[$.U,p.U],[$.UL,p.UL],[$.SVG,p.SVG],[$.VAR,p.VAR],[$.WBR,p.WBR],[$.XMP,p.XMP]]);function Js(e){var t;return(t=HR.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ue=p,zR={[re.HTML]:new Set([ue.ADDRESS,ue.APPLET,ue.AREA,ue.ARTICLE,ue.ASIDE,ue.BASE,ue.BASEFONT,ue.BGSOUND,ue.BLOCKQUOTE,ue.BODY,ue.BR,ue.BUTTON,ue.CAPTION,ue.CENTER,ue.COL,ue.COLGROUP,ue.DD,ue.DETAILS,ue.DIR,ue.DIV,ue.DL,ue.DT,ue.EMBED,ue.FIELDSET,ue.FIGCAPTION,ue.FIGURE,ue.FOOTER,ue.FORM,ue.FRAME,ue.FRAMESET,ue.H1,ue.H2,ue.H3,ue.H4,ue.H5,ue.H6,ue.HEAD,ue.HEADER,ue.HGROUP,ue.HR,ue.HTML,ue.IFRAME,ue.IMG,ue.INPUT,ue.LI,ue.LINK,ue.LISTING,ue.MAIN,ue.MARQUEE,ue.MENU,ue.META,ue.NAV,ue.NOEMBED,ue.NOFRAMES,ue.NOSCRIPT,ue.OBJECT,ue.OL,ue.P,ue.PARAM,ue.PLAINTEXT,ue.PRE,ue.SCRIPT,ue.SECTION,ue.SELECT,ue.SOURCE,ue.STYLE,ue.SUMMARY,ue.TABLE,ue.TBODY,ue.TD,ue.TEMPLATE,ue.TEXTAREA,ue.TFOOT,ue.TH,ue.THEAD,ue.TITLE,ue.TR,ue.TRACK,ue.UL,ue.WBR,ue.XMP]),[re.MATHML]:new Set([ue.MI,ue.MO,ue.MN,ue.MS,ue.MTEXT,ue.ANNOTATION_XML]),[re.SVG]:new Set([ue.TITLE,ue.FOREIGN_OBJECT,ue.DESC]),[re.XLINK]:new Set,[re.XML]:new Set,[re.XMLNS]:new Set},Th=new Set([ue.H1,ue.H2,ue.H3,ue.H4,ue.H5,ue.H6]);$.STYLE,$.SCRIPT,$.XMP,$.IFRAME,$.NOEMBED,$.NOFRAMES,$.PLAINTEXT;var v;(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"})(v||(v={}));const kt={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function jR(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function du(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function $R(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function di(e){return $R(e)||du(e)}function qy(e){return di(e)||jR(e)}function Sl(e){return e+32}function Yy(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function Wy(e){return Yy(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function VR(e){return e===A.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:zy(e)?Q.surrogateCharacterReference:$y(e)?Q.noncharacterCharacterReference:jy(e)||e===A.CARRIAGE_RETURN?Q.controlCharacterReference:null}class qR{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=v.DATA,this.returnState=v.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new OR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new BR(IR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=VR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.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(Vy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Q.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=Js(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.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 qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.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:qe.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=Yy(t)?qe.WHITESPACE_CHARACTER:t===A.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=v.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Yr.Attribute:Yr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===v.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case v.DATA:{this._stateData(t);break}case v.RCDATA:{this._stateRcdata(t);break}case v.RAWTEXT:{this._stateRawtext(t);break}case v.SCRIPT_DATA:{this._stateScriptData(t);break}case v.PLAINTEXT:{this._statePlaintext(t);break}case v.TAG_OPEN:{this._stateTagOpen(t);break}case v.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case v.TAG_NAME:{this._stateTagName(t);break}case v.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case v.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case v.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case v.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case v.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case v.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case v.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case v.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case v.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case v.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case v.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case v.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case v.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case v.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case v.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case v.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case v.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case v.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case v.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case v.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case v.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case v.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case v.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case v.BOGUS_COMMENT:{this._stateBogusComment(t);break}case v.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case v.COMMENT_START:{this._stateCommentStart(t);break}case v.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case v.COMMENT:{this._stateComment(t);break}case v.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case v.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case v.COMMENT_END:{this._stateCommentEnd(t);break}case v.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case v.DOCTYPE:{this._stateDoctype(t);break}case v.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case v.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case v.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case v.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case v.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case v.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case v.CDATA_SECTION:{this._stateCdataSection(t);break}case v.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case v.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case v.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case v.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=v.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(di(t))this._createStartTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=v.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=v.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=v.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(di(t))this._createEndTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=pt;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(du(t)?Sl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=v.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){di(t)?(this.state=v.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=v.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=v.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=v.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=v.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){di(t)?(this.state=v.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=v.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=v.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=v.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){di(t)?(this.state=v.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:di(t)?(this._emitChars("<"),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){di(t)?(this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&Wy(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(pt);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&Wy(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=v.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=pt;break}default:this.currentAttr.name+=String.fromCodePoint(du(t)?Sl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=v.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=v.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=v.DATA,this.emitCurrentTagToken();break}default:this.state=v.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Sn.DASH_DASH,!0)?(this._createCommentToken(Sn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(Sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Sn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(Sn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(Sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=v.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=v.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=v.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=pt;break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=v.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=v.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=v.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(Q.nestedComment),this.state=v.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=v.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=v.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=v.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(du(t))this._createDoctypeToken(String.fromCharCode(Sl(t))),this.state=v.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(pt),this.state=v.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.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=v.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=pt;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(du(t)?Sl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Sn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Sn.SYSTEM,!1)?this.state=v.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=pt;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=pt;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=pt;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=pt;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.NULL:{this._err(Q.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=v.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=v.CDATA_SECTION_END:(this._emitChars("]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&qy(this.preprocessor.peek(1))?v.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){qy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Gy=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Ky=new Set([...Gy,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),wl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),YR=new Set([...wl,p.OL,p.UL]),WR=new Set([...wl,p.BUTTON]),Qy=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Xy=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),GR=new Set([p.TR,p.TEMPLATE,p.HTML]),KR=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),QR=new Set([p.TABLE,p.TEMPLATE,p.HTML]),XR=new Set([p.TD,p.TH]);class JR{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===re.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==re.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,re.HTML)}popUntilTableCellPopped(){this.popUntilPopped(XR,re.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(QR,re.HTML)}clearBackToTableBodyContext(){this.clearBackTo(KR,re.HTML)}clearBackToTableRowContext(){this.clearBackTo(GR,re.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case re.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case re.SVG:{if(Xy.has(o))return!1;break}case re.MATHML:{if(Qy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,wl)}hasInListItemScope(t){return this.hasInDynamicScope(t,YR)}hasInButtonScope(t){return this.hasInDynamicScope(t,WR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case re.HTML:{if(Th.has(n))return!0;if(wl.has(n))return!1;break}case re.SVG:{if(Xy.has(n))return!1;break}case re.MATHML:{if(Qy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===re.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ky.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ky.has(this.currentTagId);)this.pop()}}const bh=3;var kr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(kr||(kr={}));const Jy={type:kr.Marker};class ZR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,u=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===kr.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===a){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}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 o=new Map(n.map(a=>[a.name,a.value]));let u=0;for(let a=0;a<r.length;a++){const c=r[a];c.attrs.every(f=>o.get(f.name)===f.value)&&(u+=1,u>=bh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Jy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:kr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:kr.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(Jy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===kr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===kr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===kr.Element&&n.element===t)}}const hi={createDocument(){return{nodeName:"#document",mode:Yn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(u=>u.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};hi.appendChild(e,u)}},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(hi.isTextNode(n)){n.value+=t;return}}hi.appendChild(e,hi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&hi.isTextNode(r)?r.value+=t:hi.insertBefore(e,hi.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)}},Zy="html",eL="about:legacy-compat",tL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",eT=["+//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//"],nL=[...eT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],rL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),tT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],iL=[...tT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function nT(e,t){return t.some(n=>e.startsWith(n))}function sL(e){return e.name===Zy&&e.publicId===null&&(e.systemId===null||e.systemId===eL)}function oL(e){if(e.name!==Zy)return Yn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===tL)return Yn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rL.has(n))return Yn.QUIRKS;let r=t===null?nL:eT;if(nT(n,r))return Yn.QUIRKS;if(r=t===null?tT:iL,nT(n,r))return Yn.LIMITED_QUIRKS}return Yn.NO_QUIRKS}const rT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},uL="definitionurl",aL="definitionURL",lL=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])),cL=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:re.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:re.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:re.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:re.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:re.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:re.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:re.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:re.XML}],["xml:space",{prefix:"xml",name:"space",namespace:re.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:re.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:re.XMLNS}]]),fL=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])),dL=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function hL(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===Ki.COLOR||r===Ki.SIZE||r===Ki.FACE)||dL.has(t)}function iT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===uL){e.attrs[t].name=aL;break}}function sT(e){for(let t=0;t<e.attrs.length;t++){const n=lL.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=cL.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 pL(e){const t=fL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Js(e.tagName))}function mL(e,t){return t===re.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function gL(e,t,n){if(t===re.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ki.ENCODING){const o=n[r].value.toLowerCase();return o===rT.TEXT_HTML||o===rT.APPLICATION_XML}}return t===re.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function EL(e,t,n,r){return(!r||r===re.HTML)&&gL(e,t,n)||(!r||r===re.MATHML)&&mL(e,t)}const yL="hidden",TL=8,bL=3;var P;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(P||(P={}));const _L={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},oT=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),uT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:hi,onParseError:null};class aT{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},uT),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 qR(this.options,this),this.activeFormattingElements=new ZR(this.treeAdapter),this.fragmentContextID=r?Js(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new JR(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({},uT),n);t!=null||(t=r.treeAdapter.createElement($.TEMPLATE,re.HTML,[]));const o=r.treeAdapter.createElement("documentmock",re.HTML,[]),u=new this(r,o,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const u=(o=t.location)!==null&&o!==void 0?o:_L,a={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,u;(u=(o=this.treeAdapter).onItemPush)===null||u===void 0||u.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let u,a;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,a=this.fragmentContextID):{current:u,currentTagId:a}=this.openElements,this._setContextModes(u,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===re.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,re.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=kt.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)===$.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==re.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=kt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=kt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=kt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=kt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&be(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,re.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,re.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($.HTML,re.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),u=r?o.lastIndexOf(r):o.length,a=o[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),u=n.type===qe.END_TAG&&o===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,u)}}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===p.SVG&&this.treeAdapter.getTagName(n)===$.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===re.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,re.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return EL(t,o,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===kr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const u=this.activeFormattingElements.entries[o];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return oT.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===re.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 zR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){X6(this,t);return}switch(this.insertionMode){case P.INITIAL:{hu(this,t);break}case P.BEFORE_HTML:{pu(this,t);break}case P.BEFORE_HEAD:{mu(this,t);break}case P.IN_HEAD:{gu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case P.AFTER_HEAD:{yu(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{cT(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Ch(this,t);break}case P.IN_TABLE_TEXT:{yT(this,t);break}case P.IN_COLUMN_GROUP:{vl(this,t);break}case P.AFTER_BODY:{Ol(this,t);break}case P.AFTER_AFTER_BODY:{Il(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q6(this,t);return}switch(this.insertionMode){case P.INITIAL:{hu(this,t);break}case P.BEFORE_HTML:{pu(this,t);break}case P.BEFORE_HEAD:{mu(this,t);break}case P.IN_HEAD:{gu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case P.AFTER_HEAD:{yu(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Ch(this,t);break}case P.IN_COLUMN_GROUP:{vl(this,t);break}case P.AFTER_BODY:{Ol(this,t);break}case P.AFTER_AFTER_BODY:{Il(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Sh(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Sh(this,t);break}case P.IN_TABLE_TEXT:{_u(this,t);break}case P.AFTER_BODY:{kL(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{NL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{OL(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case P.IN_TABLE_TEXT:{_u(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?J6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{hu(this,t);break}case P.BEFORE_HTML:{IL(this,t);break}case P.BEFORE_HEAD:{RL(this,t);break}case P.IN_HEAD:{lr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ML(this,t);break}case P.AFTER_HEAD:{BL(this,t);break}case P.IN_BODY:{rn(this,t);break}case P.IN_TABLE:{Zs(this,t);break}case P.IN_TABLE_TEXT:{_u(this,t);break}case P.IN_CAPTION:{L6(this,t);break}case P.IN_COLUMN_GROUP:{Ah(this,t);break}case P.IN_TABLE_BODY:{kl(this,t);break}case P.IN_ROW:{Nl(this,t);break}case P.IN_CELL:{F6(this,t);break}case P.IN_SELECT:{_T(this,t);break}case P.IN_SELECT_IN_TABLE:{U6(this,t);break}case P.IN_TEMPLATE:{z6(this,t);break}case P.AFTER_BODY:{$6(this,t);break}case P.IN_FRAMESET:{V6(this,t);break}case P.AFTER_FRAMESET:{Y6(this,t);break}case P.AFTER_AFTER_BODY:{G6(this,t);break}case P.AFTER_AFTER_FRAMESET:{K6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Z6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{hu(this,t);break}case P.BEFORE_HTML:{PL(this,t);break}case P.BEFORE_HEAD:{LL(this,t);break}case P.IN_HEAD:{DL(this,t);break}case P.IN_HEAD_NO_SCRIPT:{FL(this,t);break}case P.AFTER_HEAD:{UL(this,t);break}case P.IN_BODY:{Al(this,t);break}case P.TEXT:{w6(this,t);break}case P.IN_TABLE:{Tu(this,t);break}case P.IN_TABLE_TEXT:{_u(this,t);break}case P.IN_CAPTION:{D6(this,t);break}case P.IN_COLUMN_GROUP:{M6(this,t);break}case P.IN_TABLE_BODY:{vh(this,t);break}case P.IN_ROW:{bT(this,t);break}case P.IN_CELL:{B6(this,t);break}case P.IN_SELECT:{xT(this,t);break}case P.IN_SELECT_IN_TABLE:{H6(this,t);break}case P.IN_TEMPLATE:{j6(this,t);break}case P.AFTER_BODY:{wT(this,t);break}case P.IN_FRAMESET:{q6(this,t);break}case P.AFTER_FRAMESET:{W6(this,t);break}case P.AFTER_AFTER_BODY:{Il(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{hu(this,t);break}case P.BEFORE_HTML:{pu(this,t);break}case P.BEFORE_HEAD:{mu(this,t);break}case P.IN_HEAD:{gu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case P.AFTER_HEAD:{yu(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{gT(this,t);break}case P.TEXT:{C6(this,t);break}case P.IN_TABLE_TEXT:{_u(this,t);break}case P.IN_TEMPLATE:{ST(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{wh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{lT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Ch(this,t);break}case P.IN_TABLE_TEXT:{ET(this,t);break}}}}function xL(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):mT(e,t),n}function SL(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wL(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let u=0,a=o;a!==n;u++,a=o){o=e.openElements.getCommonAncestor(a);const c=e.activeFormattingElements.getElementEntry(a),f=c&&u>=bL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(a)):(a=CL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function CL(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 AL(e,t,n){const r=e.treeAdapter.getTagName(t),o=Js(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&u===re.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function vL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,u=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,o.tagID)}function xh(e,t){for(let n=0;n<TL;n++){const r=xL(e,t);if(!r)break;const o=SL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const u=wL(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),a&&AL(e,a,u),vL(e,o,r)}}function Sh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function kL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function NL(e,t){e._appendCommentNode(t,e.document)}function wh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(u);a&&!a.endTag&&e._setEndLocation(u,t)}}}}function OL(e,t){e._setDocumentType(t);const n=t.forceQuirks?Yn.QUIRKS:oL(t);sL(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function hu(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Yn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function IL(e,t){t.tagID===p.HTML?(e._insertElement(t,re.HTML),e.insertionMode=P.BEFORE_HEAD):pu(e,t)}function PL(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&pu(e,t)}function pu(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function RL(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.HEAD:{e._insertElement(t,re.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:mu(e,t)}}function LL(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?mu(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function mu(e,t){e._insertFakeElement($.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function lr(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,kt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,kt.RAWTEXT):(e._insertElement(t,re.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,kt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,kt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:gu(e,t)}}function DL(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{gu(e,t);break}case p.TEMPLATE:{Qi(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Qi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function gu(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function ML(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{lr(e,t);break}case p.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:Eu(e,t)}}function FL(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{Eu(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Eu(e,t){const n=t.type===qe.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function BL(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.BODY:{e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),lr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:yu(e,t)}}function UL(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{yu(e,t);break}case p.TEMPLATE:{Qi(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function yu(e,t){e._insertFakeElement($.BODY,p.BODY),e.insertionMode=P.IN_BODY,Cl(e,t)}function Cl(e,t){switch(t.type){case qe.CHARACTER:{cT(e,t);break}case qe.WHITESPACE_CHARACTER:{lT(e,t);break}case qe.COMMENT:{Sh(e,t);break}case qe.START_TAG:{rn(e,t);break}case qe.END_TAG:{Al(e,t);break}case qe.EOF:{gT(e,t);break}}}function lT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function HL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function jL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET)}function $L(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function VL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Th.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,re.HTML)}function qL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function YL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),n||(e.formElement=e.openElements.current))}function WL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function GL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.tokenizer.state=kt.PLAINTEXT}function KL(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1}function QL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName($.A);n&&(xh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function e6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Yn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function fT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function dT(e){const t=Vy(e,Ki.TYPE);return t!=null&&t.toLowerCase()===yL}function t6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),dT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n6(e,t){e._appendElement(t,re.HTML),t.ackSelfClosing=!0}function r6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function i6(e,t){t.tagName=$.IMG,t.tagID=p.IMG,fT(e,t)}function s6(e,t){e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function o6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function u6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function hT(e,t){e._switchToTextParsing(t,kt.RAWTEXT)}function a6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function l6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function c6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,re.HTML)}function f6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,re.HTML)}function d6(e,t){e._reconstructActiveFormattingElements(),iT(t),_h(t),t.selfClosing?e._appendElement(t,re.MATHML):e._insertElement(t,re.MATHML),t.ackSelfClosing=!0}function h6(e,t){e._reconstructActiveFormattingElements(),sT(t),_h(t),t.selfClosing?e._appendElement(t,re.SVG):e._insertElement(t,re.SVG),t.ackSelfClosing=!0}function pT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function rn(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{XL(e,t);break}case p.A:{QL(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{VL(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{$L(e,t);break}case p.LI:case p.DD:case p.DT:{WL(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{fT(e,t);break}case p.HR:{r6(e,t);break}case p.RB:case p.RTC:{c6(e,t);break}case p.RT:case p.RP:{f6(e,t);break}case p.PRE:case p.LISTING:{qL(e,t);break}case p.XMP:{o6(e,t);break}case p.SVG:{h6(e,t);break}case p.HTML:{HL(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{lr(e,t);break}case p.BODY:{zL(e,t);break}case p.FORM:{YL(e,t);break}case p.NOBR:{JL(e,t);break}case p.MATH:{d6(e,t);break}case p.TABLE:{e6(e,t);break}case p.INPUT:{t6(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{n6(e,t);break}case p.IMAGE:{i6(e,t);break}case p.BUTTON:{KL(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{ZL(e,t);break}case p.IFRAME:{u6(e,t);break}case p.SELECT:{a6(e,t);break}case p.OPTION:case p.OPTGROUP:{l6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{hT(e,t);break}case p.FRAMESET:{jL(e,t);break}case p.TEXTAREA:{s6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?hT(e,t):pT(e,t);break}case p.PLAINTEXT:{GL(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:pT(e,t)}}function p6(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function m6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,wT(e,t))}function g6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function E6(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function y6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement($.P,p.P),e._closePElement()}function T6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function b6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function _6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function x6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function S6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement($.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function mT(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const u=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(u,a))break}}function Al(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{xh(e,t);break}case p.P:{y6(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{g6(e,t);break}case p.LI:{T6(e);break}case p.DD:case p.DT:{b6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{_6(e);break}case p.BR:{S6(e);break}case p.BODY:{p6(e,t);break}case p.HTML:{m6(e,t);break}case p.FORM:{E6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{x6(e,t);break}case p.TEMPLATE:{Qi(e,t);break}default:mT(e,t)}}function gT(e,t){e.tmplInsertionModeStack.length>0?ST(e,t):wh(e,t)}function w6(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function C6(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&oT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{yT(e,t);break}case qe.WHITESPACE_CHARACTER:{ET(e,t);break}}else bu(e,t)}function A6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CAPTION}function v6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function k6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Ah(e,t)}function N6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_TABLE_BODY}function O6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,kl(e,t)}function I6(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function P6(e,t){dT(t)?e._appendElement(t,re.HTML):bu(e,t),t.ackSelfClosing=!0}function R6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,re.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Zs(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{O6(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{lr(e,t);break}case p.COL:{k6(e,t);break}case p.FORM:{R6(e,t);break}case p.TABLE:{I6(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{N6(e,t);break}case p.INPUT:{P6(e,t);break}case p.CAPTION:{A6(e,t);break}case p.COLGROUP:{v6(e,t);break}default:bu(e,t)}}function Tu(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Qi(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:bu(e,t)}}function bu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Cl(e,t),e.fosterParentingEnabled=n}function ET(e,t){e.pendingCharacterTokens.push(t)}function yT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function _u(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)bu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const TT=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function L6(e,t){const n=t.tagID;TT.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Zs(e,t)):rn(e,t)}function D6(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&Tu(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Al(e,t)}}function Ah(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.COL:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{lr(e,t);break}default:vl(e,t)}}function M6(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TEMPLATE:{Qi(e,t);break}case p.COL:break;default:vl(e,t)}}function vl(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function kl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement($.TR,p.TR),e.insertionMode=P.IN_ROW,Nl(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Zs(e,t));break}default:Zs(e,t)}}function vh(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Tu(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Tu(e,t)}}function Nl(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,kl(e,t));break}default:Zs(e,t)}}function bT(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,vh(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,vh(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Tu(e,t)}}function F6(e,t){const n=t.tagID;TT.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Nl(e,t)):rn(e,t)}function B6(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),bT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Al(e,t)}}function _T(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{lr(e,t);break}}}function xT(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Qi(e,t);break}}}function U6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_T(e,t)}function H6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xT(e,t)}function z6(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{lr(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Zs(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Ah(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,kl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Nl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,rn(e,t)}}function j6(e,t){t.tagID===p.TEMPLATE&&Qi(e,t)}function ST(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function $6(e,t){t.tagID===p.HTML?rn(e,t):Ol(e,t)}function wT(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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 Ol(e,t)}function Ol(e,t){e.insertionMode=P.IN_BODY,Cl(e,t)}function V6(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.FRAMESET:{e._insertElement(t,re.HTML);break}case p.FRAME:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{lr(e,t);break}}}function q6(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function Y6(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.NOFRAMES:{lr(e,t);break}}}function W6(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function G6(e,t){t.tagID===p.HTML?rn(e,t):Il(e,t)}function Il(e,t){e.insertionMode=P.IN_BODY,Cl(e,t)}function K6(e,t){switch(t.tagID){case p.HTML:{rn(e,t);break}case p.NOFRAMES:{lr(e,t);break}}}function Q6(e,t){t.chars=pt,e._insertCharacters(t)}function X6(e,t){e._insertCharacters(t),e.framesetOk=!1}function CT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==re.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function J6(e,t){if(hL(t))CT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===re.MATHML?iT(t):r===re.SVG&&(pL(t),sT(t)),_h(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Z6(e,t){if(t.tagID===p.P||t.tagID===p.BR){CT(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)===re.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}$.AREA,$.BASE,$.BASEFONT,$.BGSOUND,$.BR,$.COL,$.EMBED,$.FRAME,$.HR,$.IMG,$.INPUT,$.KEYGEN,$.LINK,$.META,$.PARAM,$.SOURCE,$.TRACK,$.WBR;const e4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),AT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vT(e,t){const n=f4(e),r=Uy("type",{handlers:{root:n4,element:r4,text:i4,comment:NT,doctype:s4,raw:u4},unknown:a4}),o={parser:n?new aT(AT):aT.getFragmentParser(void 0,AT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),eo(o,Ar());const u=n?o.parser.document:o.parser.getFragment(),a=nR(u,{file:o.options.file});return o.stitches&&bl(a,"comment",function(c,f,h){const m=c;if(m.value.stitch&&h&&f!==void 0){const E=h.children;return E[f]=m.value.stitch,f}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function kT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function n4(e,t){kT(e.children,t)}function r4(e,t){l4(e,t),kT(e.children,t),c4(e,t)}function i4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:xu(e)};eo(t,Ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s4(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xu(e)};eo(t,Ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function o4(e,t){t.stitches=!0;const n=d4(e);if("children"in e&&"children"in n){const r=vT({type:"root",children:e.children},t.options);n.children=r.children}NT({type:"comment",value:{stitch:n}},t)}function NT(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:xu(e)};eo(t,Ar(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function u4(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,OT(t,Ar(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(e4,"<$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 a4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))o4(n,t);else{let r="";throw t4.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 eo(e,t){OT(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=kt.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 OT(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 l4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===kt.PLAINTEXT)return;eo(t,Ar(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Wi.html;o===Wi.html&&n==="svg"&&(o=Wi.svg);const u=ER(be(U({},e),{children:[]}),{space:o===Wi.svg?"svg":"html"}),a={type:qe.START_TAG,tagName:n,tagID:Js(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:xu(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function c4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&CR.includes(n)||t.parser.tokenizer.state===kt.PLAINTEXT)return;eo(t,ll(e));const r={type:qe.END_TAG,tagName:n,tagID:Js(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===kt.RCDATA||t.parser.tokenizer.state===kt.RAWTEXT||t.parser.tokenizer.state===kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=kt.DATA)}function f4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xu(e){const t=Ar(e)||{line:void 0,column:void 0,offset:void 0},n=ll(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 d4(e){return"children"in e?Ws(be(U({},e),{children:[]})):Ws(e)}function h4(e){return function(t,n){return vT(t,be(U({},e),{file:n}))}}function IT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function p4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function m4(e,t,n){const o=yl((n||{}).ignore||[]),u=g4(t);let a=-1;for(;++a<u.length;)ly(e,"text",c);function c(h,m){let E=-1,b;for(;++E<m.length;){const T=m[E],_=b?b.children:void 0;if(o(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return f(h,m)}function f(h,m){const E=m[m.length-1],b=u[a][0],T=u[a][1];let _=0;const C=E.children.indexOf(h);let k=!1,F=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const z=D.index,X={index:D.index,input:D.input,stack:[...m,h]};let B=T(...D,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=z+1:(_!==z&&F.push({type:"text",value:h.value.slice(_,z)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=z+D[0].length,k=!0),!b.global)break;D=b.exec(h.value)}return k?(_<h.value.length&&F.push({type:"text",value:h.value.slice(_)}),E.children.splice(C,1,...F)):F=[h],C+F.length}}function g4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([E4(o[0]),y4(o[1])])}return t}function E4(e){return typeof e=="string"?new RegExp(p4(e),"g"):e}function y4(e){return typeof e=="function"?e:function(){return e}}const kh="phrasing",Nh=["autolink","link","image","label"];function T4(){return{transforms:[A4],enter:{literalAutolink:_4,literalAutolinkEmail:Oh,literalAutolinkHttp:Oh,literalAutolinkWww:Oh},exit:{literalAutolink:C4,literalAutolinkEmail:w4,literalAutolinkHttp:x4,literalAutolinkWww:S4}}}function b4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:kh,notInConstruct:Nh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:kh,notInConstruct:Nh},{character:":",before:"[ps]",after:"\\/",inConstruct:kh,notInConstruct:Nh}]}}function _4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oh(e){this.config.enter.autolinkProtocol.call(this,e)}function x4(e){this.config.exit.autolinkProtocol.call(this,e)}function S4(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 w4(e){this.config.exit.autolinkEmail.call(this,e)}function C4(e){this.exit(e)}function A4(e){m4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),k4]],{ignore:["link","linkReference"]})}function v4(e,t,n,r,o){let u="";if(!PT(o)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!N4(n)))return!1;const a=O4(n+r);if(!a[0])return!1;const c={type:"link",title:null,url:u+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function k4(e,t,n,r){return!PT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function N4(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 O4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=IT(e,"(");let u=IT(e,")");for(;r!==-1&&o>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function PT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yi(n)||fl(n))&&(!t||n!==47)}RT.peek=U4;function I4(){this.buffer()}function P4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function R4(){this.buffer()}function L4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function D4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M4(e){this.exit(e)}function F4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function B4(e){this.exit(e)}function U4(){return"["}function RT(e,t,n,r){const o=n.createTracker(r);let u=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return u+=o.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),a(),u+=o.move("]"),u}function H4(){return{enter:{gfmFootnoteCallString:I4,gfmFootnoteCall:P4,gfmFootnoteDefinitionLabelString:R4,gfmFootnoteDefinition:L4},exit:{gfmFootnoteCallString:D4,gfmFootnoteCall:M4,gfmFootnoteDefinitionLabelString:F4,gfmFootnoteDefinition:B4}}}function z4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:RT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,u,a){const c=u.createTracker(a);let f=c.move("[^");const h=u.enter("footnoteDefinition"),m=u.enter("label");return f+=c.move(u.safe(u.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
29
|
-
`:" ")+u.indentLines(u.containerFlow(r,c.current()),t?
|
|
30
|
-
`)}function
|
|
31
|
-
`&&
|
|
32
|
-
`}function
|
|
26
|
+
`}),n}function dy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hy(e,t){const n=mP(e,t),r=n.one(e,void 0),o=sP(n),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
27
|
+
`},o),u}function bP(e,t){return e&&"run"in e?function(n,r){return it(this,null,function*(){const o=hy(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return hy(n,U({file:r},e||t))}}function py(e){if(e)throw e}var nh,my;function _P(){if(my)return nh;my=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return nh=function f(){var h,m,E,b,T,_,S=arguments[0],C=1,k=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<k;++C)if(h=arguments[C],h!=null)for(m in h)E=c(S,m),b=c(h,m),S!==b&&(M&&b&&(u(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&u(E)?E:{},a(S,{name:m,newValue:f(M,_,b)})):typeof b!="undefined"&&a(S,{name:m,newValue:b}));return S},nh}var xP=_P();const rh=Ge(xP);function ih(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 SP(){const e=[],t={run:n,use:r};return t;function n(...o){let u=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const m=e[++u];let E=-1;if(f){a(f);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?wP(m,c)(...h):a(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function wP(e,t){let n;return r;function r(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,o):f instanceof Error?o(f):u(f))}function o(a,...c){n||(n=!0,t(a,...c))}function u(a){o(null,a)}}const Or={basename:CP,dirname:AP,extname:vP,join:kP,sep:"/"};function CP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');du(e);let n=0,r=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else a<0&&(u=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function AP(e){if(du(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 vP(e){du(e);let t=e.length,n=-1,r=0,o=-1,u=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function kP(...e){let t=-1,n;for(;++t<e.length;)du(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":NP(n)}function NP(e){du(e);const t=e.codePointAt(0)===47;let n=OP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function OP(e,t){let n="",r=0,o=-1,u=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||u===1))if(o!==a-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=a,u=0;continue}}else if(n.length>0){n="",r=0,o=a,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,u=0}else c===46&&u>-1?u++:u=-1}return n}function du(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IP={cwd:PP};function PP(){return"/"}function sh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RP(e){if(typeof e=="string")e=new URL(e);else if(!sh(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 LP(e)}function LP(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const oh=["history","path","basename","stem","extname","dirname"];class gy{constructor(t){let n;t?sh(t)?n={path:t}:typeof t=="string"||DP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const u=oh[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)oh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){ah(t,"basename"),uh(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){Ey(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(uh(t,"extname"),Ey(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sh(t)&&(t=RP(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),uh(t,"stem"),this.path=Or.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new rn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ey(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FP=function(e){const r=this.constructor.prototype,o=r[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u},MP={}.hasOwnProperty;class lh extends FP{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=SP()}copy(){const t=new lh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):MP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Sl(t),r=this.parser||this.Parser;return ch("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ch("process",this.parser||this.Parser),fh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,a){const c=Sl(t),f=r.parse(c);r.run(f,c,function(m,E,b){if(m||!E||!b)return h(m);const T=E,_=r.stringify(T,b);HP(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?a(m):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),ch("processSync",this.parser||this.Parser),fh("processSync",this.compiler||this.Compiler),this.process(t,o),Ty("processSync","process",n),r;function o(u,a){n=!0,py(u),r=a}}run(t,n,r){yy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(a,c){const f=Sl(n);o.run(t,f,h);function h(m,E,b){const T=E||t;m?c(m):a?a(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,u),Ty("runSync","run",r),o;function u(a,c){py(a),o=c,r=!0}}stringify(t,n){this.freeze();const r=Sl(n),o=this.compiler||this.Compiler;return fh("stringify",o),yy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(dh("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=rh(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];u(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===h){b=E;break}if(b===-1)r.push([h,...m]);else if(m.length>0){let[T,..._]=m;const S=r[b][1];ih(S)&&ih(T)&&(T=rh(!0,S,T)),r[b]=[h,T,..._]}}}}const BP=new lh().freeze();function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(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 yy(e){if(!ih(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ty(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sl(e){return UP(e)?e:new gy(e)}function UP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HP(e){return typeof e=="string"||zP(e)}function zP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",by=[],_y={allowDangerousHtml:!0},$P=/^(https?|ircs?|mailto|xmpp)$/i,VP=[{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 qP(e){const t=YP(e),n=WP(e);return GP(t.runSync(t.parse(n),n),e)}function YP(e){const t=e.rehypePlugins||by,n=e.remarkPlugins||by,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),_y):_y;return BP().use(AI).use(n).use(bP,r).use(t)}function WP(e){const t=e.children||"",n=new gy;return typeof t=="string"&&(n.value=t),n}function GP(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,u=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||KP;for(const m of VP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+jP+m.id,void 0);return xl(e,h),y3(e,{Fragment:I.Fragment,components:o,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return a?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in jd)if(Object.hasOwn(jd,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=jd[T];(S===null||S.includes(m.tagName))&&(m.properties[T]=f(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):u?u.includes(m.tagName):!1;if(!T&&r&&typeof E=="number"&&(T=!r(m,E,b)),T&&b&&typeof E=="number")return c&&m.children?b.children.splice(E,1,...m.children):b.children.splice(E,1),E}}}function KP(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||$P.test(e.slice(0,t))?e:""}const xy=/[#.]/g;function QP(e,t){const n=e||"",r={};let o=0,u,a;for(;o<n.length;){xy.lastIndex=o;const c=xy.exec(n),f=n.slice(o,c?c.index:n.length);f&&(u?u==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:a=f,o+=f.length),c&&(u=c[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Sy(e,t,n){const r=n?eR(n):void 0;function o(u,a,...c){let f;if(u==null){f={type:"root",children:[]};const h=a;c.unshift(h)}else{f=QP(u,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,XP(a))c.unshift(a);else for(const[E,b]of Object.entries(a))JP(e,f.properties,E,b)}for(const h of c)hh(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function XP(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const u=o;for(const a of u)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function JP(e,t,n,r){const o=Fd(e,n);let u;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;u=r}else typeof r=="boolean"?u=r:typeof r=="string"?o.spaceSeparated?u=mE(r):o.commaSeparated?u=nE(r):o.commaOrSpaceSeparated?u=mE(nE(r).join(" ")):u=wy(o,o.property,r):Array.isArray(r)?u=[...r]:u=o.property==="style"?ZP(r):String(r);if(Array.isArray(u)){const a=[];for(const c of u)a.push(wy(o,o.property,c));u=a}o.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[o.property]=u}}function hh(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)hh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?hh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||nu(n)===nu(t)))return!0}return n}function ZP(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function eR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const tR=["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"],nR=Sy(cl,"div"),rR=Sy(Vs,"g",tR);function iR(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(u){if(typeof u=="number"&&u>-1&&u<=t.length){let a=0;for(;;){let c=n[a];if(c===void 0){const f=Cy(t,n[a-1]);c=f===-1?t.length+1:f+1,n[a]=c}if(c>u)return{line:a+1,column:u-(a>0?n[a-1]:0)+1,offset:u};a++}}}function o(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=Cy(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const a=(u.line>1?n[u.line-2]:0)+u.column-1;if(a<n[u.line-1])return a}}}function Cy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
28
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ki={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/"},Ay={}.hasOwnProperty,sR=Object.prototype;function oR(e,t){const n=t||{};return ph({file:n.file||void 0,location:!1,schema:n.space==="svg"?Vs:cl,verbose:n.verbose||!1},e)}function ph(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},wl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:vy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const u=String(e.file),a=iR(u),c=a.toPoint(0),f=a.toPoint(u.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},wl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},wl(e,r,n),n}default:return n=uR(e,t),n}}function vy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=ph(e,t[n]);r.push(o)}return r}function uR(e,t){const n=e.schema;e.schema=t.namespaceURI===Ki.svg?Vs:cl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;Ay.call(sR,f)||(o[f]=c.value)}const a=(e.schema.space==="svg"?rR:nR)(t.tagName,o,vy(e,t.childNodes));if(wl(e,t,a),a.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Qs(f.startTag),m=f&&f.endTag&&Qs(f.endTag),E=ph(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),a.content=E}return e.schema=n,a}function wl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=aR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function aR(e,t,n){const r=Qs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const u={};let a;if(n.attrs)for(a in n.attrs)Ay.call(n.attrs,a)&&(u[Fd(e.schema,a).property]=Qs(n.attrs[a]));n.startTag;const c=Qs(n.startTag),f=n.endTag?Qs(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=u,t.data={position:h}}}return r}function Qs(e){const t=ky({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ky({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ky(e){return e.line&&e.column?e:void 0}class hu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}hu.prototype.property={},hu.prototype.normal={},hu.prototype.space=null;function Ny(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new hu(n,r,t)}function mh(e){return e.toLowerCase()}class Wn{constructor(t,n){this.property=t,this.attribute=n}}Wn.prototype.space=null,Wn.prototype.boolean=!1,Wn.prototype.booleanish=!1,Wn.prototype.overloadedBoolean=!1,Wn.prototype.number=!1,Wn.prototype.commaSeparated=!1,Wn.prototype.spaceSeparated=!1,Wn.prototype.commaOrSpaceSeparated=!1,Wn.prototype.mustUseProperty=!1,Wn.prototype.defined=!1;let lR=0;const je=Qi(),Bt=Qi(),Oy=Qi(),pe=Qi(),lt=Qi(),Xs=Qi(),Fn=Qi();function Qi(){return Xc(2,++lR)}const gh=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Bt,commaOrSpaceSeparated:Fn,commaSeparated:Xs,number:pe,overloadedBoolean:Oy,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Eh=Object.keys(gh);class yh extends Wn{constructor(t,n,r,o){let u=-1;if(super(t,n),Iy(this,"space",o),typeof r=="number")for(;++u<Eh.length;){const a=Eh[u];Iy(this,Eh[u],(r&gh[a])===gh[a])}}}yh.prototype.defined=!0;function Iy(e,t,n){n&&(e[t]=n)}const cR={}.hasOwnProperty;function Js(e){const t={},n={};let r;for(r in e.properties)if(cR.call(e.properties,r)){const o=e.properties[r],u=new yh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[mh(r)]=r,n[mh(u.attribute)]=r}return new hu(t,n,e.space)}const Py=Js({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}}),Ry=Js({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ly(e,t){return t in e?e[t]:t}function Dy(e,t){return Ly(e,t.toLowerCase())}const Fy=Js({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Dy,properties:{xmlns:null,xmlnsXLink:null}}),My=Js({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:lt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:lt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null}}),fR=Js({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Dy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xs,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,cols:pe,colSpan:null,content:null,contentEditable:Bt,controls:je,controlsList:lt,coords:pe|Xs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Oy,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:pe,hidden:je,high:pe,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:pe,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:pe,rowSpan:pe,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:pe,security:null,unselectable:null}}),dR=Js({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:Ly,properties:{about:Fn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xs,g2:Xs,glyphName:Xs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fn,rev:Fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fn,requiredFeatures:Fn,requiredFonts:Fn,requiredFormats:Fn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),hR=/^data[-\w.:]+$/i,By=/-[a-z]/g,pR=/[A-Z]/g;function mR(e,t){const n=mh(t);let r=t,o=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hR.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(By,ER);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!By.test(u)){let a=u.replace(pR,gR);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=yh}return new o(r,t)}function gR(e){return"-"+e.toLowerCase()}function ER(e){return e.charAt(1).toUpperCase()}const yR=Ny([Ry,Py,Fy,My,fR],"html"),Uy=Ny([Ry,Py,Fy,My,dR],"svg"),Hy={}.hasOwnProperty;function zy(e,t){const n=t||{};function r(o,...u){let a=r.invalid;const c=r.handlers;if(o&&Hy.call(o,e)){const f=String(o[e]);a=Hy.call(c,f)?c[f]:r.unknown}if(a)return a.call(this,o,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const TR={},bR={}.hasOwnProperty,jy=zy("type",{handlers:{root:xR,element:vR,text:CR,comment:AR,doctype:wR}});function _R(e,t){const r=(t||TR).space;return jy(e,r==="svg"?Uy:yR)}function xR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Th(e.children,n,t),Zs(e,n),n}function SR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Th(e.children,n,t),Zs(e,n),n}function wR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Zs(e,t),t}function CR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Zs(e,t),t}function AR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Zs(e,t),t}function vR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Uy);const o=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&bR.call(e.properties,u)){const f=kR(r,u,e.properties[u]);f&&o.push(f)}}const a=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ki[a],childNodes:[],parentNode:null};return c.childNodes=Th(e.children,c,r),Zs(e,c),e.tagName==="template"&&e.content&&(c.content=SR(e.content,r)),c}function kR(e,t,n){const r=mR(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?rE(n):gE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const u=o.name.indexOf(":");u<0?o.prefix="":(o.name=o.name.slice(u+1),o.prefix=r.attribute.slice(0,u)),o.namespace=Ki[r.space]}return o}function Th(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const u=jy(e[r],n);u.parentNode=t,o.push(u)}return o}function Zs(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 NR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],OR=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]),yt="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const Cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function $y(e){return e>=55296&&e<=57343}function IR(e){return e>=56320&&e<=57343}function PR(e,t){return(e-55296)*1024+9216+t}function Vy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qy(e){return e>=64976&&e<=65007||OR.has(e)}var X;(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"})(X||(X={}));const RR=65536;class LR{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=RR,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:u}=this,a=o+n,c=u+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(IR(n))return this.pos++,this._addGap(),PR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(X.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$y(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Vy(t)?this._err(X.controlCharacterInInputStream):qy(t)&&this._err(X.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(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"})(qe||(qe={}));function Yy(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 DR=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))),FR=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 MR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=FR.get(e))!==null&&t!==void 0?t:e}var qt;(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"})(qt||(qt={}));const BR=32;var mi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(mi||(mi={}));function bh(e){return e>=qt.ZERO&&e<=qt.NINE}function UR(e){return e>=qt.UPPER_A&&e<=qt.UPPER_F||e>=qt.LOWER_A&&e<=qt.LOWER_F}function HR(e){return e>=qt.UPPER_A&&e<=qt.UPPER_Z||e>=qt.LOWER_A&&e<=qt.LOWER_Z||bh(e)}function zR(e){return e===qt.EQUALS||HR(e)}var Yt;(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"})(Yt||(Yt={}));var Qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qr||(Qr={}));class jR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qr.Strict}startEntity(t){this.decodeMode=t,this.state=Yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Yt.EntityStart:return t.charCodeAt(n)===qt.NUM?(this.state=Yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Yt.NamedEntity,this.stateNamedEntity(t,n));case Yt.NumericStart:return this.stateNumericStart(t,n);case Yt.NumericDecimal:return this.stateNumericDecimal(t,n);case Yt.NumericHex:return this.stateNumericHex(t,n);case Yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|BR)===qt.LOWER_X?(this.state=Yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Yt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const u=r-n;this.result=this.result*Math.pow(o,u)+Number.parseInt(t.substr(n,u),o),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o)||UR(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===qt.SEMI)this.consumed+=1;else if(this.decodeMode===Qr.Strict)return 0;return this.emitCodePoint(MR(this.result),this.consumed),this.errors&&(t!==qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&mi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=$R(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qr.Attribute&&(u===0||zR(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&mi.VALUE_LENGTH)>>14,u!==0){if(a===qt.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Qr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&mi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~mi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Yt.NamedEntity:return this.result!==0&&(this.decodeMode!==Qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yt.NumericDecimal:return this.emitNumericEntity(0,2);case Yt.NumericHex:return this.emitNumericEntity(0,3);case Yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yt.EntityStart:return 0}}}function $R(e,t,n,r){const o=(t&mi.BRANCH_LENGTH)>>7,u=t&mi.JUMP_TABLE;if(o===0)return u!==0&&r===u?n:-1;if(u){const f=r-u;return f<0||f>=o?-1:e[n+f]-1}let a=n,c=a+o-1;for(;a<=c;){const f=a+c>>>1,h=e[f];if(h<r)a=f+1;else if(h>r)c=f-1;else return e[f+o]}return-1}var re;(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/"})(re||(re={}));var Xi;(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"})(Xi||(Xi={}));var Gn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Gn||(Gn={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var p;(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"})(p||(p={}));const VR=new Map([[j.A,p.A],[j.ADDRESS,p.ADDRESS],[j.ANNOTATION_XML,p.ANNOTATION_XML],[j.APPLET,p.APPLET],[j.AREA,p.AREA],[j.ARTICLE,p.ARTICLE],[j.ASIDE,p.ASIDE],[j.B,p.B],[j.BASE,p.BASE],[j.BASEFONT,p.BASEFONT],[j.BGSOUND,p.BGSOUND],[j.BIG,p.BIG],[j.BLOCKQUOTE,p.BLOCKQUOTE],[j.BODY,p.BODY],[j.BR,p.BR],[j.BUTTON,p.BUTTON],[j.CAPTION,p.CAPTION],[j.CENTER,p.CENTER],[j.CODE,p.CODE],[j.COL,p.COL],[j.COLGROUP,p.COLGROUP],[j.DD,p.DD],[j.DESC,p.DESC],[j.DETAILS,p.DETAILS],[j.DIALOG,p.DIALOG],[j.DIR,p.DIR],[j.DIV,p.DIV],[j.DL,p.DL],[j.DT,p.DT],[j.EM,p.EM],[j.EMBED,p.EMBED],[j.FIELDSET,p.FIELDSET],[j.FIGCAPTION,p.FIGCAPTION],[j.FIGURE,p.FIGURE],[j.FONT,p.FONT],[j.FOOTER,p.FOOTER],[j.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[j.FORM,p.FORM],[j.FRAME,p.FRAME],[j.FRAMESET,p.FRAMESET],[j.H1,p.H1],[j.H2,p.H2],[j.H3,p.H3],[j.H4,p.H4],[j.H5,p.H5],[j.H6,p.H6],[j.HEAD,p.HEAD],[j.HEADER,p.HEADER],[j.HGROUP,p.HGROUP],[j.HR,p.HR],[j.HTML,p.HTML],[j.I,p.I],[j.IMG,p.IMG],[j.IMAGE,p.IMAGE],[j.INPUT,p.INPUT],[j.IFRAME,p.IFRAME],[j.KEYGEN,p.KEYGEN],[j.LABEL,p.LABEL],[j.LI,p.LI],[j.LINK,p.LINK],[j.LISTING,p.LISTING],[j.MAIN,p.MAIN],[j.MALIGNMARK,p.MALIGNMARK],[j.MARQUEE,p.MARQUEE],[j.MATH,p.MATH],[j.MENU,p.MENU],[j.META,p.META],[j.MGLYPH,p.MGLYPH],[j.MI,p.MI],[j.MO,p.MO],[j.MN,p.MN],[j.MS,p.MS],[j.MTEXT,p.MTEXT],[j.NAV,p.NAV],[j.NOBR,p.NOBR],[j.NOFRAMES,p.NOFRAMES],[j.NOEMBED,p.NOEMBED],[j.NOSCRIPT,p.NOSCRIPT],[j.OBJECT,p.OBJECT],[j.OL,p.OL],[j.OPTGROUP,p.OPTGROUP],[j.OPTION,p.OPTION],[j.P,p.P],[j.PARAM,p.PARAM],[j.PLAINTEXT,p.PLAINTEXT],[j.PRE,p.PRE],[j.RB,p.RB],[j.RP,p.RP],[j.RT,p.RT],[j.RTC,p.RTC],[j.RUBY,p.RUBY],[j.S,p.S],[j.SCRIPT,p.SCRIPT],[j.SEARCH,p.SEARCH],[j.SECTION,p.SECTION],[j.SELECT,p.SELECT],[j.SOURCE,p.SOURCE],[j.SMALL,p.SMALL],[j.SPAN,p.SPAN],[j.STRIKE,p.STRIKE],[j.STRONG,p.STRONG],[j.STYLE,p.STYLE],[j.SUB,p.SUB],[j.SUMMARY,p.SUMMARY],[j.SUP,p.SUP],[j.TABLE,p.TABLE],[j.TBODY,p.TBODY],[j.TEMPLATE,p.TEMPLATE],[j.TEXTAREA,p.TEXTAREA],[j.TFOOT,p.TFOOT],[j.TD,p.TD],[j.TH,p.TH],[j.THEAD,p.THEAD],[j.TITLE,p.TITLE],[j.TR,p.TR],[j.TRACK,p.TRACK],[j.TT,p.TT],[j.U,p.U],[j.UL,p.UL],[j.SVG,p.SVG],[j.VAR,p.VAR],[j.WBR,p.WBR],[j.XMP,p.XMP]]);function eo(e){var t;return(t=VR.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,qR={[re.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[re.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[re.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[re.XLINK]:new Set,[re.XML]:new Set,[re.XMLNS]:new Set},_h=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var v;(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"})(v||(v={}));const Pt={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function YR(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function pu(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function WR(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function gi(e){return WR(e)||pu(e)}function Wy(e){return gi(e)||YR(e)}function Cl(e){return e+32}function Gy(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function Ky(e){return Gy(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function GR(e){return e===A.NULL?X.nullCharacterReference:e>1114111?X.characterReferenceOutsideUnicodeRange:$y(e)?X.surrogateCharacterReference:qy(e)?X.noncharacterCharacterReference:Vy(e)||e===A.CARRIAGE_RETURN?X.controlCharacterReference:null}class KR{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=v.DATA,this.returnState=v.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new LR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new jR(DR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(X.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(X.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=GR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.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(Yy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(X.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=eo(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(X.endTagWithAttributes),t.selfClosing&&this._err(X.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 qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.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:qe.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=Gy(t)?qe.WHITESPACE_CHARACTER:t===A.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=v.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Qr.Attribute:Qr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===v.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case v.DATA:{this._stateData(t);break}case v.RCDATA:{this._stateRcdata(t);break}case v.RAWTEXT:{this._stateRawtext(t);break}case v.SCRIPT_DATA:{this._stateScriptData(t);break}case v.PLAINTEXT:{this._statePlaintext(t);break}case v.TAG_OPEN:{this._stateTagOpen(t);break}case v.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case v.TAG_NAME:{this._stateTagName(t);break}case v.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case v.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case v.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case v.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case v.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case v.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case v.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case v.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case v.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case v.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case v.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case v.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case v.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case v.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case v.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case v.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case v.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case v.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case v.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case v.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case v.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case v.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case v.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case v.BOGUS_COMMENT:{this._stateBogusComment(t);break}case v.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case v.COMMENT_START:{this._stateCommentStart(t);break}case v.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case v.COMMENT:{this._stateComment(t);break}case v.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case v.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case v.COMMENT_END:{this._stateCommentEnd(t);break}case v.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case v.DOCTYPE:{this._stateDoctype(t);break}case v.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case v.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case v.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case v.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case v.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case v.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case v.CDATA_SECTION:{this._stateCdataSection(t);break}case v.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case v.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case v.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case v.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=v.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gi(t))this._createStartTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=v.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=v.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(X.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(X.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=v.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gi(t))this._createEndTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(X.missingEndTagName),this.state=v.DATA;break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(X.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.tagName+=yt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(pu(t)?Cl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=v.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){gi(t)?(this.state=v.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=v.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=v.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=v.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=v.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){gi(t)?(this.state=v.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=v.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=v.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=v.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){gi(t)?(this.state=v.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gi(t)?(this._emitChars("<"),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){gi(t)?(this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Cn.SCRIPT,!1)&&Ky(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(yt);break}case A.EOF:{this._err(X.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Cn.SCRIPT,!1)&&Ky(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(X.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=v.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(X.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.name+=yt;break}default:this.currentAttr.name+=String.fromCodePoint(pu(t)?Cl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=v.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=v.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingAttributeValue),this.state=v.DATA,this.emitCurrentTagToken();break}default:this.state=v.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(X.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this._err(X.missingWhitespaceBetweenAttributes),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:this._err(X.unexpectedSolidusInTag),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.data+=yt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Cn.DASH_DASH,!0)?(this._createCommentToken(Cn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(Cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Cn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(Cn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(X.cdataInHtmlContent),this._createCommentToken(Cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=v.BOGUS_COMMENT):this._ensureHibernation()||(this._err(X.incorrectlyOpenedComment),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptClosingOfEmptyComment),this.state=v.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptClosingOfEmptyComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=v.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.data+=yt;break}case A.EOF:{this._err(X.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=v.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=v.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=v.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(X.nestedComment),this.state=v.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.EOF:{this._err(X.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=v.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(X.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=v.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(X.incorrectlyClosedComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=v.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(X.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingWhitespaceBeforeDoctypeName),this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(pu(t))this._createDoctypeToken(String.fromCharCode(Cl(t))),this.state=v.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(X.unexpectedNullCharacter),this._createDoctypeToken(yt),this.state=v.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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=v.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.name+=yt;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(pu(t)?Cl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Cn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Cn.SYSTEM,!1)?this.state=v.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(X.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.publicId+=yt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.publicId+=yt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.systemId+=yt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(X.unexpectedNullCharacter),n.systemId+=yt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.NULL:{this._err(X.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=v.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(X.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=v.CDATA_SECTION_END:(this._emitChars("]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Wy(this.preprocessor.peek(1))?v.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Wy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(X.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Qy=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Xy=new Set([...Qy,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Al=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),QR=new Set([...Al,p.OL,p.UL]),XR=new Set([...Al,p.BUTTON]),Jy=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Zy=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),JR=new Set([p.TR,p.TEMPLATE,p.HTML]),ZR=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),eL=new Set([p.TABLE,p.TEMPLATE,p.HTML]),tL=new Set([p.TD,p.TH]);class nL{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===re.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==re.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(_h,re.HTML)}popUntilTableCellPopped(){this.popUntilPopped(tL,re.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(eL,re.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ZR,re.HTML)}clearBackToTableRowContext(){this.clearBackTo(JR,re.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case re.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case re.SVG:{if(Zy.has(o))return!1;break}case re.MATHML:{if(Jy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Al)}hasInListItemScope(t){return this.hasInDynamicScope(t,QR)}hasInButtonScope(t){return this.hasInDynamicScope(t,XR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case re.HTML:{if(_h.has(n))return!0;if(Al.has(n))return!1;break}case re.SVG:{if(Zy.has(n))return!1;break}case re.MATHML:{if(Jy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===re.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Qy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Xy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Xy.has(this.currentTagId);)this.pop()}}const xh=3;var Ir;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ir||(Ir={}));const eT={type:Ir.Marker};class rL{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,u=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Ir.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===a){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xh)return;const o=new Map(n.map(a=>[a.name,a.value]));let u=0;for(let a=0;a<r.length;a++){const c=r[a];c.attrs.every(f=>o.get(f.name)===f.value)&&(u+=1,u>=xh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(eT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ir.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ir.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(eT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ir.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ir.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ir.Element&&n.element===t)}}const Ei={createDocument(){return{nodeName:"#document",mode:Gn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(u=>u.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ei.appendChild(e,u)}},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(Ei.isTextNode(n)){n.value+=t;return}}Ei.appendChild(e,Ei.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ei.isTextNode(r)?r.value+=t:Ei.insertBefore(e,Ei.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)}},tT="html",iL="about:legacy-compat",sL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",nT=["+//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//"],oL=[...nT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],uL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aL=[...rT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function iT(e,t){return t.some(n=>e.startsWith(n))}function lL(e){return e.name===tT&&e.publicId===null&&(e.systemId===null||e.systemId===iL)}function cL(e){if(e.name!==tT)return Gn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===sL)return Gn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),uL.has(n))return Gn.QUIRKS;let r=t===null?oL:nT;if(iT(n,r))return Gn.QUIRKS;if(r=t===null?rT:aL,iT(n,r))return Gn.LIMITED_QUIRKS}return Gn.NO_QUIRKS}const sT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},fL="definitionurl",dL="definitionURL",hL=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])),pL=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:re.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:re.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:re.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:re.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:re.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:re.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:re.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:re.XML}],["xml:space",{prefix:"xml",name:"space",namespace:re.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:re.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:re.XMLNS}]]),mL=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])),gL=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function EL(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===Xi.COLOR||r===Xi.SIZE||r===Xi.FACE)||gL.has(t)}function oT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===fL){e.attrs[t].name=dL;break}}function uT(e){for(let t=0;t<e.attrs.length;t++){const n=hL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sh(e){for(let t=0;t<e.attrs.length;t++){const n=pL.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 yL(e){const t=mL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=eo(e.tagName))}function TL(e,t){return t===re.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function bL(e,t,n){if(t===re.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Xi.ENCODING){const o=n[r].value.toLowerCase();return o===sT.TEXT_HTML||o===sT.APPLICATION_XML}}return t===re.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function _L(e,t,n,r){return(!r||r===re.HTML)&&bL(e,t,n)||(!r||r===re.MATHML)&&TL(e,t)}const xL="hidden",SL=8,wL=3;var P;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(P||(P={}));const CL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},aT=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),lT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ei,onParseError:null};class cT{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},lT),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 KR(this.options,this),this.activeFormattingElements=new rL(this.treeAdapter),this.fragmentContextID=r?eo(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new nL(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({},lT),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,re.HTML,[]));const o=r.treeAdapter.createElement("documentmock",re.HTML,[]),u=new this(r,o,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const u=(o=t.location)!==null&&o!==void 0?o:CL,a={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,u;(u=(o=this.treeAdapter).onItemPush)===null||u===void 0||u.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let u,a;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,a=this.fragmentContextID):{current:u,currentTagId:a}=this.openElements,this._setContextModes(u,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===re.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,re.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Pt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==re.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=Pt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=Pt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=Pt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=Pt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ye(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,re.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,re.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,re.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),u=r?o.lastIndexOf(r):o.length,a=o[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),u=n.type===qe.END_TAG&&o===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,u)}}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===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===re.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,re.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return _L(t,o,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ir.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const u=this.activeFormattingElements.entries[o];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return aT.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===re.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 qR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){t4(this,t);return}switch(this.insertionMode){case P.INITIAL:{mu(this,t);break}case P.BEFORE_HTML:{gu(this,t);break}case P.BEFORE_HEAD:{Eu(this,t);break}case P.IN_HEAD:{yu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Tu(this,t);break}case P.AFTER_HEAD:{bu(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{dT(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{vh(this,t);break}case P.IN_TABLE_TEXT:{bT(this,t);break}case P.IN_COLUMN_GROUP:{Nl(this,t);break}case P.AFTER_BODY:{Pl(this,t);break}case P.AFTER_AFTER_BODY:{Rl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){e4(this,t);return}switch(this.insertionMode){case P.INITIAL:{mu(this,t);break}case P.BEFORE_HTML:{gu(this,t);break}case P.BEFORE_HEAD:{Eu(this,t);break}case P.IN_HEAD:{yu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Tu(this,t);break}case P.AFTER_HEAD:{bu(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{vh(this,t);break}case P.IN_COLUMN_GROUP:{Nl(this,t);break}case P.AFTER_BODY:{Pl(this,t);break}case P.AFTER_AFTER_BODY:{Rl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ch(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Ch(this,t);break}case P.IN_TABLE_TEXT:{Su(this,t);break}case P.AFTER_BODY:{PL(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{RL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{LL(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,X.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Su(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,X.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?n4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{mu(this,t);break}case P.BEFORE_HTML:{DL(this,t);break}case P.BEFORE_HEAD:{ML(this,t);break}case P.IN_HEAD:{dr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{HL(this,t);break}case P.AFTER_HEAD:{jL(this,t);break}case P.IN_BODY:{on(this,t);break}case P.IN_TABLE:{to(this,t);break}case P.IN_TABLE_TEXT:{Su(this,t);break}case P.IN_CAPTION:{B6(this,t);break}case P.IN_COLUMN_GROUP:{kh(this,t);break}case P.IN_TABLE_BODY:{Ol(this,t);break}case P.IN_ROW:{Il(this,t);break}case P.IN_CELL:{z6(this,t);break}case P.IN_SELECT:{ST(this,t);break}case P.IN_SELECT_IN_TABLE:{$6(this,t);break}case P.IN_TEMPLATE:{q6(this,t);break}case P.AFTER_BODY:{W6(this,t);break}case P.IN_FRAMESET:{G6(this,t);break}case P.AFTER_FRAMESET:{Q6(this,t);break}case P.AFTER_AFTER_BODY:{J6(this,t);break}case P.AFTER_AFTER_FRAMESET:{Z6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?r4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{mu(this,t);break}case P.BEFORE_HTML:{FL(this,t);break}case P.BEFORE_HEAD:{BL(this,t);break}case P.IN_HEAD:{UL(this,t);break}case P.IN_HEAD_NO_SCRIPT:{zL(this,t);break}case P.AFTER_HEAD:{$L(this,t);break}case P.IN_BODY:{kl(this,t);break}case P.TEXT:{k6(this,t);break}case P.IN_TABLE:{_u(this,t);break}case P.IN_TABLE_TEXT:{Su(this,t);break}case P.IN_CAPTION:{U6(this,t);break}case P.IN_COLUMN_GROUP:{H6(this,t);break}case P.IN_TABLE_BODY:{Nh(this,t);break}case P.IN_ROW:{xT(this,t);break}case P.IN_CELL:{j6(this,t);break}case P.IN_SELECT:{wT(this,t);break}case P.IN_SELECT_IN_TABLE:{V6(this,t);break}case P.IN_TEMPLATE:{Y6(this,t);break}case P.AFTER_BODY:{AT(this,t);break}case P.IN_FRAMESET:{K6(this,t);break}case P.AFTER_FRAMESET:{X6(this,t);break}case P.AFTER_AFTER_BODY:{Rl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{mu(this,t);break}case P.BEFORE_HTML:{gu(this,t);break}case P.BEFORE_HEAD:{Eu(this,t);break}case P.IN_HEAD:{yu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Tu(this,t);break}case P.AFTER_HEAD:{bu(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{yT(this,t);break}case P.TEXT:{N6(this,t);break}case P.IN_TABLE_TEXT:{Su(this,t);break}case P.IN_TEMPLATE:{CT(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Ah(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{fT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{vh(this,t);break}case P.IN_TABLE_TEXT:{TT(this,t);break}}}}function AL(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):ET(e,t),n}function vL(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function kL(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let u=0,a=o;a!==n;u++,a=o){o=e.openElements.getCommonAncestor(a);const c=e.activeFormattingElements.getElementEntry(a),f=c&&u>=wL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(a)):(a=NL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function NL(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 OL(e,t,n){const r=e.treeAdapter.getTagName(t),o=eo(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&u===re.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function IL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,u=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,o.tagID)}function wh(e,t){for(let n=0;n<SL;n++){const r=AL(e,t);if(!r)break;const o=vL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const u=kL(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),a&&OL(e,a,u),IL(e,o,r)}}function Ch(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function PL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function RL(e,t){e._appendCommentNode(t,e.document)}function Ah(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(u);a&&!a.endTag&&e._setEndLocation(u,t)}}}}function LL(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gn.QUIRKS:cL(t);lL(t)||e._err(t,X.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function mu(e,t){e._err(t,X.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Gn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function DL(e,t){t.tagID===p.HTML?(e._insertElement(t,re.HTML),e.insertionMode=P.BEFORE_HEAD):gu(e,t)}function FL(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&gu(e,t)}function gu(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function ML(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.HEAD:{e._insertElement(t,re.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:Eu(e,t)}}function BL(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Eu(e,t):e._err(t,X.endTagWithoutMatchingOpenElement)}function Eu(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,Pt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Pt.RAWTEXT):(e._insertElement(t,re.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,Pt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,Pt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case p.HEAD:{e._err(t,X.misplacedStartTagForHeadElement);break}default:yu(e,t)}}function UL(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{yu(e,t);break}case p.TEMPLATE:{Ji(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,X.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,X.endTagWithoutMatchingOpenElement)}function yu(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function HL(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{dr(e,t);break}case p.NOSCRIPT:{e._err(t,X.nestedNoscriptInHead);break}default:Tu(e,t)}}function zL(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{Tu(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function Tu(e,t){const n=t.type===qe.EOF?X.openElementsLeftAfterEof:X.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function jL(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.BODY:{e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,X.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,X.misplacedStartTagForHeadElement);break}default:bu(e,t)}}function $L(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{bu(e,t);break}case p.TEMPLATE:{Ji(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function bu(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,vl(e,t)}function vl(e,t){switch(t.type){case qe.CHARACTER:{dT(e,t);break}case qe.WHITESPACE_CHARACTER:{fT(e,t);break}case qe.COMMENT:{Ch(e,t);break}case qe.START_TAG:{on(e,t);break}case qe.END_TAG:{kl(e,t);break}case qe.EOF:{yT(e,t);break}}}function fT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function dT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function VL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function qL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function YL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET)}function WL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function GL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&_h.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,re.HTML)}function KL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),n||(e.formElement=e.openElements.current))}function XL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function JL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.tokenizer.state=Pt.PLAINTEXT}function ZL(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1}function e6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(wh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function n6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(wh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function r6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function i6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Gn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function hT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pT(e){const t=Yy(e,Xi.TYPE);return t!=null&&t.toLowerCase()===xL}function s6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),pT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function o6(e,t){e._appendElement(t,re.HTML),t.ackSelfClosing=!0}function u6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function a6(e,t){t.tagName=j.IMG,t.tagID=p.IMG,hT(e,t)}function l6(e,t){e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Pt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function c6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function f6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function mT(e,t){e._switchToTextParsing(t,Pt.RAWTEXT)}function d6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function h6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function p6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,re.HTML)}function m6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,re.HTML)}function g6(e,t){e._reconstructActiveFormattingElements(),oT(t),Sh(t),t.selfClosing?e._appendElement(t,re.MATHML):e._insertElement(t,re.MATHML),t.ackSelfClosing=!0}function E6(e,t){e._reconstructActiveFormattingElements(),uT(t),Sh(t),t.selfClosing?e._appendElement(t,re.SVG):e._insertElement(t,re.SVG),t.ackSelfClosing=!0}function gT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function on(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{t6(e,t);break}case p.A:{e6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{GL(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{WL(e,t);break}case p.LI:case p.DD:case p.DT:{XL(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{hT(e,t);break}case p.HR:{u6(e,t);break}case p.RB:case p.RTC:{p6(e,t);break}case p.RT:case p.RP:{m6(e,t);break}case p.PRE:case p.LISTING:{KL(e,t);break}case p.XMP:{c6(e,t);break}case p.SVG:{E6(e,t);break}case p.HTML:{VL(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{dr(e,t);break}case p.BODY:{qL(e,t);break}case p.FORM:{QL(e,t);break}case p.NOBR:{n6(e,t);break}case p.MATH:{g6(e,t);break}case p.TABLE:{i6(e,t);break}case p.INPUT:{s6(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{o6(e,t);break}case p.IMAGE:{a6(e,t);break}case p.BUTTON:{ZL(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{r6(e,t);break}case p.IFRAME:{f6(e,t);break}case p.SELECT:{d6(e,t);break}case p.OPTION:case p.OPTGROUP:{h6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{mT(e,t);break}case p.FRAMESET:{YL(e,t);break}case p.TEXTAREA:{l6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?mT(e,t):gT(e,t);break}case p.PLAINTEXT:{JL(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:gT(e,t)}}function y6(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function T6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,AT(e,t))}function b6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _6(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function x6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function S6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function w6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function C6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function A6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function v6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function ET(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const u=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(u,a))break}}function kl(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{wh(e,t);break}case p.P:{x6(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{b6(e,t);break}case p.LI:{S6(e);break}case p.DD:case p.DT:{w6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{C6(e);break}case p.BR:{v6(e);break}case p.BODY:{y6(e,t);break}case p.HTML:{T6(e,t);break}case p.FORM:{_6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{A6(e,t);break}case p.TEMPLATE:{Ji(e,t);break}default:ET(e,t)}}function yT(e,t){e.tmplInsertionModeStack.length>0?CT(e,t):Ah(e,t)}function k6(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function N6(e,t){e._err(t,X.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function vh(e,t){if(e.openElements.currentTagId!==void 0&&aT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{bT(e,t);break}case qe.WHITESPACE_CHARACTER:{TT(e,t);break}}else xu(e,t)}function O6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CAPTION}function I6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function P6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,kh(e,t)}function R6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_TABLE_BODY}function L6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,Ol(e,t)}function D6(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function F6(e,t){pT(t)?e._appendElement(t,re.HTML):xu(e,t),t.ackSelfClosing=!0}function M6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,re.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function to(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{L6(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{dr(e,t);break}case p.COL:{P6(e,t);break}case p.FORM:{M6(e,t);break}case p.TABLE:{D6(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{R6(e,t);break}case p.INPUT:{F6(e,t);break}case p.CAPTION:{O6(e,t);break}case p.COLGROUP:{I6(e,t);break}default:xu(e,t)}}function _u(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Ji(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:xu(e,t)}}function xu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,vl(e,t),e.fosterParentingEnabled=n}function TT(e,t){e.pendingCharacterTokens.push(t)}function bT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Su(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const _T=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function B6(e,t){const n=t.tagID;_T.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,to(e,t)):on(e,t)}function U6(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&_u(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:kl(e,t)}}function kh(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.COL:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{dr(e,t);break}default:Nl(e,t)}}function H6(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TEMPLATE:{Ji(e,t);break}case p.COL:break;default:Nl(e,t)}}function Nl(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function Ol(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,p.TR),e.insertionMode=P.IN_ROW,Il(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,to(e,t));break}default:to(e,t)}}function Nh(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,_u(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:_u(e,t)}}function Il(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Ol(e,t));break}default:to(e,t)}}function xT(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Nh(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Nh(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:_u(e,t)}}function z6(e,t){const n=t.tagID;_T.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Il(e,t)):on(e,t)}function j6(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),xT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:kl(e,t)}}function ST(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{dr(e,t);break}}}function wT(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Ji(e,t);break}}}function $6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ST(e,t)}function V6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):wT(e,t)}function q6(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{dr(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,to(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,kh(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,Ol(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Il(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,on(e,t)}}function Y6(e,t){t.tagID===p.TEMPLATE&&Ji(e,t)}function CT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ah(e,t)}function W6(e,t){t.tagID===p.HTML?on(e,t):Pl(e,t)}function AT(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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=P.IN_BODY,vl(e,t)}function G6(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.FRAMESET:{e._insertElement(t,re.HTML);break}case p.FRAME:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{dr(e,t);break}}}function K6(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function Q6(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function X6(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function J6(e,t){t.tagID===p.HTML?on(e,t):Rl(e,t)}function Rl(e,t){e.insertionMode=P.IN_BODY,vl(e,t)}function Z6(e,t){switch(t.tagID){case p.HTML:{on(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function e4(e,t){t.chars=yt,e._insertCharacters(t)}function t4(e,t){e._insertCharacters(t),e.framesetOk=!1}function vT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==re.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function n4(e,t){if(EL(t))vT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===re.MATHML?oT(t):r===re.SVG&&(yL(t),uT(t)),Sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function r4(e,t){if(t.tagID===p.P||t.tagID===p.BR){vT(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)===re.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const i4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,s4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),kT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function NT(e,t){const n=m4(e),r=zy("type",{handlers:{root:o4,element:u4,text:a4,comment:IT,doctype:l4,raw:f4},unknown:d4}),o={parser:n?new cT(kT):cT.getFragmentParser(void 0,kT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),no(o,Nr());const u=n?o.parser.document:o.parser.getFragment(),a=oR(u,{file:o.options.file});return o.stitches&&xl(a,"comment",function(c,f,h){const m=c;if(m.value.stitch&&h&&f!==void 0){const E=h.children;return E[f]=m.value.stitch,f}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function OT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function o4(e,t){OT(e.children,t)}function u4(e,t){h4(e,t),OT(e.children,t),p4(e,t)}function a4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:wu(e)};no(t,Nr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function l4(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:wu(e)};no(t,Nr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function c4(e,t){t.stitches=!0;const n=g4(e);if("children"in e&&"children"in n){const r=NT({type:"root",children:e.children},t.options);n.children=r.children}IT({type:"comment",value:{stitch:n}},t)}function IT(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:wu(e)};no(t,Nr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function f4(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,PT(t,Nr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(i4,"<$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 d4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))c4(n,t);else{let r="";throw s4.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 no(e,t){PT(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=Pt.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 PT(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 h4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Pt.PLAINTEXT)return;no(t,Nr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ki.html;o===Ki.html&&n==="svg"&&(o=Ki.svg);const u=_R(ye(U({},e),{children:[]}),{space:o===Ki.svg?"svg":"html"}),a={type:qe.START_TAG,tagName:n,tagID:eo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:wu(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function p4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&NR.includes(n)||t.parser.tokenizer.state===Pt.PLAINTEXT)return;no(t,fl(e));const r={type:qe.END_TAG,tagName:n,tagID:eo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:wu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Pt.RCDATA||t.parser.tokenizer.state===Pt.RAWTEXT||t.parser.tokenizer.state===Pt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Pt.DATA)}function m4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function wu(e){const t=Nr(e)||{line:void 0,column:void 0,offset:void 0},n=fl(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 g4(e){return"children"in e?Ks(ye(U({},e),{children:[]})):Ks(e)}function E4(e){return function(t,n){return NT(t,ye(U({},e),{file:n}))}}function RT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function y4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function T4(e,t,n){const o=bl((n||{}).ignore||[]),u=b4(t);let a=-1;for(;++a<u.length;)fy(e,"text",c);function c(h,m){let E=-1,b;for(;++E<m.length;){const T=m[E],_=b?b.children:void 0;if(o(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return f(h,m)}function f(h,m){const E=m[m.length-1],b=u[a][0],T=u[a][1];let _=0;const C=E.children.indexOf(h);let k=!1,M=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const G=D.index,q={index:D.index,input:D.input,stack:[...m,h]};let B=T(...D,q);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=G+1:(_!==G&&M.push({type:"text",value:h.value.slice(_,G)}),Array.isArray(B)?M.push(...B):B&&M.push(B),_=G+D[0].length,k=!0),!b.global)break;D=b.exec(h.value)}return k?(_<h.value.length&&M.push({type:"text",value:h.value.slice(_)}),E.children.splice(C,1,...M)):M=[h],C+M.length}}function b4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([_4(o[0]),x4(o[1])])}return t}function _4(e){return typeof e=="string"?new RegExp(y4(e),"g"):e}function x4(e){return typeof e=="function"?e:function(){return e}}const Oh="phrasing",Ih=["autolink","link","image","label"];function S4(){return{transforms:[O4],enter:{literalAutolink:C4,literalAutolinkEmail:Ph,literalAutolinkHttp:Ph,literalAutolinkWww:Ph},exit:{literalAutolink:N4,literalAutolinkEmail:k4,literalAutolinkHttp:A4,literalAutolinkWww:v4}}}function w4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Oh,notInConstruct:Ih},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Oh,notInConstruct:Ih},{character:":",before:"[ps]",after:"\\/",inConstruct:Oh,notInConstruct:Ih}]}}function C4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ph(e){this.config.enter.autolinkProtocol.call(this,e)}function A4(e){this.config.exit.autolinkProtocol.call(this,e)}function v4(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 k4(e){this.config.exit.autolinkEmail.call(this,e)}function N4(e){this.exit(e)}function O4(e){T4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,I4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),P4]],{ignore:["link","linkReference"]})}function I4(e,t,n,r,o){let u="";if(!LT(o)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!R4(n)))return!1;const a=L4(n+r);if(!a[0])return!1;const c={type:"link",title:null,url:u+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function P4(e,t,n,r){return!LT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function R4(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 L4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=RT(e,"(");let u=RT(e,")");for(;r!==-1&&o>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function LT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gi(n)||hl(n))&&(!t||n!==47)}DT.peek=$4;function D4(){this.buffer()}function F4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function M4(){this.buffer()}function B4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function U4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function H4(e){this.exit(e)}function z4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j4(e){this.exit(e)}function $4(){return"["}function DT(e,t,n,r){const o=n.createTracker(r);let u=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return u+=o.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),a(),u+=o.move("]"),u}function V4(){return{enter:{gfmFootnoteCallString:D4,gfmFootnoteCall:F4,gfmFootnoteDefinitionLabelString:M4,gfmFootnoteDefinition:B4},exit:{gfmFootnoteCallString:U4,gfmFootnoteCall:H4,gfmFootnoteDefinitionLabelString:z4,gfmFootnoteDefinition:j4}}}function q4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:DT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,u,a){const c=u.createTracker(a);let f=c.move("[^");const h=u.enter("footnoteDefinition"),m=u.enter("label");return f+=c.move(u.safe(u.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
29
|
+
`:" ")+u.indentLines(u.containerFlow(r,c.current()),t?FT:Y4))),h(),f}}function Y4(e,t,n){return t===0?e:FT(e,t,n)}function FT(e,t,n){return(n?"":" ")+e}const W4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];MT.peek=J4;function G4(){return{canContainEols:["delete"],enter:{strikethrough:Q4},exit:{strikethrough:X4}}}function K4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W4}],handlers:{delete:MT}}}function Q4(e){this.enter({type:"delete",children:[]},e)}function X4(e){this.exit(e)}function MT(e,t,n,r){const o=n.createTracker(r),u=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,ye(U({},o.current()),{before:a,after:"~"})),a+=o.move("~~"),u(),a}function J4(){return"~"}function Z4(e){return e.length}function eD(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Z4,u=[],a=[],c=[],f=[];let h=0,m=-1;for(;++m<e.length;){const S=[],C=[];let k=-1;for(e[m].length>h&&(h=e[m].length);++k<e[m].length;){const M=tD(e[m][k]);if(n.alignDelimiters!==!1){const D=o(M);C[k]=D,(f[k]===void 0||D>f[k])&&(f[k]=D)}S.push(M)}a[m]=S,c[m]=C}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)u[E]=BT(r[E]);else{const S=BT(r);for(;++E<h;)u[E]=S}E=-1;const b=[],T=[];for(;++E<h;){const S=u[E];let C="",k="";S===99?(C=":",k=":"):S===108?C=":":S===114&&(k=":");let M=n.alignDelimiters===!1?1:Math.max(1,f[E]-C.length-k.length);const D=C+"-".repeat(M)+k;n.alignDelimiters!==!1&&(M=C.length+M+k.length,M>f[E]&&(f[E]=M),T[E]=M),b[E]=D}a.splice(1,0,b),c.splice(1,0,T),m=-1;const _=[];for(;++m<a.length;){const S=a[m],C=c[m];E=-1;const k=[];for(;++E<h;){const M=S[E]||"";let D="",G="";if(n.alignDelimiters!==!1){const q=f[E]-(C[E]||0),B=u[E];B===114?D=" ".repeat(q):B===99?q%2?(D=" ".repeat(q/2+.5),G=" ".repeat(q/2-.5)):(D=" ".repeat(q/2),G=D):G=" ".repeat(q)}n.delimiterStart!==!1&&!E&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||E)&&k.push(" "),n.alignDelimiters!==!1&&k.push(D),k.push(M),n.alignDelimiters!==!1&&k.push(G),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&k.push("|")}_.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return _.join(`
|
|
30
|
+
`)}function tD(e){return e==null?"":String(e)}function BT(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 nD(e,t,n,r){const o=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const a=n.indentLines(n.containerFlow(e,u.current()),rD);return o(),a}function rD(e,t,n){return">"+(n?"":" ")+e}function iD(e,t){return UT(e,t.inConstruct,!0)&&!UT(e,t.notInConstruct,!1)}function UT(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 HT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
31
|
+
`&&iD(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
32
|
+
`}function sD(e,t){const n=String(e);let r=n.indexOf(t),o=r,u=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>a&&(a=u):u=1,o=r+t.length,r=n.indexOf(t,o);return a}function oD(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 uD(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 aD(e,t,n,r){const o=uD(n),u=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(oD(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(u,lD);return E(),b}const c=n.createTracker(r),f=o.repeat(Math.max(sD(u,o)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,U({before:m,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,U({before:m,after:`
|
|
33
33
|
`,encode:["`"]},c.current()))),E()}return m+=c.move(`
|
|
34
34
|
`),u&&(m+=c.move(u+`
|
|
35
|
-
`)),m+=c.move(f),h(),m}function
|
|
36
|
-
`},f.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),a(),h}function
|
|
35
|
+
`)),m+=c.move(f),h(),m}function lD(e,t,n){return(n?"":" ")+e}function Rh(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 cD(e,t,n,r){const o=Rh(n),u=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),U({before:h,after:"]"},f.current()))),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,U({before:h,after:">"},f.current()))),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,U({before:h,after:e.title?" ":`
|
|
36
|
+
`},f.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),a(),h}function fD(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 Cu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ll(e,t,n){const r=Ws(e),o=Ws(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zT.peek=dD;function zT(e,t,n,r){const o=fD(n),u=n.enter("emphasis"),a=n.createTracker(r),c=a.move(o);let f=a.move(n.containerPhrasing(e,U({after:o,before:c},a.current())));const h=f.charCodeAt(0),m=Ll(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Cu(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Ll(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Cu(E));const T=a.move(o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function dD(e,t,n){return n.options.emphasis||"*"}function hD(e,t){let n=!1;return xl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,eh}),!!((!e.depth||e.depth<3)&&$d(e)&&(t.options.setext||n))}function pD(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(hD(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,ye(U({},u.current()),{before:`
|
|
37
37
|
`,after:`
|
|
38
38
|
`}));return E(),m(),b+`
|
|
39
39
|
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
40
40
|
`))+1))}const a="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");u.move(a+" ");let h=n.containerPhrasing(e,U({before:"# ",after:`
|
|
41
|
-
`},u.current()));return/^[\t ]/.test(h)&&(h=
|
|
42
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:a,tableCell:f,tableRow:c}};function a(T,_,S,C){return h(m(T,S,C),T.align)}function c(T,_,S,C){const k=E(T,S,C),
|
|
43
|
-
`))}function f(T,_,S,C){const k=S.enter("tableCell"),F=S.enter("phrasing"),D=S.containerPhrasing(T,be(U({},C),{before:u,after:u}));return F(),k(),D}function h(T,_){return Q4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,S){const C=T.children;let k=-1;const F=[],D=_.enter("table");for(;++k<C.length;)F[k]=E(C[k],_,S);return D(),F}function E(T,_,S){const C=T.children;let k=-1;const F=[],D=_.enter("tableRow");for(;++k<C.length;)F[k]=f(C[k],T,_,S);return D(),F}function b(T,_,S){let C=KT.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function FD(){return{exit:{taskListCheckValueChecked:XT,taskListCheckValueUnchecked:XT,paragraph:UD}}}function BD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HD}}}function XT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function UD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let u=-1,a;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){a=c;break}}a===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 HD(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(a);let f=KT.listItem(e,t,n,U(U({},r),c.current()));return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+a}}function zD(){return[T4(),H4(),V4(),OD(),FD()]}function jD(e){return{extensions:[b4(),z4(e),q4(),MD(e),BD()]}}const $D={tokenize:KD,partial:!0},JT={tokenize:QD,partial:!0},ZT={tokenize:XD,partial:!0},eb={tokenize:JD,partial:!0},VD={tokenize:ZD,partial:!0},tb={name:"wwwAutolink",tokenize:WD,previous:rb},nb={name:"protocolAutolink",tokenize:GD,previous:ib},Wr={name:"emailAutolink",tokenize:YD,previous:sb},Nr={};function qD(){return{text:Nr}}let Xi=48;for(;Xi<123;)Nr[Xi]=Wr,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);Nr[43]=Wr,Nr[45]=Wr,Nr[46]=Wr,Nr[95]=Wr,Nr[72]=[Wr,nb],Nr[104]=[Wr,nb],Nr[87]=[Wr,tb],Nr[119]=[Wr,tb];function YD(e,t,n){const r=this;let o,u;return a;function a(E){return!Lh(E)||!sb.call(r,r.previous)||Dh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Lh(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(VD,m,h)(E):E===45||E===95||nn(E)?(u=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),o=!0,f}function m(E){return u&&o&&dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function WD(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!rb.call(r,r.previous)||Dh(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($D,e.attempt(JT,e.attempt(ZT,u),n),n)(a))}function u(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function GD(e,t,n){const r=this;let o="",u=!1;return a;function a(E){return(E===72||E===104)&&ib.call(r,r.previous)&&!Dh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(dn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?h:(u=!0,f)):n(E)}function h(E){return E===null||cl(E)||ot(E)||Yi(E)||fl(E)?n(E):e.attempt(JT,e.attempt(ZT,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function KD(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),u):n(a)}function u(a){return a===null?n(a):t(a)}}function QD(e,t,n){let r,o,u;return a;function a(h){return h===46||h===95?e.check(eb,f,c)(h):h===null||ot(h)||Yi(h)||h!==45&&fl(h)?f(h):(u=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),a}function f(h){return o||r||!u?n(h):t(h)}}function XD(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?u(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(eb,t,u)(a):a===null||ot(a)||Yi(a)?t(a):(e.consume(a),o)}function u(a){return a===41&&r++,e.consume(a),o}}function JD(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),u):c===93?(e.consume(c),o):c===60||c===null||ot(c)||Yi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ot(c)||Yi(c)?t(c):r(c)}function u(c){return dn(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):dn(c)?(e.consume(c),a):n(c)}}function ZD(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return nn(u)?n(u):t(u)}}function rb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ot(e)}function ib(e){return!dn(e)}function sb(e){return!(e===47||Lh(e))}function Lh(e){return e===43||e===45||e===46||e===95||nn(e)}function Dh(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 e5={tokenize:a5,partial:!0};function t5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:s5,continuation:{tokenize:o5},exit:u5}},text:{91:{name:"gfmFootnoteCall",tokenize:i5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:n5,resolveTo:r5}}}}function n5(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=ar(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function r5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function i5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,a;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(u>999||E===93&&!a||E===null||E===91||ot(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ot(E)||(a=!0),u++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),u++,h):h(E)}}function s5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,a=0,c;return f;function f(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(_)}function m(_){if(a>999||_===93&&!c||_===null||_===91||ot(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=ar(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ot(_)||(c=!0),a++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),a++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(u)||o.push(u),Je(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function o5(e,t,n){return e.check(su,t,e.attempt(e5,t,n))}function u5(e){e.exit("gfmFootnoteDefinition")}function a5(e,t,n){const r=this;return Je(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):n(u)}}function l5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},E={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Rn(b,b.length,0,dl(T,a.slice(h+1,f),c)),Rn(b,b.length,0,[["exit",E,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",m,c]]),Rn(a,h-1,f-h+3,b),f=h+b.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function u(a,c,f){const h=this.previous,m=this.events;let E=0;return b;function b(_){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(_):(a.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const S=qs(h);if(_===126)return E>1?f(_):(a.consume(_),E++,T);if(E<2&&!n)return f(_);const C=a.exit("strikethroughSequenceTemporary"),k=qs(_);return C._open=!k||k===2&&!!S,C._close=!S||S===2&&!!k,c(_)}}}class c5{constructor(){this.map=[]}add(t,n,r){f5(this,t,n,r)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const u of o)t.push(u);o=r.pop()}this.map.length=0}}function f5(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function d5(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function h5(){return{flow:{null:{name:"table",tokenize:p5,resolveAll:m5}}}}function p5(e,t,n){const r=this;let o=0,u=0,a;return c;function c(H){let fe=r.events.length-1;for(;fe>-1;){const de=r.events[fe][1].type;if(de==="lineEnding"||de==="linePrefix")fe--;else break}const ae=fe>-1?r.events[fe][1].type:null,le=ae==="tableHead"||ae==="tableRow"?B:f;return le===B&&r.parser.lazy[r.now().line]?n(H):le(H)}function f(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(a=!0,u+=1),m(H)}function m(H){return H===null?n(H):Re(H)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),T):n(H):Ke(H)?Je(e,m,"whitespace")(H):(u+=1,a&&(a=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||ot(H)?(e.exit("data"),m(H)):(e.consume(H),H===92?b:E)}function b(H){return H===92||H===124?(e.consume(H),E):E(H)}function T(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),a=!1,Ke(H)?Je(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?C(H):H===124?(a=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),S):X(H)}function S(H){return Ke(H)?Je(e,C,"whitespace")(H):C(H)}function C(H){return H===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),k):H===45?(u+=1,k(H)):H===null||Re(H)?z(H):X(H)}function k(H){return H===45?(e.enter("tableDelimiterFiller"),F(H)):X(H)}function F(H){return H===45?(e.consume(H),F):H===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(H))}function D(H){return Ke(H)?Je(e,z,"whitespace")(H):z(H)}function z(H){return H===124?_(H):H===null||Re(H)?!a||o!==u?X(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):X(H)}function X(H){return n(H)}function B(H){return e.enter("tableRow"),te(H)}function te(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),te):H===null||Re(H)?(e.exit("tableRow"),t(H)):Ke(H)?Je(e,te,"whitespace")(H):(e.enter("data"),Te(H))}function Te(H){return H===null||H===124||ot(H)?(e.exit("data"),te(H)):(e.consume(H),H===92?Se:Te)}function Se(H){return H===92||H===124?(e.consume(H),Te):Te(H)}}function m5(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,m,E;const b=new c5;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,f!==0&&(ob(b,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",h,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,u=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(u[1]!==0&&(a[0]=a[1],E=Rl(b,t,u,o,void 0,E),u=[0,0,0,0]),a[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(a[0]=a[1],E=Rl(b,t,u,o,void 0,E)),u=a,a=[u[1],n,0,0])):_.type==="tableHead"?(c=!0,f=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=n,u[1]!==0?(a[0]=a[1],E=Rl(b,t,u,o,n,E)):a[1]!==0&&(E=Rl(b,t,a,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&ob(b,t,f,h,m),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=d5(t.events,n))}return e}function Rl(e,t,n,r,o,u){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},to(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=to(t.events,n[1]);if(u={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=to(t.events,n[2]),m=to(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,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",E,t]])}return o!==void 0&&(u.end=Object.assign({},to(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function ob(e,t,n,r,o){const u=[],a=to(t.events,n);o&&(o.end=Object.assign({},a),u.push(["exit",o,t])),r.end=Object.assign({},a),u.push(["exit",r,t]),e.add(n+1,0,u)}function to(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const g5={name:"tasklistCheck",tokenize:y5};function E5(){return{text:{91:g5}}}function y5(e,t,n){const r=this;return o;function o(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return ot(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Re(f)?t(f):Ke(f)?e.check({tokenize:T5},t,n)(f):n(f)}}function T5(e,t,n){return Je(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function b5(e){return OE([qD(),t5(),l5(e),h5(),E5()])}const _5={};function x5(e){const t=this,n=e||_5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(b5(n)),u.push(zD()),a.push(jD(n))}const Ll=()=>I.jsx("span",{className:`${ee}-blinking-cursor`,children:I.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),ub=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=si(),o=n&&r((t==null?void 0:t.eventSourceId)||"")&&t.name==="partial_inquiry";return I.jsx(zP,{remarkPlugins:[x5],rehypePlugins:[h4],components:{h1:({children:u})=>I.jsx("h1",{className:se(e,`${ee}-header h1`),children:u}),h2:({children:u})=>I.jsx("h2",{className:se(e,`${ee}-header h2`),children:u}),h3:({children:u})=>I.jsx("h3",{className:se(e,`${ee}-header h3`),children:u}),ul:({children:u})=>I.jsx("ul",{className:se(e,`${ee}-ul`),children:u}),ol:({children:u})=>I.jsx("ol",{className:se(e,`${ee}-ol`),children:u}),li:({children:u})=>I.jsx("li",{className:se(e,`${ee}-li`),children:u}),a:({href:u,children:a})=>I.jsx("a",be(U({className:se(e,`${ee}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:a})),table:({children:u})=>I.jsx("table",{className:se(e,`${ee}-table`),children:u}),thead:({children:u})=>I.jsx("thead",{className:se(e,`${ee}-thead`),children:u}),tbody:({children:u})=>I.jsx("tbody",{className:se(e,`${ee}-tbody`),children:u}),tr:({children:u})=>I.jsx("tr",{className:se(e,`${ee}-tr`),children:u}),th:({children:u})=>I.jsx("th",{className:se(e,`${ee}-th`),children:u}),td:({children:u})=>I.jsx("td",{className:se(e,`${ee}-td`),children:u}),span:({className:u,children:a})=>u===`${ee}-blinking-cursor`?I.jsx(Ll,{}):I.jsx("span",{children:a})},children:t.message+(o?`<span className='${ee}-blinking-cursor'></span>`:"")})},S5=({globalClassName:e,message:t})=>{const[n,r]=W.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,a=!!o,c=()=>{r(f=>!f)};return I.jsxs("div",{children:[I.jsxs("div",{className:se(e,`${ee}-progress-message`,"standalone"),children:[I.jsx("span",{className:se(e,`${ee}-message-icon`,"progress-icon","standalone"),children:I.jsx(Og,{})}),I.jsx("p",{className:se(e,`${ee}-progress-text`,"standalone"),children:t.message})]}),(u||a)&&I.jsxs(I.Fragment,{children:[I.jsx(Vf,{className:se(e,`${ee}-thought-context-button`),onClick:c,children:n?I.jsxs(I.Fragment,{children:["Hide ",I.jsx(nA,{})]}):I.jsxs(I.Fragment,{children:["Context ",I.jsx(rA,{})]})}),n&&I.jsx("div",{className:se(e,`${ee}-thought-container`),children:u&&I.jsx("p",{className:se(e,`${ee}-progress-thought`),children:t.thought})})]})]})},w5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?I.jsx(S5,{globalClassName:e,message:t}):I.jsxs("div",{className:se(e,`${ee}-progress-message`,"embedded"),title:t.message,children:[I.jsx("span",{className:se(e,`${ee}-message-icon`,"progress-icon","embedded"),children:I.jsx(Og,{})}),I.jsx("i",{className:se(e,`${ee}-progress-text`,"embedded"),children:t.message})]}),C5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o,u;const r=((o=t.searchParams)==null?void 0:o.query)||((u=t.browseParams)==null?void 0:u.categoryId);return I.jsxs("div",{className:se(e,`${ee}-refined-event`,{embedded:!n,standalone:n}),children:[I.jsxs("div",{className:se(e,`${ee}-refined-event-query`,{embedded:!n,standalone:n}),children:[I.jsx("span",{className:se(e,`${ee}-message-icon`,`${ee}-refined-event-icon`,{embedded:!n,standalone:n}),children:I.jsx(Ua,{})}),I.jsx("p",{className:se(e,`${ee}-text`,"bold"),children:r})]}),I.jsx(ub,{message:t})]})},ab=e=>{var f,h;const{configModule:t}=rr(),n=((f=e.request)==null?void 0:f.searchParams)||((h=e.request)==null?void 0:h.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},u=Object.fromEntries(Object.entries(o).filter(([m])=>!r.includes(m))),a=Object.keys(u),c=Object.values(u).reduce((m,E)=>m+E.length,0);return{facetFiltersList:a,filterCount:c}},Dl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>I.jsx("span",{className:se(t,`${ee}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),lb=({globalClassName:e,message:t,facetFiltersList:n})=>{var u,a;if(!n.length)return null;const r=((u=t.request)==null?void 0:u.searchParams)||((a=t.request)==null?void 0:a.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var h;const f=((h=o[c])==null?void 0:h.join(", "))||"";return I.jsxs("div",{className:se(e,`${ee}-facets`),children:[I.jsx("p",{className:se(e,`${ee}-facet-category`),children:c}),I.jsx("p",{className:se(e,`${ee}-facet-values`),children:f})]},c)})},A5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,a;const{facetFiltersList:r,filterCount:o}=ab(t);return n?I.jsxs("div",{children:[I.jsxs("div",{className:se(e,`${ee}-user-message standalone`),children:[I.jsx("span",{className:se(e,`${ee}-message-icon user-message-icon standalone`),children:I.jsx(Ig,{})}),I.jsx("p",{className:se(e,`${ee}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&I.jsx(Dl,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),I.jsx(lb,{globalClassName:e,facetFiltersList:r,message:t})]}):I.jsxs("div",{className:se(e,`${ee}-user-message embedded`),children:[I.jsx("span",{className:se(e,`${ee}-message-icon user-message-icon embedded`),children:I.jsx(Ig,{})}),I.jsx("p",{children:(a=t.request)==null?void 0:a.userPrompt}),r.length>0&&I.jsx(Dl,{isWidgetStandalone:!1,filterCount:o})]})},v5=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>I.jsxs("div",{className:se(e,`${ee}-user-search standalone`),children:[I.jsxs("div",{className:se(e,`${ee}-user-search-query`),children:[I.jsx("span",{className:se(e,`${ee}-message-icon user-search-icon standalone`),children:I.jsx(Ua,{})}),I.jsx("p",{className:se(e,`${ee}-text bold`),children:`${t}: ${n}`}),o.length>0&&I.jsx(Dl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),I.jsx(lb,{globalClassName:e,facetFiltersList:o,message:r})]}),k5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=ab(t),{actionLabel:u,query:a}=W.useMemo(()=>{var f,h,m,E;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(f=t.request)==null?void 0:f.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(m=(h=t.request)==null?void 0:h.browseParams)==null?void 0:m.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(E=t.request)==null?void 0:E.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!a?null:n?I.jsx(v5,{globalClassName:e,message:t,actionLabel:u,query:a,facetFiltersList:r,filterCount:o}):I.jsxs("div",{className:se(e,`${ee}-user-search embedded`),children:[I.jsx("span",{className:se(e,`${ee}-message-icon user-search-icon embedded`),children:I.jsx(Ua,{})}),I.jsx("p",{children:a}),r.length>0&&I.jsx(Dl,{isWidgetStandalone:!1,filterCount:o})]})},cb=["copilot_search","copilot_browse","product_view"],fb=({message:e,globalClassName:t,resetConversationMessage:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var a;if(!e)return null;let u=e.name;if(cb.includes(u)&&(e.isInitial||e.isUserAction)&&(u="faceted_navigation"),cb.includes(u)&&!((a=e.request)!=null&&a.userPrompt))return null;switch(u){case"copilot_search":case"copilot_browse":case"product_view":return I.jsx(A5,{globalClassName:t,isWidgetStandalone:r,message:e});case"faceted_navigation":return I.jsx(k5,{globalClassName:t,message:e,isWidgetStandalone:r});case"refined_search":case"refined_browse":return I.jsx(C5,{globalClassName:t,message:e,isWidgetStandalone:r});case"follow_up":return I.jsx($N,{globalClassName:t,isWidgetStandalone:r,message:e,handleSuggestionClick:o});case"inquiry":case"partial_inquiry":return I.jsx(ub,{globalClassName:t,message:e});case"error":return I.jsx(HN,{message:e,isWidgetStandalone:r});case"display_products":return I.jsx(UN,{message:e,isWidgetStandalone:r});case"progress":return I.jsx(w5,{globalClassName:t,isWidgetStandalone:r,message:e});case"conversation_reset":return I.jsxs(I.Fragment,{children:[I.jsx("p",{className:se(t,`${ee}-reset-message`),children:"This conversation has been reset."}),I.jsx("p",{className:se(t,`${ee}-start-search-message`),children:n})]});default:return null}},Mh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,resetConversationMessage:o}=rr();return t.map(u=>u.messages&&u.type==="group"?I.jsx("div",{className:se(r,`${ee}-message-group`,e?"standalone":"embedded"),children:u.messages.length>0&&u.messages.map(a=>I.jsx("div",{className:`${ee}-message-group-child`,children:I.jsx(fb,{id:a.id,globalClassName:r,isWidgetStandalone:e,message:a,resetConversationMessage:o,handleSuggestionClick:n})},a.id))},`group-${u.eventSourceId}`):u.type==="individual"&&u.message?I.jsx("div",{className:se(r,`${ee}-message`,e?"standalone":"embedded",{error:u.message.name.includes("error")}),children:I.jsx(fb,{id:u.message.id,globalClassName:r,isWidgetStandalone:e,message:u.message,resetConversationMessage:o,handleSuggestionClick:n})},u.message.id):null)},db=()=>{const{globalClassName:e,themeVariables:t}=rr(),{status:n}=jo(),{copilot:r,messages:o,groupedMessages:u,isLoading:a,handleUserInput:c,handleSuggestion:f}=si(),{isOpen:h}=n||{},m=W.useRef(null);return W.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:I.jsxs("div",{className:se(e,`${ee}-container`,`${ee}-embedded-chat`),style:t,children:[I.jsxs("div",{className:se(e,`${ee}-message-container`,"embedded"),children:[I.jsx(Mh,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:f}),a&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(Ll,{})}),I.jsx("div",{ref:m})]}),I.jsx(qf,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:c}),I.jsx("div",{className:se(`${ee}-embedded-chat-menu`),children:I.jsx(Nd,{componentType:"chat",children:I.jsx(Z1,{componentType:"chat"})})})]}):I.jsx("div",{children:"Loading Copilot..."})},[N5,O5]=Os({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),I5=e=>i1()(e,["lazyMount","unmountOnExit"]),[P5,wu]=Os({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),hb=W.forwardRef((e,t)=>{const n=wu(),r=O5(),o=fd(be(U({},r),{present:n.open})),u=sr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:I.jsx(oi.div,be(U({},u),{ref:Qa(o.ref,t)}))});hb.displayName="DialogBackdrop";const Fh=W.forwardRef((e,t)=>{const n=wu(),r=Yo(),o=sr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:I.jsx(oi.div,be(U({},o),{ref:Qa(r.ref,t)}))});Fh.displayName="DialogContent";const Bh=W.forwardRef((e,t)=>{const n=wu(),r=sr(n.getDescriptionProps(),e);return I.jsx(oi.div,be(U({},r),{ref:t}))});Bh.displayName="DialogDescription";const Uh=W.forwardRef((e,t)=>{const n=wu(),r=sr(n.getPositionerProps(),e);return Yo().unmounted?null:I.jsx(oi.div,be(U({},r),{ref:t}))});Uh.displayName="DialogPositioner";var R5=Is("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ji=R5.build(),pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Ml=e=>e.getById(Hh(e)),L5=e=>e.getById(pb(e)),D5=e=>e.getById(mb(e)),M5=e=>e.getById(gb(e)),F5=e=>e.getById(zh(e)),B5=e=>e.getById(jh(e)),U5=e=>e.getById(Eb(e));function H5(e,t){const{state:n,send:r,context:o,prop:u,scope:a}=e,c=u("aria-label"),f=n.matches("open");return{open:f,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(be(U({},Ji.trigger.attrs),{dir:u("dir"),id:gb(a),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Hh(a),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(be(U({},Ji.backdrop.attrs),{dir:u("dir"),hidden:!f,id:mb(a),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(be(U({},Ji.positioner.attrs),{dir:u("dir"),id:pb(a),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(be(U({},Ji.content.attrs),{dir:u("dir"),role:u("role"),hidden:!f,id:Hh(a),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:zh(a),"aria-describedby":h.description?jh(a):void 0}))},getTitleProps(){return t.element(be(U({},Ji.title.attrs),{dir:u("dir"),id:zh(a)}))},getDescriptionProps(){return t.element(be(U({},Ji.description.attrs),{dir:u("dir"),id:jh(a)}))},getCloseTriggerProps(){return t.button(be(U({},Ji.closeTrigger.attrs),{dir:u("dir"),id:Eb(a),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var z5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>U5(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return B1(()=>Ml(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[M5(e)],onInteractOutside(o){var u;(u=n("onInteractOutside"))==null||u(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var u;(u=n("onEscapeKeyDown"))==null||u(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return $1(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?z1(()=>Ml(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,u;return(u=(o=t("finalFocusEl"))==null?void 0:o())!=null?u:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?N1(()=>[Ml(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Tn(()=>{e.set("rendered",{title:!!F5(t),description:!!B5(t)})})},syncZIndex({scope:e}){Tn(()=>{const t=Ml(e);if(!t)return;const n=qa(t);[L5(e),D5(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ud()(["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 j5=e=>{const t=W.useId(),{getRootNode:n}=kd(),{dir:r}=K1(),o=U({id:t,getRootNode:n,dir:r},e),u=ad(z5,o);return H5(u,e1)},yb=e=>{const[t,c]=s1(e),f=c,{children:n}=f,r=Gt(f,["children"]),[o]=I5(t),u=j5(r),a=fd(sr({present:u.open},t));return I.jsx(P5,{value:u,children:I.jsx(N5,{value:o,children:I.jsx(t1,{value:a,children:n})})})},$h=W.forwardRef((e,t)=>{const n=wu(),r=sr(n.getTitleProps(),e);return I.jsx(oi.h2,be(U({},r),{ref:t}))});$h.displayName="DialogTitle";const Tb=e=>{var f;const{children:t,disabled:n}=e,[r,o]=W.useState((f=e.container)==null?void 0:f.current),u=W.useSyncExternalStore(V5,()=>!1,()=>!0),{getRootNode:a}=kd();if(W.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),u||n)return I.jsx(I.Fragment,{children:t});const c=r!=null?r:$5(a);return I.jsx(I.Fragment,{children:W.Children.map(t,h=>Ga.createPortal(h,c))})},$5=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ji(n)?n:br(t).body},V5=()=>()=>{},q5=()=>{const{dialogPosition:e}=jo(),t=e==="bottom-left",n=()=>{yg(t?"bottom-right":"bottom-left")},r=t?RN:PN,o=t?"Move right":"Move left";return I.jsxs("button",{className:se(`${ee}-overflow-menu-button`,"left-right-toggle-button","dialog"),onClick:n,children:[I.jsx(r,{}),o]})},bb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=rr(),{mode:o,status:u,dialogPosition:a}=jo(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=si(),T=W.useRef(null),{isOpen:_}=u||{},S=o==="standalone";W.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{Ma(!1)};return!_||h.length===0?null:c?I.jsx(yb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:I.jsx(Tb,{children:I.jsx(Uh,{className:se(n,`${ee}-container`,`${ee}-dialog`,a),style:r,children:I.jsxs(Fh,{className:se(n,`${ee}-dialog-content`,{standalone:S,embedded:!S}),children:[I.jsxs("div",{className:se(n,`${ee}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&I.jsx("img",{alt:"",role:"img",className:se(n,`${ee}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),I.jsx($h,{className:se(n,`${ee}-dialog-title`,{standalone:S,embedded:!S}),children:t}),I.jsxs("div",{className:se(n,`${ee}-dialog-controls`),children:[I.jsx(Z1,{componentType:"dialog",isIcon:!0}),I.jsx(Nd,{componentType:"dialog",children:I.jsx(q5,{})}),I.jsx(J1,{className:`dialog ${n}`,onClick:C})]})]}),I.jsxs(Bh,{className:se(n,`${ee}-message-container`,{standalone:S,embedded:!S}),children:[I.jsx(Mh,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(Ll,{})}),I.jsx("div",{ref:T})]}),I.jsx(qf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):I.jsx("div",{children:"Loading Copilot..."})},_b=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=rr(),{mode:o,status:u,isModalFullscreen:a,previousComponentType:c}=jo(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=si(),_=W.useRef(null),{isOpen:S}=u||{},C=o==="standalone";W.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const k=({open:X})=>{Ma(X)},F=()=>{Eg(!a)},D=()=>{jf(c||"dialog")},z=()=>{Ma(!1)};return!S||m.length===0?null:f?I.jsx(yb,{lazyMount:!0,open:S,onOpenChange:k,children:I.jsx(Tb,{children:I.jsxs("div",{className:se(n,`${ee}-modal-container`),style:r,children:[I.jsx(hb,{className:se(n,`${ee}-modal-backdrop`)}),I.jsx(Uh,{className:se(n,`${ee}-container`,`${ee}-modal`,{fullscreen:a,standalone:C,embedded:!C}),children:I.jsxs(Fh,{className:se(n,`${ee}-modal-content`,{standalone:C,embedded:!C}),children:[I.jsxs("div",{className:se(n,`${ee}-modal-header`,{standalone:C,embedded:!C}),children:[e&&I.jsx("img",{alt:"",role:"img",className:se(n,`${ee}-modal-logo`,{standalone:C,embedded:!C}),src:e}),I.jsx($h,{className:se(n,`${ee}-modal-title`,{standalone:C,embedded:!C}),children:t}),I.jsxs("div",{className:se(n,`${ee}-modal-controls`),children:[I.jsx(Ha,{ariaLabel:"Toggle Fullscreen",className:se(n,`${ee}-modal-fullscreen-button`),icon:a?I.jsx(iA,{}):I.jsx(sA,{}),onClick:F}),I.jsx(Ha,{ariaLabel:"Toggle Dialog",className:se(n,`${ee}-modal-toggle-dialog-button`),onClick:D,icon:I.jsx(FN,{})}),I.jsx(Nd,{componentType:"modal"}),I.jsx(J1,{className:`modal ${n}`,onClick:z})]})]}),I.jsxs(Bh,{className:se(n,`${ee}-message-container`,{standalone:C,embedded:!C}),children:[I.jsx(Mh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:I.jsx(Ll,{})}),I.jsx("div",{ref:_})]}),I.jsx(qf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):I.jsx("div",{children:"Loading Copilot..."})},Y5=()=>{const e=jo(),{status:{type:t}}=e||{status:{}};return t==="dialog"?I.jsx(bb,{}):t==="modal"?I.jsx(_b,{}):I.jsx(db,{})},Vh=e=>I.jsx(wg,be(U({},e),{children:I.jsx(Y5,{})}));var Fl={},xb;function W5(){if(xb)return Fl;xb=1;var e=Qg();return Fl.createRoot=e.createRoot,Fl.hydrateRoot=e.hydrateRoot,Fl}var Sb=W5();const G5=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=Gt(o,["elementId","timeout"]);let u;const a=(f,h)=>{var m;for(const E of f)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(xs(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(u),(m=Sb.createRoot(b))==null||m.render(I.jsx(Vh,U({},n))))},c=new MutationObserver(a);return c.observe(document.body,{childList:!0,subtree:!0}),u=setTimeout(()=>{c.disconnect(),xs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},K5=r=>{var o=r,{timeout:e,elementId:t}=o,n=Gt(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){xs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const u=document.getElementById(t);if(!u){xs(!0,"warn","Container element not found for id:",t),xs(!0,"warn","Beginning observation for element"),G5(U({elementId:t,timeout:e},n));return}Sb.createRoot(u).render(I.jsx(Vh,U({},n)))},Q5={search:kC,browse:NC,pdp:{setPdpContext:IC,updatePdpProductId:PC,updatePdpLink:RC},components:{toggleWidgetOpen:Ma,toggleModalFullscreen:Eg,setWidgetType:jf,setWidgetDialogPosition:yg},session:LC};Oe.CopilotDialog=bb,Oe.CopilotEmbed=db,Oe.CopilotModal=_b,Oe.CopilotWidget=Vh,Oe.WidgetProvider=wg,Oe.eventHandlers=Q5,Oe.injectCopilotWidget=K5,Oe.useCopilot=si,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
|
|
41
|
+
`},u.current()));return/^[\t ]/.test(h)&&(h=Cu(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}jT.peek=mD;function jT(e){return e.value||""}function mD(){return"<"}$T.peek=gD;function $T(e,t,n,r){const o=Rh(n),u=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("![");return h+=f.move(n.safe(e.alt,U({before:h,after:"]"},f.current()))),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,U({before:h,after:">"},f.current()))),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},f.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),h+=f.move(")"),a(),h}function gD(){return"!"}VT.peek=ED;function VT(e,t,n,r){const o=e.referenceType,u=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const h=n.safe(e.alt,U({before:f,after:"]"},c.current()));f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return a(),n.stack=m,u(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function ED(){return"!"}qT.peek=yD;function qT(e,t,n){let r=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<n.unsafe.length;){const a=n.unsafe[u],c=n.compilePattern(a);let f;if(a.atBreak)for(;f=c.exec(r);){let h=f.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(f.index+1)}}return o+r+o}function yD(){return"`"}function YT(e,t){const n=$d(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))}WT.peek=TD;function WT(e,t,n,r){const o=Rh(n),u=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,f;if(YT(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=a.move("<");return E+=a.move(n.containerPhrasing(e,U({before:E,after:">"},a.current()))),E+=a.move(">"),c(),n.stack=m,E}c=n.enter("link"),f=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,U({before:h,after:"]("},a.current()))),h+=a.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,U({before:h,after:">"},a.current()))),h+=a.move(">")):(f=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},a.current())))),f(),e.title&&(f=n.enter(`title${u}`),h+=a.move(" "+o),h+=a.move(n.safe(e.title,U({before:h,after:o},a.current()))),h+=a.move(o),f()),h+=a.move(")"),c(),h}function TD(e,t,n){return YT(e,n)?"<":"["}GT.peek=bD;function GT(e,t,n,r){const o=e.referenceType,u=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const h=n.containerPhrasing(e,U({before:f,after:"]"},c.current()));f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return a(),n.stack=m,u(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function bD(){return"["}function Lh(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 _D(e){const t=Lh(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 xD(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 KT(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 SD(e,t,n,r){const o=n.enter("list"),u=n.bulletCurrent;let a=e.ordered?xD(n):Lh(n);const c=e.ordered?a==="."?")":".":_D(n);let f=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.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&&(f=!0),KT(n)===a&&m){let E=-1;for(;++E<e.children.length;){const b=e.children[E];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=u,o(),h}function wD(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 CD(e,t,n,r){const o=wD(n);let u=n.bulletCurrent||Lh(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let a=u.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(u+" ".repeat(a-u.length)),c.shift(a);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return f(),h;function m(E,b,T){return b?(T?"":" ".repeat(a))+E:(T?u:u+" ".repeat(a-u.length))+E}}function AD(e,t,n,r){const o=n.enter("paragraph"),u=n.enter("phrasing"),a=n.containerPhrasing(e,r);return u(),o(),a}const vD=bl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kD(e,t,n,r){return(e.children.some(function(a){return vD(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ND(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}QT.peek=OD;function QT(e,t,n,r){const o=ND(n),u=n.enter("strong"),a=n.createTracker(r),c=a.move(o+o);let f=a.move(n.containerPhrasing(e,U({after:o,before:c},a.current())));const h=f.charCodeAt(0),m=Ll(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Cu(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Ll(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Cu(E));const T=a.move(o+o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function OD(e,t,n){return n.options.strong||"*"}function ID(e,t,n,r){return n.safe(e.value,r)}function PD(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 RD(e,t,n){const r=(KT(n)+(n.options.ruleSpaces?" ":"")).repeat(PD(n));return n.options.ruleSpaces?r.slice(0,-1):r}const XT={blockquote:nD,break:HT,code:aD,definition:cD,emphasis:zT,hardBreak:HT,heading:pD,html:jT,image:$T,imageReference:VT,inlineCode:qT,link:WT,linkReference:GT,list:SD,listItem:CD,paragraph:AD,root:kD,strong:QT,text:ID,thematicBreak:RD};function LD(){return{enter:{table:DD,tableData:JT,tableHeader:JT,tableRow:MD},exit:{codeText:BD,table:FD,tableData:Dh,tableHeader:Dh,tableRow:Dh}}}function DD(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 FD(e){this.exit(e),this.data.inTable=void 0}function MD(e){this.enter({type:"tableRow",children:[]},e)}function Dh(e){this.exit(e)}function JT(e){this.enter({type:"tableCell",children:[]},e)}function BD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,UD));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function UD(e,t){return t==="|"?t:e}function HD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
42
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:a,tableCell:f,tableRow:c}};function a(T,_,S,C){return h(m(T,S,C),T.align)}function c(T,_,S,C){const k=E(T,S,C),M=h([k]);return M.slice(0,M.indexOf(`
|
|
43
|
+
`))}function f(T,_,S,C){const k=S.enter("tableCell"),M=S.enter("phrasing"),D=S.containerPhrasing(T,ye(U({},C),{before:u,after:u}));return M(),k(),D}function h(T,_){return eD(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,S){const C=T.children;let k=-1;const M=[],D=_.enter("table");for(;++k<C.length;)M[k]=E(C[k],_,S);return D(),M}function E(T,_,S){const C=T.children;let k=-1;const M=[],D=_.enter("tableRow");for(;++k<C.length;)M[k]=f(C[k],T,_,S);return D(),M}function b(T,_,S){let C=XT.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function zD(){return{exit:{taskListCheckValueChecked:ZT,taskListCheckValueUnchecked:ZT,paragraph:$D}}}function jD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VD}}}function ZT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $D(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let u=-1,a;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){a=c;break}}a===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 VD(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(a);let f=XT.listItem(e,t,n,U(U({},r),c.current()));return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+a}}function qD(){return[S4(),V4(),G4(),LD(),zD()]}function YD(e){return{extensions:[w4(),q4(e),K4(),HD(e),jD()]}}const WD={tokenize:ZD,partial:!0},eb={tokenize:e5,partial:!0},tb={tokenize:t5,partial:!0},nb={tokenize:n5,partial:!0},GD={tokenize:r5,partial:!0},rb={name:"wwwAutolink",tokenize:XD,previous:sb},ib={name:"protocolAutolink",tokenize:JD,previous:ob},Xr={name:"emailAutolink",tokenize:QD,previous:ub},Pr={};function KD(){return{text:Pr}}let Zi=48;for(;Zi<123;)Pr[Zi]=Xr,Zi++,Zi===58?Zi=65:Zi===91&&(Zi=97);Pr[43]=Xr,Pr[45]=Xr,Pr[46]=Xr,Pr[95]=Xr,Pr[72]=[Xr,ib],Pr[104]=[Xr,ib],Pr[87]=[Xr,rb],Pr[119]=[Xr,rb];function QD(e,t,n){const r=this;let o,u;return a;function a(E){return!Fh(E)||!ub.call(r,r.previous)||Mh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Fh(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(GD,m,h)(E):E===45||E===95||sn(E)?(u=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),o=!0,f}function m(E){return u&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function XD(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!sb.call(r,r.previous)||Mh(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(WD,e.attempt(eb,e.attempt(tb,u),n),n)(a))}function u(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function JD(e,t,n){const r=this;let o="",u=!1;return a;function a(E){return(E===72||E===104)&&ob.call(r,r.previous)&&!Mh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?h:(u=!0,f)):n(E)}function h(E){return E===null||dl(E)||ut(E)||Gi(E)||hl(E)?n(E):e.attempt(eb,e.attempt(tb,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function ZD(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),u):n(a)}function u(a){return a===null?n(a):t(a)}}function e5(e,t,n){let r,o,u;return a;function a(h){return h===46||h===95?e.check(nb,f,c)(h):h===null||ut(h)||Gi(h)||h!==45&&hl(h)?f(h):(u=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),a}function f(h){return o||r||!u?n(h):t(h)}}function t5(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?u(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(nb,t,u)(a):a===null||ut(a)||Gi(a)?t(a):(e.consume(a),o)}function u(a){return a===41&&r++,e.consume(a),o}}function n5(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),u):c===93?(e.consume(c),o):c===60||c===null||ut(c)||Gi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ut(c)||Gi(c)?t(c):r(c)}function u(c){return pn(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),a):n(c)}}function r5(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return sn(u)?n(u):t(u)}}function sb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ut(e)}function ob(e){return!pn(e)}function ub(e){return!(e===47||Fh(e))}function Fh(e){return e===43||e===45||e===46||e===95||sn(e)}function Mh(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 i5={tokenize:d5,partial:!0};function s5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l5,continuation:{tokenize:c5},exit:f5}},text:{91:{name:"gfmFootnoteCall",tokenize:a5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:o5,resolveTo:u5}}}}function o5(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=fr(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function u5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function a5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,a;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(u>999||E===93&&!a||E===null||E===91||ut(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(fr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ut(E)||(a=!0),u++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),u++,h):h(E)}}function l5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,a=0,c;return f;function f(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(_)}function m(_){if(a>999||_===93&&!c||_===null||_===91||ut(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=fr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ut(_)||(c=!0),a++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),a++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(u)||o.push(u),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function c5(e,t,n){return e.check(uu,t,e.attempt(i5,t,n))}function f5(e){e.exit("gfmFootnoteDefinition")}function d5(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):n(u)}}function h5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},E={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Dn(b,b.length,0,pl(T,a.slice(h+1,f),c)),Dn(b,b.length,0,[["exit",E,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",m,c]]),Dn(a,h-1,f-h+3,b),f=h+b.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function u(a,c,f){const h=this.previous,m=this.events;let E=0;return b;function b(_){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(_):(a.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const S=Ws(h);if(_===126)return E>1?f(_):(a.consume(_),E++,T);if(E<2&&!n)return f(_);const C=a.exit("strikethroughSequenceTemporary"),k=Ws(_);return C._open=!k||k===2&&!!S,C._close=!S||S===2&&!!k,c(_)}}}class p5{constructor(){this.map=[]}add(t,n,r){m5(this,t,n,r)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const u of o)t.push(u);o=r.pop()}this.map.length=0}}function m5(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function g5(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function E5(){return{flow:{null:{name:"table",tokenize:y5,resolveAll:T5}}}}function y5(e,t,n){const r=this;let o=0,u=0,a;return c;function c(H){let fe=r.events.length-1;for(;fe>-1;){const ie=r.events[fe][1].type;if(ie==="lineEnding"||ie==="linePrefix")fe--;else break}const de=fe>-1?r.events[fe][1].type:null,ue=de==="tableHead"||de==="tableRow"?B:f;return ue===B&&r.parser.lazy[r.now().line]?n(H):ue(H)}function f(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(a=!0,u+=1),m(H)}function m(H){return H===null?n(H):Re(H)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),T):n(H):Ke(H)?Xe(e,m,"whitespace")(H):(u+=1,a&&(a=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||ut(H)?(e.exit("data"),m(H)):(e.consume(H),H===92?b:E)}function b(H){return H===92||H===124?(e.consume(H),E):E(H)}function T(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),a=!1,Ke(H)?Xe(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?C(H):H===124?(a=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),S):q(H)}function S(H){return Ke(H)?Xe(e,C,"whitespace")(H):C(H)}function C(H){return H===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),k):H===45?(u+=1,k(H)):H===null||Re(H)?G(H):q(H)}function k(H){return H===45?(e.enter("tableDelimiterFiller"),M(H)):q(H)}function M(H){return H===45?(e.consume(H),M):H===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(H))}function D(H){return Ke(H)?Xe(e,G,"whitespace")(H):G(H)}function G(H){return H===124?_(H):H===null||Re(H)?!a||o!==u?q(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):q(H)}function q(H){return n(H)}function B(H){return e.enter("tableRow"),te(H)}function te(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),te):H===null||Re(H)?(e.exit("tableRow"),t(H)):Ke(H)?Xe(e,te,"whitespace")(H):(e.enter("data"),Te(H))}function Te(H){return H===null||H===124||ut(H)?(e.exit("data"),te(H)):(e.consume(H),H===92?Se:Te)}function Se(H){return H===92||H===124?(e.consume(H),Te):Te(H)}}function T5(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,m,E;const b=new p5;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,f!==0&&(ab(b,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",h,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,u=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(u[1]!==0&&(a[0]=a[1],E=Dl(b,t,u,o,void 0,E),u=[0,0,0,0]),a[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(a[0]=a[1],E=Dl(b,t,u,o,void 0,E)),u=a,a=[u[1],n,0,0])):_.type==="tableHead"?(c=!0,f=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=n,u[1]!==0?(a[0]=a[1],E=Dl(b,t,u,o,n,E)):a[1]!==0&&(E=Dl(b,t,a,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&ab(b,t,f,h,m),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=g5(t.events,n))}return e}function Dl(e,t,n,r,o,u){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},ro(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=ro(t.events,n[1]);if(u={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=ro(t.events,n[2]),m=ro(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,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",E,t]])}return o!==void 0&&(u.end=Object.assign({},ro(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function ab(e,t,n,r,o){const u=[],a=ro(t.events,n);o&&(o.end=Object.assign({},a),u.push(["exit",o,t])),r.end=Object.assign({},a),u.push(["exit",r,t]),e.add(n+1,0,u)}function ro(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b5={name:"tasklistCheck",tokenize:x5};function _5(){return{text:{91:b5}}}function x5(e,t,n){const r=this;return o;function o(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return ut(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Re(f)?t(f):Ke(f)?e.check({tokenize:S5},t,n)(f):n(f)}}function S5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function w5(e){return PE([KD(),s5(),h5(e),E5(),_5()])}const C5={};function A5(e){const t=this,n=e||C5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(w5(n)),u.push(qD()),a.push(YD(n))}const Fl=()=>I.jsx("span",{className:`${Z}-blinking-cursor`,children:I.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),lb=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=li(),o=n&&r((t==null?void 0:t.eventSourceId)||"")&&t.name==="partial_inquiry";return I.jsx(qP,{remarkPlugins:[A5],rehypePlugins:[E4],components:{h1:({children:u})=>I.jsx("h1",{className:oe(e,`${Z}-header h1`),children:u}),h2:({children:u})=>I.jsx("h2",{className:oe(e,`${Z}-header h2`),children:u}),h3:({children:u})=>I.jsx("h3",{className:oe(e,`${Z}-header h3`),children:u}),ul:({children:u})=>I.jsx("ul",{className:oe(e,`${Z}-ul`),children:u}),ol:({children:u})=>I.jsx("ol",{className:oe(e,`${Z}-ol`),children:u}),li:({children:u})=>I.jsx("li",{className:oe(e,`${Z}-li`),children:u}),a:({href:u,children:a})=>I.jsx("a",ye(U({className:oe(e,`${Z}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:a})),table:({children:u})=>I.jsx("table",{className:oe(e,`${Z}-table`),children:u}),thead:({children:u})=>I.jsx("thead",{className:oe(e,`${Z}-thead`),children:u}),tbody:({children:u})=>I.jsx("tbody",{className:oe(e,`${Z}-tbody`),children:u}),tr:({children:u})=>I.jsx("tr",{className:oe(e,`${Z}-tr`),children:u}),th:({children:u})=>I.jsx("th",{className:oe(e,`${Z}-th`),children:u}),td:({children:u})=>I.jsx("td",{className:oe(e,`${Z}-td`),children:u}),span:({className:u,children:a})=>u===`${Z}-blinking-cursor`?I.jsx(Fl,{}):I.jsx("span",{children:a})},children:t.message+(o?`<span className='${Z}-blinking-cursor'></span>`:"")})},v5=({globalClassName:e,message:t})=>{const[n,r]=W.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,a=!!o,c=()=>{r(f=>!f)};return I.jsxs("div",{children:[I.jsxs("div",{className:oe(e,`${Z}-progress-message`,"standalone"),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon`,"progress-icon","standalone"),children:I.jsx(Pg,{})}),I.jsx("p",{className:oe(e,`${Z}-progress-text`,"standalone"),children:t.message})]}),(u||a)&&I.jsxs(I.Fragment,{children:[I.jsx(Yf,{className:oe(e,`${Z}-thought-context-button`),onClick:c,children:n?I.jsxs(I.Fragment,{children:["Hide ",I.jsx(oA,{})]}):I.jsxs(I.Fragment,{children:["Context ",I.jsx(uA,{})]})}),n&&I.jsx("div",{className:oe(e,`${Z}-thought-container`),children:u&&I.jsx("p",{className:oe(e,`${Z}-progress-thought`),children:t.thought})})]})]})},k5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?I.jsx(v5,{globalClassName:e,message:t}):I.jsxs("div",{className:oe(e,`${Z}-progress-message`,"embedded"),title:t.message,children:[I.jsx("span",{className:oe(e,`${Z}-message-icon`,"progress-icon","embedded"),children:I.jsx(Pg,{})}),I.jsx("i",{className:oe(e,`${Z}-progress-text`,"embedded"),children:t.message})]}),N5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o,u;const r=((o=t.searchParams)==null?void 0:o.query)||((u=t.browseParams)==null?void 0:u.categoryId);return I.jsxs("div",{className:oe(e,`${Z}-refined-event`,{embedded:!n,standalone:n}),children:[I.jsxs("div",{className:oe(e,`${Z}-refined-event-query`,{embedded:!n,standalone:n}),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon`,`${Z}-refined-event-icon`,{embedded:!n,standalone:n}),children:I.jsx(za,{})}),I.jsx("p",{className:oe(e,`${Z}-text`,"bold"),children:r})]}),I.jsx(lb,{message:t})]})},cb=e=>{var f,h;const{configModule:t}=sr(),n=((f=e.request)==null?void 0:f.searchParams)||((h=e.request)==null?void 0:h.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},u=Object.fromEntries(Object.entries(o).filter(([m])=>!r.includes(m))),a=Object.keys(u),c=Object.values(u).reduce((m,E)=>m+E.length,0);return{facetFiltersList:a,filterCount:c}},Ml=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>I.jsx("span",{className:oe(t,`${Z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),fb=({globalClassName:e,message:t,facetFiltersList:n})=>{var u,a;if(!n.length)return null;const r=((u=t.request)==null?void 0:u.searchParams)||((a=t.request)==null?void 0:a.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var h;const f=((h=o[c])==null?void 0:h.join(", "))||"";return I.jsxs("div",{className:oe(e,`${Z}-facets`),children:[I.jsx("p",{className:oe(e,`${Z}-facet-category`),children:c}),I.jsx("p",{className:oe(e,`${Z}-facet-values`),children:f})]},c)})},O5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,a;const{facetFiltersList:r,filterCount:o}=cb(t);return n?I.jsxs("div",{children:[I.jsxs("div",{className:oe(e,`${Z}-user-message standalone`),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon user-message-icon standalone`),children:I.jsx(Rg,{})}),I.jsx("p",{className:oe(e,`${Z}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&I.jsx(Ml,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),I.jsx(fb,{globalClassName:e,facetFiltersList:r,message:t})]}):I.jsxs("div",{className:oe(e,`${Z}-user-message embedded`),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon user-message-icon embedded`),children:I.jsx(Rg,{})}),I.jsx("p",{children:(a=t.request)==null?void 0:a.userPrompt}),r.length>0&&I.jsx(Ml,{isWidgetStandalone:!1,filterCount:o})]})},I5=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>I.jsxs("div",{className:oe(e,`${Z}-user-search standalone`),children:[I.jsxs("div",{className:oe(e,`${Z}-user-search-query`),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon user-search-icon standalone`),children:I.jsx(za,{})}),I.jsx("p",{className:oe(e,`${Z}-text bold`),children:`${t}: ${n}`}),o.length>0&&I.jsx(Ml,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),I.jsx(fb,{globalClassName:e,facetFiltersList:o,message:r})]}),P5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=cb(t),{actionLabel:u,query:a}=W.useMemo(()=>{var f,h,m,E;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(f=t.request)==null?void 0:f.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(m=(h=t.request)==null?void 0:h.browseParams)==null?void 0:m.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(E=t.request)==null?void 0:E.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!a?null:n?I.jsx(I5,{globalClassName:e,message:t,actionLabel:u,query:a,facetFiltersList:r,filterCount:o}):I.jsxs("div",{className:oe(e,`${Z}-user-search embedded`),children:[I.jsx("span",{className:oe(e,`${Z}-message-icon user-search-icon embedded`),children:I.jsx(za,{})}),I.jsx("p",{children:a}),r.length>0&&I.jsx(Ml,{isWidgetStandalone:!1,filterCount:o})]})},db=["copilot_search","copilot_browse","product_view"],hb=({message:e,globalClassName:t,resetConversationMessage:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var a;if(!e)return null;let u=e.name;if(db.includes(u)&&(e.isInitial||e.isUserAction)&&(u="faceted_navigation"),db.includes(u)&&!((a=e.request)!=null&&a.userPrompt))return null;switch(u){case"copilot_search":case"copilot_browse":case"product_view":return I.jsx(O5,{globalClassName:t,isWidgetStandalone:r,message:e});case"faceted_navigation":return I.jsx(P5,{globalClassName:t,message:e,isWidgetStandalone:r});case"refined_search":case"refined_browse":return I.jsx(N5,{globalClassName:t,message:e,isWidgetStandalone:r});case"follow_up":return I.jsx(WN,{globalClassName:t,isWidgetStandalone:r,message:e,handleSuggestionClick:o});case"inquiry":case"partial_inquiry":return I.jsx(lb,{globalClassName:t,message:e});case"error":return I.jsx(VN,{message:e,isWidgetStandalone:r});case"display_products":return I.jsx($N,{message:e,isWidgetStandalone:r});case"progress":return I.jsx(k5,{globalClassName:t,isWidgetStandalone:r,message:e});case"conversation_reset":return I.jsxs(I.Fragment,{children:[I.jsx("p",{className:oe(t,`${Z}-reset-message`),children:"This conversation has been reset."}),I.jsx("p",{className:oe(t,`${Z}-start-search-message`),children:n})]});default:return null}},Bh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,resetConversationMessage:o}=sr();return t.map(u=>u.messages&&u.type==="group"?I.jsx("div",{className:oe(r,`${Z}-message-group`,e?"standalone":"embedded"),children:u.messages.length>0&&u.messages.map(a=>I.jsx("div",{className:`${Z}-message-group-child`,children:I.jsx(hb,{id:a.id,globalClassName:r,isWidgetStandalone:e,message:a,resetConversationMessage:o,handleSuggestionClick:n})},a.id))},`group-${u.eventSourceId}`):u.type==="individual"&&u.message?I.jsx("div",{className:oe(r,`${Z}-message`,e?"standalone":"embedded",{error:u.message.name.includes("error")}),children:I.jsx(hb,{id:u.message.id,globalClassName:r,isWidgetStandalone:e,message:u.message,resetConversationMessage:o,handleSuggestionClick:n})},u.message.id):null)},pb=()=>{const{globalClassName:e,themeVariables:t}=sr(),{status:n}=Vo(),{copilot:r,messages:o,groupedMessages:u,isLoading:a,handleUserInput:c,handleSuggestion:f}=li(),{isOpen:h}=n||{},m=W.useRef(null);return W.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:I.jsxs("div",{className:oe(e,`${Z}-container`,`${Z}-embedded-chat`),style:t,children:[I.jsxs("div",{className:oe(e,`${Z}-message-container`,"embedded"),children:[I.jsx(Bh,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:f}),a&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(Fl,{})}),I.jsx("div",{ref:m})]}),I.jsx(Wf,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:c}),I.jsx("div",{className:oe(`${Z}-embedded-chat-menu`),children:I.jsx(Id,{componentType:"chat",children:I.jsx(tE,{componentType:"chat"})})})]}):I.jsx("div",{children:"Loading Copilot..."})},[R5,L5]=Ps({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),D5=e=>o1()(e,["lazyMount","unmountOnExit"]),[F5,Au]=Ps({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=W.forwardRef((e,t)=>{const n=Au(),r=L5(),o=hd(ye(U({},r),{present:n.open})),u=ar(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:I.jsx(ci.div,ye(U({},u),{ref:Ja(o.ref,t)}))});mb.displayName="DialogBackdrop";const Uh=W.forwardRef((e,t)=>{const n=Au(),r=Go(),o=ar(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:I.jsx(ci.div,ye(U({},o),{ref:Ja(r.ref,t)}))});Uh.displayName="DialogContent";const Hh=W.forwardRef((e,t)=>{const n=Au(),r=ar(n.getDescriptionProps(),e);return I.jsx(ci.div,ye(U({},r),{ref:t}))});Hh.displayName="DialogDescription";const zh=W.forwardRef((e,t)=>{const n=Au(),r=ar(n.getPositionerProps(),e);return Go().unmounted?null:I.jsx(ci.div,ye(U({},r),{ref:t}))});zh.displayName="DialogPositioner";var M5=Rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),es=M5.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},$h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Bl=e=>e.getById(jh(e)),B5=e=>e.getById(gb(e)),U5=e=>e.getById(Eb(e)),H5=e=>e.getById(yb(e)),z5=e=>e.getById($h(e)),j5=e=>e.getById(Vh(e)),$5=e=>e.getById(Tb(e));function V5(e,t){const{state:n,send:r,context:o,prop:u,scope:a}=e,c=u("aria-label"),f=n.matches("open");return{open:f,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ye(U({},es.trigger.attrs),{dir:u("dir"),id:yb(a),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":jh(a),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ye(U({},es.backdrop.attrs),{dir:u("dir"),hidden:!f,id:Eb(a),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({},es.positioner.attrs),{dir:u("dir"),id:gb(a),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ye(U({},es.content.attrs),{dir:u("dir"),role:u("role"),hidden:!f,id:jh(a),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:$h(a),"aria-describedby":h.description?Vh(a):void 0}))},getTitleProps(){return t.element(ye(U({},es.title.attrs),{dir:u("dir"),id:$h(a)}))},getDescriptionProps(){return t.element(ye(U({},es.description.attrs),{dir:u("dir"),id:Vh(a)}))},getCloseTriggerProps(){return t.button(ye(U({},es.closeTrigger.attrs),{dir:u("dir"),id:Tb(a),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var q5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>$5(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return H1(()=>Bl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[H5(e)],onInteractOutside(o){var u;(u=n("onInteractOutside"))==null||u(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var u;(u=n("onEscapeKeyDown"))==null||u(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return q1(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?$1(()=>Bl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,u;return(u=(o=t("finalFocusEl"))==null?void 0:o())!=null?u:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?I1(()=>[Bl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){_n(()=>{e.set("rendered",{title:!!z5(t),description:!!j5(t)})})},syncZIndex({scope:e}){_n(()=>{const t=Bl(e);if(!t)return;const n=Wa(t);[B5(e),U5(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ld()(["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 Y5=e=>{const t=W.useId(),{getRootNode:n}=Od(),{dir:r}=X1(),o=U({id:t,getRootNode:n,dir:r},e),u=cd(q5,o);return V5(u,n1)},bb=e=>{const[t,c]=u1(e),f=c,{children:n}=f,r=Xt(f,["children"]),[o]=D5(t),u=Y5(r),a=hd(ar({present:u.open},t));return I.jsx(F5,{value:u,children:I.jsx(R5,{value:o,children:I.jsx(r1,{value:a,children:n})})})},qh=W.forwardRef((e,t)=>{const n=Au(),r=ar(n.getTitleProps(),e);return I.jsx(ci.h2,ye(U({},r),{ref:t}))});qh.displayName="DialogTitle";const _b=e=>{var f;const{children:t,disabled:n}=e,[r,o]=W.useState((f=e.container)==null?void 0:f.current),u=W.useSyncExternalStore(G5,()=>!1,()=>!0),{getRootNode:a}=Od();if(W.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),u||n)return I.jsx(I.Fragment,{children:t});const c=r!=null?r:W5(a);return I.jsx(I.Fragment,{children:W.Children.map(t,h=>Qa.createPortal(h,c))})},W5=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Vi(n)?n:Sr(t).body},G5=()=>()=>{},K5=()=>{const{dialogPosition:e}=Vo(),t=e==="bottom-left",n=()=>{og(t?"bottom-right":"bottom-left")},r=t?MN:FN,o=t?"Move right":"Move left";return I.jsxs("button",{className:oe(`${Z}-overflow-menu-button`,"left-right-toggle-button","dialog"),onClick:n,children:[I.jsx(r,{}),o]})},xb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=sr(),{mode:o,status:u,dialogPosition:a}=Vo(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=li(),T=W.useRef(null),{isOpen:_}=u||{},S=o==="standalone";W.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{Ma(!1)};return!_||h.length===0?null:c?I.jsx(bb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:I.jsx(_b,{children:I.jsx(zh,{className:oe(n,`${Z}-container`,`${Z}-dialog`,a),style:r,children:I.jsxs(Uh,{className:oe(n,`${Z}-dialog-content`,{standalone:S,embedded:!S}),children:[I.jsxs("div",{className:oe(n,`${Z}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&I.jsx("img",{alt:"",role:"img",className:oe(n,`${Z}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),I.jsx(qh,{className:oe(n,`${Z}-dialog-title`,{standalone:S,embedded:!S}),children:t}),I.jsxs("div",{className:oe(n,`${Z}-dialog-controls`),children:[I.jsx(tE,{componentType:"dialog",isIcon:!0}),I.jsx(Id,{componentType:"dialog",children:I.jsx(K5,{})}),I.jsx(eE,{className:`dialog ${n}`,onClick:C})]})]}),I.jsxs(Hh,{className:oe(n,`${Z}-message-container`,{standalone:S,embedded:!S}),children:[I.jsx(Bh,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(Fl,{})}),I.jsx("div",{ref:T})]}),I.jsx(Wf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):I.jsx("div",{children:"Loading Copilot..."})},Sb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=sr(),{mode:o,status:u,isModalFullscreen:a,previousComponentType:c}=Vo(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=li(),_=W.useRef(null),{isOpen:S}=u||{},C=o==="standalone";W.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const k=({open:q})=>{Ma(q)},M=()=>{sg(!a)},D=()=>{Vf(c||"dialog")},G=()=>{Ma(!1)};return!S||m.length===0?null:f?I.jsx(bb,{lazyMount:!0,open:S,onOpenChange:k,children:I.jsx(_b,{children:I.jsxs("div",{className:oe(n,`${Z}-modal-container`),style:r,children:[I.jsx(mb,{className:oe(n,`${Z}-modal-backdrop`)}),I.jsx(zh,{className:oe(n,`${Z}-container`,`${Z}-modal`,{fullscreen:a,standalone:C,embedded:!C}),children:I.jsxs(Uh,{className:oe(n,`${Z}-modal-content`,{standalone:C,embedded:!C}),children:[I.jsxs("div",{className:oe(n,`${Z}-modal-header`,{standalone:C,embedded:!C}),children:[e&&I.jsx("img",{alt:"",role:"img",className:oe(n,`${Z}-modal-logo`,{standalone:C,embedded:!C}),src:e}),I.jsx(qh,{className:oe(n,`${Z}-modal-title`,{standalone:C,embedded:!C}),children:t}),I.jsxs("div",{className:oe(n,`${Z}-modal-controls`),children:[I.jsx(ja,{ariaLabel:"Toggle Fullscreen",className:oe(n,`${Z}-modal-fullscreen-button`),icon:a?I.jsx(aA,{}):I.jsx(lA,{}),onClick:M}),I.jsx(ja,{ariaLabel:"Toggle Dialog",className:oe(n,`${Z}-modal-toggle-dialog-button`),onClick:D,icon:I.jsx(zN,{})}),I.jsx(Id,{componentType:"modal"}),I.jsx(eE,{className:`modal ${n}`,onClick:G})]})]}),I.jsxs(Hh,{className:oe(n,`${Z}-message-container`,{standalone:C,embedded:!C}),children:[I.jsx(Bh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:I.jsx(Fl,{})}),I.jsx("div",{ref:_})]}),I.jsx(Wf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):I.jsx("div",{children:"Loading Copilot..."})},Q5=()=>{const e=Vo(),{status:{type:t}}=e||{status:{}};return t==="dialog"?I.jsx(xb,{}):t==="modal"?I.jsx(Sb,{}):I.jsx(pb,{})},Yh=e=>I.jsx(Ag,ye(U({},e),{children:I.jsx(Q5,{})}));var Ul={},wb;function X5(){if(wb)return Ul;wb=1;var e=Jg();return Ul.createRoot=e.createRoot,Ul.hydrateRoot=e.hydrateRoot,Ul}var Cb=X5();const J5=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=Xt(o,["elementId","timeout"]);let u;const a=(f,h)=>{var m;for(const E of f)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(ws(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(u),(m=Cb.createRoot(b))==null||m.render(I.jsx(Yh,U({},n))))},c=new MutationObserver(a);return c.observe(document.body,{childList:!0,subtree:!0}),u=setTimeout(()=>{c.disconnect(),ws(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},Z5=r=>{var o=r,{timeout:e,elementId:t}=o,n=Xt(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ws(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const u=document.getElementById(t);if(!u){ws(!0,"warn","Container element not found for id:",t),ws(!0,"warn","Beginning observation for element"),J5(U({elementId:t,timeout:e},n));return}Cb.createRoot(u).render(I.jsx(Yh,U({},n)))},e8={search:FC,browse:MC,pdp:{setPdpContext:UC,updatePdpProductId:HC,updatePdpLink:zC},components:{toggleWidgetOpen:Ma,toggleModalFullscreen:sg,setWidgetType:Vf,setWidgetDialogPosition:og},session:jC},t8={search:gt.state,browse:mt.state,pdp:Vr.state,isConnected:It.state.connected};Oe.CopilotDialog=xb,Oe.CopilotEmbed=pb,Oe.CopilotModal=Sb,Oe.CopilotWidget=Yh,Oe.WidgetProvider=Ag,Oe.eventHandlers=e8,Oe.injectCopilotWidget=Z5,Oe.state=t8,Oe.useCopilot=li,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
|